Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update documentation assets #4692

Merged
merged 5 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ jobs:
- name: Update GitHub Action config
run: make assets/github-action-config.json

- name: Update reference files
run: cp .golangci.next.reference.yml .golangci.reference.yml

- name: Update JSON schema files
run: cp jsonschema/golangci.next.jsonschema.json jsonschema/golangci.jsonschema.json

- name: Update information
run: make website_dump_info

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
Expand Down
145 changes: 69 additions & 76 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ linters-settings:
pop-directional-isolate: false

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

cyclop:
# The maximal code complexity to report.
Expand Down Expand Up @@ -279,23 +279,11 @@ linters-settings:
# Default: false
check-blank: true

# DEPRECATED comma-separated list of pairs of the form pkg:regex
#
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*

# To disable the errcheck built-in exclude list.
# See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details.
# Default: false
disable-default-exclusions: true

# DEPRECATED use exclude-functions instead.
#
# Path to a file containing a list of functions to exclude from checking.
# See https://github.com/kisielk/errcheck#excluding-functions for details.
exclude: /path/to/file.txt

# List of functions to exclude from checking, where each entry is a single function to exclude.
# See https://github.com/kisielk/errcheck#excluding-functions for details.
exclude-functions:
Expand Down Expand Up @@ -338,6 +326,16 @@ linters-settings:
# Check for plain error comparisons.
# Default: true
comparison: false
# Allowed errors.
# Default: []
allowed-errors:
- err: "io.EOF"
fun: "example.com/pkg.Read"
# Allowed error "wildcards".
# Default: []
allowed-errors-wildcard:
- err: "example.com/pkg.ErrMagic"
fun: "example.com/pkg.Magic"

exhaustive:
# Program elements to check for exhaustiveness.
Expand Down Expand Up @@ -431,12 +429,9 @@ linters-settings:
ignore-comments: true

gci:
# DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead.
local-prefixes: github.com/org/project

# 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`,
# 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:
Expand All @@ -446,6 +441,7 @@ linters-settings:
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
- alias # Alias section: contains all alias imports. This section is not present unless explicitly enabled.
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.

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

gofumpt:
# Deprecated: use the global `run.go` instead.
lang-version: "1.17"

# Module path which contains the source code being formatted.
# Default: ""
module-path: github.com/org/project
Expand Down Expand Up @@ -779,38 +769,6 @@ linters-settings:
# Default: ""
local-prefixes: github.com/org/project

gomnd:
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
checks:
- argument
- case
- condition
- operation
- return
- 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"
# Default: []
ignored-numbers:
- '0666'
- '0755'
- '42'
# List of file patterns to exclude from analysis.
# Values always ignored: `.+_test.go`
# Default: []
ignored-files:
- 'magic1_.+\.go$'
# List of function patterns to exclude from analysis.
# Following functions are always ignored: `time.Date`,
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
# Default: []
ignored-functions:
- '^math\.'
- '^http\.StatusText$'

gomoddirectives:
# Allow local `replace` directives.
# Default: false
Expand Down Expand Up @@ -861,8 +819,6 @@ linters-settings:
local_replace_directives: false

gosimple:
# Deprecated: use the global `run.go` instead.
go: "1.15"
# Sxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: [ "all" ]
Expand Down Expand Up @@ -1367,6 +1323,38 @@ linters-settings:
# Default: ""
mode: restricted

mnd:
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
checks:
- argument
- case
- condition
- operation
- return
- 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"
# Default: []
ignored-numbers:
- '0666'
- '0755'
- '42'
# List of file patterns to exclude from analysis.
# Values always ignored: `.+_test.go`
# Default: []
ignored-files:
- 'magic1_.+\.go$'
# List of function patterns to exclude from analysis.
# Following functions are always ignored: `time.Date`,
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
# Default: []
ignored-functions:
- '^math\.'
- '^http\.StatusText$'

