From f794700ec0722d49b591290c566637c5b1fe53c8 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Sat, 29 Mar 2025 13:55:29 +0200 Subject: [PATCH] docs: cleanup config reference --- .golangci.next.reference.yml | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 81d741134a69..52a474c759b3 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -121,7 +121,7 @@ linters: - wsl - zerologlint - # Disable specific linter + # Disable specific linter. # https://golangci-lint.run/usage/linters/#disabled-by-default disable: - asasalint @@ -266,7 +266,7 @@ linters: # Default: 10 max-complexity: 10 # The maximal average package complexity. - # If it's higher than 0.0 (float) the check is enabled + # If it's higher than 0.0 (float) the check is enabled. # Default: 0.0 package-average: 0.5 @@ -279,7 +279,7 @@ linters: - var - func - # If true, underscore vars (vars with "_" as the name) will be ignored at all checks + # If true, underscore vars (vars with "_" as the name) will be ignored at all checks. # Default: false (underscore vars are not ignored) ignore-underscore-vars: false @@ -295,15 +295,15 @@ linters: # Default: true (disabled) disable-dec-num-check: false - # If true, type declarations will be ignored for dec num check + # If true, type declarations will be ignored for dec num check. # Default: false (type statements are not ignored) disable-type-dec-num-check: false - # If true, const declarations will be ignored for dec num check + # If true, const declarations will be ignored for dec num check. # Default: false (const statements are not ignored) disable-const-dec-num-check: false - # If true, var declarations will be ignored for dec num check + # If true, var declarations will be ignored for dec num check. # Default: false (var statements are not ignored) disable-var-dec-num-check: false @@ -428,7 +428,7 @@ linters: # See the https://github.com/polyfloyd/go-errorlint for caveats. # Default: true errorf: false - # Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true) + # Permit more than 1 %w verb, valid per Go 1.20 (requires `errorf: true`). # Default: true errorf-multi: false # Check for plain type assertions and type switches. @@ -508,7 +508,7 @@ linters: # Optional message that gets included in error reports. - pattern: ^fmt\.Print.*$ msg: Do not commit print statements. - # Alternatively, put messages at the end of the regex, surrounded by `(# )?` + # Alternatively, put messages at the end of the regex, surrounded by `(# )?`. # Escape any special characters. Those messages get included in error reports. - pattern: 'fmt\.Print.*(# Do not commit print statements\.)?' # Forbid spew Dump, whether it is called as function or method. @@ -563,11 +563,11 @@ linters: # Default: false suppress-async-assertion: true - # Suppress warning for comparing values from different types, like `int32` and `uint32` + # Suppress warning for comparing values from different types, like `int32` and `uint32`. # Default: false suppress-type-compare-assertion: true - # Trigger warning for ginkgo focus containers like `FDescribe`, `FContext`, `FWhen` or `FIt` + # Trigger warning for ginkgo focus containers like `FDescribe`, `FContext`, `FWhen` or `FIt`. # Default: false forbid-focus-container: true @@ -581,7 +581,7 @@ linters: force-expect-to: true # Best effort validation of async intervals (timeout and polling). - # Ignored the suppress-async-assertion is true. + # Ignored the `suppress-async-assertion` is true. # Default: false validate-async-intervals: true @@ -597,7 +597,7 @@ linters: # Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed. # Default: true default-signifies-exhaustive: false - # Include shared interfaces in the exhaustiviness check. + # Include shared interfaces in the exhaustiveness check. # Default: false include-shared-interfaces: true @@ -619,10 +619,10 @@ linters: # Search also for duplicated numbers. # Default: false numbers: true - # Minimum value, only works with goconst.numbers + # Minimum value, only works with `goconst.numbers`. # Default: 3 min: 2 - # Maximum value, only works with goconst.numbers + # Maximum value, only works with `goconst.numbers`. # Default: 3 max: 2 # Ignore when constant is not used as function argument. @@ -1095,7 +1095,7 @@ linters: # Settings passed to gocritic. # The settings key is the name of a supported gocritic checker. - # The list of supported checkers can be find in https://go-critic.com/overview. + # The list of supported checkers can be found at https://go-critic.com/overview. settings: # Must be valid enabled check name. captLocal: @@ -1234,19 +1234,19 @@ linters: # for example: AUTHOR: .*@mycompany\.com # The template used for checking. - # Put here copyright header template for source code files + # Put here copyright header template for source code files. # Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time. # Default: "" template: |- {{ AUTHOR }} {{ COMPANY }} {{ YEAR }} SPDX-License-Identifier: Apache-2.0 - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -1494,13 +1494,13 @@ linters: # Regexp pattern to find potential directory traversal. # Default: "http\\.Dir\\(\"\\/\"\\)|http\\.Dir\\('\\/'\\)" pattern: "custom\\.Dir\\(\\)" - # Maximum allowed permissions mode for os.Mkdir and os.MkdirAll + # Maximum allowed permissions mode for os.Mkdir and os.MkdirAll. # Default: "0750" G301: "0750" - # Maximum allowed permissions mode for os.OpenFile and os.Chmod + # Maximum allowed permissions mode for os.OpenFile and os.Chmod. # Default: "0600" G302: "0600" - # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile + # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile. # Default: "0600" G306: "0600" @@ -1536,7 +1536,7 @@ linters: # Default: false disable-all: true # Enable analyzers by name. - # (in addition to default: + # (In addition to default: # appends, asmdecl, assign, atomic, bools, buildtag, cgocall, composites, copylocks, defers, directive, errorsas, # framepointer, httpresponse, ifaceassert, loopclosure, lostcancel, nilfunc, printf, shift, sigchanyzer, slog, # stdmethods, stringintconv, structtag, testinggoroutine, tests, timeformat, unmarshal, unreachable, unsafeptr, @@ -1636,7 +1636,7 @@ linters: # Default: false enable-all: true # Disable analyzers by name. - # (in addition to default + # (In addition to default # atomicalign, deepequalerrors, fieldalignment, findcall, nilness, reflectvaluecompare, shadow, sortslice, # timeformat, unusedwrite # ). @@ -1703,16 +1703,16 @@ linters: # Default: false strict: true unusedresult: - # Comma-separated list of functions whose results must be used - # (in addition to default: + # Comma-separated list of functions whose results must be used. + # (In addition to default: # context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf, # fmt.Sprint, fmt.Sprintf, sort.Reverse # ). # Default: [] funcs: - pkg.MyFunc - # Comma-separated list of names of methods of type func() string whose results must be used - # (in addition to default Error,String) + # Comma-separated list of names of methods of type func() string whose results must be used. + # (In addition to default Error,String). # Default: [] stringmethods: - MyMethod @@ -1778,7 +1778,7 @@ linters: alias: autoscalingv1alpha1 # You can specify the package path by regular expression, # and alias by regular expression expansion syntax like below. - # see https://github.com/julz/importas#use-regular-expression for details + # See https://github.com/julz/importas#use-regular-expression for details. - pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+) alias: $1$2 # An explicit empty alias can be used to ensure no aliases are used for a package. @@ -1917,14 +1917,14 @@ linters: - assign # List of numbers to exclude from analysis. # The numbers should be written as string. - # Values always ignored: "1", "1.0", "0" and "0.0" + # Values always ignored: "1", "1.0", "0" and "0.0". # Default: [] ignored-numbers: - '0666' - '0755' - '42' # List of file patterns to exclude from analysis. - # Values always ignored: `.+_test.go` + # Values always ignored: `.+_test.go`. # Default: [] ignored-files: - 'magic1_.+\.go$' @@ -1979,7 +1979,7 @@ linters: - unsafeptr nlreturn: - # Size of the block (including return statement that is still "OK") + # Size of the block (including return statement that is still "OK"), # so no return split required. # Default: 1 block-size: 2 @@ -2681,7 +2681,7 @@ linters: exclude: [""] rowserrcheck: - # database/sql is always checked + # database/sql is always checked. # Default: [] packages: - github.com/jmoiron/sqlx @@ -3267,7 +3267,7 @@ linters: # Align and sort can be used together or separately. # # Whether enable align. If true, the struct tags will be aligned. - # e.g.: + # E.g.: # type FooBar struct { # Bar string `json:"bar" validate:"required"` # FooFoo int8 `json:"foo_foo" validate:"required"` @@ -3281,7 +3281,7 @@ linters: align: false # Whether enable tags sort. # If true, the tags will be sorted by name in ascending order. - # e.g.: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"` + # E.g.: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"`. # Default: true sort: false # Specify the order of tags, the other tags will be sorted by name. @@ -3947,7 +3947,7 @@ formatters: gci: # Section configuration to compare against. # Section names are case-insensitive and may contain parameters in (). - # The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`, + # The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`. # If `custom-order` is `true`, it follows the order of `sections` option. # Default: ["standard", "default"] sections: