From 4285e92596f4e8420953fd2fc00dcd97b7c00825 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 23 Mar 2021 23:56:12 +0100 Subject: [PATCH] remove hardcoded limit for typecheck --- pkg/result/processors/max_per_file_from_linter.go | 5 ++--- test/testdata/notcompiles/typecheck_many_issues.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/result/processors/max_per_file_from_linter.go b/pkg/result/processors/max_per_file_from_linter.go index e83c569ef5e3..e36446c9fc7f 100644 --- a/pkg/result/processors/max_per_file_from_linter.go +++ b/pkg/result/processors/max_per_file_from_linter.go @@ -16,9 +16,8 @@ type MaxPerFileFromLinter struct { var _ Processor = &MaxPerFileFromLinter{} func NewMaxPerFileFromLinter(cfg *config.Config) *MaxPerFileFromLinter { - maxPerFileFromLinterConfig := map[string]int{ - "typecheck": 3, - } + maxPerFileFromLinterConfig := map[string]int{} + if !cfg.Issues.NeedFix { // if we don't fix we do this limiting to not annoy user; // otherwise we need to fix all issues in the file at once diff --git a/test/testdata/notcompiles/typecheck_many_issues.go b/test/testdata/notcompiles/typecheck_many_issues.go index ced4724d9d9e..d2dfc29a77cf 100644 --- a/test/testdata/notcompiles/typecheck_many_issues.go +++ b/test/testdata/notcompiles/typecheck_many_issues.go @@ -5,5 +5,5 @@ func TypeCheckBadCalls() { typecheckNotExists1.F1() // ERROR "undeclared name: `typecheckNotExists1`" typecheckNotExists2.F2() // ERROR "undeclared name: `typecheckNotExists2`" typecheckNotExists3.F3() // ERROR "undeclared name: `typecheckNotExists3`" - typecheckNotExists4.F4() + typecheckNotExists4.F4() // ERROR "undeclared name: `typecheckNotExists4`" }