Skip to content

Commit 2a97350

Browse files
committed
docs: add formatters exclusions reference
1 parent e564cce commit 2a97350

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

.golangci.next.reference.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ linters:
13721372
- G504 # Import blocklist: net/http/cgi
13731373
- G505 # Import blocklist: crypto/sha1
13741374
- G506 # Import blocklist: golang.org/x/crypto/md4
1375-
- G507 #Import blocklist: golang.org/x/crypto/ripemd160
1375+
- G507 # Import blocklist: golang.org/x/crypto/ripemd160
13761376
- G601 # Implicit memory aliasing of items from a range statement
13771377
- G602 # Slice access out of bounds
13781378

@@ -1417,7 +1417,7 @@ linters:
14171417
- G504 # Import blocklist: net/http/cgi
14181418
- G505 # Import blocklist: crypto/sha1
14191419
- G506 # Import blocklist: golang.org/x/crypto/md4
1420-
- G507 #Import blocklist: golang.org/x/crypto/ripemd160
1420+
- G507 # Import blocklist: golang.org/x/crypto/ripemd160
14211421
- G601 # Implicit memory aliasing of items from a range statement
14221422
- G602 # Slice access out of bounds
14231423

@@ -3983,6 +3983,23 @@ formatters:
39833983
# Default: true
39843984
chain-split-dots: false
39853985

3986+
exclusions:
3987+
# Mode of the generated files analysis.
3988+
#
3989+
# - `strict`: sources are excluded by strictly following the Go generated file convention.
3990+
# Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
3991+
# This line must appear before the first non-comment, non-blank text in the file.
3992+
# https://go.dev/s/generatedcode
3993+
# - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
3994+
# - `disable`: disable the generated files exclusion.
3995+
#
3996+
# Default: lax
3997+
generated: strict
3998+
# Which file paths to exclude.
3999+
# Default: []
4000+
paths:
4001+
- ".*\\.my\\.go$"
4002+
- lib/bad.go
39864003

39874004
issues:
39884005
# Maximum issues count per one linter.

jsonschema/golangci.next.jsonschema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4584,8 +4584,8 @@
45844584
"additionalProperties": false,
45854585
"properties": {
45864586
"generated": {
4587-
"type": "boolean",
4588-
"default": true
4587+
"enum": ["strict", "lax", "disable"],
4588+
"default": "strict"
45894589
},
45904590
"paths": {
45914591
"type": "array",

0 commit comments

Comments
 (0)