Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
evlekht committed Aug 19, 2024
1 parent 26adb8f commit 811f0db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ jobs:
matrix:
go:
- '1.19'
steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Submodules
run: git submodule update --init --recursive
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --timeout 5m
- name: Run static analysis tests
shell: bash
run: scripts/lint.sh
test-and-build:
name: Test and build on Go ${{ matrix.go }}
runs-on: ubuntu-22.04
Expand Down
15 changes: 6 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
run:
max-same-issues: 0
max-issues-per-linter: 0
skip-dirs:
- dependencies

issues:
exclude:
Expand All @@ -29,38 +27,37 @@ linters-settings:
check-exported: false

linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- exportloopref
- goconst
- gocritic
- gocyclo
# - godox
# - godox
- gofmt
# - gofumpt
- goimports
- golint
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- maligned
- misspell
- nakedret
- noctx
- nolintlint
- prealloc
- revive
- rowserrcheck
- scopelint
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
4 changes: 1 addition & 3 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ fi

TARGET="./..."

if ! [ -x "$(command -v golangci-lint)" ]; then
go install -v github.com/golangci/golangci-lint/cmd/[email protected]
fi
go install -v github.com/golangci/golangci-lint/cmd/[email protected]
golangci-lint run --config .golangci.yml

echo "ALL SUCCESS!"

0 comments on commit 811f0db

Please sign in to comment.