Skip to content

Commit

Permalink
build(deps): bump github.com/ultraware/funlen from 0.0.3 to 0.1.0 (#3988
Browse files Browse the repository at this point in the history
)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and ldez committed Aug 6, 2023
1 parent 1a32d40 commit 2c0224f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .golangci.reference.yml
Expand Up @@ -402,6 +402,9 @@ linters-settings:
# If lower than 0, disable the check.
# Default: 40
statements: -1
# Ignore comments when counting lines.
# Default false
ignore-comments: true

gci:
# DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -106,7 +106,7 @@ require (
github.com/timonwong/loggercheck v0.9.4
github.com/tomarrell/wrapcheck/v2 v2.8.1
github.com/tommy-muehle/go-mnd/v2 v2.5.1
github.com/ultraware/funlen v0.0.3
github.com/ultraware/funlen v0.1.0
github.com/ultraware/whitespace v0.0.5
github.com/uudashr/gocognit v1.0.7
github.com/valyala/quicktemplate v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/config/linters_settings.go
Expand Up @@ -380,8 +380,9 @@ func (p *ForbidigoPattern) MarshalString() ([]byte, error) {
}

type FunlenSettings struct {
Lines int
Statements int
Lines int
Statements int
IgnoreComments bool `mapstructure:"ignore-comments"`
}

type GciSettings struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/funlen.go
Expand Up @@ -52,7 +52,7 @@ func NewFunlen(settings *config.FunlenSettings) *goanalysis.Linter {
func runFunlen(pass *analysis.Pass, settings *config.FunlenSettings) []goanalysis.Issue {
var lintIssues []funlen.Message
for _, file := range pass.Files {
fileIssues := funlen.Run(file, pass.Fset, settings.Lines, settings.Statements)
fileIssues := funlen.Run(file, pass.Fset, settings.Lines, settings.Statements, settings.IgnoreComments)
lintIssues = append(lintIssues, fileIssues...)
}

Expand Down

0 comments on commit 2c0224f

Please sign in to comment.