aboutsummaryrefslogtreecommitdiff
path: root/.golangci.yml
diff options
context:
space:
mode:
authorAbhinav Gupta <mail@abhinavg.net>2023-10-21 16:59:14 -0700
committerGitHub <noreply@github.com>2023-10-21 16:59:14 -0700
commit4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6 (patch)
treed823419085562ed0442d061ffdcb519ebdb410b7 /.golangci.yml
parent5fbb57ed966154dc29730e0ce62824e1b577d8cb (diff)
downloadsally-4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6.tar.gz
ci: Use golangci-lint for linting (#121)
Instead of hand-managing and running linters, use golangci-lint. Along with the golangci-lint defaults, enable a couple other linters we generally agree with. See also uber-go/zap#1323 for a similar change. As a result of this, we can: - Drop the dependabot for tools - Run the lint job in parallel with build/test - Simplify the Makefile
Diffstat (limited to '')
-rw-r--r--.golangci.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..f84e6da
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,28 @@
+output:
+ # Make output more digestible with quickfix in vim/emacs/etc.
+ sort-results: true
+ print-issued-lines: false
+
+linters:
+ enable:
+ - gofumpt
+ - nolintlint
+ - revive
+
+linters-settings:
+ govet:
+ # These govet checks are disabled by default, but they're useful.
+ enable:
+ - niliness
+ - reflectvaluecompare
+ - sortslice
+ - unusedwrite
+
+issues:
+ # Print all issues reported by all linters.
+ max-issues-per-linter: 0
+ max-same-issues: 0
+
+ # Don't ignore some of the issues that golangci-lint considers okay.
+ # This includes documenting all exported entities.
+ exclude-use-default: false