Skip to content

Commit 9558920

Browse files
authored
Merge pull request CosmosContracts#243 from CosmosContracts/faddat/golangci
Use golangci-lint
2 parents 1227fc5 + 6f19482 commit 9558920

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
- main
9+
pull_request:
10+
permissions:
11+
contents: read
12+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
13+
# pull-requests: read
14+
jobs:
15+
golangci:
16+
name: lint
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/setup-go@v3
20+
with:
21+
go-version: 1.18
22+
- uses: actions/checkout@v3
23+
- name: golangci-lint
24+
uses: golangci/golangci-lint-action@v3
25+
with:
26+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
27+
version: latest
28+
args: --timeout 10m

.golangci-lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
run:
2+
# timeout for analysis, e.g. 30s, 5m, default is 1m
3+
timeout: 10m
4+
5+
linters:
6+
disable-all: true
7+
enable:
8+
- bodyclose
9+
- deadcode
10+
- depguard
11+
- dogsled
12+
- errcheck
13+
- goconst
14+
- gocritic
15+
- gofumpt
16+
- goimports
17+
- revive
18+
- gosec
19+
- gosimple
20+
- govet
21+
- ineffassign
22+
- misspell
23+
- nakedret
24+
- prealloc
25+
- exportloopref
26+
- staticcheck
27+
- structcheck
28+
- stylecheck
29+
- typecheck
30+
- unconvert
31+
- unused
32+
- unparam
33+
- misspell
34+
35+
36+
linters-settings:
37+
gosec:
38+
excludes:
39+
- G404

0 commit comments

Comments
 (0)