Skip to content

Commit 61b56d6

Browse files
committed
review
1 parent 88d9ade commit 61b56d6

File tree

8 files changed

+18
-23
lines changed

8 files changed

+18
-23
lines changed

pkg/lint/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ func NewRunner(log logutils.Log, cfg *config.Config, args []string, goenv *gouti
7979
// Must be after FilenameUnadjuster.
8080
processors.NewInvalidIssue(log.Child(logutils.DebugKeyInvalidIssue)),
8181

82-
// Must be before Diff, SkipFiles, SkipDirs, ExcludeRules processors at least.
82+
// Must be before Diff, SkipFiles, SkipDirs, ExcludeRules processors at least.
8383
processors.NewPathPrettifier(log),
8484

85-
// must be after path prettifier
85+
// must be after PathPrettifier.
8686
skipFilesProcessor,
8787
skipDirsProcessor,
8888

pkg/result/processors/autogenerated_exclude.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ type fileSummary struct {
4040
}
4141

4242
// AutogeneratedExclude filters generated files.
43-
// - mode "lax": see [isGeneratedFileLax] documentation.
44-
// - mode "strict": see [isGeneratedFileStrict] documentation.
45-
// - mode "disable": skips this processor.
43+
// - mode "lax": see `isGeneratedFileLax` documentation.
44+
// - mode "strict": see `isGeneratedFileStrict` documentation.
45+
// - mode "disable": skips this processor.
4646
type AutogeneratedExclude struct {
4747
debugf logutils.DebugFunc
4848

pkg/result/processors/diff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var _ Processor = (*Diff)(nil)
2121
// Diff filters issues based on options `new`, `new-from-rev`, etc.
2222
//
2323
// Uses `git`.
24-
// The paths inside the patch are relative to the path where git/golangci-lint is run.
24+
// The paths inside the patch are relative to the path where git is run (the same location where golangci-lint is run).
2525
//
2626
// Warning: it doesn't use `path-prefix` option.
2727
type Diff struct {

pkg/result/processors/exclude_rules.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ type excludeRule struct {
1616
}
1717

1818
// ExcludeRules filters reports based on multiple criteria:
19-
// - linter names (string)
20-
// - file path (regular expressions)
21-
// - text (regular expressions)
22-
// - code source (regular expressions)
19+
// - linter names (string)
20+
// - file path (regular expressions)
21+
// - text (regular expressions)
22+
// - code source (regular expressions)
2323
//
2424
// It uses the shortest relative paths and `path-prefix` option.
2525
type ExcludeRules struct {

pkg/result/processors/invalid_issue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
var _ Processor = (*InvalidIssue)(nil)
1111

1212
// InvalidIssue filters invalid reports.
13-
// - non-go files (except `go.mod`)
14-
// - reports without file path
13+
// - non-go files (except `go.mod`)
14+
// - reports without file path
1515
type InvalidIssue struct {
1616
log logutils.Log
1717
}

pkg/result/processors/severity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type severityRule struct {
2020
}
2121

2222
// Severity modifies report severity.
23-
// It uses the same [baseRule] structure as [ExcludeRules] processor.
23+
// It uses the same `baseRule` structure as [ExcludeRules] processor.
2424
//
2525
// Warning: it doesn't use `path-prefix` option.
2626
type Severity struct {

pkg/result/processors/sort_results.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ import (
1010
"github.com/golangci/golangci-lint/pkg/result"
1111
)
1212

13-
// Base propose of this functionality to sort results (issues)
14-
// produced by various linters by analyzing code. We're achieving this
15-
// by sorting results.Issues using processor step, and chain based
16-
// rules that can compare different properties of the Issues struct.
17-
1813
const (
1914
orderNameFile = "file"
2015
orderNameLinter = "linter"
@@ -32,9 +27,9 @@ var _ Processor = (*SortResults)(nil)
3227
type issueComparator func(a, b *result.Issue) int
3328

3429
// SortResults sorts reports based on criteria:
35-
// - file names, line numbers, positions
36-
// - linter names
37-
// - severity names
30+
// - file names, line numbers, positions
31+
// - linter names
32+
// - severity names
3833
type SortResults struct {
3934
cmps map[string][]issueComparator
4035

pkg/result/processors/source_code.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ var _ Processor = (*SourceCode)(nil)
1111
// SourceCode modifies displayed information based on [result.Issue.GetLineRange()].
1212
//
1313
// This is used:
14-
// - to display the "UnderLinePointer".
15-
// - in some rare cases to display multiple lines instead of one (ex: `dupl`)
14+
// - to display the "UnderLinePointer".
15+
// - in some rare cases to display multiple lines instead of one (ex: `dupl`)
1616
//
1717
// It requires to use [fsutils.LineCache] ([fsutils.FileCache]) to get the file information before the fixes.
1818
type SourceCode struct {

0 commit comments

Comments
 (0)