File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ func NewLineCache(fc *FileCache) *LineCache {
21
21
}
22
22
}
23
23
24
- // GetLine returns a index1-th (1-based index) line from the file on filePath
24
+ // GetLine returns the index1-th (1-based index) line from the file on filePath
25
25
func (lc * LineCache ) GetLine (filePath string , index1 int ) (string , error ) {
26
26
if index1 == 0 { // some linters, e.g. gosec can do it: it really means first line
27
27
index1 = 1
Original file line number Diff line number Diff line change @@ -49,20 +49,20 @@ type hunkChangesParser struct {
49
49
50
50
func (p * hunkChangesParser ) parseDiffLines (h * diffpkg.Hunk ) {
51
51
lines := bytes .Split (h .Body , []byte {'\n' })
52
- currentOriginalLineNumer := int (h .OrigStartLine )
52
+ currentOriginalLineNumber := int (h .OrigStartLine )
53
53
var ret []diffLine
54
54
55
55
for i , line := range lines {
56
56
dl := diffLine {
57
- originalNumber : currentOriginalLineNumer ,
57
+ originalNumber : currentOriginalLineNumber ,
58
58
}
59
59
60
60
lineStr := string (line )
61
61
62
62
if strings .HasPrefix (lineStr , "-" ) {
63
63
dl .typ = diffLineDeleted
64
64
dl .data = strings .TrimPrefix (lineStr , "-" )
65
- currentOriginalLineNumer ++
65
+ currentOriginalLineNumber ++
66
66
} else if strings .HasPrefix (lineStr , "+" ) {
67
67
dl .typ = diffLineAdded
68
68
dl .data = strings .TrimPrefix (lineStr , "+" )
@@ -74,7 +74,7 @@ func (p *hunkChangesParser) parseDiffLines(h *diffpkg.Hunk) {
74
74
75
75
dl .typ = diffLineOriginal
76
76
dl .data = strings .TrimPrefix (lineStr , " " )
77
- currentOriginalLineNumer ++
77
+ currentOriginalLineNumber ++
78
78
}
79
79
80
80
ret = append (ret , dl )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ func NewGosimple(settings *config.StaticCheckSettings) *goanalysis.Linter {
14
14
15
15
return goanalysis .NewLinter (
16
16
"gosimple" ,
17
- "Linter for Go source code that specializes in simplifying a code" ,
17
+ "Linter for Go source code that specializes in simplifying code" ,
18
18
analyzers ,
19
19
nil ,
20
20
).WithLoadMode (goanalysis .LoadModeTypesInfo )
You can’t perform that action at this time.
0 commit comments