Support both possible go-critic binary names#50
Closed
mcdonnnj wants to merge 1 commit intoTekWizely:masterfrom
Closed
Support both possible go-critic binary names#50mcdonnnj wants to merge 1 commit intoTekWizely:masterfrom
mcdonnnj wants to merge 1 commit intoTekWizely:masterfrom
Conversation
Even though go-critic is moving to name its binary `go-critic` it will still install as `gocritic` if you do not specifically install the `go-critic` command.
Owner
|
Hi @mcdonnnj and thanks for taking the time to create an issue! I ended up creating a similar PR with a slightly different approach: If you have any time to verify that branch and report back, it would be much appreciated. -TW |
Author
|
Closed in favor of #52. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #45 the expected binary for go-critic was changed from
gocritictogo-criticbased on an effort to change binary names in the go-critic project (go-critic/go-critic#1481 and go-critic/go-critic#1482). However, even now the default binary is stillgocriticif you install the project and not thego-criticcommand specifically. The same is true if you install using brew (per the formula)). Thus it makes sense to check for the legacy binary name (gocritic) and only if it is not found use the newergo-criticname.I verified with
pre-commit try-repothat this works as expected after installing go-critic with brew.