File tree Expand file tree Collapse file tree 8 files changed +169
-130
lines changed
examples/chain/8_OfflineSigning Expand file tree Collapse file tree 8 files changed +169
-130
lines changed Original file line number Diff line number Diff line change 1+ name : golangci-lint
2+ on :
3+ pull_request :
4+ push :
5+ branches : [master, dev]
6+ permissions :
7+ contents : read
8+ # Optional: allow read access to pull request. Use with `only-new-issues` option.
9+ pull-requests : read
10+
11+ jobs :
12+ golangci :
13+ name : lint
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+ - uses : actions/setup-go@v5
18+ with :
19+ go-version-file : " go.mod"
20+ check-latest : true
21+ - name : golangci-lint
22+ uses : golangci/golangci-lint-action@v6
23+ with :
24+ # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
25+ version : latest
26+
27+ # Optional: working directory, useful for monorepos
28+ # working-directory: somedir
29+
30+ # Optional: golangci-lint command line arguments.
31+ args : --timeout=15m -v
32+
33+ # Optional: show only new issues if it's a pull request. The default value is `false`.
34+ only-new-issues : true
35+
36+ # Optional: if set to true then the all caching functionality will be complete disabled,
37+ # takes precedence over all other caching options.
38+ # skip-cache: true
Original file line number Diff line number Diff line change 88 pre-commit :
99 runs-on : ubuntu-latest
1010 steps :
11- - uses : actions/setup-python@v4
1211 - uses : actions/checkout@master
1312 with :
1413 fetch-depth : 2
1514 - uses : actions/setup-go@v5
1615 with :
1716 go-version-file : " go.mod"
1817 check-latest : true
19- - run : go install golang.org/x/tools/cmd/goimports@latest
20- - run : curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0
2118 -
uses :
pre-commit/[email protected]
Original file line number Diff line number Diff line change 1- {
2- " run " : {
3- " tests " : false,
4- " skip-dirs " : [
5- " chain" ,
6- " exchange" ,
7- " proto" ,
8- " client/keyring/testdata"
9- ]
10- },
11- " linters " : {
12- " fast " : false,
13- " enable " : [
14- " errcheck" ,
15- " errorlint" ,
16- " gas" ,
17- " gocritic" ,
18- " gosimple" ,
19- " govet" ,
20- " ineffassign" ,
21- " megacheck" ,
22- " misspell" ,
23- " nakedret" ,
24- " prealloc" ,
25- " revive" ,
26- " staticcheck" ,
27- " unconvert" ,
28- " unparam" ,
29- ],
30- " disable " : [
31- " unused" ,
32- ]
33- },
34- " linters-settings " : {
35- " revive " : {
36- " enableAllRules " : true,
37- " rules " : [
38- {
39- " name " : " var-naming" ,
40- " arguments " : [
41- ["ID"]
42- ]
43- }
44- ]
45- },
46- " gocritic " : {
47- " enabled-tags " : [
48- " diagnostic" ,
49- " experimental" ,
50- " opinionated" ,
51- " performance" ,
52- " style" ,
53- ],
54- " disabled-checks " : [
55- " hugeParam" ,
56- " unnamedResult" ,
57- ]
58- }
59- },
60- }
1+ linters :
2+ fast : false
3+ enable :
4+ - errcheck
5+ - errorlint
6+ - gas
7+ - gocritic
8+ - gofmt
9+ - goimports
10+ - gosimple
11+ - govet
12+ - ineffassign
13+ - megacheck
14+ - misspell
15+ - nakedret
16+ - prealloc
17+ - revive
18+ - staticcheck
19+ - unconvert
20+ - unparam
21+ disable :
22+ - unused
23+
24+ linters-settings :
25+ revive :
26+ enable-all-rules : true
27+ rules :
28+ - name : var-naming
29+ arguments :
30+ - ["ID"]
31+ - name : add-constant
32+ disabled : true
33+ - name : line-length-limit
34+ arguments :
35+ - 140
36+ gocritic :
37+ enabled-tags :
38+ - performance
39+ - diagnostic
40+ - style
41+ - opinionated
42+ - experimental
43+ disabled-checks :
44+ - singleCaseSwitch
45+ - deferInLoop
46+ - hugeParam
47+ - unnamedResult
48+ issues :
49+ exclude-rules :
50+ - linters :
51+ - revive
52+ text : ALL_CAPS
53+ exclude-dirs :
54+ - chain
55+ - exchange
56+ - injective_data
57+ - proto
58+ - client/keyring/testdata
59+ max-issues-per-linter : 0
60+
61+ run :
62+ tests : false
Original file line number Diff line number Diff line change @@ -13,10 +13,3 @@ repos:
1313 - id : end-of-file-fixer
1414 - id : end-of-file-fixer
1515 - id : check-yaml
16- - repo : https://github.com/dnephin/pre-commit-golang
17- rev : master
18- hooks :
19- - id : go-fmt
20- - id : go-imports
21- - id : golangci-lint
22- args : [--timeout=15m]
Original file line number Diff line number Diff line change @@ -151,4 +151,16 @@ tests:
151151coverage :
152152 go test -race -coverprofile=coverage.out -covermode=atomic ./client/... ./ethereum/...
153153
154- .PHONY : copy-exchange-client tests coverage
154+ lint : export GOPROXY=direct
155+ lint :
156+ golangci-lint run --timeout=15m -v --new-from-rev=dev
157+
158+ lint-last-commit : export GOPROXY=direct
159+ lint-last-commit :
160+ golangci-lint run --timeout=15m -v --new-from-rev=HEAD~
161+
162+ lint-master : export GOPROXY=direct
163+ lint-master :
164+ golangci-lint run --timeout=15m -v --new-from-rev=master
165+
166+ .PHONY : copy-exchange-client tests coverage lint lint-last-commit lint-master
You can’t perform that action at this time.
0 commit comments