Skip to content

Commit 3ee39db

Browse files
authored
Exclude routers/private/tests from air (#29949)
Exclude this and reformat the toml option to multiline. I wasn't able to get `exclude_regex` to work so it would include a `tests` directory anywhere. I think that option only works on files.
1 parent d4cd988 commit 3ee39db

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.air.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ delay = 1000
88
include_ext = ["go", "tmpl"]
99
include_file = ["main.go"]
1010
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
11-
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
11+
exclude_dir = [
12+
"models/fixtures",
13+
"models/migrations/fixtures",
14+
"modules/avatar/identicon/testdata",
15+
"modules/avatar/testdata",
16+
"modules/git/tests",
17+
"modules/migration/file_format_testdata",
18+
"routers/private/tests",
19+
"services/gitdiff/testdata",
20+
]
1221
exclude_regex = ["_test.go$", "_gen.go$"]
1322
stop_on_error = true

0 commit comments

Comments
 (0)