lll: Advertise max line length instead of just reporting failure (#4781)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
78f350bd27
commit
eb23eaf716
@ -121,7 +121,7 @@ func getLLLIssuesForFile(filename string, maxLineLen int, tabSpaces string) ([]r
|
||||
Filename: filename,
|
||||
Line: lineNumber,
|
||||
},
|
||||
Text: fmt.Sprintf("line is %d characters", lineLen),
|
||||
Text: fmt.Sprintf("the line is %d characters long, which exceeds the maximum of %d characters.", lineLen, maxLineLen),
|
||||
FromLinter: linterName,
|
||||
})
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ func TestLineDirective(t *testing.T) {
|
||||
},
|
||||
configPath: "testdata/linedirective/lll.yml",
|
||||
targetPath: "linedirective",
|
||||
expected: "line is 57 characters (lll)",
|
||||
expected: "the line is 57 characters long, which exceeds the maximum of 50 characters. (lll)",
|
||||
},
|
||||
{
|
||||
desc: "misspell",
|
||||
|
Loading…
x
Reference in New Issue
Block a user