Skip to content

Commit 7e61de8

Browse files
authored
Merge branch 'main' into gofuncor
2 parents 6603c25 + 8411157 commit 7e61de8

File tree

4 files changed

+247
-65
lines changed

4 files changed

+247
-65
lines changed

.golangci.next.reference.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ linters:
122122
- wsl
123123
- zerologlint
124124

125-
# Disable specific linter
125+
# Disable specific linter.
126126
# https://golangci-lint.run/usage/linters/#disabled-by-default
127127
disable:
128128
- asasalint
@@ -268,7 +268,7 @@ linters:
268268
# Default: 10
269269
max-complexity: 10
270270
# The maximal average package complexity.
271-
# If it's higher than 0.0 (float) the check is enabled
271+
# If it's higher than 0.0 (float) the check is enabled.
272272
# Default: 0.0
273273
package-average: 0.5
274274

@@ -281,7 +281,7 @@ linters:
281281
- var
282282
- func
283283

284-
# If true, underscore vars (vars with "_" as the name) will be ignored at all checks
284+
# If true, underscore vars (vars with "_" as the name) will be ignored at all checks.
285285
# Default: false (underscore vars are not ignored)
286286
ignore-underscore-vars: false
287287

@@ -297,15 +297,15 @@ linters:
297297
# Default: true (disabled)
298298
disable-dec-num-check: false
299299

300-
# If true, type declarations will be ignored for dec num check
300+
# If true, type declarations will be ignored for dec num check.
301301
# Default: false (type statements are not ignored)
302302
disable-type-dec-num-check: false
303303

304-
# If true, const declarations will be ignored for dec num check
304+
# If true, const declarations will be ignored for dec num check.
305305
# Default: false (const statements are not ignored)
306306
disable-const-dec-num-check: false
307307

308-
# If true, var declarations will be ignored for dec num check
308+
# If true, var declarations will be ignored for dec num check.
309309
# Default: false (var statements are not ignored)
310310
disable-var-dec-num-check: false
311311

@@ -430,7 +430,7 @@ linters:
430430
# See the https://github.com/polyfloyd/go-errorlint for caveats.
431431
# Default: true
432432
errorf: false
433-
# Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
433+
# Permit more than 1 %w verb, valid per Go 1.20 (requires `errorf: true`).
434434
# Default: true
435435
errorf-multi: false
436436
# Check for plain type assertions and type switches.
@@ -510,7 +510,7 @@ linters:
510510
# Optional message that gets included in error reports.
511511
- pattern: ^fmt\.Print.*$
512512
msg: Do not commit print statements.
513-
# Alternatively, put messages at the end of the regex, surrounded by `(# )?`
513+
# Alternatively, put messages at the end of the regex, surrounded by `(# )?`.
514514
# Escape any special characters. Those messages get included in error reports.
515515
- pattern: 'fmt\.Print.*(# Do not commit print statements\.)?'
516516
# Forbid spew Dump, whether it is called as function or method.
@@ -573,11 +573,11 @@ linters:
573573
# Default: false
574574
suppress-async-assertion: true
575575

576-
# Suppress warning for comparing values from different types, like `int32` and `uint32`
576+
# Suppress warning for comparing values from different types, like `int32` and `uint32`.
577577
# Default: false
578578
suppress-type-compare-assertion: true
579579

580-
# Trigger warning for ginkgo focus containers like `FDescribe`, `FContext`, `FWhen` or `FIt`
580+
# Trigger warning for ginkgo focus containers like `FDescribe`, `FContext`, `FWhen` or `FIt`.
581581
# Default: false
582582
forbid-focus-container: true
583583

@@ -591,7 +591,7 @@ linters:
591591
force-expect-to: true
592592

593593
# Best effort validation of async intervals (timeout and polling).
594-
# Ignored the suppress-async-assertion is true.
594+
# Ignored the `suppress-async-assertion` is true.
595595
# Default: false
596596
validate-async-intervals: true
597597

@@ -607,7 +607,7 @@ linters:
607607
# Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.
608608
# Default: true
609609
default-signifies-exhaustive: false
610-
# Include shared interfaces in the exhaustiviness check.
610+
# Include shared interfaces in the exhaustiveness check.
611611
# Default: false
612612
include-shared-interfaces: true
613613

@@ -629,10 +629,10 @@ linters:
629629
# Search also for duplicated numbers.
630630
# Default: false
631631
numbers: true
632-
# Minimum value, only works with goconst.numbers
632+
# Minimum value, only works with `goconst.numbers`.
633633
# Default: 3
634634
min: 2
635-
# Maximum value, only works with goconst.numbers
635+
# Maximum value, only works with `goconst.numbers`.
636636
# Default: 3
637637
max: 2
638638
# Ignore when constant is not used as function argument.
@@ -1105,7 +1105,7 @@ linters:
11051105

11061106
# Settings passed to gocritic.
11071107
# The settings key is the name of a supported gocritic checker.
1108-
# The list of supported checkers can be find in https://go-critic.com/overview.
1108+
# The list of supported checkers can be found at https://go-critic.com/overview.
11091109
settings:
11101110
# Must be valid enabled check name.
11111111
captLocal:
@@ -1244,19 +1244,19 @@ linters:
12441244
# for example:
12451245
AUTHOR: .*@mycompany\.com
12461246
# The template used for checking.
1247-
# Put here copyright header template for source code files
1247+
# Put here copyright header template for source code files.
12481248
# Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time.
12491249
# Default: ""
12501250
template: |-
12511251
{{ AUTHOR }} {{ COMPANY }} {{ YEAR }}
12521252
SPDX-License-Identifier: Apache-2.0
1253-
1253+
12541254
Licensed under the Apache License, Version 2.0 (the "License");
12551255
you may not use this file except in compliance with the License.
12561256
You may obtain a copy of the License at:
1257-
1257+
12581258
http://www.apache.org/licenses/LICENSE-2.0
1259-
1259+
12601260
Unless required by applicable law or agreed to in writing, software
12611261
distributed under the License is distributed on an "AS IS" BASIS,
12621262
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -1504,13 +1504,13 @@ linters:
15041504
# Regexp pattern to find potential directory traversal.
15051505
# Default: "http\\.Dir\\(\"\\/\"\\)|http\\.Dir\\('\\/'\\)"
15061506
pattern: "custom\\.Dir\\(\\)"
1507-
# Maximum allowed permissions mode for os.Mkdir and os.MkdirAll
1507+
# Maximum allowed permissions mode for os.Mkdir and os.MkdirAll.
15081508
# Default: "0750"
15091509
G301: "0750"
1510-
# Maximum allowed permissions mode for os.OpenFile and os.Chmod
1510+
# Maximum allowed permissions mode for os.OpenFile and os.Chmod.
15111511
# Default: "0600"
15121512
G302: "0600"
1513-
# Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile
1513+
# Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile.
15141514
# Default: "0600"
15151515
G306: "0600"
15161516

@@ -1546,7 +1546,7 @@ linters:
15461546
# Default: false
15471547
disable-all: true
15481548
# Enable analyzers by name.
1549-
# (in addition to default:
1549+
# (In addition to default:
15501550
# appends, asmdecl, assign, atomic, bools, buildtag, cgocall, composites, copylocks, defers, directive, errorsas,
15511551
# framepointer, httpresponse, ifaceassert, loopclosure, lostcancel, nilfunc, printf, shift, sigchanyzer, slog,
15521552
# stdmethods, stringintconv, structtag, testinggoroutine, tests, timeformat, unmarshal, unreachable, unsafeptr,
@@ -1646,7 +1646,7 @@ linters:
16461646
# Default: false
16471647
enable-all: true
16481648
# Disable analyzers by name.
1649-
# (in addition to default
1649+
# (In addition to default
16501650
# atomicalign, deepequalerrors, fieldalignment, findcall, nilness, reflectvaluecompare, shadow, sortslice,
16511651
# timeformat, unusedwrite
16521652
# ).
@@ -1713,16 +1713,16 @@ linters:
17131713
# Default: false
17141714
strict: true
17151715
unusedresult:
1716-
# Comma-separated list of functions whose results must be used
1717-
# (in addition to default:
1716+
# Comma-separated list of functions whose results must be used.
1717+
# (In addition to default:
17181718
# context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf,
17191719
# fmt.Sprint, fmt.Sprintf, sort.Reverse
17201720
# ).
17211721
# Default: []
17221722
funcs:
17231723
- pkg.MyFunc
1724-
# Comma-separated list of names of methods of type func() string whose results must be used
1725-
# (in addition to default Error,String)
1724+
# Comma-separated list of names of methods of type func() string whose results must be used.
1725+
# (In addition to default Error,String).
17261726
# Default: []
17271727
stringmethods:
17281728
- MyMethod
@@ -1788,7 +1788,7 @@ linters:
17881788
alias: autoscalingv1alpha1
17891789
# You can specify the package path by regular expression,
17901790
# and alias by regular expression expansion syntax like below.
1791-
# see https://github.com/julz/importas#use-regular-expression for details
1791+
# See https://github.com/julz/importas#use-regular-expression for details.
17921792
- pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+)
17931793
alias: $1$2
17941794
# An explicit empty alias can be used to ensure no aliases are used for a package.
@@ -1927,14 +1927,14 @@ linters:
19271927
- assign
19281928
# List of numbers to exclude from analysis.
19291929
# The numbers should be written as string.
1930-
# Values always ignored: "1", "1.0", "0" and "0.0"
1930+
# Values always ignored: "1", "1.0", "0" and "0.0".
19311931
# Default: []
19321932
ignored-numbers:
19331933
- '0666'
19341934
- '0755'
19351935
- '42'
19361936
# List of file patterns to exclude from analysis.
1937-
# Values always ignored: `.+_test.go`
1937+
# Values always ignored: `.+_test.go`.
19381938
# Default: []
19391939
ignored-files:
19401940
- 'magic1_.+\.go$'
@@ -1989,7 +1989,7 @@ linters:
19891989
- unsafeptr
19901990

19911991
nlreturn:
1992-
# Size of the block (including return statement that is still "OK")
1992+
# Size of the block (including return statement that is still "OK"),
19931993
# so no return split required.
19941994
# Default: 1
19951995
block-size: 2
@@ -2691,7 +2691,7 @@ linters:
26912691
exclude: [""]
26922692

26932693
rowserrcheck:
2694-
# database/sql is always checked
2694+
# database/sql is always checked.
26952695
# Default: []
26962696
packages:
26972697
- github.com/jmoiron/sqlx
@@ -3277,7 +3277,7 @@ linters:
32773277
# Align and sort can be used together or separately.
32783278
#
32793279
# Whether enable align. If true, the struct tags will be aligned.
3280-
# e.g.:
3280+
# E.g.:
32813281
# type FooBar struct {
32823282
# Bar string `json:"bar" validate:"required"`
32833283
# FooFoo int8 `json:"foo_foo" validate:"required"`
@@ -3291,7 +3291,7 @@ linters:
32913291
align: false
32923292
# Whether enable tags sort.
32933293
# If true, the tags will be sorted by name in ascending order.
3294-
# e.g.: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"`
3294+
# E.g.: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"`.
32953295
# Default: true
32963296
sort: false
32973297
# Specify the order of tags, the other tags will be sorted by name.
@@ -3957,7 +3957,7 @@ formatters:
39573957
gci:
39583958
# Section configuration to compare against.
39593959
# Section names are case-insensitive and may contain parameters in ().
3960-
# The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`,
3960+
# The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`.
39613961
# If `custom-order` is `true`, it follows the order of `sections` option.
39623962
# Default: ["standard", "default"]
39633963
sections:

pkg/lint/lintersdb/builder_linter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
455455
linter.NewConfig(misspell.New(&cfg.Linters.Settings.Misspell)).
456456
WithSince("v1.8.0").
457457
WithAutoFix().
458-
WithURL("https://github.com/client9/misspell"),
458+
WithURL("https://github.com/golangci/misspell"),
459459

460460
linter.NewConfig(musttag.New(&cfg.Linters.Settings.MustTag)).
461461
WithSince("v1.51.0").

0 commit comments

Comments
 (0)