docs: update documentation assets (#4749)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
golangci-releaser 2024-05-26 21:50:44 +03:00 committed by GitHub
parent d69bbeddf7
commit a4f06a9cb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3740 additions and 41 deletions

View File

@ -72,6 +72,7 @@ output:
# - `junit-xml` # - `junit-xml`
# - `github-actions` # - `github-actions`
# - `teamcity` # - `teamcity`
# - `sarif`
# Output path can be either `stdout`, `stderr` or path to the file to write to. # Output path can be either `stdout`, `stderr` or path to the file to write to.
# #
# For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma. # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
@ -1388,14 +1389,16 @@ linters-settings:
min-complexity: 4 min-complexity: 4
nilnil: nilnil:
# Checks that there is no simultaneous return of `nil` error and an invalid value. # List of return types to check.
# Default: ["ptr", "func", "iface", "map", "chan"] # Default: ["ptr", "func", "iface", "map", "chan", "uintptr", "unsafeptr"]
checked-types: checked-types:
- ptr - ptr
- func - func
- iface - iface
- map - map
- chan - chan
- uintptr
- unsafeptr
nlreturn: nlreturn:
# Size of the block (including return statement that is still "OK") # Size of the block (including return statement that is still "OK")
@ -1996,12 +1999,15 @@ linters-settings:
sloglint: sloglint:
# Enforce not mixing key-value pairs and attributes. # Enforce not mixing key-value pairs and attributes.
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-mixed-arguments
# Default: true # Default: true
no-mixed-args: false no-mixed-args: false
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only). # Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-value-pairs-only
# Default: false # Default: false
kv-only: true kv-only: true
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only). # Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#attributes-only
# Default: false # Default: false
attr-only: true attr-only: true
# Enforce not using global loggers. # Enforce not using global loggers.
@ -2009,6 +2015,7 @@ linters-settings:
# - "": disabled # - "": disabled
# - "all": report all global loggers # - "all": report all global loggers
# - "default": report only the default slog logger # - "default": report only the default slog logger
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-global
# Default: "" # Default: ""
no-global: "all" no-global: "all"
# Enforce using methods that accept a context. # Enforce using methods that accept a context.
@ -2016,19 +2023,32 @@ linters-settings:
# - "": disabled # - "": disabled
# - "all": report all contextless calls # - "all": report all contextless calls
# - "scope": report only if a context exists in the scope of the outermost function # - "scope": report only if a context exists in the scope of the outermost function
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#context-only
# Default: "" # Default: ""
context: "all" context: "all"
# Enforce using static values for log messages. # Enforce using static values for log messages.
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#static-messages
# Default: false # Default: false
static-msg: true static-msg: true
# Enforce using constants instead of raw keys. # Enforce using constants instead of raw keys.
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-raw-keys
# Default: false # Default: false
no-raw-keys: true no-raw-keys: true
# Enforce a single key naming convention. # Enforce a single key naming convention.
# Values: snake, kebab, camel, pascal # Values: snake, kebab, camel, pascal
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-naming-convention
# Default: "" # Default: ""
key-naming-case: snake key-naming-case: snake
# Enforce not using specific keys.
# Default: []
forbidden-keys:
- time
- level
- msg
- source
- foo
# Enforce putting arguments on separate lines. # Enforce putting arguments on separate lines.
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#forbidden-keys
# Default: false # Default: false
args-on-sep-lines: true args-on-sep-lines: true
@ -2158,9 +2178,10 @@ linters-settings:
- error-is-as - error-is-as
- error-nil - error-nil
- expected-actual - expected-actual
- go-require
- float-compare - float-compare
- go-require
- len - len
- negative-positive
- nil-compare - nil-compare
- require-error - require-error
- suite-dont-use-pkg - suite-dont-use-pkg
@ -2174,7 +2195,7 @@ linters-settings:
# Enable checkers by name # Enable checkers by name
# (in addition to default # (in addition to default
# blank-import, bool-compare, compares, empty, error-is-as, error-nil, expected-actual, go-require, float-compare, # blank-import, bool-compare, compares, empty, error-is-as, error-nil, expected-actual, go-require, float-compare,
# len, nil-compare, require-error, suite-dont-use-pkg, suite-extra-assert-call, useless-assert # len, negative-positive, nil-compare, require-error, suite-dont-use-pkg, suite-extra-assert-call, useless-assert
# ). # ).
enable: enable:
- blank-import - blank-import
@ -2184,9 +2205,10 @@ linters-settings:
- error-is-as - error-is-as
- error-nil - error-nil
- expected-actual - expected-actual
- go-require
- float-compare - float-compare
- go-require
- len - len
- negative-positive
- nil-compare - nil-compare
- require-error - require-error
- suite-dont-use-pkg - suite-dont-use-pkg
@ -2202,6 +2224,10 @@ linters-settings:
# Regexp for expected variable name. # Regexp for expected variable name.
# Default: (^(exp(ected)?|want(ed)?)([A-Z]\w*)?$)|(^(\w*[a-z])?(Exp(ected)?|Want(ed)?)$) # Default: (^(exp(ected)?|want(ed)?)([A-Z]\w*)?$)|(^(\w*[a-z])?(Exp(ected)?|Want(ed)?)$)
pattern: ^expected pattern: ^expected
go-require:
# To ignore HTTP handlers (like http.HandlerFunc).
# Default: false
ignore-http-handlers: true
require-error: require-error:
# Regexp for assertions to analyze. If defined, then only matched error assertions will be reported. # Regexp for assertions to analyze. If defined, then only matched error assertions will be reported.
# Default: "" # Default: ""
@ -2846,17 +2872,17 @@ issues:
- ".*\\.my\\.go$" - ".*\\.my\\.go$"
- lib/bad.go - lib/bad.go
# To follow strictly the Go generated file convention. # Mode of the generated files analysis.
# #
# If set to true, source files that have lines matching only the following regular expression will be excluded: # - `strict`: sources are excluded by following strictly the Go generated file convention.
# `^// Code generated .* DO NOT EDIT\.$` # Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
# This line must appear before the first non-comment, non-blank text in the file. # This line must appear before the first non-comment, non-blank text in the file.
# https://go.dev/s/generatedcode # https://go.dev/s/generatedcode
# - `lax`: sources are excluded if they contain lines `autogenerated file`, `code generated`, `do not edit`, etc.
# - `disable`: disable the generated files exclusion.
# #
# By default, a lax pattern is applied: # Default: lax
# sources are excluded if they contain lines `autogenerated file`, `code generated`, `do not edit`, etc. exclude-generated: strict
# Default: false
exclude-generated-strict: true
# The list of ids of default excludes to include or disable. # The list of ids of default excludes to include or disable.
# https://golangci-lint.run/usage/false-positives/#default-exclusions # https://golangci-lint.run/usage/false-positives/#default-exclusions

