Skip to content

Commit 0051d73

Browse files
authored
relayer: bump common for config fix (#659)
1 parent bce49d5 commit 0051d73

39 files changed

+1616
-1227
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ jobs:
9999
contents: read
100100
needs: [golangci-lint-version]
101101
steps:
102+
- name: Free Disk Space
103+
uses: smartcontractkit/.github/actions/free-disk-space@free-disk-space/v1
102104
- name: Checkout sources
103105
uses: actions/checkout@v5
104106
with:

.golangci.yml

Lines changed: 150 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,159 @@
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-starknet
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/go-gorm/gorm
29+
desc: Use github.com/jmoiron/sqlx directly instead
30+
- pkg: github.com/gofrs/uuid
31+
desc: Use github.com/google/uuid instead
32+
- pkg: github.com/pkg/errors
33+
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
34+
- pkg: github.com/satori/go.uuid
35+
desc: Use github.com/google/uuid instead
36+
- pkg: github.com/test-go/testify/assert
37+
desc: Use github.com/stretchr/testify/assert instead
38+
- pkg: github.com/test-go/testify/mock
39+
desc: Use github.com/stretchr/testify/mock instead
40+
- pkg: github.com/test-go/testify/require
41+
desc: Use github.com/stretchr/testify/require instead
42+
- pkg: go.uber.org/multierr
43+
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
44+
- pkg: gopkg.in/guregu/null.v1
45+
desc: Use gopkg.in/guregu/null.v4 instead
46+
- pkg: gopkg.in/guregu/null.v2
47+
desc: Use gopkg.in/guregu/null.v4 instead
48+
- pkg: gopkg.in/guregu/null.v3
49+
desc: Use gopkg.in/guregu/null.v4 instead
50+
- pkg: github.com/go-gorm/gorm
51+
desc: Use github.com/jmoiron/sqlx directly instead
52+
errorlint:
53+
errorf: false
54+
exhaustive:
55+
default-signifies-exhaustive: true
56+
gosec:
57+
excludes:
58+
- G101
59+
- G104
60+
govet:
61+
enable:
62+
- shadow
63+
settings:
64+
printf:
65+
funcs:
66+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugf
67+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infof
68+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnf
69+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorf
70+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicf
71+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalf
72+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationf
73+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracef
74+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalf
75+
loggercheck:
76+
rules:
77+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugw
78+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infow
79+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnw
80+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorw
81+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicw
82+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalw
83+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationw
84+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracew
85+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalw
86+
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).With
87+
revive:
88+
confidence: 0.8
89+
rules:
90+
- name: blank-imports
91+
- name: context-as-argument
92+
- name: context-keys-type
93+
- name: dot-imports
94+
- name: error-return
95+
- name: error-strings
96+
- name: error-naming
97+
- name: exported
98+
- name: if-return
99+
- name: increment-decrement
100+
- name: var-naming
101+
- name: var-declaration
102+
- name: package-comments
103+
- name: range
104+
- name: receiver-naming
105+
- name: time-naming
106+
- name: indent-error-flow
107+
- name: errorf
108+
- name: empty-block
109+
- name: superfluous-else
110+
- name: unreachable-code
111+
- name: redefines-builtin-id
112+
- name: waitgroup-by-value
113+
- name: unconditional-recursion
114+
- name: struct-tag
115+
- name: string-of-int
116+
- name: range-val-address
117+
- name: range-val-in-closure
118+
- name: modifies-value-receiver
119+
- name: modifies-parameter
120+
- name: identical-branches
121+
- name: get-return
122+
- name: early-return
123+
- name: defer
124+
- name: constant-logical-expr
125+
- name: bool-literal-in-expr
126+
- name: atomic
127+
exclusions:
128+
generated: lax
129+
presets:
130+
- comments
131+
- common-false-positives
132+
- legacy
133+
- std-error-handling
102134
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/go-gorm/gorm"
109-
desc: Use github.com/jmoiron/sqlx directly instead
110-
- pkg: "github.com/gofrs/uuid"
111-
desc: Use github.com/google/uuid instead
112-
- pkg: "github.com/pkg/errors"
113-
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
114-
- pkg: "github.com/satori/go.uuid"
115-
desc: Use github.com/google/uuid instead
116-
- pkg: "github.com/test-go/testify/assert"
117-
desc: Use github.com/stretchr/testify/assert instead
118-
- pkg: "github.com/test-go/testify/mock"
119-
desc: Use github.com/stretchr/testify/mock instead
120-
- pkg: "github.com/test-go/testify/require"
121-
desc: Use github.com/stretchr/testify/require instead
122-
- pkg: "go.uber.org/multierr"
123-
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join
124-
- pkg: "gopkg.in/guregu/null.v1"
125-
desc: Use gopkg.in/guregu/null.v4 instead
126-
- pkg: "gopkg.in/guregu/null.v2"
127-
desc: Use gopkg.in/guregu/null.v4 instead
128-
- pkg: "gopkg.in/guregu/null.v3"
129-
desc: Use gopkg.in/guregu/null.v4 instead
130-
- pkg: github.com/go-gorm/gorm
131-
desc: Use github.com/jmoiron/sqlx directly instead
132-
loggercheck:
133-
# Check that *w logging functions have even number of args (i.e., well formed key-value pairs).
134-
rules:
135-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugw
136-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infow
137-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnw
138-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorw
139-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicw
140-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalw
141-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationw
142-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracew
143-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalw
144-
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).With
145-
issues:
146-
exclude-rules:
147-
- path: test
148-
text: "^G404:"
149-
linters:
150-
- gosec
151-
# TODO: re-add gpp op file once we integrate into workflows
152-
- path: "common/gauntlet_plus_plus_common.go"
153-
text: ".*"
154-
linters:
155-
- unused
135+
- linters:
136+
- gosec
137+
path: test
138+
text: '^G404:'
139+
- linters:
140+
- unused
141+
path: common/gauntlet_plus_plus_common.go
142+
text: .*
143+
paths:
144+
- third_party$
145+
- builtin$
146+
- examples$
147+
formatters:
148+
enable:
149+
- goimports
150+
settings:
151+
goimports:
152+
local-prefixes:
153+
- github.com/smartcontractkit/chainlink-starknet
154+
exclusions:
155+
generated: lax
156+
paths:
157+
- third_party$
158+
- builtin$
159+
- examples$

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python 3.9.13
66

