Skip to content

Commit

Permalink
Upgrade golangci-lint versions, update config, remove double linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hoenn committed Feb 12, 2024
1 parent 7ca815e commit fa7109d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
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: v1.46.2
version: v1.55.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ jobs:
go-version: ${{ matrix.go }}
- name: Run tests
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOROOT/bin v1.46.2
sudo sysctl -w vm.max_map_count=262144
script/integration-test
7 changes: 4 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ linters-settings:

linters:
enable:
- depguard
- errcheck
- errorlint
- exportloopref
- gocritic
- gocyclo
Expand All @@ -27,14 +27,15 @@ linters:
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unused
- revive
- reassign
- unparam
disable:
- gochecknoglobals # we allow global variables in packages
- gochecknoinits # we allow inits in packages
- goconst # we allow repeated values to go un-const'd
- lll # we allow any line length
- unparam # we allow function calls to name unused parameters
2 changes: 0 additions & 2 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ then
else
go test -v github.com/github/vulcanizer/...
fi

golangci-lint -v run

0 comments on commit fa7109d

Please sign in to comment.