Skip to content

Commit 730463a

Browse files
dependabot[bot]ldez
authored andcommitted
build(deps): bump github.com/ultraware/funlen from 0.0.3 to 0.1.0 (#3988)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 03e71b1 commit 730463a

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.golangci.reference.yml

+3
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@ linters-settings:
402402
# If lower than 0, disable the check.
403403
# Default: 40
404404
statements: -1
405+
# Ignore comments when counting lines.
406+
# Default false
407+
ignore-comments: true
405408

406409
gci:
407410
# DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ require (
106106
github.com/timonwong/loggercheck v0.9.4
107107
github.com/tomarrell/wrapcheck/v2 v2.8.1
108108
github.com/tommy-muehle/go-mnd/v2 v2.5.1
109-
github.com/ultraware/funlen v0.0.3
109+
github.com/ultraware/funlen v0.1.0
110110
github.com/ultraware/whitespace v0.0.5
111111
github.com/uudashr/gocognit v1.0.7
112112
github.com/valyala/quicktemplate v1.7.0

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,9 @@ func (p *ForbidigoPattern) MarshalString() ([]byte, error) {
380380
}
381381

382382
type FunlenSettings struct {
383-
Lines int
384-
Statements int
383+
Lines int
384+
Statements int
385+
IgnoreComments bool `mapstructure:"ignore-comments"`
385386
}
386387

387388
type GciSettings struct {

pkg/golinters/funlen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func NewFunlen(settings *config.FunlenSettings) *goanalysis.Linter {
5252
func runFunlen(pass *analysis.Pass, settings *config.FunlenSettings) []goanalysis.Issue {
5353
var lintIssues []funlen.Message
5454
for _, file := range pass.Files {
55-
fileIssues := funlen.Run(file, pass.Fset, settings.Lines, settings.Statements)
55+
fileIssues := funlen.Run(file, pass.Fset, settings.Lines, settings.Statements, settings.IgnoreComments)
5656
lintIssues = append(lintIssues, fileIssues...)
5757
}
5858

0 commit comments

Comments
 (0)