Skip to content

Commit c5e2be5

Browse files
ci: block chainlink-deployments-framework imports via depguard (#771)
## Summary Enables the `depguard` linter in golangci-lint and denies imports of `github.com/smartcontractkit/chainlink-deployments-framework` (including subpackages). This keeps mcms from depending on chainlink-deployments-framework, which would introduce a circular dependency. ## Why mcms must not import chainlink-deployments-framework because that module already depends on mcms, so adding the import would create a cycle in the dependency graph.
1 parent 2994f8b commit c5e2be5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
- contextcheck
88
- copyloopvar
99
- decorder
10+
- depguard
1011
- dogsled
1112
- dupword
1213
- durationcheck
@@ -40,6 +41,15 @@ linters:
4041
- wastedassign
4142
- whitespace
4243
settings:
44+
depguard:
45+
rules:
46+
no-chainlink-deployments-framework:
47+
list-mode: lax
48+
files:
49+
- $all
50+
deny:
51+
- pkg: github.com/smartcontractkit/chainlink-deployments-framework
52+
desc: must not import chainlink-deployments-framework; it would introduce a circular dependency with mcms
4353
goconst:
4454
min-len: 5
4555
gomoddirectives:

0 commit comments

Comments
 (0)