mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
Integrate golangci-lint into automated testing and release. Closes #1336
This commit is contained in:
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@@ -24,6 +24,13 @@ jobs:
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
continue-on-error: true # we dont want to enforce just yet
|
||||
with:
|
||||
version: v1.52.2
|
||||
args: --timeout=15m --config=.golangci.yml
|
||||
|
||||
- name: Fetching Go Cache Paths
|
||||
id: go-cache-paths
|
||||
run: |
|
||||
|
||||
@@ -1,16 +1,42 @@
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- deadcode
|
||||
# default rules
|
||||
- errcheck
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- typecheck
|
||||
- unused
|
||||
- varcheck
|
||||
# other rules
|
||||
- asasalint
|
||||
- asciicheck
|
||||
- bidichk
|
||||
- durationcheck
|
||||
- exportloopref
|
||||
- forbidigo
|
||||
- gocritic
|
||||
- gocheckcompilerdirectives
|
||||
- gosec
|
||||
- makezero
|
||||
- nilerr
|
||||
- nolintlint
|
||||
- reassign
|
||||
- sqlclosecheck
|
||||
- unconvert
|
||||
|
||||
linters-settings:
|
||||
nolintlint:
|
||||
require-explanation: true
|
||||
require-specific: true
|
||||
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- ifElseChain # style
|
||||
- singleCaseSwitch # style & it's actually not a bad idea to use single case switch in some cases
|
||||
- assignOp # style
|
||||
- commentFormatting # style
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
Reference in New Issue
Block a user