Skip to content

Commit

Permalink
rename golangci-lint config file and use golangci-lint-action to lint
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed May 5, 2024
1 parent 4d48273 commit 70a46ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/pr-linter-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ 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@v5
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'
- name: Linter check
uses: golangci/golangci-lint-action@v5
with:
version: v1.57.2
args: --verbose
7 changes: 5 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -250,6 +252,7 @@ linters-settings:
enable:
- empty
- len
- nil-compare
testpackage:
# regexp pattern to skip files
skip-regexp: (export|internal)_test\.go
Expand Down Expand Up @@ -411,4 +414,4 @@ severity:
rules:
- linters:
- dupl
severity: info
severity: info

0 comments on commit 70a46ac

Please sign in to comment.