77
# Tools
88
mockery 2.53.0
9-
golangci-lint 1.62.2
9+
golangci-lint 2.6.2
1010
actionlint 1.6.12
1111
shellcheck 0.8.0
1212
scarb 2.9.2

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ format-ts-check:
176176

177177
.PHONY: lint-go-ops
178178
lint-go-ops:
179-
cd ./ops && golangci-lint --config ../.golangci.yml --color=always --out-format checkstyle run > golangci-lint-ops-report.xml
179+
cd ./ops && golangci-lint --config ../.golangci.yml --color=always --output.checkstyle.path ./ops/golangci-lint-ops-report.xml run
180180

181181
.PHONY: lint-go-relayer
182182
lint-go-relayer:
183-
cd ./relayer && golangci-lint --config ../.golangci.yml --color=always --out-format checkstyle run --fix
183+
cd ./relayer && golangci-lint --config ../.golangci.yml --color=always --output.checkstyle.path ./relayer/golangci-lint-relayer-report.xml run
184184

185185
.PHONY: lint-go-test
186186
lint-go-test:
187-
cd ./integration-tests && golangci-lint --config ../.golangci.yml --color=always --out-format checkstyle run > golangci-lint-integration-tests-report.xml
187+
cd ./integration-tests && golangci-lint --config ../.golangci.yml --color=always --output.checkstyle.path ./integration-tests/golangci-lint-integration-tests-report.xml run
188188

189189
.PHONY: test-go
190190
test-go: test-unit-go test-unit-go-race test-integration-go

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)