rename golangci-lint config file and use golangci-lint-action to lint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>pull/7595/head
parent
27392d3411
commit
bc1e88cb27
|
@ -6,17 +6,15 @@ jobs:
|
||||||
name: Run Linter Check
|
name: Run Linter Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check out the code
|
||||||
- name: Set up Go
|
uses: actions/checkout@v4
|
||||||
uses: actions/setup-go@v5
|
- name: Set up Go
|
||||||
with:
|
uses: actions/setup-go@v5
|
||||||
go-version: '1.22'
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
- name: Check out the code
|
id: go
|
||||||
uses: actions/checkout@v4
|
- name: Linter check
|
||||||
|
uses: golangci/golangci-lint-action@v6
|
||||||
- name: golangci-lint
|
with:
|
||||||
uses: golangci/golangci-lint-action@v6
|
version: v1.57.2
|
||||||
with:
|
args: --verbose
|
||||||
version: v1.57.2
|
|
||||||
args: --out-format=colored-line-number
|
|
||||||
|
|
|
@ -36,7 +36,9 @@ run:
|
||||||
# output configuration options
|
# output configuration options
|
||||||
output:
|
output:
|
||||||
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
|
# 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 lines of code with issue, default is true
|
||||||
print-issued-lines: true
|
print-issued-lines: true
|
||||||
|
@ -250,6 +252,7 @@ linters-settings:
|
||||||
enable:
|
enable:
|
||||||
- empty
|
- empty
|
||||||
- len
|
- len
|
||||||
|
- nil-compare
|
||||||
testpackage:
|
testpackage:
|
||||||
# regexp pattern to skip files
|
# regexp pattern to skip files
|
||||||
skip-regexp: (export|internal)_test\.go
|
skip-regexp: (export|internal)_test\.go
|
||||||
|
@ -410,4 +413,4 @@ severity:
|
||||||
rules:
|
rules:
|
||||||
- linters:
|
- linters:
|
||||||
- dupl
|
- dupl
|
||||||
severity: info
|
severity: info
|
||||||
|
|
Loading…
Reference in New Issue