Merge pull request #7595 from mmorel-35/golangci-lint-config

organize golangci workflow
pull/7671/head
Xun Jiang/Bruce Jiang 2024-05-16 11:31:13 +08:00 committed by GitHub
commit a0b7382e5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 16 deletions

View File

@ -6,17 +6,15 @@ jobs:
name: Run Linter Check
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Check out the code
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
args: --out-format=colored-line-number
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Linter check
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
args: --verbose

View File

@ -36,7 +36,9 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
formats: colored-line-number
formats:
- format: colored-line-number
path: stdout
# print lines of code with issue, default is true
print-issued-lines: true
@ -250,6 +252,7 @@ linters-settings:
enable:
- empty
- len
- nil-compare
testpackage:
# regexp pattern to skip files
skip-regexp: (export|internal)_test\.go
@ -410,4 +413,4 @@ severity:
rules:
- linters:
- dupl
severity: info
severity: info