View File

@ -1,5 +1,21 @@
Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint) and on [Twitter](https://twitter.com/golangci). Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint) and on [Twitter](https://twitter.com/golangci).
### v1.59.0
1. Enhancements
* Add SARIF output format
* Allow the analysis of generated files (`issues.exclude-generated: disable`)
2. Updated linters
* `errcheck`: fix deprecation warning
* `go-critic`: from 0.11.3 to 0.11.4
* `gosec`: from 2.20.0 to 5f0084eb01a9 (fix G601 and G113 performance issues)
* `sloglint`: from 0.6.0 to 0.7.0 (new option `forbidden-keys`)
* `testifylint`: from 1.2.0 to 1.3.0 (new checker `negative-positive` and new option `go-require.ignore-http-handlers`)
3. Misc.
* ️️⚠️ Deprecate `github-action` output format
* ️️⚠️ Deprecate `issues.exclude-generated-strict` option (replaced by `issues.exclude-generated: strict`)
* ️️⚠️ Add warning about disabled and deprecated linters (level 2)
### v1.58.2 ### v1.58.2
1. Updated linters 1. Updated linters

File diff suppressed because one or more lines are too long

View File

@ -433,7 +433,8 @@
"code-climate", "code-climate",
"junit-xml", "junit-xml",
"github-actions", "github-actions",
"teamcity" "teamcity",
"sarif"
] ]
} }
}, },
@ -2083,11 +2084,11 @@
"properties": { "properties": {
"checked-types": { "checked-types": {
"type": "array", "type": "array",
"description": "Order of return types to check.", "description": "List of return types to check.",
"items": { "items": {
"enum": ["ptr", "func", "iface", "map", "chan"] "enum": ["ptr", "func", "iface", "map", "chan", "uintptr", "unsafeptr"]
}, },
"default": ["ptr", "func", "iface", "map", "chan"] "default": ["ptr", "func", "iface", "map", "chan", "uintptr", "unsafeptr"]
} }
} }
}, },
@ -2469,6 +2470,13 @@
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },
"forbidden-keys": {
"description": "Enforce not using specific keys.",
"type": "array",
"items": {
"type": "string"
}
},
"args-on-sep-lines": { "args-on-sep-lines": {
"description": "Enforce putting arguments on separate lines.", "description": "Enforce putting arguments on separate lines.",
"type": "boolean", "type": "boolean",
@ -2773,16 +2781,6 @@
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"bool-compare": {
"type": "object",
"additionalProperties": false,
"properties": {
"ignore-custom-types": {
"type": "boolean",
"default": false
}
}
},
"enable-all": { "enable-all": {
"description": "Enable all checkers.", "description": "Enable all checkers.",
"type": "boolean", "type": "boolean",
@ -2805,9 +2803,10 @@
"error-is-as", "error-is-as",
"error-nil", "error-nil",
"expected-actual", "expected-actual",
"go-require",
"float-compare", "float-compare",
"go-require",
"len", "len",
"negative-positive",
"nil-compare", "nil-compare",
"require-error", "require-error",
"suite-dont-use-pkg", "suite-dont-use-pkg",
@ -2815,10 +2814,28 @@
"suite-thelper", "suite-thelper",
"useless-assert" "useless-assert"
] ]
} },
"default": [
"blank-import",
"bool-compare",
"compares",
"empty",
"error-is-as",
"error-nil",
"expected-actual",
"float-compare",
"go-require",
"len",
"negative-positive",
"nil-compare",
"require-error",
"suite-dont-use-pkg",
"suite-extra-assert-call",
"useless-assert"
]
}, },
"disable": { "disable": {
"description": "Enable specific checkers.", "description": "Disable specific checkers.",
"type": "array", "type": "array",
"items": { "items": {
"enum": [ "enum": [
@ -2829,25 +2846,52 @@
"error-is-as", "error-is-as",
"error-nil", "error-nil",
"expected-actual", "expected-actual",
"go-require",
"float-compare", "float-compare",
"go-require",
"len", "len",
"negative-positive",
"nil-compare", "nil-compare",
"require-error", "require-error",
"suite-dont-use-pkg", "suite-dont-use-pkg",
"suite-extra-assert-call", "suite-extra-assert-call",
"suite-thelper", "suite-thelper",
"useless-assert" "useless-assert"
],
"default": [
"suite-thelper"
] ]
} }
}, },
"bool-compare": {
"type": "object",
"additionalProperties": false,
"properties": {
"ignore-custom-types": {
"description": "To ignore user defined types (over builtin bool).",
"type": "boolean",
"default": false
}
}
},
"expected-actual": { "expected-actual": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"pattern": { "pattern": {
"description": "Regexp for expected variable name.", "description": "Regexp for expected variable name.",
"type": "string" "type": "string",
"default": "(^(exp(ected)?|want(ed)?)([A-Z]\\w*)?$)|(^(\\w*[a-z])?(Exp(ected)?|Want(ed)?)$)"
}
}
},
"go-require": {
"type": "object",
"additionalProperties": false,
"properties": {
"ignore-http-handlers": {
"description": "To ignore HTTP handlers (like http.HandlerFunc).",
"type": "boolean",
"default": false
} }
} }
}, },
@ -2856,8 +2900,9 @@
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"fn-pattern": { "fn-pattern": {
"description": "Regexp for expected variable name.", "description": "Regexp for assertions to analyze. If defined, then only matched error assertions will be reported.",
"type": "string" "type": "string",
"default": ""
} }
} }
}, },
@ -2868,7 +2913,8 @@
"mode": { "mode": {
"description": "To require or remove extra Assert() call?", "description": "To require or remove extra Assert() call?",
"type": "string", "type": "string",
"enum": ["remove", "require"] "enum": ["remove", "require"],
"default": "remove"
} }
} }
} }
@ -3472,10 +3518,10 @@
"type": "boolean", "type": "boolean",
"default": false "default": false
}, },
"exclude-generated-strict": { "exclude-generated": {
"description": "To follow strict Go generated file convention", "description": "Mode of the generated files analysis.",
"type": "boolean", "enum": ["lax", "strict", "disable"],
"default": false "default": "lax"
}, },
"exclude-dirs": { "exclude-dirs": {
"description": "Which directories to exclude: issues from them won't be reported.", "description": "Which directories to exclude: issues from them won't be reported.",

File diff suppressed because it is too large Load Diff