Skip to content

Commit f6a449f

Browse files
docs: update documentation assets (#6230)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 84729b8 commit f6a449f

File tree

5 files changed

+5175
-3
lines changed

5 files changed

+5175
-3
lines changed

.golangci.reference.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,6 +2137,8 @@ linters:
21372137
- newexpr
21382138
# Suggest replacing omitempty with omitzero for struct fields.
21392139
- omitzero
2140+
# Remove obsolete //+build comments.
2141+
- plusbuild
21402142
# Replace 3-clause for loops with for-range over integers.
21412143
- rangeint
21422144
# Replace reflect.TypeOf(x) with TypeFor[T]().
@@ -2147,6 +2149,8 @@ linters:
21472149
- slicessort
21482150
# Use iterators instead of Len/At-style APIs.
21492151
- stditerators
2152+
# Replace strings.Index etc. with strings.Cut.
2153+
- stringscut
21502154
# Replace HasPrefix/TrimPrefix with CutPrefix.
21512155
- stringscutprefix
21522156
# Replace ranging over Split/Fields with SplitSeq/FieldsSeq.
@@ -2378,6 +2382,12 @@ linters:
23782382
# Default: false
23792383
enable-all-rules: true
23802384

2385+
# By default, the default rules are enabled,
2386+
# but if you explicitly define or configure a rule, the default rules will be disabled.
2387+
# This option, when set to `true`, allows you to avoid explicitly redefining default rules when adding a rule.
2388+
# Default: false
2389+
enable-default-rules: true
2390+
23812391
# Enable validation of comment directives.
23822392
# See https://github.com/mgechev/revive#comment-directives
23832393
directives:
@@ -2390,7 +2400,7 @@ linters:
23902400
confidence: 0.1
23912401
# Revive handles the default rules in a way that can be unexpected:
23922402
# - If there are no explicit rules, the default rules are used.
2393-
# - If there is at least one explicit rule, the default rules are not used.
2403+
# - If there is at least one explicit rule, the default rules are not used, unless `enable-default-rules` is `true`.
23942404
# Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules.
23952405
rules:
23962406
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant
@@ -2640,6 +2650,11 @@ linters:
26402650
severity: warning
26412651
disabled: false
26422652
exclude: [""]
2653+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#forbidden-call-in-wg-go
2654+
- name: forbidden-call-in-wg-go
2655+
severity: warning
2656+
disabled: false
2657+
exclude: [""]
26432658
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#function-length
26442659
- name: function-length
26452660
severity: warning
@@ -2722,6 +2737,11 @@ linters:
27222737
exclude: [""]
27232738
arguments:
27242739
- "preserve-scope"
2740+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#inefficient-map-lookup
2741+
- name: inefficient-map-lookup
2742+
severity: warning
2743+
disabled: false
2744+
exclude: [""]
27252745
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#line-length-limit
27262746
- name: line-length-limit
27272747
severity: warning
@@ -2840,6 +2860,7 @@ linters:
28402860
disabled: false
28412861
exclude: [""]
28422862
arguments:
2863+
- "!validate"
28432864
- "json,inline"
28442865
- "bson,outline,gnu"
28452866
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#superfluous-else
@@ -2899,6 +2920,11 @@ linters:
28992920
severity: warning
29002921
disabled: false
29012922
exclude: [""]
2923+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-if
2924+
- name: unnecessary-if
2925+
severity: warning
2926+
disabled: false
2927+
exclude: [""]
29022928
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-stmt
29032929
- name: unnecessary-stmt
29042930
severity: warning
@@ -2974,6 +3000,7 @@ linters:
29743000
- - skip-initialism-name-checks: true
29753001
upper-case-const: true
29763002
skip-package-name-checks: true
3003+
skip-package-name-collision-with-go-std: true
29773004
extra-bad-package-names:
29783005
- helpers
29793006
- models

docs/data/cli_help.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"helpOutput": "Display extra help\n\nUsage:\n golangci-lint help [flags]\n golangci-lint help [command]\n\nAvailable Commands:\n formatters Display help for formatters.\n linters Display help for linters.\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n\nUse \"golangci-lint help [command] --help\" for more information about a command.\n",
99
"migrateOutput": "Migrate configuration file from v1 to v2.\n\nUsage:\n golangci-lint migrate [flags]\n\nFlags:\n -c, --config PATH Read config from file path PATH\n --no-config Don't read config file\n --format string Output file format.\n By default, the format of the input configuration file is used.\n It can be 'yml', 'yaml', 'toml', or 'json'.\n --skip-validation Skip validation of the configuration file against the JSON Schema for v1.\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n",
1010
"configOutput": "Configuration file information and verification.\n\nUsage:\n golangci-lint config [flags]\n golangci-lint config [command]\n\nAvailable Commands:\n path Print used configuration path.\n verify Verify configuration against JSON schema.\n\nFlags:\n -c, --config PATH Read config from file path PATH\n --no-config Don't read config file\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n\nUse \"golangci-lint config [command] --help\" for more information about a command.\n",
11-
"customOutput": "Build a version of golangci-lint with custom linters.\n\nUsage:\n golangci-lint custom [flags]\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n",
11+
"customOutput": "Build a version of golangci-lint with custom linters.\n\nUsage:\n golangci-lint custom [flags]\n\nFlags:\n --destination string The directory path used to store the custom binary\n --name string The name of the custom binary\n --version string The golangci-lint version used to build the custom binary\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n",
1212
"cacheOutput": "Cache control and information.\n\nUsage:\n golangci-lint cache [flags]\n golangci-lint cache [command]\n\nAvailable Commands:\n clean Clean cache\n status Show cache status\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n\nUse \"golangci-lint cache [command] --help\" for more information about a command.\n",
1313
"versionOutput": "Display the golangci-lint version.\n\nUsage:\n golangci-lint version [flags]\n\nFlags:\n --debug Add build information\n --json Display as JSON\n --short Display only the version number\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n",
1414
"completionOutput": "Generate the autocompletion script for golangci-lint for the specified shell.\nSee each sub-command's help for details on how to use the generated script.\n\nUsage:\n golangci-lint completion [command]\n\nAvailable Commands:\n bash Generate the autocompletion script for bash\n fish Generate the autocompletion script for fish\n powershell Generate the autocompletion script for powershell\n zsh Generate the autocompletion script for zsh\n\nGlobal Flags:\n --color string Use color when printing; can be 'always', 'auto', or 'never' (default \"auto\")\n -h, --help Help for a command\n -v, --verbose Verbose output\n\nUse \"golangci-lint completion [command] --help\" for more information about a command.\n"

0 commit comments

Comments
 (0)