build(deps): bump github.com/go-critic/go-critic from 0.10.0 to 0.11.0 ()

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2024-01-02 16:12:26 +01:00 committed by GitHub
parent 8f4b1a797e
commit 87d55d9c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 8 deletions

@ -565,6 +565,10 @@ linters-settings:
# Whether to restrict checker to params only.
# Default: true
paramsOnly: false
commentedOutCode:
# Min length of the comment that triggers a warning.
# Default: 15
minLength: 50
elseif:
# Whether to skip balanced if-else pairs.
# Default: true
@ -573,6 +577,10 @@ linters-settings:
# Size in bytes that makes the warning trigger.
# Default: 80
sizeThreshold: 70
ifElseChain:
# Min number of if-else blocks that makes the warning trigger.
# Default: 2
minThreshold: 4
nestingReduce:
# Min number of statements inside a branch to trigger a warning.
# Default: 5
@ -602,7 +610,7 @@ linters-settings:
# Then:
# ruleguard prints the specific Where() condition that was rejected.
#
# The flag is passed to the ruleguard 'debug-group' argument.
# The option is passed to the ruleguard 'debug-group' argument.
# Default: ""
debug: 'emptyDecl'
# Deprecated, use 'failOn' param.

2
go.mod

@ -37,7 +37,7 @@ require (
github.com/firefart/nonamedreturns v1.0.4
github.com/fzipp/gocyclo v0.6.0
github.com/ghostiam/protogetter v0.3.3
github.com/go-critic/go-critic v0.10.0
github.com/go-critic/go-critic v0.11.0
github.com/go-xmlfmt/xmlfmt v1.1.2
github.com/gofrs/flock v0.8.1
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2

4
go.sum generated

@ -154,8 +154,8 @@ github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
github.com/ghostiam/protogetter v0.3.3 h1:EvOuzB/SEifg/c4aMnwcj033Qc1lHO7Yz4QnBDbmbik=
github.com/ghostiam/protogetter v0.3.3/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk=
github.com/go-critic/go-critic v0.10.0 h1:tOkke48KSKC4tSS5Dc22ICdChMy0maRj1uDgdV5vXfc=
github.com/go-critic/go-critic v0.10.0/go.mod h1:gW4noMWDewS/WQdqiuJdA0pXbRxito860jj1ucPzy7g=
github.com/go-critic/go-critic v0.11.0 h1:mARtIFX7jPtJ3SzxO9Isa5T2jd2dZxFmQHK3yNf0wrE=
github.com/go-critic/go-critic v0.11.0/go.mod h1:Cz6lr1PlkIu/0Y0U9KqJgcIJJECAF8mEwmzVjKnhbfI=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=

@ -39,7 +39,7 @@ func NewMirror() *goanalysis.Linter {
Pos: i.Start,
}
if len(i.InlineFix) > 0 {
if i.InlineFix != "" {
issue.Replacement = &result.Replacement{
Inline: &result.InlineFix{
StartCol: i.Start.Column - 1,

@ -171,7 +171,7 @@ func (l Linter) Run(fset *token.FileSet, nodes ...ast.Node) ([]Issue, error) {
}
directiveWithOptionalLeadingSpace := "//"
if len(leadingSpace) > 0 {
if leadingSpace != "" {
directiveWithOptionalLeadingSpace += " "
}
@ -188,7 +188,7 @@ func (l Linter) Run(fset *token.FileSet, nodes ...ast.Node) ([]Issue, error) {
}
// check for, report and eliminate leading spaces, so we can check for other issues
if len(leadingSpace) > 0 {
if leadingSpace != "" {
removeWhitespace := &result.Replacement{
Inline: &result.InlineFix{
StartCol: pos.Column + 1,
@ -217,7 +217,7 @@ func (l Linter) Run(fset *token.FileSet, nodes ...ast.Node) ([]Issue, error) {
lintersText, explanation := fullMatches[1], fullMatches[2]
var linters []string
if len(lintersText) > 0 && !strings.HasPrefix(lintersText, "all") {
if lintersText != "" && !strings.HasPrefix(lintersText, "all") {
lls := strings.Split(lintersText, ",")
linters = make([]string, 0, len(lls))
rangeStart := (pos.Column - 1) + len("//") + len(leadingSpace) + len("nolint:")