Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf64ac8f

Browse files
authored
chore(scripts/rules.go): ignore db imports in _test.go files (#20406)
This change allows us to stop adding the following for every invokation:```//nolint:gocritic // This is in a test package and does not end up in the build```
1 parent69c2c40 commitf64ac8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎scripts/rules.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ func databaseImport(m dsl.Matcher) {
133133
m.Import("github.com/coder/coder/v2/coderd/database")
134134
m.Match("database.$_").
135135
Report("Do not import any database types into codersdk").
136-
Where(m.File().PkgPath.Matches("github.com/coder/coder/v2/codersdk"))
136+
Where(
137+
m.File().PkgPath.Matches("github.com/coder/coder/v2/codersdk")&&
138+
!m.File().Name.Matches(`_test\.go$`),
139+
)
137140
}
138141

139142
// publishInTransaction detects calls to Publish inside database transactions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp