File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,16 @@ func databaseImport(m dsl.Matcher) {
134
134
Where (m .File ().PkgPath .Matches ("github.com/coder/coder/v2/codersdk" ))
135
135
}
136
136
137
+ // sdkImportFromDB enforces not importing any /codersdk from /database.
138
+ //
139
+ //nolint:unused,deadcode,varnamelen
140
+ func sdkImportFromDB (m dsl.Matcher ) {
141
+ m .Import ("github.com/coder/coder/v2/codersdk" )
142
+ m .Match ("codersdk.$_" ).
143
+ Report ("Do not import any codersdk types into database" ).
144
+ Where (m .File ().PkgPath .Matches ("github.com/coder/coder/v2/coderd/database" ))
145
+ }
146
+
137
147
// doNotCallTFailNowInsideGoroutine enforces not calling t.FailNow or
138
148
// functions that may themselves call t.FailNow in goroutines outside
139
149
// the main test goroutine. See testing.go:834 for why.
You can’t perform that action at this time.
0 commit comments