musttag:
# A set of custom functions to check in addition to the builtin ones.
# Default: json, xml, gopkg.in/yaml.v3, BurntSushi/toml, mitchellh/mapstructure, jmoiron/sqlx
Expand Down Expand Up @@ -2013,8 +2001,12 @@ linters-settings:
# Default: ""
no-global: "all"
# Enforce using methods that accept a context.
# Default: false
context-only: true
# Values:
# - "": disabled
# - "all": report all contextless calls
# - "scope": report only if a context exists in the scope of the outermost function
# Default: ""
context: "all"
# Enforce using static values for log messages.
# Default: false
static-msg: true
Expand Down Expand Up @@ -2046,17 +2038,19 @@ linters-settings:
# Default: []
ignore-check-signatures:
- "telemetry.RecordError"

# A list of regexes for additional function signatures that create spans.
# This is useful if you have a utility method to create spans.
# Each entry should be of the form `<regex>:<telemetry-type>`, where `telemetry-type` can be `opentelemetry` or `opencensus`.
# https://github.com/jjti/go-spancheck#extra-start-span-signatures
# Default: []
extra-start-span-signatures:
- "github.com/user/repo/telemetry/trace.Start:opentelemetry"
staticcheck:
# Deprecated: use the global `run.go` instead.
go: "1.15"
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: [ "all" ]

stylecheck:
# Deprecated: use the global `run.go` instead.
go: "1.15"
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
Expand Down Expand Up @@ -2280,9 +2274,6 @@ linters-settings:
# Suggest the use of rpc.DefaultXXPath.
# Default: false
default-rpc-path: true
# DEPRECATED Suggest the use of os.DevNull.
# Default: false
os-dev-null: true
# Suggest the use of sql.LevelXX.String().
# Default: false
sql-isolation-level: true
Expand All @@ -2292,9 +2283,6 @@ linters-settings:
# Suggest the use of constant.Kind.String().
# Default: false
constant-kind: true
# DEPRECATED Suggest the use of syslog.Priority.
# Default: false
syslog-priority: true

unconvert:
# Remove conversions that force intermediate rounding.
Expand Down Expand Up @@ -2514,6 +2502,7 @@ linters:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
Expand All @@ -2524,6 +2513,7 @@ linters:
- dupl
- dupword
- durationcheck
- err113
- errcheck
- errchkjson
- errname
Expand All @@ -2532,6 +2522,7 @@ linters:
- exhaustive
- exhaustruct
- exportloopref
- fatcontext
- forbidigo
- forcetypeassert
- funlen
Expand All @@ -2547,12 +2538,10 @@ linters:
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
Expand All @@ -2573,6 +2562,7 @@ linters:
- makezero
- mirror
- misspell
- mnd
- musttag
- nakedret
- nestif
Expand Down Expand Up @@ -2627,6 +2617,7 @@ linters:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
Expand All @@ -2637,6 +2628,7 @@ linters:
- dupl
- dupword
- durationcheck
- err113
- errcheck
- errchkjson
- errname
Expand All @@ -2645,6 +2637,7 @@ linters:
- exhaustive
- exhaustruct
- exportloopref
- fatcontext
- forbidigo
- forcetypeassert
- funlen
Expand All @@ -2660,12 +2653,10 @@ linters:
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
Expand All @@ -2686,6 +2677,7 @@ linters:
- makezero
- mirror
- misspell
- mnd
- musttag
- nakedret
- nestif
Expand Down Expand Up @@ -2735,6 +2727,7 @@ linters:
- ifshort # Deprecated
- interfacer # Deprecated
- maligned # Deprecated
- gomnd # Deprecated
- nosnakecase # Deprecated
- scopelint # Deprecated
- structcheck # Deprecated
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ linters-settings:
replacement: 'any'
goimports:
local-prefixes: github.com/golangci/golangci-lint
gomnd:
mnd:
# don't include the "operation" and "assign"
checks:
- argument
Expand Down Expand Up @@ -121,7 +121,7 @@ linters:
- godox
- gofmt
- goimports
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
Expand Down Expand Up @@ -150,7 +150,7 @@ issues:
- path: (.+)_test\.go
linters:
- dupl
- gomnd
- mnd
- lll

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