Skip to content

build(deps): bump github.com/ultraware/funlen from 0.0.3 to 0.1.0 #3988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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