docs: update documentation assets (#4545)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
golangci-releaser 2024-03-20 03:05:17 +03:00 committed by GitHub
parent 023d78b94f
commit e35fa39729
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1031 additions and 861 deletions

View File

@ -40,11 +40,10 @@ jobs:
token: ${{ secrets.GOLANGCI_LINT_TOKEN }}
branch-suffix: timestamp
title: "docs: update documentation"
team-reviewers: golangci/team
delete-branch: true
update-assets:
name: "Update assets"
update-gha-assets:
name: "Update GitHub Action assets"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }}
@ -59,7 +58,7 @@ jobs:
# - 1.18rc1 -> 1.18.0-rc.1
go-version: '1.22'
- name: Update GitHub action config
- name: Update GitHub Action config
run: make assets/github-action-config.json
- name: Update reference files
@ -77,6 +76,39 @@ jobs:
base: master
token: ${{ secrets.GOLANGCI_LINT_TOKEN }}
branch-suffix: timestamp
title: "docs: update assets"
team-reviewers: golangci/team
title: "docs: update GitHub Action assets"
delete-branch: true
update-assets:
name: "Update documentation assets"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
# https://github.com/actions/setup-go#supported-version-syntax
# ex:
# - 1.18beta1 -> 1.18.0-beta.1
# - 1.18rc1 -> 1.18.0-rc.1
go-version: '1.22'
- 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:
base: master
token: ${{ secrets.GOLANGCI_LINT_TOKEN }}
branch-suffix: timestamp
title: "docs: update documentation assets"
delete-branch: true

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
#
# We have specific constraints, so we use a specific configuration.
#
# See the file `.golangci.reference.yml` to have a list of all available configuration options.
# See the file `.golangci.reference.yml` to have a list of all available configuration options.
linters-settings:
depguard:
@ -133,7 +133,6 @@ linters:
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
@ -146,7 +145,7 @@ linters:
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: _test\.go
- path: (.+)_test\.go
linters:
- dupl
- gomnd
@ -187,14 +186,13 @@ issues:
- path: pkg/golinters/unused.go
linters: [gocritic]
text: "rangeValCopy: each iteration copies 160 bytes \\(consider pointers or indexing\\)"
- path: test/(fix|linters)_test.go
linters: [gocritic]
text: "string `gocritic.go` has 3 occurrences, make it a constant"
run:
timeout: 5m
skip-dirs: # TODO(ldez): should be replaced by `issues.exclude-dirs` after the next release.
exclude-dirs:
- test/testdata_etc # test files
- internal/cache # extracted from Go code
- internal/renameio # extracted from Go code
- internal/robustio # extracted from Go code
run:
timeout: 5m

View File

@ -69,8 +69,10 @@ changelog:
- '(?i)^docs\[[^:]+\]:'
- '^tests?:'
- '(?i)^dev:'
- '(?i)^chore:'
- '^build\(deps\): bump .* in /docs \(#\d+\)'
- '^build\(deps\): bump .* in /\.github/peril \(#\d+\)'
- '^build\(deps\): bump .* in /scripts/gen_github_action_config \(#\d+\)'
- Merge pull request
- Merge branch

View File

