Skip to content

Commit 68b530b

Browse files
committed
Minor.
1 parent beae549 commit 68b530b

File tree

2 files changed

+161
-149
lines changed

2 files changed

+161
-149
lines changed

chains/solana/.golangci.yml

Lines changed: 159 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,168 @@
1-
run:
2-
timeout: 15m0s
1+
version: "2"
32
linters:
43
enable:
5-
- exhaustive
4+
- containedctx
65
- copyloopvar
7-
- revive
8-
- goimports
6+
- depguard
7+
- errorlint
8+
- exhaustive
9+
- fatcontext
910
- gosec
11+
- loggercheck
12+
- mirror
1013
- misspell
14+
- noctx
15+
- revive
1116
- rowserrcheck
12-
- errorlint
13-
- unconvert
1417
- sqlclosecheck
15-
- noctx
18+
- unconvert
1619
- whitespace
17-
- depguard
18-
- containedctx
19-
- fatcontext
20-
- mirror
21-
- loggercheck
22-
linters-settings:
23-
exhaustive:
24-
default-signifies-exhaustive: true
25-
goimports:
26-
local-prefixes: github.com/smartcontractkit/chainlink-ccip/chains/solana
27-
golint:
28-
min-confidence: 1.0
29-
gosec:
30-
excludes:
31-
- G101
32-
- G104
33-
# - G204
34-
# - G304
35-
# - G404
36-
govet:
37-
enable:
38-
- shadow
39-
settings:
40-
printf:
41-
# Additionally check custom logger
42-
funcs:
43-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugf
44-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infof
45-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnf
46-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorf
47-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicf
48-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalf
49-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationf
50-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracef
51-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalf
52-
errorlint:
53-
# Allow formatting of errors without %w
54-
errorf: false
55-
revive:
56-
confidence: 0.8
57-
rules:
58-
- name: blank-imports
59-
- name: context-as-argument
60-
- name: context-keys-type
61-
- name: dot-imports
62-
- name: error-return
63-
- name: error-strings
64-
- name: error-naming
65-
- name: exported
66-
- name: if-return
67-
- name: increment-decrement
68-
- name: var-naming
69-
- name: var-declaration
70-
- name: package-comments
71-
- name: range
72-
- name: receiver-naming
73-
- name: time-naming
74-
# - name: unexported-return
75-
- name: indent-error-flow
76-
- name: errorf
77-
- name: empty-block
78-
- name: superfluous-else
79-
# - name: unused-parameter
80-
- name: unreachable-code
81-
- name: redefines-builtin-id
82-
- name: waitgroup-by-value
83-
- name: unconditional-recursion
84-
- name: struct-tag
85-
# - name: string-format
86-
- name: string-of-int
87-
- name: range-val-address
88-
- name: range-val-in-closure
89-
- name: modifies-value-receiver
90-
- name: modifies-parameter
91-
- name: identical-branches
92-
- name: get-return
93-
# - name: flag-parameter
94-
- name: early-return
95-
- name: defer
96-
- name: constant-logical-expr
97-
# - name: confusing-naming
98-
# - name: confusing-results
99-
- name: bool-literal-in-expr
100-
- name: atomic
101-
depguard:
20+
settings:
21+
depguard:
22+
rules:
23+
main:
24+
list-mode: lax
25+
deny:
26+
- pkg: cosmossdk.io/errors
27+
desc: Use the standard library instead
28+
- pkg: github.com/ethereum/go-ethereum
29+
desc: This is chain must be isolated from ethereum
30+
- pkg: github.com/go-gorm/gorm
31+
desc: Use github.com/jmoiron/sqlx directly instead
32+
- pkg: github.com/gofrs/uuid
33+
desc: Use github.com/google/uuid instead
34+
- pkg: github.com/pkg/errors
35+
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
36+
- pkg: github.com/satori/go.uuid
37+
desc: Use github.com/google/uuid instead
38+
- pkg: github.com/test-go/testify/assert
39+
desc: Use github.com/stretchr/testify/assert instead
40+
- pkg: github.com/test-go/testify/mock
41+
desc: Use github.com/stretchr/testify/mock instead
42+
- pkg: github.com/test-go/testify/require
43+
desc: Use github.com/stretchr/testify/require instead
44+
- pkg: go.uber.org/multierr
45+
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
46+
- pkg: gopkg.in/guregu/null.v1
47+
desc: Use gopkg.in/guregu/null.v4 instead
48+
- pkg: gopkg.in/guregu/null.v2
49+
desc: Use gopkg.in/guregu/null.v4 instead
50+
- pkg: gopkg.in/guregu/null.v3
51+
desc: Use gopkg.in/guregu/null.v4 instead
52+
- pkg: github.com/go-gorm/gorm
53+
desc: Use github.com/jmoiron/sqlx directly instead
54+
errorlint:
55+
errorf: false
56+
exhaustive:
57+
default-signifies-exhaustive: true
58+
gosec:
59+
excludes:
60+
- G101
61+
- G104
62+
govet:
63+
enable:
64+
- shadow
65+
settings:
66+
printf:
67+
funcs:
68+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugf
69+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infof
70+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnf
71+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorf
72+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicf
73+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalf
74+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationf
75+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracef
76+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalf
77+
loggercheck:
78+
rules:
79+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugw
80+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infow
81+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnw
82+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorw
83+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicw
84+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalw
85+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationw
86+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracew
87+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalw
88+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).With
89+
revive:
90+
confidence: 0.8
91+
rules:
92+
- name: blank-imports
93+
- name: context-as-argument
94+
- name: context-keys-type
95+
- name: dot-imports
96+
- name: error-return
97+
- name: error-strings
98+
- name: error-naming
99+
- name: exported
100+
- name: if-return
101+
- name: increment-decrement
102+
- name: var-naming
103+
- name: var-declaration
104+
- name: package-comments
105+
- name: range
106+
- name: receiver-naming
107+
- name: time-naming
108+
- name: indent-error-flow
109+
- name: errorf
110+
- name: empty-block
111+
- name: superfluous-else
112+
- name: unreachable-code
113+
- name: redefines-builtin-id
114+
- name: waitgroup-by-value
115+
- name: unconditional-recursion
116+
- name: struct-tag
117+
- name: string-of-int
118+
- name: range-val-address
119+
- name: range-val-in-closure
120+
- name: modifies-value-receiver
121+
- name: modifies-parameter
122+
- name: identical-branches
123+
- name: get-return
124+
- name: early-return
125+
- name: defer
126+
- name: constant-logical-expr
127+
- name: bool-literal-in-expr
128+
- name: atomic
129+
exclusions:
130+
generated: lax
131+
presets:
132+
- comments
133+
- common-false-positives
134+
- legacy
135+
- std-error-handling
102136
rules:
103-
main:
104-
list-mode: lax
105-
deny:
106-
- pkg: "cosmossdk.io/errors"
107-
desc: Use the standard library instead
108-
- pkg: "github.com/ethereum/go-ethereum"
109-
desc: This is chain must be isolated from ethereum
110-
- pkg: "github.com/go-gorm/gorm"
111-
desc: Use github.com/jmoiron/sqlx directly instead
112-
- pkg: "github.com/gofrs/uuid"
113-
desc: Use github.com/google/uuid instead
114-
- pkg: "github.com/pkg/errors"
115-
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
116-
- pkg: "github.com/satori/go.uuid"
117-
desc: Use github.com/google/uuid instead
118-
- pkg: "github.com/test-go/testify/assert"
119-
desc: Use github.com/stretchr/testify/assert instead
120-
- pkg: "github.com/test-go/testify/mock"
121-
desc: Use github.com/stretchr/testify/mock instead
122-
- pkg: "github.com/test-go/testify/require"
123-
desc: Use github.com/stretchr/testify/require instead
124-
- pkg: "go.uber.org/multierr"
125-
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
126-
- pkg: "gopkg.in/guregu/null.v1"
127-
desc: Use gopkg.in/guregu/null.v4 instead
128-
- pkg: "gopkg.in/guregu/null.v2"
129-
desc: Use gopkg.in/guregu/null.v4 instead
130-
- pkg: "gopkg.in/guregu/null.v3"
131-
desc: Use gopkg.in/guregu/null.v4 instead
132-
- pkg: github.com/go-gorm/gorm
133-
desc: Use github.com/jmoiron/sqlx directly instead
134-
loggercheck:
135-
# Check that *w logging functions have even number of args (i.e., well formed key-value pairs).
136-
rules:
137-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugw
138-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infow
139-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnw
140-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorw
141-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicw
142-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalw
143-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationw
144-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracew
145-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalw
146-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).With
147-
issues:
148-
exclude-rules:
149-
- path: test
150-
text: "^G404:"
151-
linters:
152-
- gosec
153-
- path: _test.go
154-
text: "G115:" # ignore integer overflow in test conversions
155-
linters:
156-
- gosec
137+
- linters:
138+
- gosec
139+
path: test
140+
text: '^G404:'
141+
- linters:
142+
- gosec
143+
path: _test.go
144+
text: 'G115:'
145+
- linters:
146+
- revive
147+
text: "dot-imports"
148+
paths:
149+
- third_party$
150+
- builtin$
151+
- examples$
152+
formatters:
153+
enable:
154+
- goimports
155+
settings:
156+
goimports:
157+
local-prefixes:
158+
- github.com/smartcontractkit/chainlink-ccip/chains/solana
159+
exclusions:
160+
generated: lax
161+
paths:
162+
- third_party$
163+
- builtin$
164+
- examples$
165+
output:
166+
formats:
167+
checkstyle:
168+
path: ./golangci-lint-report.xml

chains/solana/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ rust-tests:
3333

3434
.PHONY: lint-go
3535
lint-go:
36-
golangci-lint --max-issues-per-linter 0 --max-same-issues 0 --color=always --exclude=dot-imports --timeout 15m --out-format checkstyle:golangci-lint-report.xml run
36+
golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 --color=always --timeout 15m
3737

3838
.PHONY: lint-go-fix
3939
lint-go-fix:
40-
golangci-lint --max-issues-per-linter 0 --max-same-issues 0 --color=always --exclude=dot-imports --timeout 15m run --verbose --fix
40+
golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 --color=always --timeout 15m run --verbose --fix
4141

4242
.PHONY: anchor-go-gen
4343
anchor-go-gen:

0 commit comments

Comments
 (0)