@@ -23,7 +23,7 @@ func (Lll) Desc() string {
2323 return "Reports long lines"
2424}
2525
26- func (lint Lll ) getIssuesForFile (filename string , maxLineLen int ) ([]result.Issue , error ) {
26+ func (lint Lll ) getIssuesForFile (filename string , maxLineLen int , tabSpaces string ) ([]result.Issue , error ) {
2727 var res []result.Issue
2828
2929 f , err := os .Open (filename )
@@ -36,7 +36,7 @@ func (lint Lll) getIssuesForFile(filename string, maxLineLen int) ([]result.Issu
3636 scanner := bufio .NewScanner (f )
3737 for scanner .Scan () {
3838 line := scanner .Text ()
39- line = strings .Replace (line , "\t " , " " , - 1 )
39+ line = strings .Replace (line , "\t " , tabSpaces , - 1 )
4040 lineLen := utf8 .RuneCountInString (line )
4141 if lineLen > maxLineLen {
4242 res = append (res , result.Issue {
@@ -61,8 +61,9 @@ func (lint Lll) getIssuesForFile(filename string, maxLineLen int) ([]result.Issu
6161
6262func (lint Lll ) Run (ctx context.Context , lintCtx * linter.Context ) ([]result.Issue , error ) {
6363 var res []result.Issue
64+ spaces := strings .Repeat (" " , lintCtx .Settings ().Lll .TabWidth )
6465 for _ , f := range lintCtx .PkgProgram .Files (lintCtx .Cfg .Run .AnalyzeTests ) {
65- issues , err := lint .getIssuesForFile (f , lintCtx .Settings ().Lll .LineLength )
66+ issues , err := lint .getIssuesForFile (f , lintCtx .Settings ().Lll .LineLength , spaces )
6667 if err != nil {
6768 return nil , err
6869 }
0 commit comments