generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add golangci-lint as an aspect (#95)
* Add golangci-lint as an aspect * Update .golangci.yaml Paste documentation about the "don't download" option * Address review comments * chore: add golangci-lint to README * chore(golangci-lint): add version placeholder for fetch * chore: remove stray comment * Add lint error * chore: add test assertion for go lint --------- Co-authored-by: Alex Eagle <[email protected]>
- Loading branch information
1 parent
2b7f46f
commit 260ee0f
Showing
18 changed files
with
509 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Refer to golangci-lint's example config file for more options and information: | ||
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml | ||
|
||
run: | ||
timeout: 5m | ||
|
||
# Prevent non-hermetic behavior. Per the documentation: | ||
# > If invoked with -mod=readonly, the go command is disallowed from the implicit | ||
# > automatic updating of go.mod described above. Instead, it fails when any changes | ||
# > to go.mod are needed. This setting is most useful to check that go.mod does | ||
# > not need updates, such as in a continuous integration and testing system. | ||
modules-download-mode: readonly | ||
|
||
linters: | ||
enable: | ||
# Default | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- typecheck | ||
- unused |
This file contains 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
This file contains 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
Oops, something went wrong.