Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 5 additions & 9 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ jobs:
# exits zero to ensure it does not fail the pull request check.
- name: Count non-blocking issues
run: |
golangci-lint run --config .golangci.next.yaml \
--issues-exit-code 0 \
--max-issues-per-linter 0 \
--max-same-issues 0 \
--out-format json |
jq --sort-keys 'reduce .Issues[] as $i ({}; .[$i.FromLinter] += 1)' |
awk >> "${GITHUB_STEP_SUMMARY}" '
NR == 1 { print "```json" } { print } END { if (NR > 0) print "```" }
' || true
golangci-lint run --config .golangci.next.yaml --show-stats >> "${GITHUB_STEP_SUMMARY}" \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--max-issues-per-linter=0 \
--max-same-issues=0 \
--uniq-by-line=0 \
--output.text.path=/dev/null ||:
122 changes: 0 additions & 122 deletions .golangci.bck.yaml

This file was deleted.

118 changes: 86 additions & 32 deletions .golangci.next.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,98 @@
# https://golangci-lint.run/usage/configuration/
# https://golangci-lint.run/usage/configuration
#
# This file is for linters that might be interesting to enforce in the future.
# Rules that should be enforced immediately belong in [.golangci.yaml].
#
# Both files are used by [.github/workflows/lint.yaml].
version: "2"

# https://golangci-lint.run/usage/linters
linters:
disable-all: true
enable:
- contextcheck
- err113
- gocritic
- godot
- godox
- gofumpt
- gosec # exclude-use-default
- nilnil
default: all
disable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- depguard
- dupword
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exptostd
- fatcontext
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- goheader
- gomoddirectives
- gomodguard
- goprintffuncname
- gosmopolitan
- grouper
- iface
- importas
- interfacebloat
- intrange
- loggercheck
- makezero
- mirror
- misspell
- musttag
- nilerr
- nilnesserr
- noctx
- nolintlint
- predeclared
- revive
- staticcheck # exclude-use-default
- tenv
- thelper
- tparallel
- nosprintfhostport
- prealloc
- promlinter
- protogetter
- reassign
- recvcheck
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- tagalign
- testifylint
- unconvert
- unparam
- usestdlibvars
- usetesting
- wastedassign
presets:
- performance
- wsl
- zerologlint

issues:
exclude-rules:
# We call external linters when they are installed: Flake8, ShellCheck, etc.
- linters: [gosec]
path: '_test[.]go$'
text: 'G204: Subprocess launched with variable'
settings:
thelper:
# https://github.com/kulti/thelper/issues/27
tb: { begin: true, first: true }
test: { begin: true, first: true, name: true }

exclusions:
warn-unused: true
# Ignore built-in exclusions
presets: []
rules:
# We call external linters when they are installed: Flake8, ShellCheck, etc.
- linters: [gosec]
path: '_test[.]go$'
text: 'G204: Subprocess launched with variable'

# https://github.com/golangci/golangci-lint/issues/2239
exclude-use-default: false
# https://golangci-lint.run/usage/formatters
formatters:
enable:
- gofumpt

issues:
# Fix only when requested
fix: false

linters-settings:
thelper:
# https://github.com/kulti/thelper/issues/27
tb: { begin: true, first: true }
test: { begin: true, first: true, name: true }
# Show all issues at once
max-issues-per-linter: 0
max-same-issues: 0
uniq-by-line: false
Loading
Loading