mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Add linter checks to GHA & Fix code to pass lints
Add linter checks to GHA & Fix code to pass lints. The linters added are: - whitespace: Tool for detection of leading and trailing whitespace - gosec: Inspects source code for security problems - gci: Gci control golang package import order and make it always deterministic - misspell: Finds commonly misspelled English words in comments - gomnd: An analyzer to detect magic numbers The file utils/utils.go is excluded from the checks of gomnd, as uses magic numbers through the code
This commit is contained in:
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -12,5 +12,5 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Lint
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
|
||||
$(go env GOPATH)/bin/golangci-lint run --timeout=5m
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
|
||||
$(go env GOPATH)/bin/golangci-lint run --timeout=5m -E whitespace -E gosec -E gci -E misspell -E gomnd --max-same-issues 0
|
||||
|
||||
Reference in New Issue
Block a user