Skip to content

Commit

Permalink
Merge pull request #2524 from Zhupku/mengzezhu/glint160
Browse files Browse the repository at this point in the history
chore: update static.yaml to avoid .golangci.yml dependency
  • Loading branch information
andyzhangx authored Sep 19, 2024
2 parents 9e38fb2 + 4eff9b8 commit 9343d86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: --timeout 10m
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=structcheck,typecheck,staticcheck --timeout=30m0s
22 changes: 0 additions & 22 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
run:
deadline: 30m

linters:
disable:
- typecheck
- structcheck
- staticcheck
enable:
- gofmt
- unused
- ineffassign
- revive
- misspell
- exportloopref
- asciicheck
- bodyclose
- depguard
- dogsled
- durationcheck
- errname
- forbidigo
linters-settings:
depguard:
rules:
Expand Down
5 changes: 2 additions & 3 deletions hack/verify-golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ set -euo pipefail

if [[ -z "$(command -v golangci-lint)" ]]; then
echo "Cannot find golangci-lint. Installing golangci-lint..."
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.0
export PATH=$PATH:$(go env GOPATH)/bin
fi

echo "Verifying golint"
readonly PKG_ROOT="$(git rev-parse --show-toplevel)"

golangci-lint run --config ${PKG_ROOT}/.golangci.yml
golangci-lint run --no-config -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=structcheck,typecheck,staticcheck --timeout=30m0s

echo "Congratulations! Lint check completed for all Go source files."

0 comments on commit 9343d86

Please sign in to comment.