@ -2,6 +2,66 @@ Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint)
There is the most valuable changes log:
### v1.57.0
1. New linters
* `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar
* `intrange`: https://github.com/ckaznocha/intrange
2. Updated linters
* `dupword`: from 0.0.13 to 0.0.14
* `gci`: from 0.12.1 to 0.12.3
* `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`)
* `go-critic`: from 0.11.1 to 0.11.2
* `go-critic`: support of `enable-all` and `disable-all` options
* `go-spancheck`: from 0.5.2 to 0.5.3
* `gomodguard`: from 1.3.0 to 1.3.1
* `govet`: deprecation of `check-shadowing` ⚠️
* `govet`: disable temporarily `httpresponse` because of a bug https://github.com/golang/go/issues/66259
* `misspell`: add `extra-words`
* `musttag`: from 0.8.0 to 0.9.0
* `nakedret`: from 2.0.2 to 2.0.4
* `paralleltest`: from 1.0.9 to 1.0.10
* `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`)
* `protogetter`: from 0.3.4 to 0.3.5
* `revive`: add `exclude` option
* `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`)
* `staticcheck`: from 0.4.6 to 0.4.7
* `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`)
* `unconvert`: to HEAD (new options `fast-math` and `safe`)
* `wrapcheck`: from 2.8.1 to 2.8.3
* Disable `copyloopvar` and `intrange` on Go < 1.22
3. Enhancements
* 🧩 New custom linters system https://golangci-lint.run/plugins/module-plugins/
* 🎉 Allow running only a specific linter without modifying the file configuration (`--enable-only`)
* Allow custom sort order for the reports (`output.sort-order`)
* Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0`
* Add `verify` command to check the configuration against the JSON Schema
* Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`)
* Syntax to not override `severity` from linters (`@linter`)
* Use severities from `gosec`
* Create automatically directory related to `output.formats.path`
* Use the first issue without inline on `mergeLineIssues` on multiple issues
4. Misc.
* ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`)
* ⚠️ Deprecated CLI flags have been removed (deprecated since 2018)
* ⚠️ Move `show-stats` option from `run` to `output` configuration section
* ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options
* ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax
* Internal rewrite of the CLI
* Improve 'no go files to analyze' message
* Use `GOTOOLCHAIN=auto` inside the Docker images
5. Documentation
* ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* 🎉 Use information from the previous release to create linter pages
* 🎉 Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json
* Reorganize documentation pages
* Add an explanation about the configuration file inside golangci-lint repository
**⚠️ Important ⚠️**
1. Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`.
2. Deprecated CLI flags (about linter settings and `deadline`) have been removed.
### v1.56.2
1. updated linters
@ -13,7 +73,7 @@ There is the most valuable changes log:
2. misc.
* Fix missing version in Docker image
3. Documentation
* Explain the limitation of new-from-rev and new-from-patch
* Explain the limitation of `new-from-rev` and `new-from-patch`
### v1.56.1
@ -26,7 +86,7 @@ There is the most valuable changes log:
### v1.56.0
1. new linters
* feat: add `spancheck` linter https://github.com/jjti/go-spancheck
* `spancheck`: https://github.com/jjti/go-spancheck
2. updated linters
* `depguard`: from 2.1.0 to 2.2.0
* `exhaustive`: from 0.11.0 to 0.12.0
@ -59,15 +119,15 @@ There is the most valuable changes log:
3. misc.
* 🎉 go1.22 support
* Implement stats per linter with a flag
* fix: make versioning inside Docker image consistent with binaries
* fix: parse Go RC version
* Make versioning inside Docker image consistent with binaries
* Parse Go RC version
4. Documentation
* Add missing fields to .golangci.reference.yml
* Fix noctx description
* Improve .golangci.reference.yml defaults
* Improve typecheck FAQ
* Note that `exhaustruct` struct regular expressions are expected to match the entire `package/name/structname`
* Adjust wrapcheck ignoreSigs to new defaults
* Fix `noctx` description
* Add missing fields to `.golangci.reference.yml`
* Improve `.golangci.reference.yml` defaults
* `typecheck`: improve FAQ
* `exhaustruct`: note that struct regular expressions are expected to match the entire `package/name/structname`
* `wrapcheck`: adjust `ignoreSigs` to new defaults
**Important**
@ -1183,7 +1243,7 @@ IMPORTANT: `varcheck` and `deadcode` has been removed of default linters.
### April 2020
1. Add new linters: `testpackage`, `nestif`, `godot`, `gomodguard`, `asciicheck`
2. Add github actions output format
2. Add GitHub Actions output format
3. Update linters: `wsl`, `gomodguard`, `gosec`
4. Support `disabled-tags` setting for `gocritic`
5. Mitigate OOM and "failed prerequisites"
@ -1197,7 +1257,7 @@ IMPORTANT: `varcheck` and `deadcode` has been removed of default linters.
2. Add new linters: `funlen`, `whitespace` (with auto-fix) and `godox`
3. Update linters: `gochecknoglobals`, `scopelint`, `gosec`
4. Provide pre-built binary for ARM and FreeBSD
5. 2. Fix false-positives in `unused`
5. Fix false-positives in `unused`
6. Support `--skip-dirs-use-default`
7. Add support for bash completions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -217,6 +217,7 @@
"bodyclose",
"containedctx",
"contextcheck",
"copyloopvar",
"cyclop",
"deadcode",
"decorder",
@ -270,6 +271,7 @@
"ineffassign",
"interfacebloat",
"interfacer",
"intrange",
"ireturn",
"lll",
"loggercheck",
@ -383,15 +385,18 @@
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false,
"properties": {
"run": {
"description": "Options for analysis running,",
"type": "object",
"additionalProperties": false,
"properties": {
"concurrency": {
"description": "Number of concurrent runners. Defaults to the number of available CPU cores.",
"type": "integer",
"minimum": 1,
"minimum": 0,
"examples": [4]
},
"timeout": {
@ -420,33 +425,6 @@
"default": [],
"examples": [["mytag"]]
},
"skip-dirs": {
"description": "Which directories to skip: issues from them won't be reported.",
"type": "array",
"items": {
"description": "You can use regexp here. The regexp is applied on the full path.\n\"/\" will be replaced by current OS file path separator to properly work on Windows.",
"type": "string",
"examples": ["generated.*"]
},
"default": [],
"examples": [["src/external_libs", "autogenerated_by_my_lib"]]
},
"skip-dirs-use-default": {
"description": "Enable skipping of directories \"vendor\", \"third_party\", \"testdata\", \"examples\", \"Godeps\", and \"builtin\".",
"type": "boolean",
"default": true
},
"skip-files": {
"description": "Which files to skip: they will be analyzed, but issues from them will not be reported.",
"type": "array",
"items": {
"description": "You can use regexp here. There is no need to include all autogenerated files, we confidently recognize them. If that is not the case, please let us know.\n\"/\" will be replaced by current OS file path separator to properly work on Windows.",
"type": "string",
"examples": [".*\\.my\\.go$"]
},
"default": [],
"examples": [[".*\\.my\\.go$", "lib/bad.go"]]
},
"modules-download-mode": {
"description": "Option to pass to \"go list -mod={option}\".\nSee \"go help modules\" for more information.",
"enum": ["mod", "readonly", "vendor"]
@ -461,37 +439,54 @@
"type": "boolean",
"default": false
},
"print-resources-usage": {
"description": "Print avg and max memory usage of golangci-lint and total time.",
"type": "boolean",
"default": false
},
"show-stats": {
"description": "Show statistics per linter.",
"type": "boolean",
"default": false
},
"go": {
"description": "Targeted Go version.",
"type": "string",
"default": "1.17"
}
},
"additionalProperties": false
}
},
"output": {
"description": "Output configuration options.",
"type": "object",
"additionalProperties": false,
"properties": {
"format": {
"description": "Output format to use.",
"pattern": "^(,?(colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity)(:[^,]+)?)+$",
"default": "colored-line-number",
"examples": [
"colored-line-number",
"checkstyle:report.json,colored-line-number",
"line-number:golangci-lint.out,colored-line-number:stdout"
]
"formats": {
"description": "Output formats to use.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"default": "stdout",
"anyOf": [
{
"enum": [ "stdout", "stderr" ]
},
{
"type": "string"
}
]
},
"format": {
"default": "colored-line-number",
"enum": [
"colored-line-number",
"line-number",
"json",
"colored-tab",
"tab",
"checkstyle",
"code-climate",
"junit-xml",
"github-actions",
"teamcity"
]
}
},
"required": ["format"]
}
},
"print-issued-lines": {
"description": "Print lines of code with issue.",
@ -513,17 +508,28 @@
"type": "string",
"default": ""
},
"show-stats": {
"description": "Show statistics per linter.",
"type": "boolean",
"default": false
},
"sort-order": {
"type": "array",
"items": {
"enum": ["linter", "severity", "file"]
}
},
"sort-results": {
"description": "Sort results by: filepath, line and column.",
"type": "boolean",
"default": true
}
},
"additionalProperties": false
}
},
"linters-settings": {
"description": "All available settings of specific linters.",
"type": "object",
"additionalProperties": false,
"properties": {
"dupword": {
"type": "object",
@ -707,8 +713,8 @@
"patternProperties": {
"^[^.]+$": {
"description": "Name of a rule.",
"additionalProperties": false,
"type": "object",
"additionalProperties": false,
"properties": {
"list-mode": {
"description": "Used to determine the package matching priority.",
@ -733,11 +739,10 @@
},
"deny": {
"description": "Packages that are not allowed where the value is a suggestion.",
"additionalProperties": false,
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"additionalProperties": false,
"properties": {
"desc": {
"description": "Description",
@ -913,20 +918,6 @@
}
}
},
"exhaustivestruct": {
"type": "object",
"additionalProperties": false,
"properties": {
"struct-patterns": {
"description": "Struct Patterns is list of expressions to match struct packages (written using `path` matching syntax)",
"type": "array",
"examples": ["^print.*$"],
"items": {
"type": "string"
}
}
}
},
"exhaustruct": {
"type": "object",
"additionalProperties": false,
@ -974,6 +965,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"p": {
"description": "Pattern",
@ -987,8 +979,7 @@
"description": "Message",
"type": "string"
}
},
"additionalProperties": false
}
}
]
}
@ -1088,6 +1079,21 @@
"description": "Don't trigger warnings for HaveLen(0).",
"type": "boolean",
"default": false
},
"force-expect-to": {
"description": "Force using `Expect` with `To`, `ToNot` or `NotTo`",
"type": "boolean",
"default": false
},
"validate-async-intervals": {
"description": "Best effort validation of async intervals (timeout and polling).",
"type": "boolean",
"default": false
},
"forbid-spec-pollution": {
"description": "Trigger a warning for variable assignments in ginkgo containers like `Describe`, `Context` and `When`, instead of in `BeforeEach()`.",
"type": "boolean",
"default": false
}
}
},
@ -1154,6 +1160,7 @@
},
"gocritic": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled-checks": {
"description": "Which checks should be enabled. By default, a list of stable checks is used. To see it, run `GL_DEBUG=gocritic golangci-lint run`.",
@ -1190,6 +1197,14 @@
"propertyNames": {
"$ref": "#/definitions/gocritic-checks"
}
},
"disable-all": {
"type": "boolean",
"default": false
},
"enable-all": {
"type": "boolean",
"default": false
}
}
},
@ -1265,6 +1280,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"pattern": {
"type": "string"
@ -1272,8 +1288,7 @@
"replacement": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
}
@ -1310,74 +1325,62 @@
},
"goheader": {
"type": "object",
"allOf": [
{
"additionalProperties": false,
"properties": {
"values": {
"type": "object",
"additionalProperties": false,
"properties": {
"values": {
"const": {
"description": "Constants to use in the template.",
"type": "object",
"properties": {
"const": {
"description": "Constants to use in the template.",
"type": "object",
"patternProperties": {
"^.+$": {
"description": "Value for the constant.",
"type": "string"
}
},
"additionalProperties": false,
"examples": [
{
"YEAR": "2030",
"COMPANY": "MY FUTURISTIC COMPANY"
}
]
},
"regexp": {
"description": "Regular expressions to use in your template.",
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string"
}
},
"additionalProperties": false,
"examples": [
{
"AUTHOR": ".*@mycompany\\.com"
}
]
"patternProperties": {
"^.+$": {
"description": "Value for the constant.",
"type": "string"
}
}
},
"additionalProperties": false,
"examples": [
{
"YEAR": "2030",
"COMPANY": "MY FUTURISTIC COMPANY"
}
]
},
"regexp": {
"description": "Regular expressions to use in your template.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string"
}
},
"examples": [
{
"AUTHOR": ".*@mycompany\\.com"
}
]
}
}
},
{
"oneOf": [
{
"properties": {
"template": {
"description": "Template to put on top of every file.",
"type": "string",
"examples": [
"{{ MY COMPANY }}\nSPDX-License-Identifier: Apache-2.0\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."
]
}
},
"required": ["template"]
},
{
"properties": {
"template-path": {
"description": "Path to the file containing the template source.",
"type": "string",
"examples": ["my_header_template.txt"]
}
},
"required": ["template-path"]
}
"template": {
"description": "Template to put on top of every file.",
"type": "string",
"examples": [
"{{ MY COMPANY }}\nSPDX-License-Identifier: Apache-2.0\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."
]
},
"template-path": {
"description": "Path to the file containing the template source.",
"type": "string",
"examples": ["my_header_template.txt"]
}
},
"oneOf": [
{ "required": ["template"] },
{ "required": ["template-path"] }
]
},
"goimports": {
@ -1391,61 +1394,10 @@
}
}
},
"golint": {
"type": "object",
"additionalProperties": false,
"properties": {
"min-confidence": {
"description": "Minimum confidence for issues.",
"type": "number",
"minimum": 0,
"exclusiveMaximum": 1
}
}
},
"gomnd": {
"type": "object",
"additionalProperties": false,
"properties": {
"settings": {
"type": "object",
"properties": {
"mnd": {
"type": "object",
"properties": {
"ignored-files": {
"description": "Comma-separated list of file patterns to exclude from the analysis.",
"examples": ["magic1_.*.go"],
"type": "string"
},
"ignored-functions": {
"description": "Comma-separated list of function patterns to exclude from the analysis.",
"examples": ["math.*,http.StatusText,make"],
"type": "string"
},
"ignored-numbers": {
"description": "Comma-separated list of numbers to exclude from the analysis.",
"examples": ["1000,1234_567_890,3.14159264"],
"type": "string"
},
"checks": {
"description": "The list of enabled checks.",
"type": "array",
"items": {
"enum": [
"argument",
"case",
"condition",
"operation",
"return",
"assign"
]
}
}
}
}
}
},
"ignored-files": {
"description": "List of file patterns to exclude from analysis.",
"examples": [["magic1_.*.go"]],
@ -1520,6 +1472,7 @@
"properties": {
"allowed": {
"type": "object",
"additionalProperties": false,
"properties": {
"modules": {
"description": "List of allowed modules.",
@ -1541,6 +1494,7 @@
},
"blocked": {
"type": "object",
"additionalProperties": false,
"properties": {
"modules": {
"description": "List of blocked modules.",
@ -1550,6 +1504,7 @@
"patternProperties": {
"^.+$": {
"type": "object",
"additionalProperties": false,
"properties": {
"recommendations": {
"description": "Recommended modules that should be used instead.",
@ -1576,6 +1531,7 @@
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"description": "Version constraint.",
@ -1705,11 +1661,6 @@
"type": "object",
"additionalProperties": false,
"properties": {
"check-shadowing": {
"description": "Report shadowed variables.",
"type": "boolean",
"default": true
},
"settings": {
"description": "Settings per analyzer. Map of analyzer name to specific settings.\nRun `go tool vet help` to find out more.",
"type": "object",
@ -1787,24 +1738,6 @@
}
}
},
"ifshort": {
"type": "object",
"additionalProperties": false,
"properties": {
"max-decl-lines": {
"description": "maximum length of variable declaration measured in numbers of lines, after which the linter won't suggest using short syntax. Has precedence over max-decl-chars",
"type": "integer",
"minimum": 1,
"default": 1
},
"max-decl-chars": {
"description": "maximum length of variable declaration measured in number of characters, after which the linter won't suggest using short syntax.",
"type": "integer",
"minimum": 1,
"default": 30
}
}
},
"importas": {
"type": "object",
"additionalProperties": false,
@ -1824,6 +1757,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"pkg": {
"description": "Package path e.g. knative.dev/serving/pkg/apis/autoscaling/v1alpha1",
@ -1982,17 +1916,6 @@
}
}
},
"maligned": {
"type": "object",
"additionalProperties": false,
"properties": {
"suggest-new": {
"description": "Whether to print struct with more effective memory layout.",
"type": "boolean",
"default": false
}
}
},
"misspell": {
"description": "Correct spellings using locale preferences for US or UK. Default is to use a neutral variety of English.",
"type": "object",
@ -2012,6 +1935,22 @@
"description": "Mode of the analysis.",
"enum": ["restricted", "", "default"],
"default": ""
},
"extra-words": {
"description": "Extra word corrections.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"correction": {
"type": "string"
},
"typo": {
"type": "string"
}
}
}
}
}
},
@ -2023,6 +1962,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
@ -2033,8 +1973,7 @@
"arg-pos": {
"type": "integer"
}
},
"additionalProperties": false
}
}
}
}
@ -2179,6 +2118,11 @@
"description": "Optimizes `fmt.Sprintf` with only one argument.",
"type": "boolean",
"default": true
},
"strconcat": {
"description": "Optimizes into strings concatenation.",
"type": "boolean",
"default": true
}
}
},
@ -2320,6 +2264,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {
@ -2333,6 +2278,12 @@
"type": "string",
"enum": ["warning", "error"]
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
},
"arguments": {
"type": "array"
}
@ -2364,6 +2315,11 @@
"type": "boolean",
"default": false
},
"no-global": {
"description": "Enforce not using global loggers.",
"enum": ["all", "default"],
"default": "default"
},
"no-mixed-args": {
"description": "Enforce not mixing key-value pairs and attributes.",
"type": "boolean",
@ -2653,6 +2609,7 @@
"properties": {
"case": {
"type": "object",
"additionalProperties": false,
"properties": {
"use-field-name": {
"description": "Use the struct field name to check the name of the struct tag.",
@ -2699,6 +2656,16 @@
"type": "object",
"additionalProperties": false,
"properties": {
"bool-compare": {
"type": "object",
"additionalProperties": false,
"properties": {
"ignore-custom-types": {
"type": "boolean",
"default": false
}
}
},
"enable-all": {
"description": "Enable all checkers.",
"type": "boolean",
@ -2837,6 +2804,7 @@
},
"benchmark": {
"type": "object",
"additionalProperties": false,
"properties": {
"begin": {
"description": "Check if `b.Helper()` begins helper function.",
@ -2857,6 +2825,7 @@
},
"tb": {
"type": "object",
"additionalProperties": false,
"properties": {
"begin": {
"description": "Check if `tb.Helper()` begins helper function.",
@ -2877,6 +2846,7 @@
},
"fuzz": {
"type": "object",
"additionalProperties": false,
"properties": {
"begin": {
"description": "Check if `f.Helper()` begins helper function.",
@ -2963,6 +2933,20 @@
}
}
},
"unconvert": {
"type": "object",
"additionalProperties": false,
"properties": {
"fast-math": {
"type": "boolean",
"default": false
},
"safe": {
"type": "boolean",
"default": false
}
}
},
"unparam": {
"type": "object",
"additionalProperties": false,
@ -3015,17 +2999,6 @@
}
}
},
"varcheck": {
"type": "object",
"additionalProperties": false,
"properties": {
"exported-fields": {
"description": "Check usage of exported variables",
"type": "boolean",
"default": false
}
}
},
"varnamelen": {
"type": "object",
"additionalProperties": false,
@ -3231,13 +3204,29 @@
}
}
},
"copyloopvar": {
"type": "object",
"additionalProperties": false,
"properties": {
"ignore-alias": {
"type": "boolean",
"default": false
}
}
},
"custom": {
"description": "The custom section can be used to define linter plugins to be loaded at runtime. See README of golangci-lint for more information.\nEach custom linter should have a unique name.",
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"description": "The plugin type.",
"enum": ["module", "goplugin"],
"default": "goplugin"
},
"path": {
"description": "The path to the plugin *.so. Can be absolute or local.",
"type": "string",
@ -3250,17 +3239,30 @@
"original-url": {
"description": "Intended to point to the repo location of the linter, for documentation purposes only.",
"type": "string"
},
"settings": {
"description": "Plugins settings/configuration. Only work with plugin based on `linterdb.PluginConstructor`.",
"type": "object"
}
},
"required": ["path"]
"oneOf": [
{
"properties": {
"type": {"enum": ["module"] }
}
},
{
"required": ["path"]
}
]
}
}
}
},
"additionalProperties": false
}
},
"linters": {
"type": "object",
"additionalProperties": false,
"properties": {
"enable": {
"description": "List of enabled linters.",
@ -3312,11 +3314,11 @@
"type": "boolean",
"default": false
}
},
"additionalProperties": false
}
},
"issues": {
"type": "object",
"additionalProperties": false,
"properties": {
"exclude": {
"description": "List of regular expressions of issue texts to exclude.\nBut independently from this option we use default exclude patterns. Their usage can be controlled through `exclude-use-default`.",
@ -3330,6 +3332,7 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string"
@ -3362,6 +3365,38 @@
"type": "boolean",
"default": false
},
"exclude-generated-strict": {
"description": "To follow strict Go generated file convention",
"type": "boolean",
"default": false
},
"exclude-dirs": {
"description": "Which directories to exclude: issues from them won't be reported.",
"type": "array",
"items": {
"description": "You can use regexp here. The regexp is applied on the full path.\n\"/\" will be replaced by current OS file path separator to properly work on Windows.",
"type": "string",
"examples": ["generated.*"]
},
"default": [],
"examples": [["src/external_libs", "autogenerated_by_my_lib"]]
},
"exclude-dirs-use-default": {
"description": "Enable exclusion of directories \"vendor\", \"third_party\", \"testdata\", \"examples\", \"Godeps\", and \"builtin\".",
"type": "boolean",
"default": true
},
"exclude-files": {
"description": "Which files to exclude: they will be analyzed, but issues from them will not be reported.",
"type": "array",
"items": {
"description": "You can use regexp here. There is no need to include all autogenerated files, we confidently recognize them. If that is not the case, please let us know.\n\"/\" will be replaced by current OS file path separator to properly work on Windows.",
"type": "string",
"examples": [".*\\.my\\.go$"]
},
"default": [],
"examples": [[".*\\.my\\.go$", "lib/bad.go"]]
},
"include": {
"description": "The list of ids of default excludes to include or disable.",
"type": "array",
@ -3406,11 +3441,11 @@
"type": "boolean",
"default": false
}
},
"additionalProperties": false
}
},
"severity": {
"type": "object",
"additionalProperties": false,
"properties": {
"default-severity": {
"description": "Set the default severity for issues. If severity rules are defined and the issues do not match or no severity is provided to the rule this will be the default severity applied. Severities should match the supported severity names of the selected out format.",
@ -3450,13 +3485,13 @@
}
}
}
]
],
"required": ["severity"]
},
"default": []
}
},
"additionalProperties": false
"required": ["default-severity"]
}
},
"type": "object"
}
}