Skip to content

Commit 86bd842

Browse files
authored
chore: spelling and grammar fixes (#2865)
1 parent 907ecf3 commit 86bd842

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/fsutils/linecache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func NewLineCache(fc *FileCache) *LineCache {
2121
}
2222
}
2323

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
2525
func (lc *LineCache) GetLine(filePath string, index1 int) (string, error) {
2626
if index1 == 0 { // some linters, e.g. gosec can do it: it really means first line
2727
index1 = 1

pkg/golinters/gofmt_common.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ type hunkChangesParser struct {
4949

5050
func (p *hunkChangesParser) parseDiffLines(h *diffpkg.Hunk) {
5151
lines := bytes.Split(h.Body, []byte{'\n'})
52-
currentOriginalLineNumer := int(h.OrigStartLine)
52+
currentOriginalLineNumber := int(h.OrigStartLine)
5353
var ret []diffLine
5454

5555
for i, line := range lines {
5656
dl := diffLine{
57-
originalNumber: currentOriginalLineNumer,
57+
originalNumber: currentOriginalLineNumber,
5858
}
5959

6060
lineStr := string(line)
6161

6262
if strings.HasPrefix(lineStr, "-") {
6363
dl.typ = diffLineDeleted
6464
dl.data = strings.TrimPrefix(lineStr, "-")
65-
currentOriginalLineNumer++
65+
currentOriginalLineNumber++
6666
} else if strings.HasPrefix(lineStr, "+") {
6767
dl.typ = diffLineAdded
6868
dl.data = strings.TrimPrefix(lineStr, "+")
@@ -74,7 +74,7 @@ func (p *hunkChangesParser) parseDiffLines(h *diffpkg.Hunk) {
7474

7575
dl.typ = diffLineOriginal
7676
dl.data = strings.TrimPrefix(lineStr, " ")
77-
currentOriginalLineNumer++
77+
currentOriginalLineNumber++
7878
}
7979

8080
ret = append(ret, dl)

pkg/golinters/gosimple.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func NewGosimple(settings *config.StaticCheckSettings) *goanalysis.Linter {
1414

1515
return goanalysis.NewLinter(
1616
"gosimple",
17-
"Linter for Go source code that specializes in simplifying a code",
17+
"Linter for Go source code that specializes in simplifying code",
1818
analyzers,
1919
nil,
2020
).WithLoadMode(goanalysis.LoadModeTypesInfo)

0 commit comments

Comments
 (0)