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

Try to get version from go.mod file #118

Merged
merged 2 commits into from Feb 23, 2021

Conversation

lukasmalkmus
Copy link
Contributor

@lukasmalkmus lukasmalkmus commented Oct 27, 2020

This first implementation is a very naive approach: Assuming that the go.mod file is residing in the repository root (and thus the current working directory I guess).

If the version input is not set, the go.mod file is loaded, the version extracted from the github.com/golangci/golangci-lint v1.32.0 line using a regex.

Closes #106.

Copy link
Member

@SVilgelm SVilgelm left a comment

Choose a reason for hiding this comment

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

Could you provide the links to prove, that this works?
comment dist changes (npm run all) then in a test pull request in your project instead of uses: golangci/golangci-lint-action@v2 use uses: lukasmalkmus/golangci-lint-action@go-mod-version
and add the link for that commit here

@lukasmalkmus lukasmalkmus force-pushed the go-mod-version branch 3 times, most recently from 47ea3e8 to 43defbb Compare February 18, 2021 23:47
@lukasmalkmus
Copy link
Contributor Author

@SVilgelm Alright, added the dist changes. Here is a link to a project of mine: https://github.com/lukasmalkmus/expensify-go/runs/1931439340#step:4:12

@SVilgelm
Copy link
Member

@lukasmalkmus Could you please rebase you PR?

@lukasmalkmus
Copy link
Contributor Author

@lukasmalkmus lukasmalkmus force-pushed the go-mod-version branch 2 times, most recently from 6d54b57 to 93a4f6a Compare February 23, 2021 15:47
@SVilgelm SVilgelm requested review from SVilgelm and a team February 23, 2021 16:30
@SVilgelm
Copy link
Member

@golangci/team please review

@SVilgelm SVilgelm merged commit 51485a4 into golangci:master Feb 23, 2021
@SVilgelm
Copy link
Member

released in v2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infer golangci-lint version from go.mod
3 participants