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

Linting: lint more on new code only #764

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
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: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.56
version: v1.63
working-directory: .
only-new-issues: true
args: --timeout 3m
skip-pkg-cache: true
- name: Run shellcheck
Expand Down
29 changes: 12 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,24 @@

run:
timeout: 10m
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
# Include non-test files tagged as test-only.
# Context: https://github.com/ava-labs/avalanchego/pull/3173

issues:
new: true

linters:
disable-all: true
enable:
- copyloopvar
- bidichk
- errorlint
- exptostd
- goimports
- gosimple
- govet
- ineffassign
- gosec
- misspell
- nolintlint
- unconvert
- unused
- wastedassign
- whitespace

linters-settings:
gofmt:
simplify: true
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences
ignore-tests: true
errorlint:
errorf: false
Loading