File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : golangci-lint
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ branches : [main]
8
+
9
+ permissions :
10
+ contents : read
11
+
12
+ jobs :
13
+ golangci :
14
+ name : golangci-lint
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Checkout Code
18
+ uses : actions/checkout@v4
19
+ - name : Setup Go
20
+ uses : actions/setup-go@v5
21
+ with :
22
+ go-version : ' 1.22'
23
+ cache : false
24
+ - name : Run golangci-lint
25
+ uses : golangci/golangci-lint-action@v6
26
+ with :
27
+ version : v1.59
28
+
29
+ # Optional: working directory, useful for monorepos
30
+ # working-directory: somedir
31
+
32
+ # Optional: golangci-lint command line arguments.
33
+ #
34
+ # Note: By default, the `.golangci.yml` file should be at the root of the repository.
35
+ # The location of the configuration file can be changed by using `--config=`
36
+ # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
37
+ args : --verbose
Original file line number Diff line number Diff line change
1
+ run :
2
+ timeout : 5m
3
+ exclude-dirs :
4
+ - vendor
5
+ - examples
6
+
7
+ linters :
8
+ enable :
9
+ - errcheck
10
+ - gocyclo
11
+ - gofmt
12
+ - goimports
13
+ - gosimple
14
+ - govet
15
+ - ineffassign
16
+ - staticcheck
17
+ - unused
18
+
19
+ linters-settings :
20
+ gocyclo :
21
+ min-complexity : 20
You can’t perform that action at this time.
0 commit comments