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

Actually use golangci-lint config. #1106

Merged
merged 2 commits into from
Apr 25, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand All @@ -33,7 +33,6 @@ jobs:
# working-directory: somedir

# Optional: golangci-lint command line arguments.
args: --timeout 10m0s

# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
Expand Down
86 changes: 0 additions & 86 deletions .golang-ci.yaml

This file was deleted.

68 changes: 68 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Documentation: https://golangci-lint.run/usage/configuration/
linters:
disable-all: true
enable:
- bodyclose
- containedctx
- decorder
- depguard
- dogsled
- dupl
- dupword
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gomodguard
- gosec
- gosimple
- govet
- ireturn
- maintidx
- makezero
- misspell
- musttag
- nakedret
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- revive
- staticcheck
- thelper
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
output:
uniq-by-line: false
issues:
# Only flag new issues
new: true
exclude-rules:
- path: _test\.go
linters:
- errcheck
- 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 # https://golangci-lint.run/usage/false-positives/#exc0012
- EXC0014 # https://golangci-lint.run/usage/false-positives/#exc0014
run:
issues-exit-code: 1
build-tags:
- e2e
# skip-dirs:
# - vendor
timeout: 20m
modules-download-mode: vendor
Loading