Skip to content

Commit 790c163

Browse files
build(deps): bump github.com/go-critic/go-critic from 0.9.0 to 0.10.0 (#4249)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 1c7e42a commit 790c163

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ issues:
151151
- path: test/(fix|linters)_test.go
152152
text: "string `gocritic.go` has 3 occurrences, make it a constant"
153153

154+
# Due to a change inside go-critic v0.10.0, some reports have been removed,
155+
# but as we run analysis with the previous version of golangci-lint this leads to a paradoxical situation.
156+
# This exclusion will be removed when the next version of golangci-lint (v1.56.0) will be released.
157+
- path: pkg/golinters/nolintlint/nolintlint.go
158+
text: "hugeParam: (i|b) is heavy \\(\\d+ bytes\\); consider passing it by pointer"
159+
154160
run:
155161
timeout: 5m
156162
skip-dirs:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ require (
3737
github.com/firefart/nonamedreturns v1.0.4
3838
github.com/fzipp/gocyclo v0.6.0
3939
github.com/ghostiam/protogetter v0.3.3
40-
github.com/go-critic/go-critic v0.9.0
40+
github.com/go-critic/go-critic v0.10.0
4141
github.com/go-xmlfmt/xmlfmt v1.1.2
4242
github.com/gofrs/flock v0.8.1
4343
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/nolintlint/nolintlint.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ type BaseIssue struct {
1919
replacement *result.Replacement
2020
}
2121

22-
//nolint:gocritic // TODO must be change in the future.
2322
func (b BaseIssue) Position() token.Position {
2423
return b.position
2524
}
2625

27-
//nolint:gocritic // TODO must be change in the future.
2826
func (b BaseIssue) Replacement() *result.Replacement {
2927
return b.replacement
3028
}
@@ -33,75 +31,64 @@ type ExtraLeadingSpace struct {
3331
BaseIssue
3432
}
3533

36-
//nolint:gocritic // TODO must be change in the future.
3734
func (i ExtraLeadingSpace) Details() string {
3835
return fmt.Sprintf("directive `%s` should not have more than one leading space", i.fullDirective)
3936
}
4037

41-
//nolint:gocritic // TODO must be change in the future.
4238
func (i ExtraLeadingSpace) String() string { return toString(i) }
4339

4440
type NotMachine struct {
4541
BaseIssue
4642
}
4743

48-
//nolint:gocritic // TODO must be change in the future.
4944
func (i NotMachine) Details() string {
5045
expected := i.fullDirective[:2] + strings.TrimLeftFunc(i.fullDirective[2:], unicode.IsSpace)
5146
return fmt.Sprintf("directive `%s` should be written without leading space as `%s`",
5247
i.fullDirective, expected)
5348
}
5449

55-
//nolint:gocritic // TODO must be change in the future.
5650
func (i NotMachine) String() string { return toString(i) }
5751

5852
type NotSpecific struct {
5953
BaseIssue
6054
}
6155

62-
//nolint:gocritic // TODO must be change in the future.
6356
func (i NotSpecific) Details() string {
6457
return fmt.Sprintf("directive `%s` should mention specific linter such as `%s:my-linter`",
6558
i.fullDirective, i.directiveWithOptionalLeadingSpace)
6659
}
6760

68-
//nolint:gocritic // TODO must be change in the future.
6961
func (i NotSpecific) String() string { return toString(i) }
7062

7163
type ParseError struct {
7264
BaseIssue
7365
}
7466

75-
//nolint:gocritic // TODO must be change in the future.
7667
func (i ParseError) Details() string {
7768
return fmt.Sprintf("directive `%s` should match `%s[:<comma-separated-linters>] [// <explanation>]`",
7869
i.fullDirective,
7970
i.directiveWithOptionalLeadingSpace)
8071
}
8172

82-
//nolint:gocritic // TODO must be change in the future.
8373
func (i ParseError) String() string { return toString(i) }
8474

8575
type NoExplanation struct {
8676
BaseIssue
8777
fullDirectiveWithoutExplanation string
8878
}
8979

90-
//nolint:gocritic // TODO must be change in the future.
9180
func (i NoExplanation) Details() string {
9281
return fmt.Sprintf("directive `%s` should provide explanation such as `%s // this is why`",
9382
i.fullDirective, i.fullDirectiveWithoutExplanation)
9483
}
9584

96-
//nolint:gocritic // TODO must be change in the future.
9785
func (i NoExplanation) String() string { return toString(i) }
9886

9987
type UnusedCandidate struct {
10088
BaseIssue
10189
ExpectedLinter string
10290
}
10391

104-
//nolint:gocritic // TODO must be change in the future.
10592
func (i UnusedCandidate) Details() string {
10693
details := fmt.Sprintf("directive `%s` is unused", i.fullDirective)
10794
if i.ExpectedLinter != "" {
@@ -110,7 +97,6 @@ func (i UnusedCandidate) Details() string {
11097
return details
11198
}
11299

113-
//nolint:gocritic // TODO must be change in the future.
114100
func (i UnusedCandidate) String() string { return toString(i) }
115101

116102
func toString(i Issue) string {

0 commit comments

Comments
 (0)