Skip to content

Commit b62fb8c

Browse files
authored
feat: error if typecheck is enabled or disabled (#5543)
1 parent 64c6528 commit b62fb8c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/config/loader.go

+8
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ func (l *Loader) Load(opts LoadOptions) error {
6060
l.cfg.Linters.Exclusions.Generated = GeneratedModeStrict
6161
}
6262

63+
if !l.cfg.InternalCmdTest {
64+
for _, n := range slices.Concat(l.cfg.Linters.Enable, l.cfg.Linters.Disable) {
65+
if n == "typecheck" {
66+
return fmt.Errorf("%s is not a linter, it cannot be enabled or disabled", n)
67+
}
68+
}
69+
}
70+
6371
l.handleFormatters()
6472

6573
if opts.CheckDeprecation {

0 commit comments

Comments
 (0)