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

Hygiene: enable additional linters. #731

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .golang-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Documentation: https://golangci-lint.run/usage/configuration/
linters-settings:
linters:
disable-all: true
enable:
- bodyclose
- decorder
Expand All @@ -23,6 +22,23 @@ linters:
- unused
- usestdlibvars
- whitespace
# Enabling presets means that new linters that we automatically adopt new
# linters that augment a preset. This also opts us in for replacement linters
# when a linter is deprecated.
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
output:
uniq-by-line: false
issues:
Expand All @@ -33,6 +49,10 @@ issues:
- gosec
max-issues-per-linter: 0
max-same-issues: 0
include:
# Enable off-by-default rules for revive requiring that all exported elements have a properly formatted comment.
- EXC0012
- EXC0014
run:
issues-exit-code: 1
build-tags:
Expand Down