Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infer golangci-lint version from go.mod #106

Closed
lukasmalkmus opened this issue Oct 9, 2020 · 5 comments · Fixed by #118
Closed

Infer golangci-lint version from go.mod #106

lukasmalkmus opened this issue Oct 9, 2020 · 5 comments · Fixed by #118
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Label for hacktoberfest hacktoberfest-accepted hacktoberfest PR help wanted Extra attention is needed

Comments

@lukasmalkmus
Copy link
Contributor

For Go projects, I use tools.go to specify the tools the project depends on and pin the version in the go.mod file. This is pretty convenient. It would be awesome to have the action infer the version from the go.mod file. When upgrading, this makes it one file less to update the golangci-lint version.

With some guidance, I can probably tackle this. I'm just completely new to GitHub Actions.

@sayboras
Copy link
Member

While tools.go is convenient to pin version of dependencies, it might dilute go.mod (or go.sum). I personally used both approach and recently moved away from tools.go. Version pinning is done in Makefile.

Anyway, I have very limited idea how widely tools.go is used. In general, I find it's great idea to derive version from go.mod. This might be done only after #98, which supports patch version.

@sayboras sayboras added enhancement New feature or request good first issue Good for newcomers hacktoberfest Label for hacktoberfest hacktoberfest-accepted hacktoberfest PR help wanted Extra attention is needed labels Oct 11, 2020
@sayboras
Copy link
Member

@lukasmalkmus just curious if you are planning to work on this.

@lukasmalkmus
Copy link
Contributor Author

Yes, sounds great. Wil. try to tackle it next weekend 👍

@sayboras
Copy link
Member

@lukasmalkmus the related PR got merged, feel free to shout out if you have any question/concern.

@lukasmalkmus
Copy link
Contributor Author

Sorry, I haven't really gotten into it, yet. I made a very simple implementation: #118. It tries to get the version from go.mod if nothing is specified in the action yaml. npm run local runs just fine but I would appreciate some guidance regarding testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Label for hacktoberfest hacktoberfest-accepted hacktoberfest PR help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants