Skip to content

Commit 620a72c

Browse files
docs: update documentation assets (#4692)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent ab1bd94 commit 620a72c

File tree

10 files changed

+484
-390
lines changed

10 files changed

+484
-390
lines changed

.github/workflows/post-release.yml

-9
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,6 @@ jobs:
6161
- name: Update GitHub Action config
6262
run: make assets/github-action-config.json
6363

64-
- name: Update reference files
65-
run: cp .golangci.next.reference.yml .golangci.reference.yml
66-
67-
- name: Update JSON schema files
68-
run: cp jsonschema/golangci.next.jsonschema.json jsonschema/golangci.jsonschema.json
69-
70-
- name: Update information
71-
run: make website_dump_info
72-
7364
- name: Create Pull Request
7465
uses: peter-evans/create-pull-request@v6
7566
with:

.golangci.reference.yml

+69-76
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ linters-settings:
154154
pop-directional-isolate: false
155155

156156
copyloopvar:
157-
# If true, ignore aliasing of loop variables.
157+
# Check all assigning the loop variable to another variable.
158158
# Default: false
159-
ignore-alias: true
159+
check-alias: true
160160

161161
cyclop:
162162
# The maximal code complexity to report.
@@ -279,23 +279,11 @@ linters-settings:
279279
# Default: false
280280
check-blank: true
281281

282-
# DEPRECATED comma-separated list of pairs of the form pkg:regex
283-
#
284-
# the regex is used to ignore names within pkg. (default "fmt:.*").
285-
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
286-
ignore: fmt:.*,io/ioutil:^Read.*
287-
288282
# To disable the errcheck built-in exclude list.
289283
# See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details.
290284
# Default: false
291285
disable-default-exclusions: true
292286

293-
# DEPRECATED use exclude-functions instead.
294-
#
295-
# Path to a file containing a list of functions to exclude from checking.
296-
# See https://github.com/kisielk/errcheck#excluding-functions for details.
297-
exclude: /path/to/file.txt
298-
299287
# List of functions to exclude from checking, where each entry is a single function to exclude.
300288
# See https://github.com/kisielk/errcheck#excluding-functions for details.
301289
exclude-functions:
@@ -338,6 +326,16 @@ linters-settings:
338326
# Check for plain error comparisons.
339327
# Default: true
340328
comparison: false
329+
# Allowed errors.
330+
# Default: []
331+
allowed-errors:
332+
- err: "io.EOF"
333+
fun: "example.com/pkg.Read"
334+
# Allowed error "wildcards".
335+
# Default: []
336+
allowed-errors-wildcard:
337+
- err: "example.com/pkg.ErrMagic"
338+
fun: "example.com/pkg.Magic"
341339

342340
exhaustive:
343341
# Program elements to check for exhaustiveness.
@@ -431,12 +429,9 @@ linters-settings:
431429
ignore-comments: true
432430

433431
gci:
434-
# DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead.
435-
local-prefixes: github.com/org/project
436-
437432
# Section configuration to compare against.
438433
# Section names are case-insensitive and may contain parameters in ().
439-
# The default order of sections is `standard > default > custom > blank > dot > alias`,
434+
# The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`,
440435
# If `custom-order` is `true`, it follows the order of `sections` option.
441436
# Default: ["standard", "default"]
442437
sections:
@@ -446,6 +441,7 @@ linters-settings:
446441
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
447442
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
448443
- alias # Alias section: contains all alias imports. This section is not present unless explicitly enabled.
444+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
449445

450446
# Skip generated files.
451447
# Default: true
@@ -636,17 +632,14 @@ linters-settings:
636632
# The option is passed to the ruleguard 'debug-group' argument.
637633
# Default: ""
638634
debug: 'emptyDecl'
639-
# Deprecated, use 'failOn' param.
640-
# If set to true, identical to failOn='all', otherwise failOn=''
641-
failOnError: false
642635
# Determines the behavior when an error occurs while parsing ruleguard files.
643636
# If flag is not set, log error and skip rule files that contain an error.
644637
# If flag is set, the value must be a comma-separated list of error conditions.
645638
# - 'all': fail on all errors.
646639
# - 'import': ruleguard rule imports a package that cannot be found.
647640
# - 'dsl': gorule file does not comply with the ruleguard DSL.
648641
# Default: ""
649-
failOn: dsl
642+
failOn: dsl,import
650643
# Comma-separated list of file paths containing ruleguard rules.
651644
# If a path is relative, it is relative to the directory where the golangci-lint command is executed.
652645
# The special '${configDir}' variable is substituted with the absolute directory containing the golangci config file.
@@ -723,9 +716,6 @@ linters-settings:
723716
replacement: 'a[b:]'
724717

725718
gofumpt:
726-
# Deprecated: use the global `run.go` instead.
727-
lang-version: "1.17"
728-
729719
# Module path which contains the source code being formatted.
730720
# Default: ""
731721
module-path: github.com/org/project
@@ -779,38 +769,6 @@ linters-settings:
779769
# Default: ""
780770
local-prefixes: github.com/org/project
781771

782-
gomnd:
783-
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
784-
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
785-
checks:
786-
- argument
787-
- case
788-
- condition
789-
- operation
790-
- return
791-
- assign
792-
# List of numbers to exclude from analysis.
793-
# The numbers should be written as string.
794-
# Values always ignored: "1", "1.0", "0" and "0.0"
795-
# Default: []
796-
ignored-numbers:
797-
- '0666'
798-
- '0755'
799-
- '42'
800-
# List of file patterns to exclude from analysis.
801-
# Values always ignored: `.+_test.go`
802-
# Default: []
803-
ignored-files:
804-
- 'magic1_.+\.go$'
805-
# List of function patterns to exclude from analysis.
806-
# Following functions are always ignored: `time.Date`,
807-
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
808-
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
809-
# Default: []
810-
ignored-functions:
811-
- '^math\.'
812-
- '^http\.StatusText$'
813-
814772
gomoddirectives:
815773
# Allow local `replace` directives.
816774
# Default: false
@@ -861,8 +819,6 @@ linters-settings:
861819
local_replace_directives: false
862820

863821
gosimple:
864-
# Deprecated: use the global `run.go` instead.
865-
go: "1.15"
866822
# Sxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
867823
# Default: ["*"]
868824
checks: [ "all" ]
@@ -1367,6 +1323,38 @@ linters-settings:
13671323
# Default: ""
13681324
mode: restricted
13691325

1326+
mnd:
1327+
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
1328+
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
1329+
checks:
1330+
- argument
1331+
- case
1332+
- condition
1333+
- operation
1334+
- return
1335+
- assign
1336+
# List of numbers to exclude from analysis.
1337+
# The numbers should be written as string.
1338+
# Values always ignored: "1", "1.0", "0" and "0.0"
1339+
# Default: []
1340+
ignored-numbers:
1341+
- '0666'
1342+
- '0755'
1343+
- '42'
1344+
# List of file patterns to exclude from analysis.
1345+
# Values always ignored: `.+_test.go`
1346+
# Default: []
1347+
ignored-files:
1348+
- 'magic1_.+\.go$'
1349+
# List of function patterns to exclude from analysis.
1350+
# Following functions are always ignored: `time.Date`,
1351+
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
1352+
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
1353+
# Default: []
1354+
ignored-functions:
1355+
- '^math\.'
1356+
- '^http\.StatusText$'
1357+
13701358
musttag:
13711359
# A set of custom functions to check in addition to the builtin ones.
13721360
# Default: json, xml, gopkg.in/yaml.v3, BurntSushi/toml, mitchellh/mapstructure, jmoiron/sqlx
@@ -2013,8 +2001,12 @@ linters-settings:
20132001
# Default: ""
20142002
no-global: "all"
20152003
# Enforce using methods that accept a context.
2016-
# Default: false
2017-
context-only: true
2004+
# Values:
2005+
# - "": disabled
2006+
# - "all": report all contextless calls
2007+
# - "scope": report only if a context exists in the scope of the outermost function
2008+
# Default: ""
2009+
context: "all"
20182010
# Enforce using static values for log messages.
20192011
# Default: false
20202012
static-msg: true
@@ -2046,17 +2038,19 @@ linters-settings:
20462038
# Default: []
20472039
ignore-check-signatures:
20482040
- "telemetry.RecordError"
2049-
2041+
# A list of regexes for additional function signatures that create spans.
2042+
# This is useful if you have a utility method to create spans.
2043+
# Each entry should be of the form `<regex>:<telemetry-type>`, where `telemetry-type` can be `opentelemetry` or `opencensus`.
2044+
# https://github.com/jjti/go-spancheck#extra-start-span-signatures
2045+
# Default: []
2046+
extra-start-span-signatures:
2047+
- "github.com/user/repo/telemetry/trace.Start:opentelemetry"
20502048
staticcheck:
2051-
# Deprecated: use the global `run.go` instead.
2052-
go: "1.15"
20532049
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
20542050
# Default: ["*"]
20552051
checks: [ "all" ]
20562052

20572053
stylecheck:
2058-
# Deprecated: use the global `run.go` instead.
2059-
go: "1.15"
20602054
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
20612055
# Default: ["*"]
20622056
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
@@ -2280,9 +2274,6 @@ linters-settings:
22802274
# Suggest the use of rpc.DefaultXXPath.
22812275
# Default: false
22822276
default-rpc-path: true
2283-
# DEPRECATED Suggest the use of os.DevNull.
2284-
# Default: false
2285-
os-dev-null: true
22862277
# Suggest the use of sql.LevelXX.String().
22872278
# Default: false
22882279
sql-isolation-level: true
@@ -2292,9 +2283,6 @@ linters-settings:
22922283
# Suggest the use of constant.Kind.String().
22932284
# Default: false
22942285
constant-kind: true
2295-
# DEPRECATED Suggest the use of syslog.Priority.
2296-
# Default: false
2297-
syslog-priority: true
22982286

22992287
unconvert:
23002288
# Remove conversions that force intermediate rounding.
@@ -2514,6 +2502,7 @@ linters:
25142502
- asciicheck
25152503
- bidichk
25162504
- bodyclose
2505+
- canonicalheader
25172506
- containedctx
25182507
- contextcheck
25192508
- copyloopvar
@@ -2524,6 +2513,7 @@ linters:
25242513
- dupl
25252514
- dupword
25262515
- durationcheck
2516+
- err113
25272517
- errcheck
25282518
- errchkjson
25292519
- errname
@@ -2532,6 +2522,7 @@ linters:
25322522
- exhaustive
25332523
- exhaustruct
25342524
- exportloopref
2525+
- fatcontext
25352526
- forbidigo
25362527
- forcetypeassert
25372528
- funlen
@@ -2547,12 +2538,10 @@ linters:
25472538
- gocyclo
25482539
- godot
25492540
- godox
2550-
- goerr113
25512541
- gofmt
25522542
- gofumpt
25532543
- goheader
25542544
- goimports
2555-
- gomnd
25562545
- gomoddirectives
25572546
- gomodguard
25582547
- goprintffuncname
@@ -2573,6 +2562,7 @@ linters:
25732562
- makezero
25742563
- mirror
25752564
- misspell
2565+
- mnd
25762566
- musttag
25772567
- nakedret
25782568
- nestif
@@ -2627,6 +2617,7 @@ linters:
26272617
- asciicheck
26282618
- bidichk
26292619
- bodyclose
2620+
- canonicalheader
26302621
- containedctx
26312622
- contextcheck
26322623
- copyloopvar
@@ -2637,6 +2628,7 @@ linters:
26372628
- dupl
26382629
- dupword
26392630
- durationcheck
2631+
- err113
26402632
- errcheck
26412633
- errchkjson
26422634
- errname
@@ -2645,6 +2637,7 @@ linters:
26452637
- exhaustive
26462638
- exhaustruct
26472639
- exportloopref
2640+
- fatcontext
26482641
- forbidigo
26492642
- forcetypeassert
26502643
- funlen
@@ -2660,12 +2653,10 @@ linters:
26602653
- gocyclo
26612654
- godot
26622655
- godox
2663-
- goerr113
26642656
- gofmt
26652657
- gofumpt
26662658
- goheader
26672659
- goimports
2668-
- gomnd
26692660
- gomoddirectives
26702661
- gomodguard
26712662
- goprintffuncname
@@ -2686,6 +2677,7 @@ linters:
26862677
- makezero
26872678
- mirror
26882679
- misspell
2680+
- mnd
26892681
- musttag
26902682
- nakedret
26912683
- nestif
@@ -2735,6 +2727,7 @@ linters:
27352727
- ifshort # Deprecated
27362728
- interfacer # Deprecated
27372729
- maligned # Deprecated
2730+
- gomnd # Deprecated
27382731
- nosnakecase # Deprecated
27392732
- scopelint # Deprecated
27402733
- structcheck # Deprecated

.golangci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ linters-settings:
5757
replacement: 'any'
5858
goimports:
5959
local-prefixes: github.com/golangci/golangci-lint
60-
gomnd:
60+
mnd:
6161
# don't include the "operation" and "assign"
6262
checks:
6363
- argument
@@ -121,7 +121,7 @@ linters:
121121
- godox
122122
- gofmt
123123
- goimports
124-
- gomnd
124+
- mnd
125125
- goprintffuncname
126126
- gosec
127127
- gosimple
@@ -150,7 +150,7 @@ issues:
150150
- path: (.+)_test\.go
151151
linters:
152152
- dupl
153-
- gomnd
153+
- mnd
154154
- lll
155155

156156
# The logic of creating a linter is similar between linters, it's not duplication.

0 commit comments

Comments
 (0)