Skip to content

Commit c3a7802

Browse files
authored
docs: update pages for v2 (#5505)
1 parent e564cce commit c3a7802

21 files changed

+478
-229
lines changed

.custom-gcl.reference.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The golangci-lint version used to build the custom binary.
2-
# Require.
3-
version: v1.56.2
2+
# Required.
3+
version: v2.0.0
44

55
# The name of the custom binary.
66
# Optional.

.golangci.next.reference.yml

+19-2
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.

.golangci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ linters:
166166
linters: [gosec]
167167
text: "G115: integer overflow conversion uint64 -> int"
168168

169+
# The files created during the tests don't need to be secured.
170+
- path: scripts/website/expand_templates/linters_test.go
171+
linters: [gosec]
172+
text: "G306: Expect WriteFile permissions to be 0600 or less"
173+
169174
formatters:
170175
enable:
171176
- gofmt

assets/cli-help.json

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

assets/exclusion-presets.json

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

assets/formatters-info.json

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

0 commit comments

Comments
 (0)