Skip to content

Commit 9534d53

Browse files
committed
chore: update implementation
1 parent d0c58bd commit 9534d53

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pkg/golinters/forcetypeassert/forcetypeassert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ func New() *goanalysis.Linter {
1515
"finds forced type assertions",
1616
[]*analysis.Analyzer{a},
1717
nil,
18-
).WithLoadMode(goanalysis.LoadModeSyntax)
18+
).WithLoadMode(goanalysis.LoadModeTypesInfo)
1919
}

pkg/lint/lintersdb/builder_linter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
304304
linter.NewConfig(forcetypeassert.New()).
305305
WithSince("v1.38.0").
306306
WithPresets(linter.PresetStyle).
307+
WithLoadForGoAnalysis().
307308
WithURL("https://github.com/gostaticanalysis/forcetypeassert"),
308309

309310
linter.NewConfig(fatcontext.New(&cfg.LintersSettings.Fatcontext)).

0 commit comments

Comments
 (0)