Skip to content

inky: run stringer with "go run"#95

Merged
maruel merged 1 commit intoperiph:mainfrom
dolmen-go:inky-fix-stringer
Feb 25, 2025
Merged

inky: run stringer with "go run"#95
maruel merged 1 commit intoperiph:mainfrom
dolmen-go:inky-fix-stringer

Conversation

@dolmen
Copy link
Contributor

@dolmen dolmen commented Feb 14, 2025

Run the stringer command (for code generation) using go run instead of go install to avoid affecting the developer's global $GOBIN.

Run stringer command (for code generation) using "go run" instead of "go
install" to avoid affecting the developer's global $GOBIN.
@codecov
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.8%. Comparing base (5bcc204) to head (45c4891).
Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #95   +/-   ##
=====================================
  Coverage   51.8%   51.8%           
=====================================
  Files        102     102           
  Lines      13073   13073           
=====================================
+ Hits        6773    6774    +1     
+ Misses      6008    6007    -1     
  Partials     292     292           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dolmen
Copy link
Contributor Author

dolmen commented Feb 22, 2025

Note that Go 1.24.0 introduces special support for version-locking of build tools such as stringer in go.mod. With that support the single line would be:

//go:generate go tool stringer ...

Of course it is a bit early to require go 1.24.0 in go.mod. I'm just mentionning this for a not-so-near future upgrade.

Copy link
Member

@maruel maruel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@maruel maruel merged commit 321f6f6 into periph:main Feb 25, 2025
10 checks passed
@dolmen dolmen deleted the inky-fix-stringer branch March 18, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments