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:
Devon Stewart 2024-06-09 11:37:58 -07:00 committed by GitHub
parent 78f350bd27
commit eb23eaf716
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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,
})
}

View File

@ -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",