added new rule DL3062 to check go install#1111
Merged
m-ildefons merged 1 commit intohadolint:masterfrom Sep 11, 2025
Merged
Conversation
m-ildefons
approved these changes
Sep 11, 2025
Member
m-ildefons
left a comment
There was a problem hiding this comment.
Hi Danil,
thanks for this. It looks good to me.
Could you please also update the wiki with a page for this rule?
larry-c-ef
reviewed
Sep 22, 2025
| | [DL3059](https://github.com/hadolint/hadolint/wiki/DL3059) | Info | Multiple consecutive `RUN` instructions. Consider consolidation. | | ||
| | [DL3060](https://github.com/hadolint/hadolint/wiki/DL3060) | Info | `yarn cache clean` missing after `yarn install` was run. | | ||
| | [DL3061](https://github.com/hadolint/hadolint/wiki/DL3061) | Error | Invalid instruction order. Dockerfile must begin with `FROM`, `ARG` or comment. | | ||
| | [DL3062](https://github.com/hadolint/hadolint/wiki/DL3061) | Warning | Pin versions in go install. Instead of `go install <package>` use `go install <package>@<version>` | |
There was a problem hiding this comment.
This is the wrong address (https://github.com/hadolint/hadolint/wiki/DL3061). And there is no wiki entry for DL3062.
The error message is not helpful enough, especially given that this rule applies to go get and go run, in addition to go install.
There was a problem hiding this comment.
go get -v ./... makes the lint triggers, so is it not recommended?
1 task
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.
Added a new rule for commands:
go rungo installgo toolNot used
latestversionnoneversion (this leads to deletion)