diff --git a/.custom-gcl.reference.yml b/.custom-gcl.reference.yml deleted file mode 100644 index c9382c24b88a..000000000000 --- a/.custom-gcl.reference.yml +++ /dev/null @@ -1,37 +0,0 @@ -# The golangci-lint version used to build the custom binary. -# Required. -version: v2.0.0 - -# The name of the custom binary. -# Optional. -# Default: custom-gcl -name: custom-golangci-lint - -# The directory path used to store the custom binary. -# Optional. -# Default: . -destination: ./my/path/ - -# The list of the plugins to integrate inside the custom binary. -plugins: - # a plugin from a Go proxy - - module: 'github.com/example/plugin3' - version: v1.2.3 - - # a plugin from a Go proxy (with a specific import path) - - module: 'github.com/example/plugin4' - import: 'github.com/example/plugin4/foo' - version: v1.0.0 - - # a plugin from local source (with absolute path) - - module: 'github.com/example/plugin2' - path: /my/local/path/plugin2 - - # a plugin from local source (with relative path) - - module: 'github.com/example/plugin1' - path: ./my/local/path/plugin1 - - # a plugin from local source (with absolute path and a specific import path) - - module: 'github.com/example/plugin2' - import: 'github.com/example/plugin4/foo' - path: /my/local/path/plugin2 diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 2b25f38602f0..000000000000 --- a/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -go.sum linguist-generated -assets/* linguist-generated -* text=auto eol=lf -*.ps1 text eol=crlf diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index dccccfdc350f..000000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -See [contributing quick start](https://golangci-lint.run/docs/contributing/) on our website. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index d7235007f93b..000000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,149 +0,0 @@ -name: 🐞 Bug Report -description: "Create a report to help us improve." -labels: [bug] -body: - - type: checkboxes - id: terms - attributes: - label: Welcome - options: - - label: Yes, I'm using a binary release within 2 latest [releases](https://github.com/golangci/golangci-lint/releases). Only such installations are supported. - required: true - - label: Yes, I've searched similar [issues on GitHub](https://github.com/golangci/golangci-lint/issues) and didn't find any. - required: true - - label: Yes, I've read the `typecheck` section of the [FAQ](https://golangci-lint.run/docs/welcome/faq/#why-do-you-have-typecheck-errors). - required: true - - label: Yes, I've tried with the standalone [linter](https://golangci-lint.run/docs/linters/) if available (e.g., gocritic, go vet, etc.). - required: true - - label: I agree to follow this project's [Code of Conduct](https://github.com/golangci/golangci-lint?tab=coc-ov-file) - required: true - - - type: dropdown - id: install - attributes: - label: How did you install golangci-lint? - options: - - I don't know - - Official GitHub Action - - Official binary - - Brew - - MacPorts - - Chocolatey - - Scoop - - Docker - - go install - - Tools pattern - - go tool - - AUR - - Nix - - Deb - - RPM - - Other Linux package manager - - Via editor/IDE - - asdf/mise-en-place - - Other - validations: - required: true - - - type: textarea - id: problem - attributes: - label: Description of the problem - placeholder: Your problem description - validations: - required: true - - - type: textarea - id: version - attributes: - label: Version of golangci-lint - value: |- -
- - ```console - $ golangci-lint --version - # Paste output here - ``` - -
- validations: - required: true - - - type: textarea - id: config - attributes: - label: Configuration - value: |- -
- - ```console - # paste configuration file or CLI flags here - ``` - -
- validations: - required: true - - - type: textarea - id: go-env - attributes: - label: Go environment - value: |- -
- - ```console - $ go version && go env - # paste output here - ``` - -
- validations: - required: true - - - type: textarea - id: verbose-output - attributes: - label: Verbose output of running - value: |- -
- - ```console - $ golangci-lint cache clean - $ golangci-lint run -v - # paste output here - ``` - -
- validations: - required: true - - - type: textarea - id: code-example - attributes: - label: A minimal reproducible example or link to a public repository - description: if your problem is related to a private repository, a minimal reproducible example is required. - value: |- -
- - ```go - // add your code here - ``` - -
- validations: - required: true - - - type: checkboxes - id: validation - attributes: - label: Validation - options: - - label: Yes, I've included all information above (version, config, etc.). - required: true - - - type: checkboxes - id: supporter - attributes: - label: Supporter - options: - - label: I am a sponsor/backer through [GitHub](https://github.com/sponsors/golangci/) or [OpenCollective](https://opencollective.com/golangci-lint) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 558c4b8625db..000000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: 📖 Documentation - url: https://golangci-lint.run - about: Please take a look to our documentation. - - name: ❓ Questions - url: https://github.com/golangci/golangci-lint/discussions - about: If you have a question, or are looking for advice, please post on our Discussions forum! - - name: 💬 Chat on Slack - url: https://gophers.slack.com/archives/CS0TBRKPC - about: Maybe chatting with the community can help diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 392c4cc0eadd..000000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: 💡 Feature request -description: "Suggest an idea for this project." -labels: [enhancement] -body: - - - type: checkboxes - id: terms - attributes: - label: Welcome - options: - - label: Yes, I've searched similar [issues on GitHub](https://github.com/golangci/golangci-lint/issues) and didn't find any. - required: true - - label: I agree to follow this project's [Code of Conduct](https://github.com/golangci/golangci-lint?tab=coc-ov-file) - required: true - - - type: dropdown - id: install - attributes: - label: How did you install golangci-lint? - options: - - I don't know - - Official GitHub Action - - Official binary - - Brew - - MacPorts - - Chocolatey - - Scoop - - Docker - - go install - - Tools pattern - - go tool - - AUR - - Nix - - Deb - - RPM - - Other Linux package manager - - Via editor/IDE - - asdf/mise-en-place - - Other - validations: - required: true - - - type: textarea - id: problem - attributes: - label: Your feature request related to a problem? Please describe - placeholder: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]" - validations: - required: true - - - type: textarea - id: solution - attributes: - label: Describe the solution you'd like - placeholder: "A clear and concise description of what you want to happen." - validations: - required: true - - - type: textarea - id: alternatives - attributes: - label: Describe alternatives you've considered - placeholder: "A clear and concise description of any alternative solutions or features you've considered." - validations: - required: true - - - type: textarea - id: additional - attributes: - label: Additional context - placeholder: "Add any other context or screenshots about the feature request here." - validations: - required: false - - - type: checkboxes - id: supporter - attributes: - label: Supporter - options: - - label: I am a sponsor through [GitHub](https://github.com/sponsors/golangci/) or [OpenCollective](https://opencollective.com/golangci-lint) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6add4eca594d..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml deleted file mode 100644 index d64d7262d661..000000000000 --- a/.github/boring-cyborg.yml +++ /dev/null @@ -1,6 +0,0 @@ -firstPRWelcomeComment: Hey, thank you for opening your first Pull Request ! - -# Comment to be posted to on first time issues -firstIssueWelcomeComment: > - Hey, thank you for opening your first Issue ! 🙂 - If you would like to contribute we have a [guide for contributors](https://golangci-lint.run/docs/contributing/). diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 1e4618407dd5..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,54 +0,0 @@ -version: 2 -updates: - - package-ecosystem: gomod - directory: "/" - schedule: - interval: weekly - day: "sunday" - time: "11:00" # 11am UTC - ignore: - # Ignore forked linters because of their versioning issues. - - dependency-name: "github.com/golangci/dupl" - - dependency-name: "github.com/golangci/gofmt" - - dependency-name: "github.com/golangci/swaggoswag" - - dependency-name: "github.com/golangci/unconvert" - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: weekly - groups: - github-actions: - patterns: - - "*" # Group all updates into a single larger pull request. - - package-ecosystem: docker - directory: "/build" - schedule: - interval: weekly - groups: - docker: - patterns: - - "*" # Group all updates into a single larger pull request. - - package-ecosystem: gomod - directory: "/scripts/gen_github_action_config" - schedule: - interval: weekly - groups: - scripts: - patterns: - - "*" # Group all updates into a single larger pull request. - - package-ecosystem: gomod - directories: - - pkg/golinters/arangolint/testdata/ - - pkg/golinters/ginkgolinter/testdata/ - - pkg/golinters/loggercheck/testdata/ - - pkg/golinters/protogetter/testdata/ - - pkg/golinters/spancheck/testdata/ - - pkg/golinters/zerologlint/testdata/ - groups: - linter-testdata: - patterns: - - "*" # Group all updates into a single larger pull request. - schedule: - interval: monthly - day: "wednesday" - time: "11:00" # 11am UTC diff --git a/.github/new-linter-checklist.md b/.github/new-linter-checklist.md deleted file mode 100644 index a2494eebda19..000000000000 --- a/.github/new-linter-checklist.md +++ /dev/null @@ -1,73 +0,0 @@ -In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements. - -- [ ] The CLA must be signed - -### Pull Request Description - -- [ ] It must have a link to the linter repository. -- [ ] It must provide a short description of the linter. - -### Linter - -- [ ] It must not be a duplicate of another linter or a rule of a linter (the team will help to verify that). -- [ ] It must have a valid license (AGPL is not allowed), and the file must contain the required information by the license, ex: author, year, etc. -- [ ] It must use Go version <= 1.22.0 -- [ ] The linter repository must have a CI and tests. -- [ ] It must use [`go/analysis`](https://golangci-lint.run/docs/contributing/new-linters/). -- [ ] It must have a valid tag, ex: `v1.0.0`, `v0.1.0`. -- [ ] It must not contain `init()`. -- [ ] It must not contain `panic()`. -- [ ] It must not contain `log.Fatal()`, `os.Exit()`, or similar. -- [ ] It must not modify the AST. -- [ ] It must not have false positives/negatives (the team will help to verify that). -- [ ] It must have tests inside golangci-lint. - -### The Linter Tests Inside Golangci-lint - -- [ ] They must have at least one std lib import. -- [ ] They must have integration tests without configuration (default). -- [ ] They must have integration tests with configuration (if the linter has a configuration). - -### `.golangci.next.reference.yml` - -- [ ] The file `.golangci.next.reference.yml` must be updated. -- [ ] The file `.golangci.reference.yml` must NOT be edited. -- [ ] The linter must be added to the lists of available linters (alphabetical case-insensitive order). - - `enable` and `disable` options -- [ ] If the linter has a configuration, the exhaustive configuration of the linter must be added (alphabetical case-insensitive order) - - The values must be different from the default ones. - - The default values must be defined in a comment. - - The option must have a short description. - -### Others Requirements - -- [ ] The files (tests and linter) inside golangci-lint must have the same name as the linter. -- [ ] The `.golangci.yml` of golangci-lint itself must not be edited and the linter must not be added to this file. -- [ ] The linters must be sorted in the alphabetical order (case-insensitive) in the `lintersdb/builder_linter.go` and `.golangci.next.reference.yml`. -- [ ] The load mode (`WithLoadMode(...)`): - - if the linter uses `goanalysis.LoadModeSyntax` -> no `WithLoadForGoAnalysis()` in `lintersdb/builder_linter.go` - - if the linter uses `goanalysis.LoadModeTypesInfo`, it requires `WithLoadForGoAnalysis()` in `lintersdb/builder_linter.go` -- [ ] The version in `WithSince(...)` must be the next minor version (`v1.X.0`) of golangci-lint. -- [ ] `WithURL()` must contain the URL of the repository. - -### Recommendations - -- [ ] The file `jsonschema/golangci.next.jsonschema.json` should be updated. -- [ ] The file `jsonschema/golangci.jsonschema.json` must NOT be edited. -- [ ] The linter repository should have a readme and linting. -- [ ] The linter should be published as a binary (useful to diagnose bug origins). -- [ ] The linter repository should have a `.gitignore` (IDE files, binaries, OS files, etc. should not be committed) -- [ ] A tag should never be recreated. -- [ ] Use `main` as the default branch name. - ---- - -The golangci-lint team will edit this comment to check the boxes before and during the review. - -The code review will start after the completion of those checkboxes (except for the specific items that the team will help to verify). - -The reviews should be addressed as commits (no squash). - -If the author of the PR is a member of the golangci-lint team, he should not edit this message. - -**This checklist does not imply that we will accept the linter.** diff --git a/.github/peril/.gitignore b/.github/peril/.gitignore deleted file mode 100644 index c2658d7d1b31..000000000000 --- a/.github/peril/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/.github/peril/README.md b/.github/peril/README.md deleted file mode 100644 index bde7716f14c1..000000000000 --- a/.github/peril/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Based on https://github.com/gatsbyjs/gatsby/tree/HEAD/peril. - -## Update a code - -```bash -heroku ps:restart web --app golangci-peril -heroku logs --app golangci-peril -t -``` diff --git a/.github/peril/package-lock.json b/.github/peril/package-lock.json deleted file mode 100644 index eaa54dd3d5d6..000000000000 --- a/.github/peril/package-lock.json +++ /dev/null @@ -1,3160 +0,0 @@ -{ - "name": "dependabot_20250315-1507-4icim6", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "jest": "^29.0.3" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", - "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", - "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.1", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.1", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.1", - "@babel/types": "^7.19.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", - "dependencies": { - "@babel/types": "^7.19.0", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", - "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", - "dependencies": { - "@babel/compat-data": "^7.19.1", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", - "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.10" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", - "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.10" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", - "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/traverse/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@babel/types": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", - "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", - "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", - "dependencies": { - "@jest/types": "^29.0.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", - "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", - "dependencies": { - "@jest/console": "^29.0.3", - "@jest/reporters": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-resolve-dependencies": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "jest-watcher": "^29.0.3", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", - "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", - "dependencies": { - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "jest-mock": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", - "dependencies": { - "expect": "^29.0.3", - "jest-snapshot": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", - "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", - "dependencies": { - "jest-get-type": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", - "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", - "dependencies": { - "@jest/types": "^29.0.3", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", - "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", - "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/types": "^29.0.3", - "jest-mock": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", - "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", - "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", - "dependencies": { - "@jest/console": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", - "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", - "dependencies": { - "@jest/test-result": "^29.0.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", - "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", - "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==" - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", - "dependencies": { - "@babel/types": "^7.3.0" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/node": { - "version": "18.7.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.20.tgz", - "integrity": "sha512-adzY4vLLr5Uivmx8+zfSJ5fbdgKxX8UMtjtl+17n0B1q1Nz8JEmE151vefMdpD+1gyh+77weN4qEhej/O7budQ==" - }, - "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" - }, - "node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/babel-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", - "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", - "dependencies": { - "@jest/transform": "^29.0.3", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", - "dependencies": { - "babel-plugin-jest-hoist": "^29.0.2", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/braces/node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001412", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", - "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ] - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==" - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", - "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==" - }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.261", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.261.tgz", - "integrity": "sha512-fVXliNUGJ7XUVJSAasPseBbVgJIeyw5M1xIkgXdTSRjlmCqBbiSTsEdLOCJS31Fc8B7CaloQ/BFAg8By3ODLdg==" - }, - "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", - "dependencies": { - "@jest/expect-utils": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - }, - "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", - "dependencies": { - "@jest/core": "^29.0.3", - "@jest/types": "^29.0.3", - "import-local": "^3.0.2", - "jest-cli": "^29.0.3" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", - "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-changed-files/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-circus": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", - "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", - "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "p-limit": "^3.1.0", - "pretty-format": "^29.0.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-config": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", - "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.3", - "@jest/types": "^29.0.3", - "babel-jest": "^29.0.3", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.3", - "jest-environment-node": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.0.3", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", - "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", - "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", - "dependencies": { - "@jest/types": "^29.0.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.0.3", - "pretty-format": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", - "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", - "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", - "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", - "dependencies": { - "@jest/types": "^29.0.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", - "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", - "dependencies": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", - "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", - "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", - "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", - "dependencies": { - "@jest/types": "^29.0.3", - "@types/node": "*" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", - "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", - "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", - "dependencies": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", - "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", - "dependencies": { - "@jest/console": "^29.0.3", - "@jest/environment": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-leak-detector": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-resolve": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-util": "^29.0.3", - "jest-watcher": "^29.0.3", - "jest-worker": "^29.0.3", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-runtime": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", - "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", - "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/globals": "^29.0.3", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", - "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.0.3", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "natural-compare": "^1.4.0", - "pretty-format": "^29.0.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", - "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", - "dependencies": { - "@jest/types": "^29.0.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", - "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", - "dependencies": { - "@jest/types": "^29.0.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "leven": "^3.1.0", - "pretty-format": "^29.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", - "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", - "dependencies": { - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.0.3", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", - "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jest/node_modules/jest-cli": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", - "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", - "dependencies": { - "@jest/core": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" - }, - "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", - "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/.github/peril/package.json b/.github/peril/package.json deleted file mode 100644 index e1415af9dd67..000000000000 --- a/.github/peril/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "dependencies": { - "jest": "^29.0.3" - }, - "scripts": { - "test": "jest" - }, - "jest": { - "rootDir": "../", - "roots": [ - "/peril" - ], - "transform": { - "^.+\\.tsx?$": "/node_modules/ts-jest/preprocessor.js" - }, - "moduleFileExtensions": [ - "js", - "jsx", - "ts", - "tsx", - "json" - ] - } -} diff --git a/.github/peril/rules/invite-collaborator.ts b/.github/peril/rules/invite-collaborator.ts deleted file mode 100644 index e4a62cb7ac10..000000000000 --- a/.github/peril/rules/invite-collaborator.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { danger } from "danger"; - -const comment = (username: string) => ` -Hey, @${username} — we just merged your PR to \`golangci-lint\`! 🔥🚀 - -\`golangci-lint\` is built by awesome people like you. Let us say “thanks”: **we just invited you to join the [GolangCI](https://github.com/golangci) organization on GitHub.** -This will add you to our team of maintainers. Accept the invite by visiting [this link](https://github.com/orgs/golangci/invitation). - -By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests. -More information about contributing is [here](https://golangci-lint.run/docs/contributing/). - -Thanks again! -`; - -const teamId = `3840765`; - -export const inviteCollaborator = async () => { - const gh = danger.github; - const api = gh.api; - - // Details about the repo. - const owner = gh.thisPR.owner; - const repo = gh.thisPR.repo; - const number = gh.thisPR.number; - - // Details about the collaborator. - const username = gh.pr.user.login; - - // Check whether or not we’ve already invited this contributor. - try { - const inviteCheck = (await api.teams.getMembership({ - team_id: teamId, - username, - } as any)) as any; - const isInvited = inviteCheck.headers.status !== "404"; - - // If we’ve already invited them, don’t spam them with more messages. - if (isInvited) { - console.log( - `@${username} has already been invited to this org. Doing nothing.` - ); - return; - } - } catch (err) { - console.info( - `Error checking membership of ${username} in team ${teamId}: ${err.stack}` - ); - // If the user hasn’t been invited, the invite check throws an error. - } - - try { - const invite = await api.teams.addOrUpdateMembership({ - team_id: teamId, - username, - } as any); - - if (invite.data.state === "active") { - console.log( - `@${username} is already a ${invite.data.role} for this team.` - ); - } else { - console.log(`We’ve invited @${username} to join this team.`); - } - } catch (err) { - console.log("Something went wrong."); - console.log(err); - return; - } - - // For new contributors, roll out the welcome wagon! - await api.issues.createComment({ - owner, - repo, - number, - body: comment(username), - }); -}; - -export default async () => { - await inviteCollaborator(); -}; diff --git a/.github/peril/settings.json b/.github/peril/settings.json deleted file mode 100644 index 3cfea70d4773..000000000000 --- a/.github/peril/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/danger/peril/HEAD/peril-settings-json.schema", - "settings": { - "ignored_repos": [], - "env_vars": ["SLACK_WEBHOOK_URL", "GITHUB_ACCESS_TOKEN"] - }, - "repos": { - "golangci/golangci-lint": { - "pull_request.closed (pull_request.merged == true)": [ - ".github/peril/rules/invite-collaborator.ts" - ] - } - } -} diff --git a/.github/peril/tests/invite-collaborator.test.ts b/.github/peril/tests/invite-collaborator.test.ts deleted file mode 100644 index 6421598bcdda..000000000000 --- a/.github/peril/tests/invite-collaborator.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -jest.mock("danger", () => jest.fn()); -import * as danger from "danger"; - -const dm = danger as any; - -import { inviteCollaborator } from "../rules/invite-collaborator"; - -beforeEach(() => { - dm.danger = { - github: { - thisPR: { - owner: "gatsbyjs", - repo: "peril-gatsbyjs", - number: 1, - }, - pr: { - user: { - login: "someUser", - }, - }, - api: { - teams: { - getMembership: () => Promise.resolve({ meta: { status: "404" } }), - addOrUpdateMembership: jest.fn(() => - Promise.resolve({ data: { state: "pending" } }) - ), - }, - issues: { - createComment: jest.fn(), - }, - }, - }, - }; -}); - -describe("a closed pull request", () => { - it("was merged and authored by a first-time contributor", async () => { - dm.danger.github.pr.merged = true; - - await inviteCollaborator(); - - expect(dm.danger.github.api.issues.createComment).toBeCalled(); - expect(dm.danger.github.api.orgs.addTeamMembership).toBeCalled(); - }); - - it("was merged and authored by an existing collaborator", async () => { - dm.danger.github.pr.merged = true; - dm.danger.github.api.orgs.getTeamMembership = () => - Promise.resolve({ headers: { status: "204 No Content" } }); - - await inviteCollaborator(); - - expect(dm.danger.github.api.issues.createComment).not.toBeCalled(); - }); - - it("does not comment if invitation failed", async () => { - dm.danger.github.pr.merged = true; - dm.danger.github.api.orgs.addTeamMembership = () => - Promise.reject({ headers: { status: "422 Unprocessable Entity" } }); - - await inviteCollaborator(); - - expect(dm.danger.github.api.issues.createComment).not.toBeCalled(); - }); -}); diff --git a/.github/peril/tsconfig.json b/.github/peril/tsconfig.json deleted file mode 100644 index 5c974a7c2630..000000000000 --- a/.github/peril/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "esModuleInterop": false, - "target": "es5", - "module": "commonjs", - "lib": ["es2017"], - "strict": true - } -} diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 39542ac527af..000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 366 - -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 30 - -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security - - blocked - - protected - - triaged - -# Label to use when marking an issue as stale -staleLabel: stale - -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 1bc574b893c1..000000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,51 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: - - main - pull_request: - # The branches below must be a subset of the branches above - branches: - - main - schedule: - - cron: '0 17 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - permissions: - # required for all workflows - security-events: write - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - # TODO: Enable for javascript later - language: [ 'go'] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml deleted file mode 100644 index dd9d2cd4691e..000000000000 --- a/.github/workflows/deploy-documentation.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Deploy Documentation - -on: - push: - branches: - - main - -jobs: - - doc: - name: Build and deploy documentation - runs-on: ubuntu-latest - env: - # 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.25' - HUGO_VERSION: 0.148.1 - CGO_ENABLED: 0 - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - - run: go mod download - - - name: Setup Hugo - run: | - wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - - name: Build Documentation - run: make docs_build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - publish_dir: docs/public - force_orphan: true - github_token: ${{ secrets.GOLANGCI_LINT_TOKEN }} diff --git a/.github/workflows/new-linter-checklist.yml b/.github/workflows/new-linter-checklist.yml deleted file mode 100644 index 18f26f071851..000000000000 --- a/.github/workflows/new-linter-checklist.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Add new linter checklist - -on: - workflow_dispatch: - inputs: - pr: - description: PR number - required: true - type: number - -permissions: - pull-requests: write - -jobs: - add-comment: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Add checklist - run: | - # Avoid adding multiple comments for the same PR. - comment_exist=$(gh pr view "$NUMBER" \ - --json comments \ - --jq '.comments[].author | select(.login=="github-actions") | .login' \ - | wc -l) - [ "$comment_exist" -gt 0 ] && edit_last="--edit-last" - - gh pr comment "$NUMBER" --body "$(cat .github/new-linter-checklist.md)" $edit_last - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ inputs.pr }} diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml deleted file mode 100644 index 763ec54511ba..000000000000 --- a/.github/workflows/post-release.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: "Post release" -on: - release: - types: - - published - -env: - # 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.25' - -jobs: - update-gha-assets: - name: "Update GitHub Action assets" - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Update GitHub Action config - run: make assets/github-action-config.json - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 - with: - base: main - token: ${{ secrets.GOLANGCI_LINT_TOKEN }} - branch-suffix: timestamp - 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@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - - 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@v7 - with: - base: main - token: ${{ secrets.GOLANGCI_LINT_TOKEN }} - branch-suffix: timestamp - title: "docs: update documentation assets" - delete-branch: true - body: | - - [ ] update changelog - - [ ] add previous version JSON Schema - - check-install-script: - name: Installation script (remote) - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b "./install-golangci-lint" diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml deleted file mode 100644 index 24c445f963cc..000000000000 --- a/.github/workflows/pr-checks.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: Checks -on: - push: - branches: - - main - pull_request: - -env: - # 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.25' - -jobs: - # Check if there is any dirty change for go mod tidy - go-mod: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - name: Check go mod - run: | - go mod tidy - git diff --exit-code go.mod - git diff --exit-code go.sum - - # This check is disabled because of GitHub API instability: 504 Gateway Timeout. - # Checks: GitHub action assets -# check-generated: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v5 -# with: -# fetch-depth: 0 -# - uses: actions/setup-go@v6 -# with: -# go-version: ${{ env.GO_VERSION }} -# - name: Check generated files are up-to-date -# run: make fast_check_generated -# env: -# # needed for github-action-config.json generation -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - check-local-install-script: - name: Installation script (local) - strategy: - matrix: - os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v5 - - name: Check installation script - run: cat ./install.sh | sh -s -- -d -b "./install-golangci-lint" - - # Note: the command `run` is tested by the other workflows (`make test`). - check-commands: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - name: Build golangci-lint - run: make build - - - run: ./golangci-lint - - - run: ./golangci-lint fmt - - run: ./golangci-lint fmt --diff - - run: cat cmd/golangci-lint/main.go | ./golangci-lint fmt --stdin - - - run: ./golangci-lint cache - - run: ./golangci-lint cache status - - run: ./golangci-lint cache clean - - - run: ./golangci-lint completion - - run: ./golangci-lint completion bash - - run: ./golangci-lint completion bash --no-descriptions - - run: ./golangci-lint completion zsh - - run: ./golangci-lint completion zsh --no-descriptions - - run: ./golangci-lint completion fish - - run: ./golangci-lint completion fish --no-descriptions - - run: ./golangci-lint completion powershell - - run: ./golangci-lint completion powershell --no-descriptions - - - run: ./golangci-lint config - - run: ./golangci-lint config path - - run: ./golangci-lint config path --json - - run: ./golangci-lint config verify --schema jsonschema/golangci.next.jsonschema.json - - - run: ./golangci-lint help - - run: ./golangci-lint help linters - - run: ./golangci-lint help linters --json - - run: ./golangci-lint help formatters - - run: ./golangci-lint help formatters --json - - run: ./golangci-lint linters - - run: ./golangci-lint linters --json - - run: ./golangci-lint formatters - - run: ./golangci-lint formatters --json - - run: ./golangci-lint version - - run: ./golangci-lint version --short - - run: ./golangci-lint version --debug - - run: ./golangci-lint version --json - - run: ./golangci-lint version --json --debug diff --git a/.github/workflows/pr-documentation.yml b/.github/workflows/pr-documentation.yml deleted file mode 100644 index f27f1d624559..000000000000 --- a/.github/workflows/pr-documentation.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Check Documentation - -on: - pull_request: - -jobs: - - doc: - name: Build documentation - runs-on: ubuntu-latest - env: - # 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.25' - HUGO_VERSION: 0.148.1 - CGO_ENABLED: 0 - - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - - run: go mod download - - - name: Setup Hugo - run: | - wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - - name: Build Documentation - run: make docs_build diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml deleted file mode 100644 index aa6e19c2b303..000000000000 --- a/.github/workflows/pr-tests.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Tests -on: - push: - branches: - - main - pull_request: - -env: - # 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.25' - -jobs: - # Check if there is any dirty change for go mod tidy - go-mod: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - name: Check go mod - run: | - go mod tidy - git diff --exit-code go.mod - git diff --exit-code go.sum - - # We already run the current golangci-lint in tests, but here we test - # our GitHub action with the latest stable golangci-lint. - golangci-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - 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 - # TODO(ldez) must be changed after the first release of golangci-lint with go1.24 - # go-version: ${{ env.GO_VERSION }} - go-version: '1.24' - - name: lint - uses: golangci/golangci-lint-action@v8.0.0 - with: - version: latest - - tests-on-windows: - needs: golangci-lint # run after golangci-lint action to not produce duplicated errors - runs-on: windows-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI - - name: Run tests - run: make.exe test - - tests-on-macos: - needs: golangci-lint # run after golangci-lint action to not produce duplicated errors - runs-on: macos-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI - - name: Run tests - run: make test - - tests-on-unix: - needs: golangci-lint # run after golangci-lint action to not produce duplicated errors - strategy: - matrix: - os: - - ubuntu-latest - - ubuntu-24.04-arm - golang: - - '1.24' - - '1.25' - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-go@v6 - with: - go-version: ${{ matrix.golang }} - - name: Run tests - run: make test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 34abc0527d03..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: "Release a tag" -on: - push: - tags: - - v* - -jobs: - release: - runs-on: ubuntu-latest - env: - # 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.25' - CHOCOLATEY_VERSION: 2.2.0 - steps: - # temporary workaround for an error in free disk space action - # https://github.com/jlumbroso/free-disk-space/issues/14 - - name: Update Package List and Remove Dotnet - run: | - sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - - # https://github.com/marketplace/actions/free-disk-space-ubuntu - - name: Free Disk Space - uses: jlumbroso/free-disk-space@main - with: - # this might remove tools that are actually needed - tool-cache: false - - # all of these default to true - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: false - - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - -# - name: Install chocolatey -# run: | -# mono --version -# mkdir -p /opt/chocolatey -# wget -q -O - "https://github.com/chocolatey/choco/releases/download/$%7BCHOCOLATEY_VERSION%7D/chocolatey.v$%7BCHOCOLATEY_VERSION%7D.tar.gz" | tar -xz -C "/opt/chocolatey" -# echo '#!/bin/bash' >> /usr/local/bin/choco -# echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco -# chmod +x /usr/local/bin/choco -# choco --version - - - name: Install snapcraft - run: sudo snap install snapcraft --classic - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login do docker.io - run: docker login -u golangci -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }} - - - name: Create release - uses: goreleaser/goreleaser-action@v6 - with: - version: latest - args: release --clean --timeout=90m - env: - AUR_KEY: ${{ secrets.AUR_KEY }} - CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} - GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d6524df2586d..000000000000 --- a/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -*.test -.DS_Store -/*.pdf -/*.pprof -/*.txt -/test.lock -/.idea/ -/.vscode/ -/dist/ -/golangci-lint -/golangci-lint.exe -/test/path -/tools/Dracula.itermcolors -/tools/dist/ -/tools/godownloader -/tools/goreleaser -/tools/node_modules -/tools/svg-term -/vendor/ -coverage.out -coverage.xml -/custom-golangci-lint -/custom-gcl -.custom-gcl.yml -.custom-gcl.yaml -**/testdata/fix.tmp/ diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml deleted file mode 100644 index 2adb14f8b4b7..000000000000 --- a/.golangci.next.reference.yml +++ /dev/null @@ -1,4697 +0,0 @@ -# This file contains all available configuration options -# with their default values (in comments). -# -# This file is not a configuration example, -# it contains the exhaustive configuration with explanations of the options. - -# Defines the configuration version. -# The only possible value is "2". -version: "2" - -linters: - # Default set of linters. - # The value can be: - # - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default - # - `all`: enables all linters by default. - # - `none`: disables all linters by default. - # - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`). - # Default: standard - default: all - - # Enable specific linter. - enable: - - arangolint - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - embeddedstructfieldcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - exhaustruct - - exptostd - - fatcontext - - forbidigo - - forcetypeassert - - funcorder - - funlen - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godoclint - - godot - - godox - - goheader - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - iotamixing - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - modernize - - musttag - - nakedret - - nestif - - nilerr - - nilnesserr - - nilnil - - nlreturn - - noctx - - noinlineerr - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - tagalign - - tagliatelle - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unqueryvet - - unused - - usestdlibvars - - usetesting - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - wsl_v5 - - zerologlint - - # Disable specific linters. - disable: - - arangolint - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - embeddedstructfieldcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - exhaustruct - - exptostd - - fatcontext - - forbidigo - - forcetypeassert - - funcorder - - funlen - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godoclint - - godot - - godox - - goheader - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - iotamixing - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - modernize - - musttag - - nakedret - - nestif - - nilerr - - nilnesserr - - nilnil - - nlreturn - - noctx - - noinlineerr - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - tagalign - - tagliatelle - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unqueryvet - - unused - - usestdlibvars - - usetesting - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - wsl_v5 - - zerologlint - - # All available settings of specific linters. - settings: - asasalint: - # To specify a set of function names to exclude. - # The values are merged with the builtin exclusions. - # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. - # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] - exclude: - - Append - - \.Wrapf - # To enable/disable the asasalint builtin exclusions of function names. - # See the default value of `exclude` to get the builtin exclusions. - # Default: true - use-builtin-exclusions: false - - bidichk: - # The following configurations check for all mentioned invisible Unicode runes. - # All runes are enabled by default. - left-to-right-embedding: false - right-to-left-embedding: false - pop-directional-formatting: false - left-to-right-override: false - right-to-left-override: false - left-to-right-isolate: false - right-to-left-isolate: false - first-strong-isolate: false - pop-directional-isolate: false - - copyloopvar: - # Check all assigning the loop variable to another variable. - # Default: false - check-alias: true - - cyclop: - # The maximal code complexity to report. - # Default: 10 - max-complexity: 10 - # The maximal average package complexity. - # If it's higher than 0.0 (float) the check is enabled. - # Default: 0.0 - package-average: 0.5 - - decorder: - # Required order of `type`, `const`, `var` and `func` declarations inside a file. - # Default: types before constants before variables before functions. - dec-order: - - type - - const - - var - - func - - # 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 - - # If true, order of declarations is not checked at all. - # Default: true (disabled) - disable-dec-order-check: false - - # If true, `init` func can be anywhere in file (does not have to be declared before all other functions). - # Default: true (disabled) - disable-init-func-first-check: false - - # If true, multiple global `type`, `const` and `var` declarations are allowed. - # Default: true (disabled) - disable-dec-num-check: false - - # 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. - # Default: false (const statements are not ignored) - disable-const-dec-num-check: false - - # If true, var declarations will be ignored for dec num check. - # Default: false (var statements are not ignored) - disable-var-dec-num-check: false - - depguard: - # Rules to apply. - # - # Variables: - # - File Variables - # Use an exclamation mark `!` to negate a variable. - # Example: `!$test` matches any file that is not a go test file. - # - # `$all` - matches all go files - # `$test` - matches all go test files - # - # - Package Variables - # - # `$gostd` - matches all of go's standard library (Pulled from `GOROOT`) - # - # Default (applies if no custom rules are defined): Only allow $gostd in all files. - rules: - # Name of a rule. - main: - # Defines package matching behavior. Available modes: - # - `original`: allowed if it doesn't match the deny list and either matches the allow list or the allow list is empty. - # - `strict`: allowed only if it matches the allow list and either doesn't match the deny list or the allow rule is more specific (longer) than the deny rule. - # - `lax`: allowed if it doesn't match the deny list or the allow rule is more specific (longer) than the deny rule. - # Default: "original" - list-mode: lax - # List of file globs that will match this list of settings to compare against. - # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed. - # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`. - # The placeholder '${config-path}' is substituted with a path relative to the configuration file. - # Default: $all - files: - - "!**/*_a _file.go" - # List of allowed packages. - # Entries can be a variable (starting with $), a string prefix, or an exact match (if ending with $). - # Default: [] - allow: - - $gostd - - github.com/OpenPeeDeeP - # List of packages that are not allowed. - # Entries can be a variable (starting with $), a string prefix, or an exact match (if ending with $). - # Default: [] - deny: - - pkg: "math/rand$" - desc: use math/rand/v2 - - pkg: "github.com/sirupsen/logrus" - desc: not allowed - - pkg: "github.com/pkg/errors" - desc: Should be replaced by standard lib errors package - - dogsled: - # Checks assignments with too many blank identifiers. - # Default: 2 - max-blank-identifiers: 3 - - dupl: - # Tokens count to trigger issue. - # Default: 150 - threshold: 100 - - dupword: - # Keywords for detecting duplicate words. - # If this list is not empty, only the words defined in this list will be detected. - # Default: [] - keywords: - - "the" - - "and" - - "a" - # Keywords used to ignore detection. - # Default: [] - ignore: - - "0C0C" - # Checks only comments, skip strings. - # Default: false - comments-only: true - - embeddedstructfieldcheck: - # Checks that there is an empty space between the embedded fields and regular fields. - # Default: true - empty-line: false - # Checks that sync.Mutex and sync.RWMutex are not used as embedded fields. - # Default: false - forbid-mutex: true - - errcheck: - # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. - # Such cases aren't reported by default. - # Default: false - check-type-assertions: true - - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`. - # Such cases aren't reported by default. - # Default: false - check-blank: true - - # 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 - - # 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: - - io/ioutil.ReadFile - - io.Copy(*bytes.Buffer) - - io.Copy(os.Stdout) - - # Display function signature instead of selector. - # Default: false - verbose: true - - errchkjson: - # With check-error-free-encoding set to true, errchkjson does warn about errors - # from json encoding functions that are safe to be ignored, - # because they are not possible to happen. - # - # if check-error-free-encoding is set to true and errcheck linter is enabled, - # it is recommended to add the following exceptions to prevent from false positives: - # - # linters: - # settings: - # errcheck: - # exclude-functions: - # - encoding/json.Marshal - # - encoding/json.MarshalIndent - # - # Default: false - check-error-free-encoding: true - - # Issue on struct encoding that doesn't have exported fields. - # Default: false - report-no-exported: false - - errorlint: - # Check whether fmt.Errorf uses the %w verb for formatting errors. - # 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`). - # Default: true - errorf-multi: false - # Check for plain type assertions and type switches. - # Default: true - asserts: false - # 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. - # Default: [ switch ] - check: - - switch - - map - # Presence of "default" case in switch statements satisfies exhaustiveness, - # even if all enum members are not listed. - # Default: false - default-signifies-exhaustive: true - # Enum members matching the supplied regex do not have to be listed in - # switch statements to satisfy exhaustiveness. - # Default: "" - ignore-enum-members: "Example.+" - # Enum types matching the supplied regex do not have to be listed in - # switch statements to satisfy exhaustiveness. - # Default: "" - ignore-enum-types: "Example.+" - # Consider enums only in package scopes, not in inner scopes. - # Default: false - package-scope-only: true - # Only run exhaustive check on switches with "//exhaustive:enforce" comment. - # Default: false - explicit-exhaustive-switch: true - # Only run exhaustive check on map literals with "//exhaustive:enforce" comment. - # Default: false - explicit-exhaustive-map: true - # Switch statement requires default case even if exhaustive. - # Default: false - default-case-required: true - - exhaustruct: - # List of regular expressions to match type names that should be processed. - # Anonymous structs can be matched by '' alias. - # - # Each regular expression must match the full type name, including package path. - # For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`, - # but not `http\.Cookie`. - # Default: [] - include: - - '.+\.Test' - - 'example\.com/package\.ExampleStruct[\d]{1,2}' - # List of regular expressions to match type names that should be excluded from processing. - # Anonymous structs can be matched by '' alias. - # Has precedence over `include`. - # Each regular expression must match the full type name, including package path. - # For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`, - # but not `http\.Cookie`. - # Default: [] - exclude: - - '.+/cobra\.Command$' - # Allows empty structures, effectively excluding them from the check. - # Default: false - allow-empty: true - # List of regular expressions to match type names that should be allowed to be empty. - # Anonymous structs can be matched by '' alias. - # Each regular expression must match the full type name, including package path. - # For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`, - # but not `http\.Cookie`. - # Default: [] - allow-empty-rx: - - '.*/http\.Cookie' - # Allows empty structures in return statements. - # Default: false - allow-empty-returns: true - # Allows empty structures in variable declarations. - # Default: false - allow-empty-declarations: true - - fatcontext: - # Check for potential fat contexts in struct pointers. - # May generate false positives. - # Default: false - check-struct-pointers: true - - forbidigo: - # Forbid the following identifiers (list of regexp). - # Default: ["^(fmt\\.Print(|f|ln)|print|println)$"] - forbid: - # Built-in bootstrapping functions. - - pattern: ^print(ln)?$ - # 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 `(# )?`. - # 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. - # Depends on analyze-types below. - - pattern: ^spew\.(ConfigState\.)?Dump$ - # The package name might be ambiguous. - # The full import path can be used as additional criteria. - # Depends on analyze-types below. - - pattern: ^v1.Dump$ - pkg: ^example.com/pkg/api/v1$ - # Exclude godoc examples from forbidigo checks. - # Default: true - exclude-godoc-examples: false - # Instead of matching the literal source code, - # use type information to replace expressions with strings that contain the package name - # and (for methods and fields) the type name. - # This makes it possible to handle import renaming and forbid struct fields and methods. - # Default: false - analyze-types: true - - funcorder: - # Checks that constructors are placed after the structure declaration. - # Default: true - constructor: false - # Checks if the exported methods of a structure are placed before the non-exported ones. - # Default: true - struct-method: false - # Checks if the constructors and/or structure methods are sorted alphabetically. - # Default: false - alphabetical: true - - funlen: - # Checks the number of lines in a function. - # If lower than 0, disable the check. - # Default: 60 - lines: -1 - # Checks the number of statements in a function. - # If lower than 0, disable the check. - # Default: 40 - statements: -1 - # Ignore comments when counting lines. - # Default: true - ignore-comments: false - - ginkgolinter: - # Suppress the wrong length assertion warning. - # Default: false - suppress-len-assertion: true - - # Suppress the wrong nil assertion warning. - # Default: false - suppress-nil-assertion: true - - # Suppress the wrong error assertion warning. - # Default: false - suppress-err-assertion: true - - # Suppress the wrong comparison assertion warning. - # Default: false - suppress-compare-assertion: true - - # Suppress the function all in async assertion warning. - # Default: false - suppress-async-assertion: true - - # 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`. - # Default: false - forbid-focus-container: true - - # Don't trigger warnings for HaveLen(0) - # Default: false - allow-havelen-zero: true - - # Force using `Expect` with `To`, `ToNot` or `NotTo`. - # Reject using `Expect` with `Should` or `ShouldNot`. - # Default: false - force-expect-to: true - - # Best effort validation of async intervals (timeout and polling). - # Ignored the `suppress-async-assertion` is true. - # Default: false - validate-async-intervals: true - - # Trigger a warning for variable assignments in ginkgo containers like `Describe`, `Context` and `When`, instead of in `BeforeEach()`. - # Default: false - forbid-spec-pollution: true - - # Force using the Succeed matcher for error functions, and the HaveOccurred matcher for non-function error values. - # Default: false - force-succeed: true - - # Force adding assertion descriptions to gomega matchers. - # Default: false - force-assertion-description: true - - # Force using `ToNot`, `ShouldNot` instead of `To(Not())`. - # Default: false - force-tonot: true - - gochecksumtype: - # 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 exhaustiveness check. - # Default: false - include-shared-interfaces: true - - gocognit: - # Minimal code complexity to report. - # Default: 30 (but we recommend 10-20) - min-complexity: 10 - - goconst: - # Minimal length of string constant. - # Default: 3 - min-len: 2 - # Minimum occurrences of constant string count to trigger issue. - # Default: 3 - min-occurrences: 2 - # Look for existing constants matching the values. - # Default: true - match-constant: false - # Search also for duplicated numbers. - # Default: false - numbers: true - # Minimum value, only works with `goconst.numbers`. - # Default: 3 - min: 2 - # Maximum value, only works with `goconst.numbers`. - # Default: 3 - max: 2 - # Ignore when constant is not used as function argument. - # Default: true - ignore-calls: false - # Exclude strings matching the given regular expression. - # Default: "" - ignore-string-values: - - 'foo.+' - # Detects constants with identical values. - # Default: false - find-duplicates: true - # Evaluates of constant expressions like Prefix + "suffix". - # Default: false - eval-const-expressions: true - - gocritic: - # Disable all checks. - # Default: false - disable-all: true - # Which checks should be enabled in addition to default checks; can't be combined with 'disabled-checks'. - # By default, list of stable checks is used (https://go-critic.com/overview#checks-overview): - # appendAssign, argOrder, assignOp, badCall, badCond, captLocal, caseOrder, codegenComment, commentFormatting, - # defaultCaseOrder, deprecatedComment, dupArg, dupBranchBody, dupCase, dupSubExpr, elseif, exitAfterDefer, - # flagDeref, flagName, ifElseChain, mapKey, newDeref, offBy1, regexpMust, singleCaseSwitch, sloppyLen, - # sloppyTypeAssert, switchTrue, typeSwitchVar, underef, unlambda, unslice, valSwap, wrapperFunc - # To see which checks are enabled run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic`. - enabled-checks: - # Detects suspicious append result assignments. - # https://go-critic.com/overview.html#appendassign - - appendAssign - # Detects `append` chains to the same slice that can be done in a single `append` call. - # https://go-critic.com/overview.html#appendcombine - - appendCombine - # Detects suspicious arguments order. - # https://go-critic.com/overview.html#argorder - - argOrder - # Detects assignments that can be simplified by using assignment operators. - # https://go-critic.com/overview.html#assignop - - assignOp - # Detects suspicious function calls. - # https://go-critic.com/overview.html#badcall - - badCall - # Detects suspicious condition expressions. - # https://go-critic.com/overview.html#badcond - - badCond - # Detects suspicious mutex lock/unlock operations. - # https://go-critic.com/overview.html#badlock - - badLock - # Detects suspicious regexp patterns. - # https://go-critic.com/overview.html#badregexp - - badRegexp - # Detects bad usage of sort package. - # https://go-critic.com/overview.html#badsorting - - badSorting - # Detects bad usage of sync.OnceFunc. - # https://go-critic.com/overview.html#badsynconcefunc - - badSyncOnceFunc - # Detects bool expressions that can be simplified. - # https://go-critic.com/overview.html#boolexprsimplify - - boolExprSimplify - # Detects when predeclared identifiers are shadowed in assignments. - # https://go-critic.com/overview.html#builtinshadow - - builtinShadow - # Detects top-level declarations that shadow the predeclared identifiers. - # https://go-critic.com/overview.html#builtinshadowdecl - - builtinShadowDecl - # Detects capitalized names for local variables. - # https://go-critic.com/overview.html#captlocal - - captLocal - # Detects erroneous case order inside switch statements. - # https://go-critic.com/overview.html#caseorder - - caseOrder - # Detects malformed 'code generated' file comments. - # https://go-critic.com/overview.html#codegencomment - - codegenComment - # Detects comments with non-idiomatic formatting. - # https://go-critic.com/overview.html#commentformatting - - commentFormatting - # Detects commented-out code inside function bodies. - # https://go-critic.com/overview.html#commentedoutcode - - commentedOutCode - # Detects commented-out imports. - # https://go-critic.com/overview.html#commentedoutimport - - commentedOutImport - # Detects when default case in switch isn't on 1st or last position. - # https://go-critic.com/overview.html#defaultcaseorder - - defaultCaseOrder - # Detects loops inside functions that use defer. - # https://go-critic.com/overview.html#deferinloop - - deferInLoop - # Detects deferred function literals that can be simplified. - # https://go-critic.com/overview.html#deferunlambda - - deferUnlambda - # Detects malformed 'deprecated' doc-comments. - # https://go-critic.com/overview.html#deprecatedcomment - - deprecatedComment - # Detects comments that silence go lint complaints about doc-comment. - # https://go-critic.com/overview.html#docstub - - docStub - # Detects suspicious duplicated arguments. - # https://go-critic.com/overview.html#duparg - - dupArg - # Detects duplicated branch bodies inside conditional statements. - # https://go-critic.com/overview.html#dupbranchbody - - dupBranchBody - # Detects duplicated case clauses inside switch or select statements. - # https://go-critic.com/overview.html#dupcase - - dupCase - # Detects multiple imports of the same package under different aliases. - # https://go-critic.com/overview.html#dupimport - - dupImport - # Detects duplicated option function arguments in variadic function calls. - # https://go-critic.com/overview.html#dupoption - - dupOption - # Detects suspicious duplicated sub-expressions. - # https://go-critic.com/overview.html#dupsubexpr - - dupSubExpr - # Detects suspicious formatting strings usage. - # https://go-critic.com/overview.html#dynamicfmtstring - - dynamicFmtString - # Detects else with nested if statement that can be replaced with else-if. - # https://go-critic.com/overview.html#elseif - - elseif - # Detects suspicious empty declarations blocks. - # https://go-critic.com/overview.html#emptydecl - - emptyDecl - # Detects fallthrough that can be avoided by using multi case values. - # https://go-critic.com/overview.html#emptyfallthrough - - emptyFallthrough - # Detects empty string checks that can be written more idiomatically. - # https://go-critic.com/overview.html#emptystringtest - - emptyStringTest - # Detects unoptimal strings/bytes case-insensitive comparison. - # https://go-critic.com/overview.html#equalfold - - equalFold - # Detects unwanted dependencies on the evaluation order. - # https://go-critic.com/overview.html#evalorder - - evalOrder - # Detects calls to exit/fatal inside functions that use defer. - # https://go-critic.com/overview.html#exitafterdefer - - exitAfterDefer - # Detects exposed methods from sync.Mutex and sync.RWMutex. - # https://go-critic.com/overview.html#exposedsyncmutex - - exposedSyncMutex - # Detects suspicious reassignment of error from another package. - # https://go-critic.com/overview.html#externalerrorreassign - - externalErrorReassign - # Detects problems in filepath.Join() function calls. - # https://go-critic.com/overview.html#filepathjoin - - filepathJoin - # Detects immediate dereferencing of `flag` package pointers. - # https://go-critic.com/overview.html#flagderef - - flagDeref - # Detects suspicious flag names. - # https://go-critic.com/overview.html#flagname - - flagName - # Detects hex literals that have mixed case letter digits. - # https://go-critic.com/overview.html#hexliteral - - hexLiteral - # Detects nil usages in http.NewRequest calls, suggesting http.NoBody as an alternative. - # https://go-critic.com/overview.html#httpnobody - - httpNoBody - # Detects params that incur excessive amount of copying. - # https://go-critic.com/overview.html#hugeparam - - hugeParam - # Detects repeated if-else statements and suggests to replace them with switch statement. - # https://go-critic.com/overview.html#ifelsechain - - ifElseChain - # Detects when imported package names shadowed in the assignments. - # https://go-critic.com/overview.html#importshadow - - importShadow - # Detects strings.Index calls that may cause unwanted allocs. - # https://go-critic.com/overview.html#indexalloc - - indexAlloc - # Detects non-assignment statements inside if/switch init clause. - # https://go-critic.com/overview.html#initclause - - initClause - # Detects suspicious map literal keys. - # https://go-critic.com/overview.html#mapkey - - mapKey - # Detects method expression call that can be replaced with a method call. - # https://go-critic.com/overview.html#methodexprcall - - methodExprCall - # Finds where nesting level could be reduced. - # https://go-critic.com/overview.html#nestingreduce - - nestingReduce - # Detects immediate dereferencing of `new` expressions. - # https://go-critic.com/overview.html#newderef - - newDeref - # Detects return statements those results evaluate to nil. - # https://go-critic.com/overview.html#nilvalreturn - - nilValReturn - # Detects old-style octal literals. - # https://go-critic.com/overview.html#octalliteral - - octalLiteral - # Detects various off-by-one kind of errors. - # https://go-critic.com/overview.html#offby1 - - offBy1 - # Detects if function parameters could be combined by type and suggest the way to do it. - # https://go-critic.com/overview.html#paramtypecombine - - paramTypeCombine - # Detects expressions like []rune(s)[0] that may cause unwanted rune slice allocation. - # https://go-critic.com/overview.html#preferdecoderune - - preferDecodeRune - # Detects concatenation with os.PathSeparator which can be replaced with filepath.Join. - # https://go-critic.com/overview.html#preferfilepathjoin - - preferFilepathJoin - # Detects fmt.Sprint(f/ln) calls which can be replaced with fmt.Fprint(f/ln). - # https://go-critic.com/overview.html#preferfprint - - preferFprint - # Detects w.Write or io.WriteString calls which can be replaced with w.WriteString. - # https://go-critic.com/overview.html#preferstringwriter - - preferStringWriter - # Detects WriteRune calls with rune literal argument that is single byte and reports to use WriteByte instead. - # https://go-critic.com/overview.html#preferwritebyte - - preferWriteByte - # Detects input and output parameters that have a type of pointer to referential type. - # https://go-critic.com/overview.html#ptrtorefparam - - ptrToRefParam - # Detects append all its data while range it. - # https://go-critic.com/overview.html#rangeappendall - - rangeAppendAll - # Detects expensive copies of `for` loop range expressions. - # https://go-critic.com/overview.html#rangeexprcopy - - rangeExprCopy - # Detects loops that copy big objects during each iteration. - # https://go-critic.com/overview.html#rangevalcopy - - rangeValCopy - # Detects redundant fmt.Sprint calls. - # https://go-critic.com/overview.html#redundantsprint - - redundantSprint - # Detects `regexp.Compile*` that can be replaced with `regexp.MustCompile*`. - # https://go-critic.com/overview.html#regexpmust - - regexpMust - # Detects suspicious regexp patterns. - # https://go-critic.com/overview.html#regexppattern - - regexpPattern - # Detects regexp patterns that can be simplified. - # https://go-critic.com/overview.html#regexpsimplify - - regexpSimplify - # Detects suspicious http.Error call without following return. - # https://go-critic.com/overview.html#returnafterhttperror - - returnAfterHttpError - # Runs user-defined rules using ruleguard linter. - # https://go-critic.com/overview.html#ruleguard - - ruleguard - # Detects switch statements that could be better written as if statement. - # https://go-critic.com/overview.html#singlecaseswitch - - singleCaseSwitch - # Detects slice clear loops, suggests an idiom that is recognized by the Go compiler. - # https://go-critic.com/overview.html#sliceclear - - sliceClear - # Detects usage of `len` when result is obvious or doesn't make sense. - # https://go-critic.com/overview.html#sloppylen - - sloppyLen - # Detects suspicious/confusing re-assignments. - # https://go-critic.com/overview.html#sloppyreassign - - sloppyReassign - # Detects redundant type assertions. - # https://go-critic.com/overview.html#sloppytypeassert - - sloppyTypeAssert - # Detects suspicious sort.Slice calls. - # https://go-critic.com/overview.html#sortslice - - sortSlice - # Detects "%s" formatting directives that can be replaced with %q. - # https://go-critic.com/overview.html#sprintfquotedstring - - sprintfQuotedString - # Detects issue in Query() and Exec() calls. - # https://go-critic.com/overview.html#sqlquery - - sqlQuery - # Detects string concat operations that can be simplified. - # https://go-critic.com/overview.html#stringconcatsimplify - - stringConcatSimplify - # Detects redundant conversions between string and []byte. - # https://go-critic.com/overview.html#stringxbytes - - stringXbytes - # Detects strings.Compare usage. - # https://go-critic.com/overview.html#stringscompare - - stringsCompare - # Detects switch-over-bool statements that use explicit `true` tag value. - # https://go-critic.com/overview.html#switchtrue - - switchTrue - # Detects sync.Map load+delete operations that can be replaced with LoadAndDelete. - # https://go-critic.com/overview.html#syncmaploadanddelete - - syncMapLoadAndDelete - # Detects manual conversion to milli- or microseconds. - # https://go-critic.com/overview.html#timeexprsimplify - - timeExprSimplify - # Detects TODO comments without detail/assignee. - # https://go-critic.com/overview.html#todocommentwithoutdetail - - todoCommentWithoutDetail - # Detects function with too many results. - # https://go-critic.com/overview.html#toomanyresultschecker - - tooManyResultsChecker - # Detects potential truncation issues when comparing ints of different sizes. - # https://go-critic.com/overview.html#truncatecmp - - truncateCmp - # Detects repeated type assertions and suggests to replace them with type switch statement. - # https://go-critic.com/overview.html#typeassertchain - - typeAssertChain - # Detects method declarations preceding the type definition itself. - # https://go-critic.com/overview.html#typedeffirst - - typeDefFirst - # Detects type switches that can benefit from type guard clause with variable. - # https://go-critic.com/overview.html#typeswitchvar - - typeSwitchVar - # Detects unneeded parenthesis inside type expressions and suggests to remove them. - # https://go-critic.com/overview.html#typeunparen - - typeUnparen - # Detects unchecked errors in if statements. - # https://go-critic.com/overview.html#uncheckedinlineerr - - uncheckedInlineErr - # Detects dereference expressions that can be omitted. - # https://go-critic.com/overview.html#underef - - underef - # Detects redundant statement labels. - # https://go-critic.com/overview.html#unlabelstmt - - unlabelStmt - # Detects function literals that can be simplified. - # https://go-critic.com/overview.html#unlambda - - unlambda - # Detects unnamed results that may benefit from names. - # https://go-critic.com/overview.html#unnamedresult - - unnamedResult - # Detects unnecessary braced statement blocks. - # https://go-critic.com/overview.html#unnecessaryblock - - unnecessaryBlock - # Detects redundantly deferred calls. - # https://go-critic.com/overview.html#unnecessarydefer - - unnecessaryDefer - # Detects slice expressions that can be simplified to sliced expression itself. - # https://go-critic.com/overview.html#unslice - - unslice - # Detects value swapping code that are not using parallel assignment. - # https://go-critic.com/overview.html#valswap - - valSwap - # Detects conditions that are unsafe due to not being exhaustive. - # https://go-critic.com/overview.html#weakcond - - weakCond - # Ensures that `//nolint` comments include an explanation. - # https://go-critic.com/overview.html#whynolint - - whyNoLint - # Detects function calls that can be replaced with convenience wrappers. - # https://go-critic.com/overview.html#wrapperfunc - - wrapperFunc - # Detects Yoda style expressions and suggests to replace them. - # https://go-critic.com/overview.html#yodastyleexpr - - yodaStyleExpr - # Detects bytes.Repeat with 0 value. - # https://go-critic.com/overview.html#zerobyterepeat - - zeroByteRepeat - - # Enable all checks. - # Default: false - enable-all: true - # Which checks should be disabled; can't be combined with 'enabled-checks'. - # Default: [] - disabled-checks: - - appendAssign - - appendCombine - - argOrder - - assignOp - - badCall - - badCond - - badLock - - badRegexp - - badSorting - - badSyncOnceFunc - - boolExprSimplify - - builtinShadow - - builtinShadowDecl - - captLocal - - caseOrder - - codegenComment - - commentFormatting - - commentedOutCode - - commentedOutImport - - defaultCaseOrder - - deferInLoop - - deferUnlambda - - deprecatedComment - - docStub - - dupArg - - dupBranchBody - - dupCase - - dupImport - - dupSubExpr - - dynamicFmtString - - elseif - - emptyDecl - - emptyFallthrough - - emptyStringTest - - equalFold - - evalOrder - - exitAfterDefer - - exposedSyncMutex - - externalErrorReassign - - filepathJoin - - flagDeref - - flagName - - hexLiteral - - httpNoBody - - hugeParam - - ifElseChain - - importShadow - - indexAlloc - - initClause - - mapKey - - methodExprCall - - nestingReduce - - newDeref - - nilValReturn - - octalLiteral - - offBy1 - - paramTypeCombine - - preferDecodeRune - - preferFilepathJoin - - preferFprint - - preferStringWriter - - preferWriteByte - - ptrToRefParam - - rangeAppendAll - - rangeExprCopy - - rangeValCopy - - redundantSprint - - regexpMust - - regexpPattern - - regexpSimplify - - returnAfterHttpError - - ruleguard - - singleCaseSwitch - - sliceClear - - sloppyLen - - sloppyReassign - - sloppyTypeAssert - - sortSlice - - sprintfQuotedString - - sqlQuery - - stringConcatSimplify - - stringXbytes - - stringsCompare - - switchTrue - - syncMapLoadAndDelete - - timeExprSimplify - - todoCommentWithoutDetail - - tooManyResultsChecker - - truncateCmp - - typeAssertChain - - typeDefFirst - - typeSwitchVar - - typeUnparen - - uncheckedInlineErr - - underef - - unlabelStmt - - unlambda - - unnamedResult - - unnecessaryBlock - - unnecessaryDefer - - unslice - - valSwap - - weakCond - - whyNoLint - - wrapperFunc - - yodaStyleExpr - - # Enable multiple checks by tags in addition to default checks. - # Run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic` to see all tags and checks. - # See https://github.com/go-critic/go-critic#usage -> section "Tags". - # Default: [] - enabled-tags: - - diagnostic - - style - - performance - - experimental - - opinionated - disabled-tags: - - diagnostic - - style - - performance - - experimental - - opinionated - - # Settings passed to gocritic. - # The settings key is the name of a supported gocritic checker. - # The list of supported checkers can be found at https://go-critic.com/overview. - settings: - # Must be valid enabled check name. - captLocal: - # Whether to restrict checker to params only. - # Default: true - paramsOnly: false - commentedOutCode: - # Min length of the comment that triggers a warning. - # Default: 15 - minLength: 50 - elseif: - # Whether to skip balanced if-else pairs. - # Default: true - skipBalanced: false - hugeParam: - # Size in bytes that makes the warning trigger. - # Default: 80 - sizeThreshold: 70 - ifElseChain: - # Min number of if-else blocks that makes the warning trigger. - # Default: 2 - minThreshold: 4 - nestingReduce: - # Min number of statements inside a branch to trigger a warning. - # Default: 5 - bodyWidth: 4 - rangeExprCopy: - # Size in bytes that makes the warning trigger. - # Default: 512 - sizeThreshold: 516 - # Whether to check test functions - # Default: true - skipTestFuncs: false - rangeValCopy: - # Size in bytes that makes the warning trigger. - # Default: 128 - sizeThreshold: 32 - # Whether to check test functions. - # Default: true - skipTestFuncs: false - ruleguard: - # Enable debug to identify which 'Where' condition was rejected. - # The value of the parameter is the name of a function in a ruleguard file. - # - # When a rule is evaluated: - # If: - # The Match() clause is accepted; and - # One of the conditions in the Where() clause is rejected, - # Then: - # ruleguard prints the specific Where() condition that was rejected. - # - # The option is passed to the ruleguard 'debug-group' argument. - # Default: "" - debug: 'emptyDecl' - # 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,import - # Comma-separated list of file paths containing ruleguard rules. - # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed. - # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`. - # The placeholder '${config-path}' is substituted with a path relative to the configuration file. - # Glob patterns such as 'rules-*.go' may be specified. - # Default: "" - rules: '${base-path}/ruleguard/rules-*.go,${base-path}/myrule1.go' - # Comma-separated list of enabled groups or skip empty to enable everything. - # Tags can be defined with # character prefix. - # Default: "" - enable: "myGroupName,#myTagName" - # Comma-separated list of disabled groups or skip empty to enable everything. - # Tags can be defined with # character prefix. - # Default: "" - disable: "myGroupName,#myTagName" - tooManyResultsChecker: - # Maximum number of results. - # Default: 5 - maxResults: 10 - truncateCmp: - # Whether to skip int/uint/uintptr types. - # Default: true - skipArchDependent: false - underef: - # Whether to skip (*x).method() calls where x is a pointer receiver. - # Default: true - skipRecvDeref: false - unnamedResult: - # Whether to check exported functions. - # Default: false - checkExported: true - - gocyclo: - # Minimal code complexity to report. - # Default: 30 (but we recommend 10-20) - min-complexity: 10 - - godoclint: - # Default set of rules to enable. - # Possible values are: `basic`, `all` or `none`. - # Default: `basic` (enables `pkg-doc`, `single-pkg-doc`, `start-with-name`, and `deprecated`) - default: all - - # List of rules to enable in addition to the default set. - # Default: empty - enable: - # Check proper package-level godoc, if any. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#pkg-doc - - pkg-doc - # Assert at most one godoc per package. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#single-pkg-doc - - single-pkg-doc - # Require all packages to have a godoc. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-pkg-doc - - require-pkg-doc - # Assert symbol godocs start with the symbol name. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#start-with-name - - start-with-name - # Require godoc for all public symbols. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-doc - - require-doc - # Assert correct formatting of deprecation notes. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#deprecated - - deprecated - # Assert maximum line length for godocs. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#max-len - - max-len - # Assert no unused link in godocs. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#no-unused-link - - no-unused-link - - # List of rules to disable. - # Default: empty - disable: - - pkg-doc - - single-pkg-doc - - require-pkg-doc - - start-with-name - - require-doc - - deprecated - - max-len - - no-unused-link - - # A map for fine-tuning individual rules. - # All subkeys are optional. - options: - max-len: - # Maximum line length for godocs, not including the `// `, or `/*` or `*/` tokens. - # Default: 77 - length: 127 - - require-doc: - # Ignore exported (public) symbols when applying the `require-doc` rule. - # Default: false - ignore-exported: true - - # Ignore unexported (private) symbols when applying the `require-doc` rule. - # Default: true - ignore-unexported: false - - start-with-name: - # Include unexported symbols when applying the `start-with-name` rule. - # Default: false - include-unexported: true - - godot: - # Comments to be checked: `declarations`, `toplevel`, `noinline` or `all`. - # Default: declarations - scope: toplevel - # List of regexps for excluding particular comment lines from check. - # Default: [] - exclude: - # Exclude todo and fixme comments. - - "^fixme:" - - "^todo:" - # Check that each sentence ends with a period. - # Default: true - period: false - # Check that each sentence starts with a capital letter. - # Default: false - capital: true - - godox: - # Report any comments starting with keywords, this is useful for TODO or FIXME comments that - # might be left in the code accidentally and should be resolved before merging. - # Default: ["TODO", "BUG", "FIXME"] - keywords: - - NOTE - - OPTIMIZE # marks code that should be optimized before merging - - HACK # marks hack-around that should be removed before merging - - goheader: - # Supports two types 'const` and `regexp`. - # Values can be used recursively. - # Default: {} - values: - const: - # Define here const type values in format k:v. - # For example: - COMPANY: MY COMPANY - regexp: - # Define here regexp type values. - # for example: - AUTHOR: .*@mycompany\.com - # The template used for checking. - # 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. - See the License for the specific language governing permissions and - limitations under the License. - # As alternative of directive 'template', you may put the path to file with the template source. - # Useful if you need to load the template from a specific file. - # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed. - # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`. - # The placeholder '${config-path}' is substituted with a path relative to the configuration file. - # Default: "" - template-path: /path/to/my/template.tmpl - - gomoddirectives: - # Allow local `replace` directives. - # Default: false - replace-local: true - # List of allowed `replace` directives. - # Default: [] - replace-allow-list: - - launchpad.net/gocheck - # Allow to not explain why the version has been retracted in the `retract` directives. - # Default: false - retract-allow-no-explanation: true - # Forbid the use of the `exclude` directives. - # Default: false - exclude-forbidden: true - # Forbid the use of the `ignore` directives (>= go1.25). - # Default: false - ignore-forbidden: true - # Forbid the use of the `toolchain` directive. - # Default: false - toolchain-forbidden: true - # Defines a pattern to validate `toolchain` directive. - # Default: '' (no match) - toolchain-pattern: 'go1\.23\.\d+$' - # Forbid the use of the `tool` directives. - # Default: false - tool-forbidden: true - # Forbid the use of the `godebug` directive. - # Default: false - go-debug-forbidden: true - # Defines a pattern to validate `go` minimum version directive. - # Default: '' (no match) - go-version-pattern: '\d\.\d+(\.0)?' - - gomodguard: - allowed: - # List of allowed modules. - # Default: [] - modules: - - gopkg.in/yaml.v2 - # List of allowed module domains. - # Default: [] - domains: - - golang.org - blocked: - # List of blocked modules. - # Default: [] - modules: - # Blocked module. - - github.com/uudashr/go-module: - # Recommended modules that should be used instead. (Optional) - recommendations: - - golang.org/x/mod - # Reason why the recommended module should be used. (Optional) - reason: "`mod` is the official go.mod parser library." - # List of blocked module version constraints. - # Default: [] - versions: - # Blocked module with version constraint. - - github.com/mitchellh/go-homedir: - # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. - version: "< 1.1.0" - # Reason why the version constraint exists. (Optional) - reason: "testing if blocked version constraint works." - # Set to true to raise lint issues for packages that are loaded from a local path via replace directive. - # Default: false - local-replace-directives: false - - gosec: - # To select a subset of rules to run. - # Available rules: https://github.com/securego/gosec#available-rules - # Default: [] - means include all rules - includes: - - G101 # Look for hard coded credentials - - G102 # Bind to all interfaces - - G103 # Audit the use of unsafe block - - G104 # Audit errors not checked - - G106 # Audit the use of ssh.InsecureIgnoreHostKey - - G107 # Url provided to HTTP request as taint input - - G108 # Profiling endpoint automatically exposed on /debug/pprof - - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 - - G110 # Potential DoS vulnerability via decompression bomb - - G111 # Potential directory traversal - - G112 # Potential slowloris attack - - G114 # Use of net/http serve function that has no support for setting timeouts - - G115 # Potential integer overflow when converting between integer types - - G201 # SQL query construction using format string - - G202 # SQL query construction using string concatenation - - G203 # Use of unescaped data in HTML templates - - G204 # Audit use of command execution - - G301 # Poor file permissions used when creating a directory - - G302 # Poor file permissions used with chmod - - G303 # Creating tempfile using a predictable path - - G304 # File path provided as taint input - - G305 # File traversal when extracting zip/tar archive - - G306 # Poor file permissions used when writing to a new file - - G307 # Poor file permissions used when creating a file with os.Create - - G401 # Detect the usage of MD5 or SHA1 - - G402 # Look for bad TLS connection settings - - G403 # Ensure minimum RSA key length of 2048 bits - - G404 # Insecure random number source (rand) - - G405 # Detect the usage of DES or RC4 - - G406 # Detect the usage of MD4 or RIPEMD160 - - G501 # Import blocklist: crypto/md5 - - G502 # Import blocklist: crypto/des - - G503 # Import blocklist: crypto/rc4 - - G504 # Import blocklist: net/http/cgi - - G505 # Import blocklist: crypto/sha1 - - G506 # Import blocklist: golang.org/x/crypto/md4 - - G507 # Import blocklist: golang.org/x/crypto/ripemd160 - - G601 # Implicit memory aliasing of items from a range statement - - G602 # Slice access out of bounds - - # To specify a set of rules to explicitly exclude. - # Available rules: https://github.com/securego/gosec#available-rules - # Default: [] - excludes: - - G101 # Look for hard coded credentials - - G102 # Bind to all interfaces - - G103 # Audit the use of unsafe block - - G104 # Audit errors not checked - - G106 # Audit the use of ssh.InsecureIgnoreHostKey - - G107 # Url provided to HTTP request as taint input - - G108 # Profiling endpoint automatically exposed on /debug/pprof - - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 - - G110 # Potential DoS vulnerability via decompression bomb - - G111 # Potential directory traversal - - G112 # Potential slowloris attack - - G114 # Use of net/http serve function that has no support for setting timeouts - - G115 # Potential integer overflow when converting between integer types - - G201 # SQL query construction using format string - - G202 # SQL query construction using string concatenation - - G203 # Use of unescaped data in HTML templates - - G204 # Audit use of command execution - - G301 # Poor file permissions used when creating a directory - - G302 # Poor file permissions used with chmod - - G303 # Creating tempfile using a predictable path - - G304 # File path provided as taint input - - G305 # File traversal when extracting zip/tar archive - - G306 # Poor file permissions used when writing to a new file - - G307 # Poor file permissions used when creating a file with os.Create - - G401 # Detect the usage of MD5 or SHA1 - - G402 # Look for bad TLS connection settings - - G403 # Ensure minimum RSA key length of 2048 bits - - G404 # Insecure random number source (rand) - - G405 # Detect the usage of DES or RC4 - - G406 # Detect the usage of MD4 or RIPEMD160 - - G501 # Import blocklist: crypto/md5 - - G502 # Import blocklist: crypto/des - - G503 # Import blocklist: crypto/rc4 - - G504 # Import blocklist: net/http/cgi - - G505 # Import blocklist: crypto/sha1 - - G506 # Import blocklist: golang.org/x/crypto/md4 - - G507 # Import blocklist: golang.org/x/crypto/ripemd160 - - G601 # Implicit memory aliasing of items from a range statement - - G602 # Slice access out of bounds - - # Filter out the issues with a lower severity than the given value. - # Valid options are: low, medium, high. - # Default: low - severity: medium - - # Filter out the issues with a lower confidence than the given value. - # Valid options are: low, medium, high. - # Default: low - confidence: medium - - # Concurrency value. - # Default: the number of logical CPUs usable by the current process. - concurrency: 12 - - # To specify the configuration of rules. - config: - # Globals are applicable to all rules. - global: - # If true, ignore #nosec in comments (and an alternative as well). - # Default: false - nosec: true - # Add an alternative comment prefix to #nosec (both will work at the same time). - # Default: "" - "#nosec": "#my-custom-nosec" - # Define whether nosec issues are counted as finding or not. - # Default: false - show-ignored: true - # Audit mode enables addition checks that for normal code analysis might be too nosy. - # Default: false - audit: true - G101: - # Regexp pattern for variables and constants to find. - # Default: "(?i)passwd|pass|password|pwd|secret|token|pw|apiKey|bearer|cred" - pattern: "(?i)example" - # If true, complain about all cases (even with low entropy). - # Default: false - ignore_entropy: false - # Maximum allowed entropy of the string. - # Default: "80.0" - entropy_threshold: "80.0" - # Maximum allowed value of entropy/string length. - # Is taken into account if entropy >= entropy_threshold/2. - # Default: "3.0" - per_char_threshold: "3.0" - # Calculate entropy for first N chars of the string. - # Default: "16" - truncate: "32" - # Additional functions to ignore while checking unhandled errors. - # Following functions always ignored: - # bytes.Buffer: - # - Write - # - WriteByte - # - WriteRune - # - WriteString - # fmt: - # - Print - # - Printf - # - Println - # - Fprint - # - Fprintf - # - Fprintln - # strings.Builder: - # - Write - # - WriteByte - # - WriteRune - # - WriteString - # io.PipeWriter: - # - CloseWithError - # hash.Hash: - # - Write - # os: - # - Unsetenv - # Default: {} - G104: - fmt: - - Fscanf - G111: - # 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. - # Default: "0750" - G301: "0750" - # Maximum allowed permissions mode for os.OpenFile and os.Chmod. - # Default: "0600" - G302: "0600" - # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile. - # Default: "0600" - G306: "0600" - - gosmopolitan: - # Allow and ignore `time.Local` usages. - # - # Default: false - allow-time-local: true - # List of fully qualified names in the `full/pkg/path.name` form, to act as "i18n escape hatches". - # String literals inside call-like expressions to, or struct literals of those names, - # are exempt from the writing system check. - # - # Default: [] - escape-hatches: - - 'github.com/nicksnyder/go-i18n/v2/i18n.Message' - - 'example.com/your/project/i18n/markers.Raw' - - 'example.com/your/project/i18n/markers.OK' - - 'example.com/your/project/i18n/markers.TODO' - - 'command-line-arguments.Simple' - # List of Unicode scripts to watch for any usage in string literals. - # https://pkg.go.dev/unicode#pkg-variables - # - # Default: ["Han"] - watch-for-scripts: - - Devanagari - - Han - - Hangul - - Hiragana - - Katakana - - govet: - # Disable all analyzers. - # Default: false - disable-all: true - # Enable analyzers by name. - # (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, - # unusedresult - # ). - # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers. - # Default: [] - enable: - # Check for missing values after append. - - appends - # Report mismatches between assembly files and Go declarations. - - asmdecl - # Check for useless assignments. - - assign - # Check for common mistakes using the sync/atomic package. - - atomic - # Check for non-64-bits-aligned arguments to sync/atomic functions. - - atomicalign - # Check for common mistakes involving boolean operators. - - bools - # Check //go:build and // +build directives. - - buildtag - # Detect some violations of the cgo pointer passing rules. - - cgocall - # Check for unkeyed composite literals. - - composites - # Check for locks erroneously passed by value. - - copylocks - # Check for calls of reflect.DeepEqual on error values. - - deepequalerrors - # Report common mistakes in defer statements. - - defers - # Check Go toolchain directives such as //go:debug. - - directive - # Report passing non-pointer or non-error values to errors.As. - - errorsas - # Find structs that would use less memory if their fields were sorted. - - fieldalignment - # Find calls to a particular function. - - findcall - # Report assembly that clobbers the frame pointer before saving it. - - framepointer - # Check format of addresses passed to net.Dial. - - hostport - # Report using Go 1.22 enhanced ServeMux patterns in older Go versions. - - httpmux - # Check for mistakes using HTTP responses. - - httpresponse - # Detect impossible interface-to-interface type assertions. - - ifaceassert - # Check references to loop variables from within nested functions. - - loopclosure - # Check cancel func returned by context.WithCancel is called. - - lostcancel - # Check for useless comparisons between functions and nil. - - nilfunc - # Check for redundant or impossible nil comparisons. - - nilness - # Check consistency of Printf format strings and arguments. - - printf - # Check for comparing reflect.Value values with == or reflect.DeepEqual. - - reflectvaluecompare - # Check for possible unintended shadowing of variables. - - shadow - # Check for shifts that equal or exceed the width of the integer. - - shift - # Check for unbuffered channel of os.Signal. - - sigchanyzer - # Check for invalid structured logging calls. - - slog - # Check the argument type of sort.Slice. - - sortslice - # Check signature of methods of well-known interfaces. - - stdmethods - # Report uses of too-new standard library symbols. - - stdversion - # Check for string(int) conversions. - - stringintconv - # Check that struct field tags conform to reflect.StructTag.Get. - - structtag - # Report calls to (*testing.T).Fatal from goroutines started by a test. - - testinggoroutine - # Check for common mistaken usages of tests and examples. - - tests - # Check for calls of (time.Time).Format or time.Parse with 2006-02-01. - - timeformat - # Report passing non-pointer or non-interface values to unmarshal. - - unmarshal - # Check for unreachable code. - - unreachable - # Check for invalid conversions of uintptr to unsafe.Pointer. - - unsafeptr - # Check for unused results of calls to some functions. - - unusedresult - # Checks for unused writes. - - unusedwrite - # Check for misuses of sync.WaitGroup. - - waitgroup - - # Enable all analyzers. - # Default: false - enable-all: true - # Disable analyzers by name. - # (In addition to default - # atomicalign, deepequalerrors, fieldalignment, findcall, nilness, reflectvaluecompare, shadow, sortslice, - # timeformat, unusedwrite - # ). - # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers. - # Default: [] - disable: - - appends - - asmdecl - - assign - - atomic - - atomicalign - - bools - - buildtag - - cgocall - - composites - - copylocks - - deepequalerrors - - defers - - directive - - errorsas - - fieldalignment - - findcall - - framepointer - - hostport - - httpmux - - httpresponse - - ifaceassert - - loopclosure - - lostcancel - - nilfunc - - nilness - - printf - - reflectvaluecompare - - shadow - - shift - - sigchanyzer - - slog - - sortslice - - stdmethods - - stdversion - - stringintconv - - structtag - - testinggoroutine - - tests - - timeformat - - unmarshal - - unreachable - - unsafeptr - - unusedresult - - unusedwrite - - waitgroup - - # Settings per analyzer. - settings: - # Analyzer name, run `go tool vet help` to see all analyzers. - printf: - # Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`). - # Default: [] - funcs: - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Infof - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Warnf - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Errorf - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Fatalf - shadow: - # Whether to be strict about shadowing; can be noisy. - # Default: false - strict: true - unusedresult: - # 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). - # Default: [] - stringmethods: - - MyMethod - - grouper: - # Require the use of a single global 'const' declaration only. - # Default: false - const-require-single-const: true - # Require the use of grouped global 'const' declarations. - # Default: false - const-require-grouping: true - - # Require the use of a single 'import' declaration only. - # Default: false - import-require-single-import: true - # Require the use of grouped 'import' declarations. - # Default: false - import-require-grouping: true - - # Require the use of a single global 'type' declaration only. - # Default: false - type-require-single-type: true - # Require the use of grouped global 'type' declarations. - # Default: false - type-require-grouping: true - - # Require the use of a single global 'var' declaration only. - # Default: false - var-require-single-var: true - # Require the use of grouped global 'var' declarations. - # Default: false - var-require-grouping: true - - iface: - # List of analyzers. - # Default: ["identical"] - enable: - - identical # Identifies interfaces in the same package that have identical method sets. - - unused # Identifies interfaces that are not used anywhere in the same package where the interface is defined. - - opaque # Identifies functions that return interfaces, but the actual returned value is always a single concrete implementation. - - unexported # Identifies interfaces that are not exported but are used in exported functions or methods. - settings: - unused: - # List of packages path to exclude from the check. - # Default: [] - exclude: - - github.com/example/log - - importas: - # Do not allow unaliased imports of aliased packages. - # Default: false - no-unaliased: true - # Do not allow non-required aliases. - # Default: false - no-extra-aliases: true - # List of aliases - # Default: [] - alias: - # Using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package. - - pkg: knative.dev/serving/pkg/apis/serving/v1 - alias: servingv1 - # Using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package. - - pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1 - 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. - - 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. - # This can be useful if `no-extra-aliases: true` doesn't fit your need. - # Multiple packages can use an empty alias. - - pkg: errors - alias: "" - - inamedparam: - # Skips check for interface methods with only a single parameter. - # Default: false - skip-single-param: true - - ineffassign: - # Check escaping variables of type error, may cause false positives. - # Default: false - check-escaping-errors: true - - interfacebloat: - # The maximum number of methods allowed for an interface. - # Default: 10 - max: 5 - - iotamixing: - # Whether to report individual consts rather than just the const block. - # Default: false - report-individual: true - - ireturn: - # List of interfaces to allow. - # Lists of the keywords and regular expressions matched to interface or package names can be used. - # `allow` and `reject` settings cannot be used at the same time. - # - # Keywords: - # - `empty` for `interface{}` - # - `error` for errors - # - `stdlib` for standard library - # - `anon` for anonymous interfaces - # - `generic` for generic interfaces added in go 1.18 - # - # Default: [anon, error, empty, stdlib] - allow: - - anon - # You can specify idiomatic endings for interface - - (or|er)$ - - # List of interfaces to reject. - # Lists of the keywords and regular expressions matched to interface or package names can be used. - # `allow` and `reject` settings cannot be used at the same time. - # - # Keywords: - # - `empty` for `interface{}` - # - `error` for errors - # - `stdlib` for standard library - # - `anon` for anonymous interfaces - # - `generic` for generic interfaces added in go 1.18 - # - # Default: [] - reject: - - github.com\/user\/package\/v4\.Type - - lll: - # Max line length, lines longer will be reported. - # '\t' is counted as 1 character by default, and can be changed with the tab-width option. - # Default: 120. - line-length: 120 - # Tab width in spaces. - # Default: 1 - tab-width: 1 - - loggercheck: - # Allow check for the github.com/go-kit/log library. - # Default: true - kitlog: false - # Allow check for the k8s.io/klog/v2 library. - # Default: true - klog: false - # Allow check for the github.com/go-logr/logr library. - # Default: true - logr: false - # Allow check for the log/slog library. - # Default: true - slog: false - # Allow check for the "sugar logger" from go.uber.org/zap library. - # Default: true - zap: false - # Require all logging keys to be inlined constant strings. - # Default: false - require-string-key: true - # Require printf-like format specifier (%s, %d for example) not present. - # Default: false - no-printf-like: true - # List of custom rules to check against, where each rule is a single logger pattern, useful for wrapped loggers. - # For example: https://github.com/timonwong/loggercheck/blob/7395ab86595781e33f7afba27ad7b55e6956ebcd/testdata/custom-rules.txt - # Default: empty - rules: - - k8s.io/klog/v2.InfoS # package level exported functions - - (github.com/go-logr/logr.Logger).Error # "Methods" - - (*go.uber.org/zap.SugaredLogger).With # Also "Methods", but with a pointer receiver - - maintidx: - # Show functions with maintainability index lower than N. - # A high index indicates better maintainability (it's kind of the opposite of complexity). - # Default: 20 - under: 100 - - makezero: - # Allow only slices initialized with a length of zero. - # Default: false - always: true - - misspell: - # Correct spellings using locale preferences for US or UK. - # Setting locale to US will correct the British spelling of 'colour' to 'color'. - # Default is to use a neutral variety of English. - locale: US - # Typos to ignore. - # Should be in lower case. - # Default: [] - ignore-rules: - - someword - # Extra word corrections. - # `typo` and `correction` should only contain letters. - # The words are case-insensitive. - # Default: [] - extra-words: - - typo: "iff" - correction: "if" - - typo: "cancelation" - correction: "cancellation" - # Mode of the analysis: - # - default: checks all the file content. - # - restricted: checks only comments. - # 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$' - - modernize: - # List of analyzers to disable. - # By default, all analyzers are enabled. - disable: - # Replace interface{} with any. - - any - # Replace for-range over b.N with b.Loop. - - bloop - # Replace []byte(fmt.Sprintf) with fmt.Appendf. - - fmtappendf - # Remove redundant re-declaration of loop variables. - - forvar - # Replace explicit loops over maps with calls to maps package. - - mapsloop - # Replace if/else statements with calls to min or max. - - minmax - # Simplify code by using go1.26's new(expr). - - newexpr - # Suggest replacing omitempty with omitzero for struct fields. - - omitzero - # Replace 3-clause for loops with for-range over integers. - - rangeint - # Replace reflect.TypeOf(x) with TypeFor[T](). - - reflecttypefor - # Replace loops with slices.Contains or slices.ContainsFunc. - - slicescontains - # Replace sort.Slice with slices.Sort for basic types. - - slicessort - # Use iterators instead of Len/At-style APIs. - - stditerators - # Replace HasPrefix/TrimPrefix with CutPrefix. - - stringscutprefix - # Replace ranging over Split/Fields with SplitSeq/FieldsSeq. - - stringsseq - # Replace += with strings.Builder. - - stringsbuilder - # Replace context.WithCancel with t.Context in tests. - - testingcontext - # Replace wg.Add(1)/go/wg.Done() with wg.Go. - - waitgroup - - 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 - functions: - # The full name of the function, including the package. - - name: github.com/hashicorp/hcl/v2/hclsimple.DecodeFile - # The struct tag whose presence should be ensured. - tag: hcl - # The position of the argument to check. - arg-pos: 2 - - nakedret: - # Make an issue if func has more lines of code than this setting, and it has naked returns. - # Default: 30 - max-func-lines: 31 - - nestif: - # Minimal complexity of if statements to report. - # Default: 5 - min-complexity: 4 - - nilnil: - # To check functions with only two return values (`return nil, nil`). - # If disabled then returns like `return nil, nil, ..., nil` are supported. - # Default: true - only-two: false - # In addition, detect opposite situation (simultaneous return of non-nil error and valid value). - # E.g, `return clone, fh.indexer.Update(clone)` will be considered as invalid. - # Default: false - detect-opposite: true - # List of return types to check. - # Default: ["chan", "func", "iface", "map", "ptr", "uintptr", "unsafeptr"] - checked-types: - - chan - - func - - iface - - map - - ptr - - uintptr - - unsafeptr - - nlreturn: - # Size of the block (including return statement that is still "OK"), - # so no return split required. - # Default: 1 - block-size: 2 - - nolintlint: - # Disable to ensure that all nolint directives actually have an effect. - # Default: false - allow-unused: true - # Exclude following linters from requiring an explanation. - # Default: [] - allow-no-explanation: [ ] - # Enable to require an explanation of nonzero length after each nolint directive. - # Default: false - require-explanation: true - # Enable to require nolint directives to mention the specific linter being suppressed. - # Default: false - require-specific: true - - nonamedreturns: - # Report named error if it is assigned inside defer. - # Default: false - report-error-in-defer: true - - paralleltest: - # Ignore missing calls to `t.Parallel()` and only report incorrect uses of it. - # Default: false - ignore-missing: true - # Ignore missing calls to `t.Parallel()` in subtests. Top-level tests are - # still required to have `t.Parallel`, but subtests are allowed to skip it. - # Default: false - ignore-missing-subtests: true - - perfsprint: - # Enable/disable optimization of integer formatting. - # Default: true - integer-format: false - # Optimizes even if it requires an int or uint type cast. - # Default: true - int-conversion: false - # Enable/disable optimization of error formatting. - # Default: true - error-format: false - # Optimizes into `err.Error()` even if it is only equivalent for non-nil errors. - # Default: false - err-error: true - # Optimizes `fmt.Errorf`. - # Default: true - errorf: false - # Enable/disable optimization of string formatting. - # Default: true - string-format: false - # Optimizes `fmt.Sprintf` with only one argument. - # Default: true - sprintf1: false - # Optimizes into strings concatenation. - # Default: true - strconcat: false - # Enable/disable optimization of bool formatting. - # Default: true - bool-format: false - # Enable/disable optimization of hex formatting. - # Default: true - hex-format: false - # Enable/disable optimization of concat loop. - # Default: true - concat-loop: false - # Optimization of `concat-loop` even with other operations. - # Default: false - loop-other-ops: true - - prealloc: - # IMPORTANT: we don't recommend using this linter before doing performance profiling. - # For most programs usage of prealloc will be a premature optimization. - - # Report pre-allocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. - # Default: true - simple: false - # Report pre-allocation suggestions on range loops. - # Default: true - range-loops: false - # Report pre-allocation suggestions on for loops. - # Default: false - for-loops: true - - predeclared: - # List of predeclared identifiers to not report on. - # Default: [] - ignore: - - new - - int - # Include method names and field names in checks. - # Default: false - qualified-name: true - - promlinter: - # Promlinter cannot infer all metrics name in static analysis. - # Enable strict mode will also include the errors caused by failing to parse the args. - # Default: false - strict: true - # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage. - # Default: [] - disabled-linters: - # Help detects issues related to the help text for a metric. - - Help - # MetricUnits detects issues with metric unit names. - - MetricUnits - # Counter detects issues specific to counters, as well as patterns that should only be used with counters. - - Counter - # HistogramSummaryReserved detects when other types of metrics use names or labels reserved for use by histograms and/or summaries. - - HistogramSummaryReserved - # MetricTypeInName detects when metric types are included in the metric name. - - MetricTypeInName - # ReservedChars detects colons in metric names. - - ReservedChars - # CamelCase detects metric names and label names written in camelCase. - - CamelCase - # UnitAbbreviations detects abbreviated units in the metric name. - - UnitAbbreviations - - protogetter: - # Skip files generated by specified generators from the checking. - # Checks only the file's initial comment, which must follow the format: "// Code generated by ". - # Files generated by protoc-gen-go, protoc-gen-go-grpc, and protoc-gen-grpc-gateway are always excluded automatically. - # Default: [] - skip-generated-by: ["protoc-gen-go-my-own-generator"] - # Skip files matching the specified glob pattern from the checking. - # Default: [] - skip-files: - - "*.pb.go" - - "*/vendor/*" - - "/full/path/to/file.go" - # Skip any generated files from the checking. - # Default: false - skip-any-generated: true - # Skip first argument of append function. - # Default: false - replace-first-arg-in-append: true - - reassign: - # Patterns for global variable names that are checked for reassignment. - # See https://github.com/curioswitch/go-reassign#usage - # Default: ["EOF", "Err.*"] - patterns: - - ".*" - - recvcheck: - # Disables the built-in method exclusions: - # - `MarshalText` - # - `MarshalJSON` - # - `MarshalYAML` - # - `MarshalXML` - # - `MarshalBinary` - # - `GobEncode` - # Default: false - disable-builtin: true - # User-defined method exclusions. - # The format is `struct_name.method_name` (ex: `Foo.MethodName`). - # A wildcard `*` can use as a struct name (ex: `*.MethodName`). - # Default: [] - exclusions: - - "*.Value" - - revive: - # Maximum number of open files at the same time. - # See https://github.com/mgechev/revive#command-line-flags - # Defaults to unlimited. - max-open-files: 2048 - - # Sets the default severity. - # See https://github.com/mgechev/revive#configuration - # Default: warning - severity: error - - # Enable all available rules. - # Default: false - enable-all-rules: true - - # Enable validation of comment directives. - # See https://github.com/mgechev/revive#comment-directives - directives: - - name: specify-disable-reason - severity: error - - # Sets the default failure confidence. - # This means that linting errors with less than 0.8 confidence will be ignored. - # Default: 0.8 - confidence: 0.1 - # Revive handles the default rules in a way that can be unexpected: - # - If there are no explicit rules, the default rules are used. - # - If there is at least one explicit rule, the default rules are not used. - # Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules. - rules: - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant - - name: add-constant - severity: warning - disabled: false - exclude: [""] - arguments: - - max-lit-count: "3" - allow-strs: '""' - allow-ints: "0,1,2" - allow-floats: "0.0,0.,1.0,1.,2.0,2." - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#argument-limit - - name: argument-limit - severity: warning - disabled: false - exclude: [""] - arguments: [ 4 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#atomic - - name: atomic - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#banned-characters - - name: banned-characters - severity: warning - disabled: false - exclude: [""] - arguments: [ "Ω","Σ","σ", "7" ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#bare-return - - name: bare-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#blank-imports - - name: blank-imports - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#bool-literal-in-expr - - name: bool-literal-in-expr - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#call-to-gc - - name: call-to-gc - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#cognitive-complexity - - name: cognitive-complexity - severity: warning - disabled: false - exclude: [""] - arguments: [ 7 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#comment-spacings - - name: comment-spacings - severity: warning - disabled: false - exclude: [""] - arguments: - - mypragma - - otherpragma - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#comments-density - - name: comments-density - severity: warning - disabled: false - exclude: [""] - arguments: [ 15 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#confusing-naming - - name: confusing-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#confusing-results - - name: confusing-results - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#constant-logical-expr - - name: constant-logical-expr - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#context-as-argument - - name: context-as-argument - severity: warning - disabled: false - exclude: [""] - arguments: - - allow-types-before: "*testing.T,*github.com/user/repo/testing.Harness" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#context-keys-type - - name: context-keys-type - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#cyclomatic - - name: cyclomatic - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#datarace - - name: datarace - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#deep-exit - - name: deep-exit - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#defer - - name: defer - severity: warning - disabled: false - exclude: [""] - arguments: - - "call-chain" - - "loop" - - "method-call" - - "recover" - - "immediate-recover" - - "return" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#dot-imports - - name: dot-imports - severity: warning - disabled: false - exclude: [""] - arguments: - - allowed-packages: ["github.com/onsi/ginkgo/v2", "github.com/onsi/gomega"] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#duplicated-imports - - name: duplicated-imports - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#early-return - - name: early-return - severity: warning - disabled: false - exclude: [""] - arguments: - - "preserve-scope" - - "allow-jump" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#empty-block - - name: empty-block - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#empty-lines - - name: empty-lines - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-map-style - - name: enforce-map-style - severity: warning - disabled: false - exclude: [""] - arguments: - - "make" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-repeated-arg-type-style - - name: enforce-repeated-arg-type-style - severity: warning - disabled: false - exclude: [""] - arguments: - - "short" - # Or this parameter: - - func-arg-style: "full" - func-ret-val-style: "short" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-slice-style - - name: enforce-slice-style - severity: warning - disabled: false - exclude: [""] - arguments: - - "make" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-switch-style - - name: enforce-switch-style - severity: warning - disabled: false - exclude: [""] - arguments: [ "allowNoDefault" ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-naming - - name: error-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-return - - name: error-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-strings - - name: error-strings - severity: warning - disabled: false - exclude: [""] - arguments: - - "xerrors.New" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#errorf - - name: errorf - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#exported - - name: exported - severity: warning - disabled: false - exclude: [""] - arguments: - - "check-private-receivers" - - "disable-stuttering-check" - - "say-repetitive-instead-of-stutters" - - "check-public-interface" - - "disable-checks-on-constants" - - "disable-checks-on-functions" - - "disable-checks-on-methods" - - "disable-checks-on-types" - - "disable-checks-on-variables" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#file-header - - name: file-header - severity: warning - disabled: false - exclude: [""] - arguments: - - This is the text that must appear at the top of source files. - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#file-length-limit - - name: file-length-limit - severity: warning - disabled: false - exclude: [""] - arguments: - - max: 100 - skip-comments: true - skip-blank-lines: true - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#filename-format - - name: filename-format - severity: warning - disabled: false - exclude: [""] - arguments: - - "^[_a-z][_a-z0-9]*\\.go$" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#flag-parameter - - name: flag-parameter - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#function-length - - name: function-length - severity: warning - disabled: false - exclude: [""] - arguments: [ 10, 0 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#function-result-limit - - name: function-result-limit - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#get-return - - name: get-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-branches - - name: identical-branches - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-ifelseif-branches - - name: identical-ifelseif-branches - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-ifelseif-conditions - - name: identical-ifelseif-conditions - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-switch-branches - - name: identical-switch-branches - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-switch-conditions - - name: identical-switch-conditions - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#if-return - - name: if-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#import-alias-naming - - name: import-alias-naming - severity: warning - disabled: false - exclude: [""] - arguments: - - "^[a-z][a-z0-9]{0,}$" - # Or this parameter: - - allow-regex: "^[a-z][a-z0-9]{0,}$" - deny-regex: '^v\d+$' - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#import-shadowing - - name: import-shadowing - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#imports-blocklist - - name: imports-blocklist - severity: warning - disabled: false - exclude: [""] - arguments: - - "crypto/md5" - - "crypto/sha1" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#increment-decrement - - name: increment-decrement - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#indent-error-flow - - name: indent-error-flow - severity: warning - disabled: false - exclude: [""] - arguments: - - "preserve-scope" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#line-length-limit - - name: line-length-limit - severity: warning - disabled: false - exclude: [""] - arguments: [ 80 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#max-control-nesting - - name: max-control-nesting - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#max-public-structs - - name: max-public-structs - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#modifies-parameter - - name: modifies-parameter - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#modifies-value-receiver - - name: modifies-value-receiver - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#nested-structs - - name: nested-structs - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#optimize-operands-order - - name: optimize-operands-order - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#package-comments - - name: package-comments - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#package-directory-mismatch - - name: package-directory-mismatch - severity: warning - disabled: false - exclude: [""] - arguments: - - ignore-directories: ["testcases", "testinfo"] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range - - name: range - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range-val-address - - name: range-val-address - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range-val-in-closure - - name: range-val-in-closure - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#receiver-naming - - name: receiver-naming - severity: warning - disabled: false - exclude: [""] - arguments: - - max-length: 2 - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redefines-builtin-id - - name: redefines-builtin-id - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-build-tag - - name: redundant-build-tag - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-import-alias - - name: redundant-import-alias - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-test-main-exit - - name: redundant-test-main-exit - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#string-format - - name: string-format - severity: warning - disabled: false - exclude: [""] - arguments: - - - 'core.WriteError[1].Message' - - '/^([^A-Z]|$)/' - - must not start with a capital letter - - - 'fmt.Errorf[0]' - - '/(^|[^\.!?])$/' - - must not end in punctuation - - - panic - - '/^[^\n]*$/' - - must not contain line breaks - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#string-of-int - - name: string-of-int - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#struct-tag - - name: struct-tag - severity: warning - disabled: false - exclude: [""] - arguments: - - "json,inline" - - "bson,outline,gnu" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#superfluous-else - - name: superfluous-else - severity: warning - disabled: false - exclude: [""] - arguments: - - "preserve-scope" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-date - - name: time-date - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-equal - - name: time-equal - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-naming - - name: time-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unchecked-type-assertion - - name: unchecked-type-assertion - severity: warning - disabled: false - exclude: [""] - arguments: - - accept-ignored-assertion-result: true - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unconditional-recursion - - name: unconditional-recursion - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unexported-naming - - name: unexported-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unexported-return - - name: unexported-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unhandled-error - - name: unhandled-error - severity: warning - disabled: false - exclude: [""] - arguments: - - "^fmt.Printf" - - "myFunction" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-format - - name: unnecessary-format - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-stmt - - name: unnecessary-stmt - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unreachable-code - - name: unreachable-code - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unsecure-url-scheme - - name: unsecure-url-scheme - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-parameter - - name: unused-parameter - severity: warning - disabled: false - exclude: [""] - arguments: - - allow-regex: "^_" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-receiver - - name: unused-receiver - severity: warning - disabled: false - exclude: [""] - arguments: - - allow-regex: "^_" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-any - - name: use-any - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-errors-new - - name: use-errors-new - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-fmt-print - - name: use-fmt-print - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-waitgroup-go - - name: use-waitgroup-go - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-break - - name: useless-break - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-fallthrough - - name: useless-fallthrough - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#var-declaration - - name: var-declaration - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#var-naming - - name: var-naming - severity: warning - disabled: false - exclude: [""] - arguments: - - [ "ID" ] # AllowList - - [ "VM" ] # DenyList - - - skip-initialism-name-checks: true - upper-case-const: true - skip-package-name-checks: true - extra-bad-package-names: - - helpers - - models - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#waitgroup-by-value - - name: waitgroup-by-value - severity: warning - disabled: false - exclude: [""] - - rowserrcheck: - # database/sql is always checked. - # Default: [] - packages: - - github.com/jmoiron/sqlx - - sloglint: - # Enforce not mixing key-value pairs and attributes. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-mixed-arguments - # Default: true - no-mixed-args: false - # 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 - kv-only: true - # 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 - attr-only: true - # Enforce not using global loggers. - # Values: - # - "": disabled - # - "all": report all global loggers - # - "default": report only the default slog logger - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-global - # Default: "" - no-global: "all" - # Enforce using methods that accept a context. - # Values: - # - "": disabled - # - "all": report all contextless calls - # - "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: "" - context: "all" - # Enforce using static values for log messages. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#static-messages - # Default: false - static-msg: true - # Enforce message style. - # Values: lowercased, capitalized - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#message-style - # Default: "" - msg-style: capitalized - # Enforce using constants instead of raw keys. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-raw-keys - # Default: false - no-raw-keys: true - # Enforce key naming convention. - # Values: snake, kebab, camel, pascal - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-naming-convention - # Default: "" - key-naming-case: snake - # Enforce not using specific keys. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#forbidden-keys - # Default: [] - forbidden-keys: - - time - - level - - msg - - source - - foo - # Enforce putting arguments on separate lines. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#arguments-on-separate-lines - # Default: false - args-on-sep-lines: true - - spancheck: - # Checks to enable. - # Options include: - # - `end`: check that `span.End()` is called - # - `record-error`: check that `span.RecordError(err)` is called when an error is returned - # - `set-status`: check that `span.SetStatus(codes.Error, msg)` is called when an error is returned - # Default: ["end"] - checks: - - end - - record-error - - set-status - # A list of regexes for function signatures that silence `record-error` and `set-status` reports - # if found in the call path to a returned error. - # https://github.com/jjti/go-spancheck#ignore-check-signatures - # 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 `:`, 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: - # https://staticcheck.dev/docs/configuration/options/#dot_import_whitelist - # Default: ["github.com/mmcloughlin/avo/build", "github.com/mmcloughlin/avo/operand", "github.com/mmcloughlin/avo/reg"] - dot-import-whitelist: - - fmt - # https://staticcheck.dev/docs/configuration/options/#initialisms - # Default: ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"] - initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS" ] - # https://staticcheck.dev/docs/configuration/options/#http_status_code_whitelist - # Default: ["200", "400", "404", "500"] - http-status-code-whitelist: [ "200", "400", "404", "500" ] - # SAxxxx checks in https://staticcheck.dev/docs/configuration/options/#checks - # Example (to disable some checks): [ "all", "-SA1000", "-SA1001"] - # Run `GL_DEBUG=staticcheck golangci-lint run --enable=staticcheck` to see all available checks and enabled by config checks. - # Default: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"] - checks: - # Invalid regular expression. - # https://staticcheck.dev/docs/checks/#SA1000 - - SA1000 - # Invalid template. - # https://staticcheck.dev/docs/checks/#SA1001 - - SA1001 - # Invalid format in 'time.Parse'. - # https://staticcheck.dev/docs/checks/#SA1002 - - SA1002 - # Unsupported argument to functions in 'encoding/binary'. - # https://staticcheck.dev/docs/checks/#SA1003 - - SA1003 - # Suspiciously small untyped constant in 'time.Sleep'. - # https://staticcheck.dev/docs/checks/#SA1004 - - SA1004 - # Invalid first argument to 'exec.Command'. - # https://staticcheck.dev/docs/checks/#SA1005 - - SA1005 - # 'Printf' with dynamic first argument and no further arguments. - # https://staticcheck.dev/docs/checks/#SA1006 - - SA1006 - # Invalid URL in 'net/url.Parse'. - # https://staticcheck.dev/docs/checks/#SA1007 - - SA1007 - # Non-canonical key in 'http.Header' map. - # https://staticcheck.dev/docs/checks/#SA1008 - - SA1008 - # '(*regexp.Regexp).FindAll' called with 'n == 0', which will always return zero results. - # https://staticcheck.dev/docs/checks/#SA1010 - - SA1010 - # Various methods in the "strings" package expect valid UTF-8, but invalid input is provided. - # https://staticcheck.dev/docs/checks/#SA1011 - - SA1011 - # A nil 'context.Context' is being passed to a function, consider using 'context.TODO' instead. - # https://staticcheck.dev/docs/checks/#SA1012 - - SA1012 - # 'io.Seeker.Seek' is being called with the whence constant as the first argument, but it should be the second. - # https://staticcheck.dev/docs/checks/#SA1013 - - SA1013 - # Non-pointer value passed to 'Unmarshal' or 'Decode'. - # https://staticcheck.dev/docs/checks/#SA1014 - - SA1014 - # Using 'time.Tick' in a way that will leak. Consider using 'time.NewTicker', and only use 'time.Tick' in tests, commands and endless functions. - # https://staticcheck.dev/docs/checks/#SA1015 - - SA1015 - # Trapping a signal that cannot be trapped. - # https://staticcheck.dev/docs/checks/#SA1016 - - SA1016 - # Channels used with 'os/signal.Notify' should be buffered. - # https://staticcheck.dev/docs/checks/#SA1017 - - SA1017 - # 'strings.Replace' called with 'n == 0', which does nothing. - # https://staticcheck.dev/docs/checks/#SA1018 - - SA1018 - # Using a deprecated function, variable, constant or field. - # https://staticcheck.dev/docs/checks/#SA1019 - - SA1019 - # Using an invalid host:port pair with a 'net.Listen'-related function. - # https://staticcheck.dev/docs/checks/#SA1020 - - SA1020 - # Using 'bytes.Equal' to compare two 'net.IP'. - # https://staticcheck.dev/docs/checks/#SA1021 - - SA1021 - # Modifying the buffer in an 'io.Writer' implementation. - # https://staticcheck.dev/docs/checks/#SA1023 - - SA1023 - # A string cutset contains duplicate characters. - # https://staticcheck.dev/docs/checks/#SA1024 - - SA1024 - # It is not possible to use '(*time.Timer).Reset''s return value correctly. - # https://staticcheck.dev/docs/checks/#SA1025 - - SA1025 - # Cannot marshal channels or functions. - # https://staticcheck.dev/docs/checks/#SA1026 - - SA1026 - # Atomic access to 64-bit variable must be 64-bit aligned. - # https://staticcheck.dev/docs/checks/#SA1027 - - SA1027 - # 'sort.Slice' can only be used on slices. - # https://staticcheck.dev/docs/checks/#SA1028 - - SA1028 - # Inappropriate key in call to 'context.WithValue'. - # https://staticcheck.dev/docs/checks/#SA1029 - - SA1029 - # Invalid argument in call to a 'strconv' function. - # https://staticcheck.dev/docs/checks/#SA1030 - - SA1030 - # Overlapping byte slices passed to an encoder. - # https://staticcheck.dev/docs/checks/#SA1031 - - SA1031 - # Wrong order of arguments to 'errors.Is'. - # https://staticcheck.dev/docs/checks/#SA1032 - - SA1032 - # 'sync.WaitGroup.Add' called inside the goroutine, leading to a race condition. - # https://staticcheck.dev/docs/checks/#SA2000 - - SA2000 - # Empty critical section, did you mean to defer the unlock?. - # https://staticcheck.dev/docs/checks/#SA2001 - - SA2001 - # Called 'testing.T.FailNow' or 'SkipNow' in a goroutine, which isn't allowed. - # https://staticcheck.dev/docs/checks/#SA2002 - - SA2002 - # Deferred 'Lock' right after locking, likely meant to defer 'Unlock' instead. - # https://staticcheck.dev/docs/checks/#SA2003 - - SA2003 - # 'TestMain' doesn't call 'os.Exit', hiding test failures. - # https://staticcheck.dev/docs/checks/#SA3000 - - SA3000 - # Assigning to 'b.N' in benchmarks distorts the results. - # https://staticcheck.dev/docs/checks/#SA3001 - - SA3001 - # Binary operator has identical expressions on both sides. - # https://staticcheck.dev/docs/checks/#SA4000 - - SA4000 - # '&*x' gets simplified to 'x', it does not copy 'x'. - # https://staticcheck.dev/docs/checks/#SA4001 - - SA4001 - # Comparing unsigned values against negative values is pointless. - # https://staticcheck.dev/docs/checks/#SA4003 - - SA4003 - # The loop exits unconditionally after one iteration. - # https://staticcheck.dev/docs/checks/#SA4004 - - SA4004 - # Field assignment that will never be observed. Did you mean to use a pointer receiver?. - # https://staticcheck.dev/docs/checks/#SA4005 - - SA4005 - # A value assigned to a variable is never read before being overwritten. Forgotten error check or dead code?. - # https://staticcheck.dev/docs/checks/#SA4006 - - SA4006 - # The variable in the loop condition never changes, are you incrementing the wrong variable?. - # https://staticcheck.dev/docs/checks/#SA4008 - - SA4008 - # A function argument is overwritten before its first use. - # https://staticcheck.dev/docs/checks/#SA4009 - - SA4009 - # The result of 'append' will never be observed anywhere. - # https://staticcheck.dev/docs/checks/#SA4010 - - SA4010 - # Break statement with no effect. Did you mean to break out of an outer loop?. - # https://staticcheck.dev/docs/checks/#SA4011 - - SA4011 - # Comparing a value against NaN even though no value is equal to NaN. - # https://staticcheck.dev/docs/checks/#SA4012 - - SA4012 - # Negating a boolean twice ('!!b') is the same as writing 'b'. This is either redundant, or a typo. - # https://staticcheck.dev/docs/checks/#SA4013 - - SA4013 - # An if/else if chain has repeated conditions and no side-effects; if the condition didn't match the first time, it won't match the second time, either. - # https://staticcheck.dev/docs/checks/#SA4014 - - SA4014 - # Calling functions like 'math.Ceil' on floats converted from integers doesn't do anything useful. - # https://staticcheck.dev/docs/checks/#SA4015 - - SA4015 - # Certain bitwise operations, such as 'x ^ 0', do not do anything useful. - # https://staticcheck.dev/docs/checks/#SA4016 - - SA4016 - # Discarding the return values of a function without side effects, making the call pointless. - # https://staticcheck.dev/docs/checks/#SA4017 - - SA4017 - # Self-assignment of variables. - # https://staticcheck.dev/docs/checks/#SA4018 - - SA4018 - # Multiple, identical build constraints in the same file. - # https://staticcheck.dev/docs/checks/#SA4019 - - SA4019 - # Unreachable case clause in a type switch. - # https://staticcheck.dev/docs/checks/#SA4020 - - SA4020 - # "x = append(y)" is equivalent to "x = y". - # https://staticcheck.dev/docs/checks/#SA4021 - - SA4021 - # Comparing the address of a variable against nil. - # https://staticcheck.dev/docs/checks/#SA4022 - - SA4022 - # Impossible comparison of interface value with untyped nil. - # https://staticcheck.dev/docs/checks/#SA4023 - - SA4023 - # Checking for impossible return value from a builtin function. - # https://staticcheck.dev/docs/checks/#SA4024 - - SA4024 - # Integer division of literals that results in zero. - # https://staticcheck.dev/docs/checks/#SA4025 - - SA4025 - # Go constants cannot express negative zero. - # https://staticcheck.dev/docs/checks/#SA4026 - - SA4026 - # '(*net/url.URL).Query' returns a copy, modifying it doesn't change the URL. - # https://staticcheck.dev/docs/checks/#SA4027 - - SA4027 - # 'x % 1' is always zero. - # https://staticcheck.dev/docs/checks/#SA4028 - - SA4028 - # Ineffective attempt at sorting slice. - # https://staticcheck.dev/docs/checks/#SA4029 - - SA4029 - # Ineffective attempt at generating random number. - # https://staticcheck.dev/docs/checks/#SA4030 - - SA4030 - # Checking never-nil value against nil. - # https://staticcheck.dev/docs/checks/#SA4031 - - SA4031 - # Comparing 'runtime.GOOS' or 'runtime.GOARCH' against impossible value. - # https://staticcheck.dev/docs/checks/#SA4032 - - SA4032 - # Assignment to nil map. - # https://staticcheck.dev/docs/checks/#SA5000 - - SA5000 - # Deferring 'Close' before checking for a possible error. - # https://staticcheck.dev/docs/checks/#SA5001 - - SA5001 - # The empty for loop ("for {}") spins and can block the scheduler. - # https://staticcheck.dev/docs/checks/#SA5002 - - SA5002 - # Defers in infinite loops will never execute. - # https://staticcheck.dev/docs/checks/#SA5003 - - SA5003 - # "for { select { ..." with an empty default branch spins. - # https://staticcheck.dev/docs/checks/#SA5004 - - SA5004 - # The finalizer references the finalized object, preventing garbage collection. - # https://staticcheck.dev/docs/checks/#SA5005 - - SA5005 - # Infinite recursive call. - # https://staticcheck.dev/docs/checks/#SA5007 - - SA5007 - # Invalid struct tag. - # https://staticcheck.dev/docs/checks/#SA5008 - - SA5008 - # Invalid Printf call. - # https://staticcheck.dev/docs/checks/#SA5009 - - SA5009 - # Impossible type assertion. - # https://staticcheck.dev/docs/checks/#SA5010 - - SA5010 - # Possible nil pointer dereference. - # https://staticcheck.dev/docs/checks/#SA5011 - - SA5011 - # Passing odd-sized slice to function expecting even size. - # https://staticcheck.dev/docs/checks/#SA5012 - - SA5012 - # Using 'regexp.Match' or related in a loop, should use 'regexp.Compile'. - # https://staticcheck.dev/docs/checks/#SA6000 - - SA6000 - # Missing an optimization opportunity when indexing maps by byte slices. - # https://staticcheck.dev/docs/checks/#SA6001 - - SA6001 - # Storing non-pointer values in 'sync.Pool' allocates memory. - # https://staticcheck.dev/docs/checks/#SA6002 - - SA6002 - # Converting a string to a slice of runes before ranging over it. - # https://staticcheck.dev/docs/checks/#SA6003 - - SA6003 - # Inefficient string comparison with 'strings.ToLower' or 'strings.ToUpper'. - # https://staticcheck.dev/docs/checks/#SA6005 - - SA6005 - # Using io.WriteString to write '[]byte'. - # https://staticcheck.dev/docs/checks/#SA6006 - - SA6006 - # Defers in range loops may not run when you expect them to. - # https://staticcheck.dev/docs/checks/#SA9001 - - SA9001 - # Using a non-octal 'os.FileMode' that looks like it was meant to be in octal. - # https://staticcheck.dev/docs/checks/#SA9002 - - SA9002 - # Empty body in an if or else branch. - # https://staticcheck.dev/docs/checks/#SA9003 - - SA9003 - # Only the first constant has an explicit type. - # https://staticcheck.dev/docs/checks/#SA9004 - - SA9004 - # Trying to marshal a struct with no public fields nor custom marshaling. - # https://staticcheck.dev/docs/checks/#SA9005 - - SA9005 - # Dubious bit shifting of a fixed size integer value. - # https://staticcheck.dev/docs/checks/#SA9006 - - SA9006 - # Deleting a directory that shouldn't be deleted. - # https://staticcheck.dev/docs/checks/#SA9007 - - SA9007 - # 'else' branch of a type assertion is probably not reading the right value. - # https://staticcheck.dev/docs/checks/#SA9008 - - SA9008 - # Ineffectual Go compiler directive. - # https://staticcheck.dev/docs/checks/#SA9009 - - SA9009 - # Incorrect or missing package comment. - # https://staticcheck.dev/docs/checks/#ST1000 - - ST1000 - # Dot imports are discouraged. - # https://staticcheck.dev/docs/checks/#ST1001 - - ST1001 - # Poorly chosen identifier. - # https://staticcheck.dev/docs/checks/#ST1003 - - ST1003 - # Incorrectly formatted error string. - # https://staticcheck.dev/docs/checks/#ST1005 - - ST1005 - # Poorly chosen receiver name. - # https://staticcheck.dev/docs/checks/#ST1006 - - ST1006 - # A function's error value should be its last return value. - # https://staticcheck.dev/docs/checks/#ST1008 - - ST1008 - # Poorly chosen name for variable of type 'time.Duration'. - # https://staticcheck.dev/docs/checks/#ST1011 - - ST1011 - # Poorly chosen name for error variable. - # https://staticcheck.dev/docs/checks/#ST1012 - - ST1012 - # Should use constants for HTTP error codes, not magic numbers. - # https://staticcheck.dev/docs/checks/#ST1013 - - ST1013 - # A switch's default case should be the first or last case. - # https://staticcheck.dev/docs/checks/#ST1015 - - ST1015 - # Use consistent method receiver names. - # https://staticcheck.dev/docs/checks/#ST1016 - - ST1016 - # Don't use Yoda conditions. - # https://staticcheck.dev/docs/checks/#ST1017 - - ST1017 - # Avoid zero-width and control characters in string literals. - # https://staticcheck.dev/docs/checks/#ST1018 - - ST1018 - # Importing the same package multiple times. - # https://staticcheck.dev/docs/checks/#ST1019 - - ST1019 - # The documentation of an exported function should start with the function's name. - # https://staticcheck.dev/docs/checks/#ST1020 - - ST1020 - # The documentation of an exported type should start with type's name. - # https://staticcheck.dev/docs/checks/#ST1021 - - ST1021 - # The documentation of an exported variable or constant should start with variable's name. - # https://staticcheck.dev/docs/checks/#ST1022 - - ST1022 - # Redundant type in variable declaration. - # https://staticcheck.dev/docs/checks/#ST1023 - - ST1023 - # Use plain channel send or receive instead of single-case select. - # https://staticcheck.dev/docs/checks/#S1000 - - S1000 - # Replace for loop with call to copy. - # https://staticcheck.dev/docs/checks/#S1001 - - S1001 - # Omit comparison with boolean constant. - # https://staticcheck.dev/docs/checks/#S1002 - - S1002 - # Replace call to 'strings.Index' with 'strings.Contains'. - # https://staticcheck.dev/docs/checks/#S1003 - - S1003 - # Replace call to 'bytes.Compare' with 'bytes.Equal'. - # https://staticcheck.dev/docs/checks/#S1004 - - S1004 - # Drop unnecessary use of the blank identifier. - # https://staticcheck.dev/docs/checks/#S1005 - - S1005 - # Use "for { ... }" for infinite loops. - # https://staticcheck.dev/docs/checks/#S1006 - - S1006 - # Simplify regular expression by using raw string literal. - # https://staticcheck.dev/docs/checks/#S1007 - - S1007 - # Simplify returning boolean expression. - # https://staticcheck.dev/docs/checks/#S1008 - - S1008 - # Omit redundant nil check on slices, maps, and channels. - # https://staticcheck.dev/docs/checks/#S1009 - - S1009 - # Omit default slice index. - # https://staticcheck.dev/docs/checks/#S1010 - - S1010 - # Use a single 'append' to concatenate two slices. - # https://staticcheck.dev/docs/checks/#S1011 - - S1011 - # Replace 'time.Now().Sub(x)' with 'time.Since(x)'. - # https://staticcheck.dev/docs/checks/#S1012 - - S1012 - # Use a type conversion instead of manually copying struct fields. - # https://staticcheck.dev/docs/checks/#S1016 - - S1016 - # Replace manual trimming with 'strings.TrimPrefix'. - # https://staticcheck.dev/docs/checks/#S1017 - - S1017 - # Use "copy" for sliding elements. - # https://staticcheck.dev/docs/checks/#S1018 - - S1018 - # Simplify "make" call by omitting redundant arguments. - # https://staticcheck.dev/docs/checks/#S1019 - - S1019 - # Omit redundant nil check in type assertion. - # https://staticcheck.dev/docs/checks/#S1020 - - S1020 - # Merge variable declaration and assignment. - # https://staticcheck.dev/docs/checks/#S1021 - - S1021 - # Omit redundant control flow. - # https://staticcheck.dev/docs/checks/#S1023 - - S1023 - # Replace 'x.Sub(time.Now())' with 'time.Until(x)'. - # https://staticcheck.dev/docs/checks/#S1024 - - S1024 - # Don't use 'fmt.Sprintf("%s", x)' unnecessarily. - # https://staticcheck.dev/docs/checks/#S1025 - - S1025 - # Simplify error construction with 'fmt.Errorf'. - # https://staticcheck.dev/docs/checks/#S1028 - - S1028 - # Range over the string directly. - # https://staticcheck.dev/docs/checks/#S1029 - - S1029 - # Use 'bytes.Buffer.String' or 'bytes.Buffer.Bytes'. - # https://staticcheck.dev/docs/checks/#S1030 - - S1030 - # Omit redundant nil check around loop. - # https://staticcheck.dev/docs/checks/#S1031 - - S1031 - # Use 'sort.Ints(x)', 'sort.Float64s(x)', and 'sort.Strings(x)'. - # https://staticcheck.dev/docs/checks/#S1032 - - S1032 - # Unnecessary guard around call to "delete". - # https://staticcheck.dev/docs/checks/#S1033 - - S1033 - # Use result of type assertion to simplify cases. - # https://staticcheck.dev/docs/checks/#S1034 - - S1034 - # Redundant call to 'net/http.CanonicalHeaderKey' in method call on 'net/http.Header'. - # https://staticcheck.dev/docs/checks/#S1035 - - S1035 - # Unnecessary guard around map access. - # https://staticcheck.dev/docs/checks/#S1036 - - S1036 - # Elaborate way of sleeping. - # https://staticcheck.dev/docs/checks/#S1037 - - S1037 - # Unnecessarily complex way of printing formatted string. - # https://staticcheck.dev/docs/checks/#S1038 - - S1038 - # Unnecessary use of 'fmt.Sprint'. - # https://staticcheck.dev/docs/checks/#S1039 - - S1039 - # Type assertion to current type. - # https://staticcheck.dev/docs/checks/#S1040 - - S1040 - # Apply De Morgan's law. - # https://staticcheck.dev/docs/checks/#QF1001 - - QF1001 - # Convert untagged switch to tagged switch. - # https://staticcheck.dev/docs/checks/#QF1002 - - QF1002 - # Convert if/else-if chain to tagged switch. - # https://staticcheck.dev/docs/checks/#QF1003 - - QF1003 - # Use 'strings.ReplaceAll' instead of 'strings.Replace' with 'n == -1'. - # https://staticcheck.dev/docs/checks/#QF1004 - - QF1004 - # Expand call to 'math.Pow'. - # https://staticcheck.dev/docs/checks/#QF1005 - - QF1005 - # Lift 'if'+'break' into loop condition. - # https://staticcheck.dev/docs/checks/#QF1006 - - QF1006 - # Merge conditional assignment into variable declaration. - # https://staticcheck.dev/docs/checks/#QF1007 - - QF1007 - # Omit embedded fields from selector expression. - # https://staticcheck.dev/docs/checks/#QF1008 - - QF1008 - # Use 'time.Time.Equal' instead of '==' operator. - # https://staticcheck.dev/docs/checks/#QF1009 - - QF1009 - # Convert slice of bytes to string when printing it. - # https://staticcheck.dev/docs/checks/#QF1010 - - QF1010 - # Omit redundant type from variable declaration. - # https://staticcheck.dev/docs/checks/#QF1011 - - QF1011 - # Use 'fmt.Fprintf(x, ...)' instead of 'x.Write(fmt.Sprintf(...))'. - # https://staticcheck.dev/docs/checks/#QF1012 - - QF1012 - - tagalign: - # Align and sort can be used together or separately. - # - # Whether enable align. If true, the struct tags will be aligned. - # E.g.: - # type FooBar struct { - # Bar string `json:"bar" validate:"required"` - # FooFoo int8 `json:"foo_foo" validate:"required"` - # } - # will be formatted to: - # type FooBar struct { - # Bar string `json:"bar" validate:"required"` - # FooFoo int8 `json:"foo_foo" validate:"required"` - # } - # Default: true. - 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"`. - # Default: true - sort: false - # Specify the order of tags, the other tags will be sorted by name. - # This option will be ignored if `sort` is false. - # Default: [] - order: - - json - - yaml - - yml - - toml - - mapstructure - - binding - - validate - # Whether enable strict style. - # In this style, the tags will be sorted and aligned in the dictionary order, - # and the tags with the same name will be aligned together. - # Note: This option will be ignored if 'align' or 'sort' is false. - # Default: false - strict: true - - tagliatelle: - # Checks the struct tag name case. - case: - # Defines the association between tag name and case. - # Any struct tag name can be used. - # Supported string cases: - # - `camel` - # - `pascal` - # - `kebab` - # - `snake` - # - `upperSnake` - # - `goCamel` - # - `goPascal` - # - `goKebab` - # - `goSnake` - # - `upper` - # - `lower` - # - `header` - rules: - json: camel - yaml: camel - xml: camel - toml: camel - bson: camel - avro: snake - mapstructure: kebab - env: upperSnake - envconfig: upperSnake - whatever: snake - # Defines the association between tag name and case. - # Important: the `extended-rules` overrides `rules`. - # Default: empty - extended-rules: - json: - # Supported string cases: - # - `camel` - # - `pascal` - # - `kebab` - # - `snake` - # - `upperSnake` - # - `goCamel` - # - `goPascal` - # - `goKebab` - # - `goSnake` - # - `header` - # - `lower` - # - `header` - # - # Required - case: camel - # Adds 'AMQP', 'DB', 'GID', 'RTP', 'SIP', 'TS' to initialisms, - # and removes 'LHS', 'RHS' from initialisms. - # Default: false - extra-initialisms: true - # Defines initialism additions and overrides. - # Default: empty - initialism-overrides: - DB: true # add a new initialism - LHS: false # disable a default initialism. - # ... - # Uses the struct field name to check the name of the struct tag. - # Default: false - use-field-name: true - # The field names to ignore. - # Default: [] - ignored-fields: - - Bar - - Foo - # Overrides the default/root configuration. - # Default: [] - overrides: - - - # The package path (uses `/` only as a separator). - # Required - pkg: foo/bar - # Default: empty or the same as the default/root configuration. - rules: - json: snake - xml: pascal - # Default: empty or the same as the default/root configuration. - extended-rules: - # Same options as the base `extended-rules`. - # Default: false (WARNING: it doesn't follow the default/root configuration) - use-field-name: true - # The field names to ignore. - # Default: [] or the same as the default/root configuration. - ignored-fields: - - Bar - - Foo - # Ignore the package (takes precedence over all other configurations). - # Default: false - ignore: true - - testifylint: - # Enable all checkers (https://github.com/Antonboom/testifylint#checkers). - # Default: false - enable-all: true - # Disable checkers by name - # (in addition to default - # suite-thelper - # ). - disable: - - blank-import - - bool-compare - - compares - - contains - - empty - - encoded-compare - - equal-values - - error-is-as - - error-nil - - expected-actual - - float-compare - - formatter - - go-require - - len - - negative-positive - - nil-compare - - regexp - - require-error - - suite-broken-parallel - - suite-dont-use-pkg - - suite-extra-assert-call - - suite-method-signature - - suite-subtest-run - - suite-thelper - - useless-assert - - # Disable all checkers (https://github.com/Antonboom/testifylint#checkers). - # Default: false - disable-all: true - # Enable checkers by name - # (in addition to default - # blank-import, bool-compare, compares, contains, empty, encoded-compare, equal-values, error-is-as, error-nil, - # expected-actual, go-require, float-compare, formatter, len, negative-positive, nil-compare, regexp, require-error, - # suite-broken-parallel, suite-dont-use-pkg, suite-extra-assert-call, suite-subtest-run, suite-method-signature, - # useless-assert - # ). - enable: - - blank-import - - bool-compare - - compares - - contains - - empty - - encoded-compare - - equal-values - - error-is-as - - error-nil - - expected-actual - - float-compare - - formatter - - go-require - - len - - negative-positive - - nil-compare - - regexp - - require-error - - suite-broken-parallel - - suite-dont-use-pkg - - suite-extra-assert-call - - suite-method-signature - - suite-subtest-run - - suite-thelper - - useless-assert - - bool-compare: - # To ignore user defined types (over builtin bool). - # Default: false - ignore-custom-types: true - expected-actual: - # Regexp for expected variable name. - # Default: (^(exp(ected)?|want(ed)?)([A-Z]\w*)?$)|(^(\w*[a-z])?(Exp(ected)?|Want(ed)?)$) - pattern: ^expected - formatter: - # To enable go vet's printf checks. - # Default: true - check-format-string: false - # To require f-assertions (e.g. `assert.Equalf`) if format string is used, even if there are no variable-length - # variables, i.e. it requires `require.NoErrorf` for both these cases: - # - require.NoErrorf(t, err, "unexpected error") - # - require.NoErrorf(t, err, "unexpected error for sid: %v", sid) - # To understand this behavior, please read the - # https://github.com/Antonboom/testifylint?tab=readme-ov-file#historical-reference-of-formatter. - # Default: false - require-f-funcs: true - # To require that the first element of msgAndArgs (msg) has a string type. - # For example, in such case assertion like `assert.True(t, b, tt.case)` will be considered as invalid. - # Default: true - require-string-msg: false - go-require: - # To ignore HTTP handlers (like http.HandlerFunc). - # Default: false - ignore-http-handlers: true - require-error: - # Regexp for assertions to analyze. If defined, then only matched error assertions will be reported. - # Default: "" - fn-pattern: ^(Errorf?|NoErrorf?)$ - suite-extra-assert-call: - # To require or remove extra Assert() call? - # Default: remove - mode: require - - testpackage: - # Regexp pattern to skip files. - # Default: "(export|internal)_test\\.go" - skip-regexp: (export|internal)_test\.go - # List of packages that don't end with _test that tests are allowed to be in. - # Default: "main" - allow-packages: - - example - - main - - thelper: - test: - # Check *testing.T is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.T param has name t. - # Default: true - name: false - # Check t.Helper() begins helper function. - # Default: true - begin: false - benchmark: - # Check *testing.B is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.B param has name b. - # Default: true - name: false - # Check b.Helper() begins helper function. - # Default: true - begin: false - tb: - # Check *testing.TB is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.TB param has name tb. - # Default: true - name: false - # Check tb.Helper() begins helper function. - # Default: true - begin: false - fuzz: - # Check *testing.F is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.F param has name f. - # Default: true - name: false - # Check f.Helper() begins helper function. - # Default: true - begin: false - - usestdlibvars: - # Suggest the use of http.MethodXX. - # Default: true - http-method: false - # Suggest the use of http.StatusXX. - # Default: true - http-status-code: false - # Suggest the use of time.Month in time.Date. - # Default: false - time-date-month: true - # Suggest the use of time.Weekday.String(). - # Default: true - time-weekday: true - # Suggest the use of time.Month.String(). - # Default: false - time-month: true - # Suggest the use of time.Layout. - # Default: false - time-layout: true - # Suggest the use of crypto.Hash.String(). - # Default: false - crypto-hash: true - # Suggest the use of rpc.DefaultXXPath. - # Default: false - default-rpc-path: true - # Suggest the use of sql.LevelXX.String(). - # Default: false - sql-isolation-level: true - # Suggest the use of tls.SignatureScheme.String(). - # Default: false - tls-signature-scheme: true - # Suggest the use of constant.Kind.String(). - # Default: false - constant-kind: true - - usetesting: - # Enable/disable `os.CreateTemp("", ...)` detections. - # Default: true - os-create-temp: false - - # Enable/disable `os.MkdirTemp()` detections. - # Default: true - os-mkdir-temp: false - - # Enable/disable `os.Setenv()` detections. - # Default: true - os-setenv: false - - # Enable/disable `os.TempDir()` detections. - # Default: false - os-temp-dir: true - - # Enable/disable `os.Chdir()` detections. - # Disabled if Go < 1.24. - # Default: true - os-chdir: false - - # Enable/disable `context.Background()` detections. - # Disabled if Go < 1.24. - # Default: false - context-background: true - - # Enable/disable `context.TODO()` detections. - # Disabled if Go < 1.24. - # Default: false - context-todo: true - - unconvert: - # Remove conversions that force intermediate rounding. - # Default: false - fast-math: true - # Be more conservative (experimental). - # Default: false - safe: true - - unparam: - # Inspect exported functions. - # - # Set to true if no external program/library imports your code. - # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: - # if it's called for subdir of a project it can't find external interfaces. All text editor integrations - # with golangci-lint call it on a directory with the changed file. - # - # Default: false - check-exported: true - - unqueryvet: - # Enable SQL builder checking. - # Default: true - check-sql-builders: false - # Regex patterns for acceptable SELECT * usage. - # Default: - # - "SELECT \\* FROM information_schema\\..*" - # - "SELECT \\* FROM pg_catalog\\..*" - # - "SELECT COUNT\\(\\*\\)" - # - "SELECT MAX\\(\\*\\)" - # - "SELECT MIN\\(\\*\\)" - allowed-patterns: - - "SELECT \\* FROM temp_.*" - - "SELECT \\* FROM.*-- migration" - - unused: - # Mark all struct fields that have been written to as used. - # Default: true - field-writes-are-uses: false - # Treat IncDec statement (e.g. `i++` or `i--`) as both read and write operation instead of just write. - # Default: false - post-statements-are-reads: true - # Mark all exported fields as used. - # default: true - exported-fields-are-used: false - # Mark all function parameters as used. - # default: true - parameters-are-used: false - # Mark all local variables as used. - # default: true - local-variables-are-used: false - # Mark all identifiers inside generated files as used. - # Default: true - generated-is-used: false - - varnamelen: - # The longest distance, in source lines, that is being considered a "small scope". - # Variables used in at most this many lines will be ignored. - # Default: 5 - max-distance: 6 - # The minimum length of a variable's name that is considered "long". - # Variable names that are at least this long will be ignored. - # Default: 3 - min-name-length: 2 - # Check method receivers. - # Default: false - check-receiver: true - # Check named return values. - # Default: false - check-return: true - # Check type parameters. - # Default: false - check-type-param: true - # Ignore "ok" variables that hold the bool return value of a type assertion. - # Default: false - ignore-type-assert-ok: true - # Ignore "ok" variables that hold the bool return value of a map index. - # Default: false - ignore-map-index-ok: true - # Ignore "ok" variables that hold the bool return value of a channel receive. - # Default: false - ignore-chan-recv-ok: true - # Optional list of variable names that should be ignored completely. - # Default: [] - ignore-names: - - err - # Optional list of variable declarations that should be ignored completely. - # Entries must be in one of the following forms (see below for examples): - # - for variables, parameters, named return values, method receivers, or type parameters: - # ( can also be a pointer/slice/map/chan/...) - # - for constants: const - # - # Default: [] - ignore-decls: - - c echo.Context - - t testing.T - - f *foo.Bar - - e error - - i int - - const C - - T any - - m map[string]int - - whitespace: - # Enforces newlines (or comments) after every multi-line if statement. - # Default: false - multi-if: true - # Enforces newlines (or comments) after every multi-line function signature. - # Default: false - multi-func: true - - wrapcheck: - # An array of strings specifying additional substrings of signatures to ignore. - # Unlike 'ignore-sigs', this option extends the default set (or the set specified in 'ignore-sigs') without replacing it entirely. - # This allows you to add specific signatures to the ignore list - # while retaining the defaults or any items in 'ignore-sigs'. - # Default: [] - extra-ignore-sigs: - - .CustomError( - - .SpecificWrap( - - # An array of strings that specify substrings of signatures to ignore. - # If this set, it will override the default set of ignored signatures. - # See https://github.com/tomarrell/wrapcheck#configuration for more information. - # Default: [".Errorf(", "errors.New(", "errors.Unwrap(", "errors.Join(", ".Wrap(", ".Wrapf(", ".WithMessage(", ".WithMessagef(", ".WithStack("] - ignore-sigs: - - .Errorf( - - errors.New( - - errors.Unwrap( - - errors.Join( - - .Wrap( - - .Wrapf( - - .WithMessage( - - .WithMessagef( - - .WithStack( - # An array of strings that specify regular expressions of signatures to ignore. - # Default: [] - ignore-sig-regexps: - - \.New.*Error\( - # An array of strings that specify globs of packages to ignore. - # Default: [] - ignore-package-globs: - - encoding/* - - github.com/pkg/* - # An array of strings that specify regular expressions of interfaces to ignore. - # Default: [] - ignore-interface-regexps: - - ^(?i)c(?-i)ach(ing|e) - # Determines whether wrapcheck should report errors returned from inside the package. - # Default: false - report-internal-errors: true - - wsl: - # Do strict checking when assigning from append (x = append(x, y)). - # If this is set to true - the append call must append either a variable - # assigned, called or used on the line above. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#strict-append - # Default: true - strict-append: false - - # Allows assignments to be cuddled with variables used in calls on - # line above and calls to be cuddled with assignments of variables - # used in call on line above. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-assign-and-call - # Default: true - allow-assign-and-call: false - - # Allows assignments to be cuddled with anything. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-assign-and-anything - # Default: false - allow-assign-and-anything: true - - # Allows cuddling to assignments even if they span over multiple lines. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-multiline-assign - # Default: true - allow-multiline-assign: false - - # If the number of lines in a case block is equal to or lager than this number, - # the case *must* end white a newline. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-case-trailing-whitespace - # Default: 0 - force-case-trailing-whitespace: 1 - - # Allow blocks to end with comments. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-trailing-comment - # Default: false - allow-trailing-comment: true - - # Allow multiple comments in the beginning of a block separated with newline. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-separated-leading-comment - # Default: false - allow-separated-leading-comment: true - - # Allow multiple var/declaration statements to be cuddled. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-cuddle-declarations - # Default: false - allow-cuddle-declarations: true - - # A list of call idents that everything can be cuddled with. - # Defaults: [ "Lock", "RLock" ] - allow-cuddle-with-calls: [ "Foo", "Bar" ] - - # AllowCuddleWithRHS is a list of right hand side variables that is allowed - # to be cuddled with anything. - # Defaults: [ "Unlock", "RUnlock" ] - allow-cuddle-with-rhs: [ "Foo", "Bar" ] - - # Allow cuddling with any block as long as the variable is used somewhere in - # the block. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-cuddle-used-in-block - # Default: false - allow-cuddle-used-in-block: true - - # Causes an error when an If statement that checks an error variable doesn't - # cuddle with the assignment of that variable. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-err-cuddling - # Default: false - force-err-cuddling: true - - # When force-err-cuddling is enabled this is a list of names - # used for error variables to check for in the conditional. - # Default: [ "err" ] - error-variable-names: [ "foo" ] - - # Causes an error if a short declaration (:=) cuddles with anything other than - # another short declaration. - # This logic overrides force-err-cuddling among others. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-short-decl-cuddling - # Default: false - force-short-decl-cuddling: true - - wsl_v5: - # Allow cuddling a variable if it's used first in the immediate following block, - # even if the statement with the block doesn't use the variable. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: true - allow-first-in-block: false - - # Same as above, - # but allows cuddling if the variable is used anywhere in the following (or nested) block. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: false - allow-whole-block: true - - # If a block contains more than this number of lines, - # the branch statement needs to be separated by whitespace. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: 2 - branch-max-lines: 4 - - # If set to a non-negative number, - # case blocks need to end with whitespace if exceeding this number - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: 0 - case-max-lines: 2 - - # Default checks to use. - # Can be `all`, `none`, `default` or empty. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#checks-and-configuration - # Default: "" - default: all - - # Enabled checks. - # Will be additive to any presets. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#checks-and-configuration - # Default: [] - enable: - - assign - - branch - - decl - - defer - - expr - - for - - go - - if - - inc-dec - - label - - range - - return - - select - - send - - switch - - type-switch - - append - - assign-exclusive - - assign-expr - - err - - leading-whitespace - - trailing-whitespace - - # Disable checks. - # Will be subtractive to any preset. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#checks-and-configuration - # Default: [] - disable: - - assign - - branch - - decl - - defer - - expr - - for - - go - - if - - inc-dec - - label - - range - - return - - select - - send - - switch - - type-switch - - append - - assign-exclusive - - assign-expr - - err - - leading-whitespace - - trailing-whitespace - - # The custom section can be used to define linter plugins to be loaded at runtime. - # See README documentation for more info. - custom: - # Each custom linter should have a unique name. - example: - # The plugin type. - # It can be `goplugin` or `module`. - # Default: goplugin - type: module - # The path to the plugin *.so. Can be absolute or local. - # Required for each custom linter. - path: /path/to/example.so - # The description of the linter. - # Optional. - description: This is an example usage of a plugin linter. - # Intended to point to the repo location of the linter. - # Optional. - original-url: github.com/golangci/example-linter - # Plugins settings/configuration. - # Only work with plugin based on `linterdb.PluginConstructor`. - # Optional. - settings: - foo: bar - - # Defines a set of rules to ignore issues. - # It does not skip the analysis, and so does not ignore "typecheck" errors. - exclusions: - # Mode of the generated files analysis. - # - # - `strict`: sources are excluded by strictly following the Go generated file convention. - # 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. - # https://go.dev/s/generatedcode - # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc. - # - `disable`: disable the generated files exclusion. - # - # Default: strict - generated: lax - # Log a warning if an exclusion rule is unused. - # Default: false - warn-unused: true - # Predefined exclusion rules. - # Default: [] - presets: - - comments - - std-error-handling - - common-false-positives - - legacy - - # Excluding configuration per-path, per-linter, per-text and per-source. - rules: - # Exclude some linters from running on tests files. - - path: _test\.go - linters: - - gocyclo - - errcheck - - dupl - - gosec - - # Run some linter only for test files by excluding its issues for everything else. - - path-except: _test\.go - linters: - - forbidigo - - # Exclude known linters from partially hard-vendored code, - # which is impossible to exclude via `nolint` comments. - # `/` will be replaced by the current OS file path separator to properly work on Windows. - - path: internal/hmac/ - text: "weak cryptographic primitive" - linters: - - gosec - - # Exclude some `staticcheck` messages. - - linters: - - staticcheck - text: "SA9003:" - - # Exclude `lll` issues for long lines with `go:generate`. - - linters: - - lll - source: "^//go:generate " - - # Which file paths to exclude: they will be analyzed, but issues from them won't be reported. - # "/" will be replaced by the current OS file path separator to properly work on Windows. - # Default: [] - paths: - - ".*\\.my\\.go$" - - lib/bad.go - # Which file paths to not exclude. - # Default: [] - paths-except: - - ".*\\.my\\.go$" - - lib/bad.go - -formatters: - # Enable specific formatter. - # Default: [] (uses standard Go formatting) - enable: - - gci - - gofmt - - gofumpt - - goimports - - golines - - swaggo - - # Formatters settings. - settings: - 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`. - # If `custom-order` is `true`, it follows the order of `sections` option. - # Default: ["standard", "default"] - sections: - - standard # Standard section: captures all standard packages. - - default # Default section: contains all imports that could not be matched to another section type. - - prefix(github.com/org/project) # Custom section: groups all imports with the specified Prefix. - - 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. - - # Checks that no inline comments are present. - # Default: false - no-inline-comments: true - - # Checks that no prefix comments (comment lines above an import) are present. - # Default: false - no-prefix-comments: true - - # Enable custom order of sections. - # If `true`, make the section order the same as the order of `sections`. - # Default: false - custom-order: true - - # Drops lexical ordering for custom sections. - # Default: false - no-lex-order: true - - gofmt: - # Simplify code: gofmt with `-s` option. - # Default: true - simplify: false - # Apply the rewrite rules to the source before reformatting. - # https://pkg.go.dev/cmd/gofmt - # Default: [] - rewrite-rules: - - pattern: 'interface{}' - replacement: 'any' - - pattern: 'a[b:len(a)]' - replacement: 'a[b:]' - - gofumpt: - # Module path which contains the source code being formatted. - # Default: "" - module-path: github.com/org/project - - # Choose whether to use the extra rules. - # Default: false - extra-rules: true - - goimports: - # A list of prefixes, which, if set, checks import paths - # with the given prefixes are grouped after 3rd-party packages. - # Default: [] - local-prefixes: - - github.com/org/project - - golines: - # Target maximum line length. - # Default: 100 - max-len: 200 - # Length of a tabulation. - # Default: 4 - tab-len: 8 - # Shorten single-line comments. - # Default: false - shorten-comments: true - # Default: true - reformat-tags: false - # Split chained methods on the dots as opposed to the arguments. - # Default: true - chain-split-dots: false - - exclusions: - # Log a warning if an exclusion path is unused. - # Default: false - warn-unused: true - # Mode of the generated files analysis. - # - # - `strict`: sources are excluded by strictly following the Go generated file convention. - # 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. - # https://go.dev/s/generatedcode - # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc. - # - `disable`: disable the generated files exclusion. - # - # Default: lax - generated: strict - # Which file paths to exclude. - # This option is ignored when using `--stdin` as the path is unknown. - # Default: [] - paths: - - ".*\\.my\\.go$" - - lib/bad.go - -issues: - # Maximum issues count per one linter. - # Set to 0 to disable. - # Default: 50 - max-issues-per-linter: 0 - - # Maximum count of issues with the same text. - # Set to 0 to disable. - # Default: 3 - max-same-issues: 0 - - # Make issues output unique by line. - # Default: true - uniq-by-line: false - - # Show only new issues: if there are unstaged changes or untracked files, - # only those changes are analyzed, else only changes in HEAD~ are analyzed. - # It's a super-useful option for integration of golangci-lint into existing large codebase. - # It's not practical to fix all existing issues at the moment of integration: - # much better don't allow issues in new code. - # - # Default: false - new: true - - # Show only new issues created after the best common ancestor (merge-base against HEAD). - # Default: "" - new-from-merge-base: main - - # Show only new issues created after git revision `REV`. - # Default: "" - new-from-rev: HEAD - - # Show only new issues created in git patch with set file path. - # Default: "" - new-from-patch: path/to/patch/file - - # Show issues in any part of update files (requires new-from-rev or new-from-patch). - # Default: false - whole-files: true - - # Fix found issues (if it's supported by the linter). - # Default: false - fix: true - - -# Output configuration options. -output: - # The formats used to render issues. - formats: - # Prints issues in a text format with colors, line number, and linter name. - # This format is the default format. - text: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.txt - # Print linter name in the end of issue text. - # Default: true - print-linter-name: false - # Print lines of code with issue. - # Default: true - print-issued-lines: false - # Use colors. - # Default: true - colors: false - # Prints issues in a JSON representation. - json: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.json - # Prints issues in columns representation separated by tabulations. - tab: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.txt - # Print linter name in the end of issue text. - # Default: true - print-linter-name: true - # Use colors. - # Default: true - colors: false - # Prints issues in an HTML page. - # It uses the Cloudflare CDN (cdnjs) and React. - html: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.html - # Prints issues in the Checkstyle format. - checkstyle: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.xml - # Prints issues in the Code Climate format. - code-climate: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.json - # Prints issues in the JUnit XML format. - junit-xml: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.xml - # Support extra JUnit XML fields. - # Default: false - extended: true - # Prints issues in the TeamCity format. - teamcity: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.txt - # Prints issues in the SARIF format. - sarif: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.json - - # Add a prefix to the output file references. - # This option is ignored when using `output.path-mode: abs` mode. - # Default: "" - path-prefix: "" - - # By default, the report are related to the path obtained by `run.relative-path-mode`. - # The mode `abs` allows to show absolute file paths instead of relative file paths. - # The option `output.path-prefix` is ignored when using `abs` mode. - # Default: "" - path-mode: "abs" - - # Order to use when sorting results. - # Possible values: `file`, `linter`, and `severity`. - # - # If the severity values are inside the following list, they are ordered in this order: - # 1. error - # 2. warning - # 3. high - # 4. medium - # 5. low - # Either they are sorted alphabetically. - # - # Default: ["linter", "file"] - sort-order: - - linter - - severity - - file # filepath, line, and column. - - # Show statistics per linter. - # Default: true - show-stats: false - - -# Options for analysis running. -run: - # Timeout for total work, e.g. 30s, 5m, 5m30s. - # If the value is lower or equal to 0, the timeout is disabled. - # Default: 0 (disabled) - timeout: 5m - - # The mode used to evaluate relative paths. - # It's used by exclusions, Go plugins, and some linters. - # The value can be: - # - `gomod`: the paths will be relative to the directory of the `go.mod` file. - # - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`). - # - `cfg`: the paths will be relative to the configuration file. - # - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run. - # Default: cfg - relative-path-mode: gomod - - # Exit code when at least one issue was found. - # Default: 1 - issues-exit-code: 2 - - # Include test files or not. - # Default: true - tests: false - - # List of build tags, all linters use it. - # Default: [] - build-tags: - - mytag - - # If set, we pass it to "go list -mod={option}". From "go help modules": - # If invoked with -mod=readonly, the go command is disallowed from the implicit - # automatic updating of go.mod described above. Instead, it fails when any changes - # to go.mod are needed. This setting is most useful to check that go.mod does - # not need updates, such as in a continuous integration and testing system. - # If invoked with -mod=vendor, the go command assumes that the vendor - # directory holds the correct copies of dependencies and ignores - # the dependency descriptions in go.mod. - # - # Allowed values: readonly|vendor|mod - # Default: "" - modules-download-mode: readonly - - # Allow multiple parallel golangci-lint instances running. - # If false, golangci-lint acquires file lock on start. - # Default: false - allow-parallel-runners: true - - # Allow multiple golangci-lint instances running, but serialize them around a lock. - # If false, golangci-lint exits with an error if it fails to acquire file lock on start. - # Default: false - allow-serial-runners: true - - # Define the Go version limit. - # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.22. - go: '1.23' - - # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. - # Default: 0 (automatically set to match Linux container CPU quota and - # fall back to the number of logical CPUs in the machine) - concurrency: 4 - - -severity: - # 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. - # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity - # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel - # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message - # - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance - # - # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...) - # - # Default: "" - default: error - - # When a list of severity rules are provided, severity information will be added to lint issues. - # Severity rules have the same filtering capability as exclude rules - # except you are allowed to specify one matcher per severity rule. - # - # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...) - # - # Only affects out formats that support setting severity information. - # - # Default: [] - rules: - - linters: - - dupl - severity: info diff --git a/.golangci.reference.yml b/.golangci.reference.yml deleted file mode 100644 index 90a34668e795..000000000000 --- a/.golangci.reference.yml +++ /dev/null @@ -1,4639 +0,0 @@ -# This file contains all available configuration options -# with their default values (in comments). -# -# This file is not a configuration example, -# it contains the exhaustive configuration with explanations of the options. - -# Defines the configuration version. -# The only possible value is "2". -version: "2" - -linters: - # Default set of linters. - # The value can be: - # - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default - # - `all`: enables all linters by default. - # - `none`: disables all linters by default. - # - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`). - # Default: standard - default: all - - # Enable specific linter. - enable: - - arangolint - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - embeddedstructfieldcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - exhaustruct - - exptostd - - fatcontext - - forbidigo - - forcetypeassert - - funcorder - - funlen - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godoclint - - godot - - godox - - goheader - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - iotamixing - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnesserr - - nilnil - - nlreturn - - noctx - - noinlineerr - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - tagalign - - tagliatelle - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unqueryvet - - unused - - usestdlibvars - - usetesting - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - wsl_v5 - - zerologlint - - # Disable specific linters. - disable: - - arangolint - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - embeddedstructfieldcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - exhaustruct - - exptostd - - fatcontext - - forbidigo - - forcetypeassert - - funcorder - - funlen - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godoclint - - godot - - godox - - goheader - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - iotamixing - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnesserr - - nilnil - - nlreturn - - noctx - - noinlineerr - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - tagalign - - tagliatelle - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unqueryvet - - unused - - usestdlibvars - - usetesting - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - wsl_v5 - - zerologlint - - # All available settings of specific linters. - settings: - asasalint: - # To specify a set of function names to exclude. - # The values are merged with the builtin exclusions. - # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. - # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] - exclude: - - Append - - \.Wrapf - # To enable/disable the asasalint builtin exclusions of function names. - # See the default value of `exclude` to get the builtin exclusions. - # Default: true - use-builtin-exclusions: false - - bidichk: - # The following configurations check for all mentioned invisible Unicode runes. - # All runes are enabled by default. - left-to-right-embedding: false - right-to-left-embedding: false - pop-directional-formatting: false - left-to-right-override: false - right-to-left-override: false - left-to-right-isolate: false - right-to-left-isolate: false - first-strong-isolate: false - pop-directional-isolate: false - - copyloopvar: - # Check all assigning the loop variable to another variable. - # Default: false - check-alias: true - - cyclop: - # The maximal code complexity to report. - # Default: 10 - max-complexity: 10 - # The maximal average package complexity. - # If it's higher than 0.0 (float) the check is enabled. - # Default: 0.0 - package-average: 0.5 - - decorder: - # Required order of `type`, `const`, `var` and `func` declarations inside a file. - # Default: types before constants before variables before functions. - dec-order: - - type - - const - - var - - func - - # 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 - - # If true, order of declarations is not checked at all. - # Default: true (disabled) - disable-dec-order-check: false - - # If true, `init` func can be anywhere in file (does not have to be declared before all other functions). - # Default: true (disabled) - disable-init-func-first-check: false - - # If true, multiple global `type`, `const` and `var` declarations are allowed. - # Default: true (disabled) - disable-dec-num-check: false - - # 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. - # Default: false (const statements are not ignored) - disable-const-dec-num-check: false - - # If true, var declarations will be ignored for dec num check. - # Default: false (var statements are not ignored) - disable-var-dec-num-check: false - - depguard: - # Rules to apply. - # - # Variables: - # - File Variables - # Use an exclamation mark `!` to negate a variable. - # Example: `!$test` matches any file that is not a go test file. - # - # `$all` - matches all go files - # `$test` - matches all go test files - # - # - Package Variables - # - # `$gostd` - matches all of go's standard library (Pulled from `GOROOT`) - # - # Default (applies if no custom rules are defined): Only allow $gostd in all files. - rules: - # Name of a rule. - main: - # Defines package matching behavior. Available modes: - # - `original`: allowed if it doesn't match the deny list and either matches the allow list or the allow list is empty. - # - `strict`: allowed only if it matches the allow list and either doesn't match the deny list or the allow rule is more specific (longer) than the deny rule. - # - `lax`: allowed if it doesn't match the deny list or the allow rule is more specific (longer) than the deny rule. - # Default: "original" - list-mode: lax - # List of file globs that will match this list of settings to compare against. - # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed. - # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`. - # The placeholder '${config-path}' is substituted with a path relative to the configuration file. - # Default: $all - files: - - "!**/*_a _file.go" - # List of allowed packages. - # Entries can be a variable (starting with $), a string prefix, or an exact match (if ending with $). - # Default: [] - allow: - - $gostd - - github.com/OpenPeeDeeP - # List of packages that are not allowed. - # Entries can be a variable (starting with $), a string prefix, or an exact match (if ending with $). - # Default: [] - deny: - - pkg: "math/rand$" - desc: use math/rand/v2 - - pkg: "github.com/sirupsen/logrus" - desc: not allowed - - pkg: "github.com/pkg/errors" - desc: Should be replaced by standard lib errors package - - dogsled: - # Checks assignments with too many blank identifiers. - # Default: 2 - max-blank-identifiers: 3 - - dupl: - # Tokens count to trigger issue. - # Default: 150 - threshold: 100 - - dupword: - # Keywords for detecting duplicate words. - # If this list is not empty, only the words defined in this list will be detected. - # Default: [] - keywords: - - "the" - - "and" - - "a" - # Keywords used to ignore detection. - # Default: [] - ignore: - - "0C0C" - - embeddedstructfieldcheck: - # Checks that there is an empty space between the embedded fields and regular fields. - # Default: true - empty-line: false - # Checks that sync.Mutex and sync.RWMutex are not used as embedded fields. - # Default: false - forbid-mutex: true - - errcheck: - # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. - # Such cases aren't reported by default. - # Default: false - check-type-assertions: true - - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`. - # Such cases aren't reported by default. - # Default: false - check-blank: true - - # 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 - - # 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: - - io/ioutil.ReadFile - - io.Copy(*bytes.Buffer) - - io.Copy(os.Stdout) - - # Display function signature instead of selector. - # Default: false - verbose: true - - errchkjson: - # With check-error-free-encoding set to true, errchkjson does warn about errors - # from json encoding functions that are safe to be ignored, - # because they are not possible to happen. - # - # if check-error-free-encoding is set to true and errcheck linter is enabled, - # it is recommended to add the following exceptions to prevent from false positives: - # - # linters: - # settings: - # errcheck: - # exclude-functions: - # - encoding/json.Marshal - # - encoding/json.MarshalIndent - # - # Default: false - check-error-free-encoding: true - - # Issue on struct encoding that doesn't have exported fields. - # Default: false - report-no-exported: false - - errorlint: - # Check whether fmt.Errorf uses the %w verb for formatting errors. - # 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`). - # Default: true - errorf-multi: false - # Check for plain type assertions and type switches. - # Default: true - asserts: false - # 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. - # Default: [ switch ] - check: - - switch - - map - # Presence of "default" case in switch statements satisfies exhaustiveness, - # even if all enum members are not listed. - # Default: false - default-signifies-exhaustive: true - # Enum members matching the supplied regex do not have to be listed in - # switch statements to satisfy exhaustiveness. - # Default: "" - ignore-enum-members: "Example.+" - # Enum types matching the supplied regex do not have to be listed in - # switch statements to satisfy exhaustiveness. - # Default: "" - ignore-enum-types: "Example.+" - # Consider enums only in package scopes, not in inner scopes. - # Default: false - package-scope-only: true - # Only run exhaustive check on switches with "//exhaustive:enforce" comment. - # Default: false - explicit-exhaustive-switch: true - # Only run exhaustive check on map literals with "//exhaustive:enforce" comment. - # Default: false - explicit-exhaustive-map: true - # Switch statement requires default case even if exhaustive. - # Default: false - default-case-required: true - - exhaustruct: - # List of regular expressions to match type names that should be processed. - # Anonymous structs can be matched by '' alias. - # - # Each regular expression must match the full type name, including package path. - # For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`, - # but not `http\.Cookie`. - # Default: [] - include: - - '.+\.Test' - - 'example\.com/package\.ExampleStruct[\d]{1,2}' - # List of regular expressions to match type names that should be excluded from processing. - # Anonymous structs can be matched by '' alias. - # Has precedence over `include`. - # Each regular expression must match the full type name, including package path. - # For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`, - # but not `http\.Cookie`. - # Default: [] - exclude: - - '.+/cobra\.Command$' - # Allows empty structures, effectively excluding them from the check. - # Default: false - allow-empty: true - # List of regular expressions to match type names that should be allowed to be empty. - # Anonymous structs can be matched by '' alias. - # Each regular expression must match the full type name, including package path. - # For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`, - # but not `http\.Cookie`. - # Default: [] - allow-empty-rx: - - '.*/http\.Cookie' - # Allows empty structures in return statements. - # Default: false - allow-empty-returns: true - # Allows empty structures in variable declarations. - # Default: false - allow-empty-declarations: true - - fatcontext: - # Check for potential fat contexts in struct pointers. - # May generate false positives. - # Default: false - check-struct-pointers: true - - forbidigo: - # Forbid the following identifiers (list of regexp). - # Default: ["^(fmt\\.Print(|f|ln)|print|println)$"] - forbid: - # Built-in bootstrapping functions. - - pattern: ^print(ln)?$ - # 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 `(# )?`. - # 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. - # Depends on analyze-types below. - - pattern: ^spew\.(ConfigState\.)?Dump$ - # The package name might be ambiguous. - # The full import path can be used as additional criteria. - # Depends on analyze-types below. - - pattern: ^v1.Dump$ - pkg: ^example.com/pkg/api/v1$ - # Exclude godoc examples from forbidigo checks. - # Default: true - exclude-godoc-examples: false - # Instead of matching the literal source code, - # use type information to replace expressions with strings that contain the package name - # and (for methods and fields) the type name. - # This makes it possible to handle import renaming and forbid struct fields and methods. - # Default: false - analyze-types: true - - funcorder: - # Checks that constructors are placed after the structure declaration. - # Default: true - constructor: false - # Checks if the exported methods of a structure are placed before the non-exported ones. - # Default: true - struct-method: false - # Checks if the constructors and/or structure methods are sorted alphabetically. - # Default: false - alphabetical: true - - funlen: - # Checks the number of lines in a function. - # If lower than 0, disable the check. - # Default: 60 - lines: -1 - # Checks the number of statements in a function. - # If lower than 0, disable the check. - # Default: 40 - statements: -1 - # Ignore comments when counting lines. - # Default: true - ignore-comments: false - - ginkgolinter: - # Suppress the wrong length assertion warning. - # Default: false - suppress-len-assertion: true - - # Suppress the wrong nil assertion warning. - # Default: false - suppress-nil-assertion: true - - # Suppress the wrong error assertion warning. - # Default: false - suppress-err-assertion: true - - # Suppress the wrong comparison assertion warning. - # Default: false - suppress-compare-assertion: true - - # Suppress the function all in async assertion warning. - # Default: false - suppress-async-assertion: true - - # 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`. - # Default: false - forbid-focus-container: true - - # Don't trigger warnings for HaveLen(0) - # Default: false - allow-havelen-zero: true - - # Force using `Expect` with `To`, `ToNot` or `NotTo`. - # Reject using `Expect` with `Should` or `ShouldNot`. - # Default: false - force-expect-to: true - - # Best effort validation of async intervals (timeout and polling). - # Ignored the `suppress-async-assertion` is true. - # Default: false - validate-async-intervals: true - - # Trigger a warning for variable assignments in ginkgo containers like `Describe`, `Context` and `When`, instead of in `BeforeEach()`. - # Default: false - forbid-spec-pollution: true - - # Force using the Succeed matcher for error functions, and the HaveOccurred matcher for non-function error values. - # Default: false - force-succeed: true - - # Force adding assertion descriptions to gomega matchers. - # Default: false - force-assertion-description: true - - # Force using `ToNot`, `ShouldNot` instead of `To(Not())`. - # Default: false - force-tonot: true - - gochecksumtype: - # 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 exhaustiveness check. - # Default: false - include-shared-interfaces: true - - gocognit: - # Minimal code complexity to report. - # Default: 30 (but we recommend 10-20) - min-complexity: 10 - - goconst: - # Minimal length of string constant. - # Default: 3 - min-len: 2 - # Minimum occurrences of constant string count to trigger issue. - # Default: 3 - min-occurrences: 2 - # Look for existing constants matching the values. - # Default: true - match-constant: false - # Search also for duplicated numbers. - # Default: false - numbers: true - # Minimum value, only works with `goconst.numbers`. - # Default: 3 - min: 2 - # Maximum value, only works with `goconst.numbers`. - # Default: 3 - max: 2 - # Ignore when constant is not used as function argument. - # Default: true - ignore-calls: false - # Exclude strings matching the given regular expression. - # Default: "" - ignore-string-values: - - 'foo.+' - # Detects constants with identical values. - # Default: false - find-duplicates: true - # Evaluates of constant expressions like Prefix + "suffix". - # Default: false - eval-const-expressions: true - - gocritic: - # Disable all checks. - # Default: false - disable-all: true - # Which checks should be enabled in addition to default checks; can't be combined with 'disabled-checks'. - # By default, list of stable checks is used (https://go-critic.com/overview#checks-overview): - # appendAssign, argOrder, assignOp, badCall, badCond, captLocal, caseOrder, codegenComment, commentFormatting, - # defaultCaseOrder, deprecatedComment, dupArg, dupBranchBody, dupCase, dupSubExpr, elseif, exitAfterDefer, - # flagDeref, flagName, ifElseChain, mapKey, newDeref, offBy1, regexpMust, singleCaseSwitch, sloppyLen, - # sloppyTypeAssert, switchTrue, typeSwitchVar, underef, unlambda, unslice, valSwap, wrapperFunc - # To see which checks are enabled run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic`. - enabled-checks: - # Detects suspicious append result assignments. - # https://go-critic.com/overview.html#appendassign - - appendAssign - # Detects `append` chains to the same slice that can be done in a single `append` call. - # https://go-critic.com/overview.html#appendcombine - - appendCombine - # Detects suspicious arguments order. - # https://go-critic.com/overview.html#argorder - - argOrder - # Detects assignments that can be simplified by using assignment operators. - # https://go-critic.com/overview.html#assignop - - assignOp - # Detects suspicious function calls. - # https://go-critic.com/overview.html#badcall - - badCall - # Detects suspicious condition expressions. - # https://go-critic.com/overview.html#badcond - - badCond - # Detects suspicious mutex lock/unlock operations. - # https://go-critic.com/overview.html#badlock - - badLock - # Detects suspicious regexp patterns. - # https://go-critic.com/overview.html#badregexp - - badRegexp - # Detects bad usage of sort package. - # https://go-critic.com/overview.html#badsorting - - badSorting - # Detects bad usage of sync.OnceFunc. - # https://go-critic.com/overview.html#badsynconcefunc - - badSyncOnceFunc - # Detects bool expressions that can be simplified. - # https://go-critic.com/overview.html#boolexprsimplify - - boolExprSimplify - # Detects when predeclared identifiers are shadowed in assignments. - # https://go-critic.com/overview.html#builtinshadow - - builtinShadow - # Detects top-level declarations that shadow the predeclared identifiers. - # https://go-critic.com/overview.html#builtinshadowdecl - - builtinShadowDecl - # Detects capitalized names for local variables. - # https://go-critic.com/overview.html#captlocal - - captLocal - # Detects erroneous case order inside switch statements. - # https://go-critic.com/overview.html#caseorder - - caseOrder - # Detects malformed 'code generated' file comments. - # https://go-critic.com/overview.html#codegencomment - - codegenComment - # Detects comments with non-idiomatic formatting. - # https://go-critic.com/overview.html#commentformatting - - commentFormatting - # Detects commented-out code inside function bodies. - # https://go-critic.com/overview.html#commentedoutcode - - commentedOutCode - # Detects commented-out imports. - # https://go-critic.com/overview.html#commentedoutimport - - commentedOutImport - # Detects when default case in switch isn't on 1st or last position. - # https://go-critic.com/overview.html#defaultcaseorder - - defaultCaseOrder - # Detects loops inside functions that use defer. - # https://go-critic.com/overview.html#deferinloop - - deferInLoop - # Detects deferred function literals that can be simplified. - # https://go-critic.com/overview.html#deferunlambda - - deferUnlambda - # Detects malformed 'deprecated' doc-comments. - # https://go-critic.com/overview.html#deprecatedcomment - - deprecatedComment - # Detects comments that silence go lint complaints about doc-comment. - # https://go-critic.com/overview.html#docstub - - docStub - # Detects suspicious duplicated arguments. - # https://go-critic.com/overview.html#duparg - - dupArg - # Detects duplicated branch bodies inside conditional statements. - # https://go-critic.com/overview.html#dupbranchbody - - dupBranchBody - # Detects duplicated case clauses inside switch or select statements. - # https://go-critic.com/overview.html#dupcase - - dupCase - # Detects multiple imports of the same package under different aliases. - # https://go-critic.com/overview.html#dupimport - - dupImport - # Detects suspicious duplicated sub-expressions. - # https://go-critic.com/overview.html#dupsubexpr - - dupSubExpr - # Detects suspicious formatting strings usage. - # https://go-critic.com/overview.html#dynamicfmtstring - - dynamicFmtString - # Detects else with nested if statement that can be replaced with else-if. - # https://go-critic.com/overview.html#elseif - - elseif - # Detects suspicious empty declarations blocks. - # https://go-critic.com/overview.html#emptydecl - - emptyDecl - # Detects fallthrough that can be avoided by using multi case values. - # https://go-critic.com/overview.html#emptyfallthrough - - emptyFallthrough - # Detects empty string checks that can be written more idiomatically. - # https://go-critic.com/overview.html#emptystringtest - - emptyStringTest - # Detects unoptimal strings/bytes case-insensitive comparison. - # https://go-critic.com/overview.html#equalfold - - equalFold - # Detects unwanted dependencies on the evaluation order. - # https://go-critic.com/overview.html#evalorder - - evalOrder - # Detects calls to exit/fatal inside functions that use defer. - # https://go-critic.com/overview.html#exitafterdefer - - exitAfterDefer - # Detects exposed methods from sync.Mutex and sync.RWMutex. - # https://go-critic.com/overview.html#exposedsyncmutex - - exposedSyncMutex - # Detects suspicious reassignment of error from another package. - # https://go-critic.com/overview.html#externalerrorreassign - - externalErrorReassign - # Detects problems in filepath.Join() function calls. - # https://go-critic.com/overview.html#filepathjoin - - filepathJoin - # Detects immediate dereferencing of `flag` package pointers. - # https://go-critic.com/overview.html#flagderef - - flagDeref - # Detects suspicious flag names. - # https://go-critic.com/overview.html#flagname - - flagName - # Detects hex literals that have mixed case letter digits. - # https://go-critic.com/overview.html#hexliteral - - hexLiteral - # Detects nil usages in http.NewRequest calls, suggesting http.NoBody as an alternative. - # https://go-critic.com/overview.html#httpnobody - - httpNoBody - # Detects params that incur excessive amount of copying. - # https://go-critic.com/overview.html#hugeparam - - hugeParam - # Detects repeated if-else statements and suggests to replace them with switch statement. - # https://go-critic.com/overview.html#ifelsechain - - ifElseChain - # Detects when imported package names shadowed in the assignments. - # https://go-critic.com/overview.html#importshadow - - importShadow - # Detects strings.Index calls that may cause unwanted allocs. - # https://go-critic.com/overview.html#indexalloc - - indexAlloc - # Detects non-assignment statements inside if/switch init clause. - # https://go-critic.com/overview.html#initclause - - initClause - # Detects suspicious map literal keys. - # https://go-critic.com/overview.html#mapkey - - mapKey - # Detects method expression call that can be replaced with a method call. - # https://go-critic.com/overview.html#methodexprcall - - methodExprCall - # Finds where nesting level could be reduced. - # https://go-critic.com/overview.html#nestingreduce - - nestingReduce - # Detects immediate dereferencing of `new` expressions. - # https://go-critic.com/overview.html#newderef - - newDeref - # Detects return statements those results evaluate to nil. - # https://go-critic.com/overview.html#nilvalreturn - - nilValReturn - # Detects old-style octal literals. - # https://go-critic.com/overview.html#octalliteral - - octalLiteral - # Detects various off-by-one kind of errors. - # https://go-critic.com/overview.html#offby1 - - offBy1 - # Detects if function parameters could be combined by type and suggest the way to do it. - # https://go-critic.com/overview.html#paramtypecombine - - paramTypeCombine - # Detects expressions like []rune(s)[0] that may cause unwanted rune slice allocation. - # https://go-critic.com/overview.html#preferdecoderune - - preferDecodeRune - # Detects concatenation with os.PathSeparator which can be replaced with filepath.Join. - # https://go-critic.com/overview.html#preferfilepathjoin - - preferFilepathJoin - # Detects fmt.Sprint(f/ln) calls which can be replaced with fmt.Fprint(f/ln). - # https://go-critic.com/overview.html#preferfprint - - preferFprint - # Detects w.Write or io.WriteString calls which can be replaced with w.WriteString. - # https://go-critic.com/overview.html#preferstringwriter - - preferStringWriter - # Detects WriteRune calls with rune literal argument that is single byte and reports to use WriteByte instead. - # https://go-critic.com/overview.html#preferwritebyte - - preferWriteByte - # Detects input and output parameters that have a type of pointer to referential type. - # https://go-critic.com/overview.html#ptrtorefparam - - ptrToRefParam - # Detects append all its data while range it. - # https://go-critic.com/overview.html#rangeappendall - - rangeAppendAll - # Detects expensive copies of `for` loop range expressions. - # https://go-critic.com/overview.html#rangeexprcopy - - rangeExprCopy - # Detects loops that copy big objects during each iteration. - # https://go-critic.com/overview.html#rangevalcopy - - rangeValCopy - # Detects redundant fmt.Sprint calls. - # https://go-critic.com/overview.html#redundantsprint - - redundantSprint - # Detects `regexp.Compile*` that can be replaced with `regexp.MustCompile*`. - # https://go-critic.com/overview.html#regexpmust - - regexpMust - # Detects suspicious regexp patterns. - # https://go-critic.com/overview.html#regexppattern - - regexpPattern - # Detects regexp patterns that can be simplified. - # https://go-critic.com/overview.html#regexpsimplify - - regexpSimplify - # Detects suspicious http.Error call without following return. - # https://go-critic.com/overview.html#returnafterhttperror - - returnAfterHttpError - # Runs user-defined rules using ruleguard linter. - # https://go-critic.com/overview.html#ruleguard - - ruleguard - # Detects switch statements that could be better written as if statement. - # https://go-critic.com/overview.html#singlecaseswitch - - singleCaseSwitch - # Detects slice clear loops, suggests an idiom that is recognized by the Go compiler. - # https://go-critic.com/overview.html#sliceclear - - sliceClear - # Detects usage of `len` when result is obvious or doesn't make sense. - # https://go-critic.com/overview.html#sloppylen - - sloppyLen - # Detects suspicious/confusing re-assignments. - # https://go-critic.com/overview.html#sloppyreassign - - sloppyReassign - # Detects redundant type assertions. - # https://go-critic.com/overview.html#sloppytypeassert - - sloppyTypeAssert - # Detects suspicious sort.Slice calls. - # https://go-critic.com/overview.html#sortslice - - sortSlice - # Detects "%s" formatting directives that can be replaced with %q. - # https://go-critic.com/overview.html#sprintfquotedstring - - sprintfQuotedString - # Detects issue in Query() and Exec() calls. - # https://go-critic.com/overview.html#sqlquery - - sqlQuery - # Detects string concat operations that can be simplified. - # https://go-critic.com/overview.html#stringconcatsimplify - - stringConcatSimplify - # Detects redundant conversions between string and []byte. - # https://go-critic.com/overview.html#stringxbytes - - stringXbytes - # Detects strings.Compare usage. - # https://go-critic.com/overview.html#stringscompare - - stringsCompare - # Detects switch-over-bool statements that use explicit `true` tag value. - # https://go-critic.com/overview.html#switchtrue - - switchTrue - # Detects sync.Map load+delete operations that can be replaced with LoadAndDelete. - # https://go-critic.com/overview.html#syncmaploadanddelete - - syncMapLoadAndDelete - # Detects manual conversion to milli- or microseconds. - # https://go-critic.com/overview.html#timeexprsimplify - - timeExprSimplify - # Detects TODO comments without detail/assignee. - # https://go-critic.com/overview.html#todocommentwithoutdetail - - todoCommentWithoutDetail - # Detects function with too many results. - # https://go-critic.com/overview.html#toomanyresultschecker - - tooManyResultsChecker - # Detects potential truncation issues when comparing ints of different sizes. - # https://go-critic.com/overview.html#truncatecmp - - truncateCmp - # Detects repeated type assertions and suggests to replace them with type switch statement. - # https://go-critic.com/overview.html#typeassertchain - - typeAssertChain - # Detects method declarations preceding the type definition itself. - # https://go-critic.com/overview.html#typedeffirst - - typeDefFirst - # Detects type switches that can benefit from type guard clause with variable. - # https://go-critic.com/overview.html#typeswitchvar - - typeSwitchVar - # Detects unneeded parenthesis inside type expressions and suggests to remove them. - # https://go-critic.com/overview.html#typeunparen - - typeUnparen - # Detects unchecked errors in if statements. - # https://go-critic.com/overview.html#uncheckedinlineerr - - uncheckedInlineErr - # Detects dereference expressions that can be omitted. - # https://go-critic.com/overview.html#underef - - underef - # Detects redundant statement labels. - # https://go-critic.com/overview.html#unlabelstmt - - unlabelStmt - # Detects function literals that can be simplified. - # https://go-critic.com/overview.html#unlambda - - unlambda - # Detects unnamed results that may benefit from names. - # https://go-critic.com/overview.html#unnamedresult - - unnamedResult - # Detects unnecessary braced statement blocks. - # https://go-critic.com/overview.html#unnecessaryblock - - unnecessaryBlock - # Detects redundantly deferred calls. - # https://go-critic.com/overview.html#unnecessarydefer - - unnecessaryDefer - # Detects slice expressions that can be simplified to sliced expression itself. - # https://go-critic.com/overview.html#unslice - - unslice - # Detects value swapping code that are not using parallel assignment. - # https://go-critic.com/overview.html#valswap - - valSwap - # Detects conditions that are unsafe due to not being exhaustive. - # https://go-critic.com/overview.html#weakcond - - weakCond - # Ensures that `//nolint` comments include an explanation. - # https://go-critic.com/overview.html#whynolint - - whyNoLint - # Detects function calls that can be replaced with convenience wrappers. - # https://go-critic.com/overview.html#wrapperfunc - - wrapperFunc - # Detects Yoda style expressions and suggests to replace them. - # https://go-critic.com/overview.html#yodastyleexpr - - yodaStyleExpr - - # Enable all checks. - # Default: false - enable-all: true - # Which checks should be disabled; can't be combined with 'enabled-checks'. - # Default: [] - disabled-checks: - - appendAssign - - appendCombine - - argOrder - - assignOp - - badCall - - badCond - - badLock - - badRegexp - - badSorting - - badSyncOnceFunc - - boolExprSimplify - - builtinShadow - - builtinShadowDecl - - captLocal - - caseOrder - - codegenComment - - commentFormatting - - commentedOutCode - - commentedOutImport - - defaultCaseOrder - - deferInLoop - - deferUnlambda - - deprecatedComment - - docStub - - dupArg - - dupBranchBody - - dupCase - - dupImport - - dupSubExpr - - dynamicFmtString - - elseif - - emptyDecl - - emptyFallthrough - - emptyStringTest - - equalFold - - evalOrder - - exitAfterDefer - - exposedSyncMutex - - externalErrorReassign - - filepathJoin - - flagDeref - - flagName - - hexLiteral - - httpNoBody - - hugeParam - - ifElseChain - - importShadow - - indexAlloc - - initClause - - mapKey - - methodExprCall - - nestingReduce - - newDeref - - nilValReturn - - octalLiteral - - offBy1 - - paramTypeCombine - - preferDecodeRune - - preferFilepathJoin - - preferFprint - - preferStringWriter - - preferWriteByte - - ptrToRefParam - - rangeAppendAll - - rangeExprCopy - - rangeValCopy - - redundantSprint - - regexpMust - - regexpPattern - - regexpSimplify - - returnAfterHttpError - - ruleguard - - singleCaseSwitch - - sliceClear - - sloppyLen - - sloppyReassign - - sloppyTypeAssert - - sortSlice - - sprintfQuotedString - - sqlQuery - - stringConcatSimplify - - stringXbytes - - stringsCompare - - switchTrue - - syncMapLoadAndDelete - - timeExprSimplify - - todoCommentWithoutDetail - - tooManyResultsChecker - - truncateCmp - - typeAssertChain - - typeDefFirst - - typeSwitchVar - - typeUnparen - - uncheckedInlineErr - - underef - - unlabelStmt - - unlambda - - unnamedResult - - unnecessaryBlock - - unnecessaryDefer - - unslice - - valSwap - - weakCond - - whyNoLint - - wrapperFunc - - yodaStyleExpr - - # Enable multiple checks by tags in addition to default checks. - # Run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic` to see all tags and checks. - # See https://github.com/go-critic/go-critic#usage -> section "Tags". - # Default: [] - enabled-tags: - - diagnostic - - style - - performance - - experimental - - opinionated - disabled-tags: - - diagnostic - - style - - performance - - experimental - - opinionated - - # Settings passed to gocritic. - # The settings key is the name of a supported gocritic checker. - # The list of supported checkers can be found at https://go-critic.com/overview. - settings: - # Must be valid enabled check name. - captLocal: - # Whether to restrict checker to params only. - # Default: true - paramsOnly: false - commentedOutCode: - # Min length of the comment that triggers a warning. - # Default: 15 - minLength: 50 - elseif: - # Whether to skip balanced if-else pairs. - # Default: true - skipBalanced: false - hugeParam: - # Size in bytes that makes the warning trigger. - # Default: 80 - sizeThreshold: 70 - ifElseChain: - # Min number of if-else blocks that makes the warning trigger. - # Default: 2 - minThreshold: 4 - nestingReduce: - # Min number of statements inside a branch to trigger a warning. - # Default: 5 - bodyWidth: 4 - rangeExprCopy: - # Size in bytes that makes the warning trigger. - # Default: 512 - sizeThreshold: 516 - # Whether to check test functions - # Default: true - skipTestFuncs: false - rangeValCopy: - # Size in bytes that makes the warning trigger. - # Default: 128 - sizeThreshold: 32 - # Whether to check test functions. - # Default: true - skipTestFuncs: false - ruleguard: - # Enable debug to identify which 'Where' condition was rejected. - # The value of the parameter is the name of a function in a ruleguard file. - # - # When a rule is evaluated: - # If: - # The Match() clause is accepted; and - # One of the conditions in the Where() clause is rejected, - # Then: - # ruleguard prints the specific Where() condition that was rejected. - # - # The option is passed to the ruleguard 'debug-group' argument. - # Default: "" - debug: 'emptyDecl' - # 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,import - # Comma-separated list of file paths containing ruleguard rules. - # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed. - # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`. - # The placeholder '${config-path}' is substituted with a path relative to the configuration file. - # Glob patterns such as 'rules-*.go' may be specified. - # Default: "" - rules: '${base-path}/ruleguard/rules-*.go,${base-path}/myrule1.go' - # Comma-separated list of enabled groups or skip empty to enable everything. - # Tags can be defined with # character prefix. - # Default: "" - enable: "myGroupName,#myTagName" - # Comma-separated list of disabled groups or skip empty to enable everything. - # Tags can be defined with # character prefix. - # Default: "" - disable: "myGroupName,#myTagName" - tooManyResultsChecker: - # Maximum number of results. - # Default: 5 - maxResults: 10 - truncateCmp: - # Whether to skip int/uint/uintptr types. - # Default: true - skipArchDependent: false - underef: - # Whether to skip (*x).method() calls where x is a pointer receiver. - # Default: true - skipRecvDeref: false - unnamedResult: - # Whether to check exported functions. - # Default: false - checkExported: true - - gocyclo: - # Minimal code complexity to report. - # Default: 30 (but we recommend 10-20) - min-complexity: 10 - - godoclint: - # Default set of rules to enable. - # Possible values are: `basic`, `all` or `none`. - # Default: `basic` (enables `pkg-doc`, `single-pkg-doc`, `start-with-name`, and `deprecated`) - default: all - - # List of rules to enable in addition to the default set. - # Default: empty - enable: - # Check proper package-level godoc, if any. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#pkg-doc - - pkg-doc - # Assert at most one godoc per package. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#single-pkg-doc - - single-pkg-doc - # Require all packages to have a godoc. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-pkg-doc - - require-pkg-doc - # Assert symbol godocs start with the symbol name. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#start-with-name - - start-with-name - # Require godoc for all public symbols. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#require-doc - - require-doc - # Assert correct formatting of deprecation notes. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#deprecated - - deprecated - # Assert maximum line length for godocs. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#max-len - - max-len - # Assert no unused link in godocs. - # https://github.com/godoc-lint/godoc-lint?tab=readme-ov-file#no-unused-link - - no-unused-link - - # List of rules to disable. - # Default: empty - disable: - - pkg-doc - - single-pkg-doc - - require-pkg-doc - - start-with-name - - require-doc - - deprecated - - max-len - - no-unused-link - - # A map for fine-tuning individual rules. - # All subkeys are optional. - options: - max-len: - # Maximum line length for godocs, not including the `// `, or `/*` or `*/` tokens. - # Default: 77 - length: 127 - - require-doc: - # Ignore exported (public) symbols when applying the `require-doc` rule. - # Default: false - ignore-exported: true - - # Ignore unexported (private) symbols when applying the `require-doc` rule. - # Default: true - ignore-unexported: false - - start-with-name: - # Include unexported symbols when applying the `start-with-name` rule. - # Default: false - include-unexported: true - - godot: - # Comments to be checked: `declarations`, `toplevel`, `noinline` or `all`. - # Default: declarations - scope: toplevel - # List of regexps for excluding particular comment lines from check. - # Default: [] - exclude: - # Exclude todo and fixme comments. - - "^fixme:" - - "^todo:" - # Check that each sentence ends with a period. - # Default: true - period: false - # Check that each sentence starts with a capital letter. - # Default: false - capital: true - - godox: - # Report any comments starting with keywords, this is useful for TODO or FIXME comments that - # might be left in the code accidentally and should be resolved before merging. - # Default: ["TODO", "BUG", "FIXME"] - keywords: - - NOTE - - OPTIMIZE # marks code that should be optimized before merging - - HACK # marks hack-around that should be removed before merging - - goheader: - # Supports two types 'const` and `regexp`. - # Values can be used recursively. - # Default: {} - values: - const: - # Define here const type values in format k:v. - # For example: - COMPANY: MY COMPANY - regexp: - # Define here regexp type values. - # for example: - AUTHOR: .*@mycompany\.com - # The template used for checking. - # 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. - See the License for the specific language governing permissions and - limitations under the License. - # As alternative of directive 'template', you may put the path to file with the template source. - # Useful if you need to load the template from a specific file. - # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed. - # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`. - # The placeholder '${config-path}' is substituted with a path relative to the configuration file. - # Default: "" - template-path: /path/to/my/template.tmpl - - gomoddirectives: - # Allow local `replace` directives. - # Default: false - replace-local: true - # List of allowed `replace` directives. - # Default: [] - replace-allow-list: - - launchpad.net/gocheck - # Allow to not explain why the version has been retracted in the `retract` directives. - # Default: false - retract-allow-no-explanation: true - # Forbid the use of the `exclude` directives. - # Default: false - exclude-forbidden: true - # Forbid the use of the `ignore` directives (>= go1.25). - # Default: false - ignore-forbidden: true - # Forbid the use of the `toolchain` directive. - # Default: false - toolchain-forbidden: true - # Defines a pattern to validate `toolchain` directive. - # Default: '' (no match) - toolchain-pattern: 'go1\.23\.\d+$' - # Forbid the use of the `tool` directives. - # Default: false - tool-forbidden: true - # Forbid the use of the `godebug` directive. - # Default: false - go-debug-forbidden: true - # Defines a pattern to validate `go` minimum version directive. - # Default: '' (no match) - go-version-pattern: '\d\.\d+(\.0)?' - - gomodguard: - allowed: - # List of allowed modules. - # Default: [] - modules: - - gopkg.in/yaml.v2 - # List of allowed module domains. - # Default: [] - domains: - - golang.org - blocked: - # List of blocked modules. - # Default: [] - modules: - # Blocked module. - - github.com/uudashr/go-module: - # Recommended modules that should be used instead. (Optional) - recommendations: - - golang.org/x/mod - # Reason why the recommended module should be used. (Optional) - reason: "`mod` is the official go.mod parser library." - # List of blocked module version constraints. - # Default: [] - versions: - # Blocked module with version constraint. - - github.com/mitchellh/go-homedir: - # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. - version: "< 1.1.0" - # Reason why the version constraint exists. (Optional) - reason: "testing if blocked version constraint works." - # Set to true to raise lint issues for packages that are loaded from a local path via replace directive. - # Default: false - local-replace-directives: false - - gosec: - # To select a subset of rules to run. - # Available rules: https://github.com/securego/gosec#available-rules - # Default: [] - means include all rules - includes: - - G101 # Look for hard coded credentials - - G102 # Bind to all interfaces - - G103 # Audit the use of unsafe block - - G104 # Audit errors not checked - - G106 # Audit the use of ssh.InsecureIgnoreHostKey - - G107 # Url provided to HTTP request as taint input - - G108 # Profiling endpoint automatically exposed on /debug/pprof - - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 - - G110 # Potential DoS vulnerability via decompression bomb - - G111 # Potential directory traversal - - G112 # Potential slowloris attack - - G114 # Use of net/http serve function that has no support for setting timeouts - - G115 # Potential integer overflow when converting between integer types - - G201 # SQL query construction using format string - - G202 # SQL query construction using string concatenation - - G203 # Use of unescaped data in HTML templates - - G204 # Audit use of command execution - - G301 # Poor file permissions used when creating a directory - - G302 # Poor file permissions used with chmod - - G303 # Creating tempfile using a predictable path - - G304 # File path provided as taint input - - G305 # File traversal when extracting zip/tar archive - - G306 # Poor file permissions used when writing to a new file - - G307 # Poor file permissions used when creating a file with os.Create - - G401 # Detect the usage of MD5 or SHA1 - - G402 # Look for bad TLS connection settings - - G403 # Ensure minimum RSA key length of 2048 bits - - G404 # Insecure random number source (rand) - - G405 # Detect the usage of DES or RC4 - - G406 # Detect the usage of MD4 or RIPEMD160 - - G501 # Import blocklist: crypto/md5 - - G502 # Import blocklist: crypto/des - - G503 # Import blocklist: crypto/rc4 - - G504 # Import blocklist: net/http/cgi - - G505 # Import blocklist: crypto/sha1 - - G506 # Import blocklist: golang.org/x/crypto/md4 - - G507 # Import blocklist: golang.org/x/crypto/ripemd160 - - G601 # Implicit memory aliasing of items from a range statement - - G602 # Slice access out of bounds - - # To specify a set of rules to explicitly exclude. - # Available rules: https://github.com/securego/gosec#available-rules - # Default: [] - excludes: - - G101 # Look for hard coded credentials - - G102 # Bind to all interfaces - - G103 # Audit the use of unsafe block - - G104 # Audit errors not checked - - G106 # Audit the use of ssh.InsecureIgnoreHostKey - - G107 # Url provided to HTTP request as taint input - - G108 # Profiling endpoint automatically exposed on /debug/pprof - - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32 - - G110 # Potential DoS vulnerability via decompression bomb - - G111 # Potential directory traversal - - G112 # Potential slowloris attack - - G114 # Use of net/http serve function that has no support for setting timeouts - - G115 # Potential integer overflow when converting between integer types - - G201 # SQL query construction using format string - - G202 # SQL query construction using string concatenation - - G203 # Use of unescaped data in HTML templates - - G204 # Audit use of command execution - - G301 # Poor file permissions used when creating a directory - - G302 # Poor file permissions used with chmod - - G303 # Creating tempfile using a predictable path - - G304 # File path provided as taint input - - G305 # File traversal when extracting zip/tar archive - - G306 # Poor file permissions used when writing to a new file - - G307 # Poor file permissions used when creating a file with os.Create - - G401 # Detect the usage of MD5 or SHA1 - - G402 # Look for bad TLS connection settings - - G403 # Ensure minimum RSA key length of 2048 bits - - G404 # Insecure random number source (rand) - - G405 # Detect the usage of DES or RC4 - - G406 # Detect the usage of MD4 or RIPEMD160 - - G501 # Import blocklist: crypto/md5 - - G502 # Import blocklist: crypto/des - - G503 # Import blocklist: crypto/rc4 - - G504 # Import blocklist: net/http/cgi - - G505 # Import blocklist: crypto/sha1 - - G506 # Import blocklist: golang.org/x/crypto/md4 - - G507 # Import blocklist: golang.org/x/crypto/ripemd160 - - G601 # Implicit memory aliasing of items from a range statement - - G602 # Slice access out of bounds - - # Filter out the issues with a lower severity than the given value. - # Valid options are: low, medium, high. - # Default: low - severity: medium - - # Filter out the issues with a lower confidence than the given value. - # Valid options are: low, medium, high. - # Default: low - confidence: medium - - # Concurrency value. - # Default: the number of logical CPUs usable by the current process. - concurrency: 12 - - # To specify the configuration of rules. - config: - # Globals are applicable to all rules. - global: - # If true, ignore #nosec in comments (and an alternative as well). - # Default: false - nosec: true - # Add an alternative comment prefix to #nosec (both will work at the same time). - # Default: "" - "#nosec": "#my-custom-nosec" - # Define whether nosec issues are counted as finding or not. - # Default: false - show-ignored: true - # Audit mode enables addition checks that for normal code analysis might be too nosy. - # Default: false - audit: true - G101: - # Regexp pattern for variables and constants to find. - # Default: "(?i)passwd|pass|password|pwd|secret|token|pw|apiKey|bearer|cred" - pattern: "(?i)example" - # If true, complain about all cases (even with low entropy). - # Default: false - ignore_entropy: false - # Maximum allowed entropy of the string. - # Default: "80.0" - entropy_threshold: "80.0" - # Maximum allowed value of entropy/string length. - # Is taken into account if entropy >= entropy_threshold/2. - # Default: "3.0" - per_char_threshold: "3.0" - # Calculate entropy for first N chars of the string. - # Default: "16" - truncate: "32" - # Additional functions to ignore while checking unhandled errors. - # Following functions always ignored: - # bytes.Buffer: - # - Write - # - WriteByte - # - WriteRune - # - WriteString - # fmt: - # - Print - # - Printf - # - Println - # - Fprint - # - Fprintf - # - Fprintln - # strings.Builder: - # - Write - # - WriteByte - # - WriteRune - # - WriteString - # io.PipeWriter: - # - CloseWithError - # hash.Hash: - # - Write - # os: - # - Unsetenv - # Default: {} - G104: - fmt: - - Fscanf - G111: - # 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. - # Default: "0750" - G301: "0750" - # Maximum allowed permissions mode for os.OpenFile and os.Chmod. - # Default: "0600" - G302: "0600" - # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile. - # Default: "0600" - G306: "0600" - - gosmopolitan: - # Allow and ignore `time.Local` usages. - # - # Default: false - allow-time-local: true - # List of fully qualified names in the `full/pkg/path.name` form, to act as "i18n escape hatches". - # String literals inside call-like expressions to, or struct literals of those names, - # are exempt from the writing system check. - # - # Default: [] - escape-hatches: - - 'github.com/nicksnyder/go-i18n/v2/i18n.Message' - - 'example.com/your/project/i18n/markers.Raw' - - 'example.com/your/project/i18n/markers.OK' - - 'example.com/your/project/i18n/markers.TODO' - - 'command-line-arguments.Simple' - # List of Unicode scripts to watch for any usage in string literals. - # https://pkg.go.dev/unicode#pkg-variables - # - # Default: ["Han"] - watch-for-scripts: - - Devanagari - - Han - - Hangul - - Hiragana - - Katakana - - govet: - # Disable all analyzers. - # Default: false - disable-all: true - # Enable analyzers by name. - # (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, - # unusedresult - # ). - # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers. - # Default: [] - enable: - # Check for missing values after append. - - appends - # Report mismatches between assembly files and Go declarations. - - asmdecl - # Check for useless assignments. - - assign - # Check for common mistakes using the sync/atomic package. - - atomic - # Check for non-64-bits-aligned arguments to sync/atomic functions. - - atomicalign - # Check for common mistakes involving boolean operators. - - bools - # Check //go:build and // +build directives. - - buildtag - # Detect some violations of the cgo pointer passing rules. - - cgocall - # Check for unkeyed composite literals. - - composites - # Check for locks erroneously passed by value. - - copylocks - # Check for calls of reflect.DeepEqual on error values. - - deepequalerrors - # Report common mistakes in defer statements. - - defers - # Check Go toolchain directives such as //go:debug. - - directive - # Report passing non-pointer or non-error values to errors.As. - - errorsas - # Find structs that would use less memory if their fields were sorted. - - fieldalignment - # Find calls to a particular function. - - findcall - # Report assembly that clobbers the frame pointer before saving it. - - framepointer - # Check format of addresses passed to net.Dial. - - hostport - # Report using Go 1.22 enhanced ServeMux patterns in older Go versions. - - httpmux - # Check for mistakes using HTTP responses. - - httpresponse - # Detect impossible interface-to-interface type assertions. - - ifaceassert - # Check references to loop variables from within nested functions. - - loopclosure - # Check cancel func returned by context.WithCancel is called. - - lostcancel - # Check for useless comparisons between functions and nil. - - nilfunc - # Check for redundant or impossible nil comparisons. - - nilness - # Check consistency of Printf format strings and arguments. - - printf - # Check for comparing reflect.Value values with == or reflect.DeepEqual. - - reflectvaluecompare - # Check for possible unintended shadowing of variables. - - shadow - # Check for shifts that equal or exceed the width of the integer. - - shift - # Check for unbuffered channel of os.Signal. - - sigchanyzer - # Check for invalid structured logging calls. - - slog - # Check the argument type of sort.Slice. - - sortslice - # Check signature of methods of well-known interfaces. - - stdmethods - # Report uses of too-new standard library symbols. - - stdversion - # Check for string(int) conversions. - - stringintconv - # Check that struct field tags conform to reflect.StructTag.Get. - - structtag - # Report calls to (*testing.T).Fatal from goroutines started by a test. - - testinggoroutine - # Check for common mistaken usages of tests and examples. - - tests - # Check for calls of (time.Time).Format or time.Parse with 2006-02-01. - - timeformat - # Report passing non-pointer or non-interface values to unmarshal. - - unmarshal - # Check for unreachable code. - - unreachable - # Check for invalid conversions of uintptr to unsafe.Pointer. - - unsafeptr - # Check for unused results of calls to some functions. - - unusedresult - # Checks for unused writes. - - unusedwrite - # Check for misuses of sync.WaitGroup. - - waitgroup - - # Enable all analyzers. - # Default: false - enable-all: true - # Disable analyzers by name. - # (In addition to default - # atomicalign, deepequalerrors, fieldalignment, findcall, nilness, reflectvaluecompare, shadow, sortslice, - # timeformat, unusedwrite - # ). - # Run `GL_DEBUG=govet golangci-lint run --enable=govet` to see default, all available analyzers, and enabled analyzers. - # Default: [] - disable: - - appends - - asmdecl - - assign - - atomic - - atomicalign - - bools - - buildtag - - cgocall - - composites - - copylocks - - deepequalerrors - - defers - - directive - - errorsas - - fieldalignment - - findcall - - framepointer - - hostport - - httpmux - - httpresponse - - ifaceassert - - loopclosure - - lostcancel - - nilfunc - - nilness - - printf - - reflectvaluecompare - - shadow - - shift - - sigchanyzer - - slog - - sortslice - - stdmethods - - stdversion - - stringintconv - - structtag - - testinggoroutine - - tests - - timeformat - - unmarshal - - unreachable - - unsafeptr - - unusedresult - - unusedwrite - - waitgroup - - # Settings per analyzer. - settings: - # Analyzer name, run `go tool vet help` to see all analyzers. - printf: - # Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`). - # Default: [] - funcs: - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Infof - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Warnf - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Errorf - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Fatalf - shadow: - # Whether to be strict about shadowing; can be noisy. - # Default: false - strict: true - unusedresult: - # 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). - # Default: [] - stringmethods: - - MyMethod - - grouper: - # Require the use of a single global 'const' declaration only. - # Default: false - const-require-single-const: true - # Require the use of grouped global 'const' declarations. - # Default: false - const-require-grouping: true - - # Require the use of a single 'import' declaration only. - # Default: false - import-require-single-import: true - # Require the use of grouped 'import' declarations. - # Default: false - import-require-grouping: true - - # Require the use of a single global 'type' declaration only. - # Default: false - type-require-single-type: true - # Require the use of grouped global 'type' declarations. - # Default: false - type-require-grouping: true - - # Require the use of a single global 'var' declaration only. - # Default: false - var-require-single-var: true - # Require the use of grouped global 'var' declarations. - # Default: false - var-require-grouping: true - - iface: - # List of analyzers. - # Default: ["identical"] - enable: - - identical # Identifies interfaces in the same package that have identical method sets. - - unused # Identifies interfaces that are not used anywhere in the same package where the interface is defined. - - opaque # Identifies functions that return interfaces, but the actual returned value is always a single concrete implementation. - - unexported # Identifies interfaces that are not exported but are used in exported functions or methods. - settings: - unused: - # List of packages path to exclude from the check. - # Default: [] - exclude: - - github.com/example/log - - importas: - # Do not allow unaliased imports of aliased packages. - # Default: false - no-unaliased: true - # Do not allow non-required aliases. - # Default: false - no-extra-aliases: true - # List of aliases - # Default: [] - alias: - # Using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package. - - pkg: knative.dev/serving/pkg/apis/serving/v1 - alias: servingv1 - # Using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package. - - pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1 - 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. - - 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. - # This can be useful if `no-extra-aliases: true` doesn't fit your need. - # Multiple packages can use an empty alias. - - pkg: errors - alias: "" - - inamedparam: - # Skips check for interface methods with only a single parameter. - # Default: false - skip-single-param: true - - ineffassign: - # Check escaping variables of type error, may cause false positives. - # Default: false - check-escaping-errors: true - - interfacebloat: - # The maximum number of methods allowed for an interface. - # Default: 10 - max: 5 - - iotamixing: - # Whether to report individual consts rather than just the const block. - # Default: false - report-individual: true - - ireturn: - # List of interfaces to allow. - # Lists of the keywords and regular expressions matched to interface or package names can be used. - # `allow` and `reject` settings cannot be used at the same time. - # - # Keywords: - # - `empty` for `interface{}` - # - `error` for errors - # - `stdlib` for standard library - # - `anon` for anonymous interfaces - # - `generic` for generic interfaces added in go 1.18 - # - # Default: [anon, error, empty, stdlib] - allow: - - anon - # You can specify idiomatic endings for interface - - (or|er)$ - - # List of interfaces to reject. - # Lists of the keywords and regular expressions matched to interface or package names can be used. - # `allow` and `reject` settings cannot be used at the same time. - # - # Keywords: - # - `empty` for `interface{}` - # - `error` for errors - # - `stdlib` for standard library - # - `anon` for anonymous interfaces - # - `generic` for generic interfaces added in go 1.18 - # - # Default: [] - reject: - - github.com\/user\/package\/v4\.Type - - lll: - # Max line length, lines longer will be reported. - # '\t' is counted as 1 character by default, and can be changed with the tab-width option. - # Default: 120. - line-length: 120 - # Tab width in spaces. - # Default: 1 - tab-width: 1 - - loggercheck: - # Allow check for the github.com/go-kit/log library. - # Default: true - kitlog: false - # Allow check for the k8s.io/klog/v2 library. - # Default: true - klog: false - # Allow check for the github.com/go-logr/logr library. - # Default: true - logr: false - # Allow check for the log/slog library. - # Default: true - slog: false - # Allow check for the "sugar logger" from go.uber.org/zap library. - # Default: true - zap: false - # Require all logging keys to be inlined constant strings. - # Default: false - require-string-key: true - # Require printf-like format specifier (%s, %d for example) not present. - # Default: false - no-printf-like: true - # List of custom rules to check against, where each rule is a single logger pattern, useful for wrapped loggers. - # For example: https://github.com/timonwong/loggercheck/blob/7395ab86595781e33f7afba27ad7b55e6956ebcd/testdata/custom-rules.txt - # Default: empty - rules: - - k8s.io/klog/v2.InfoS # package level exported functions - - (github.com/go-logr/logr.Logger).Error # "Methods" - - (*go.uber.org/zap.SugaredLogger).With # Also "Methods", but with a pointer receiver - - maintidx: - # Show functions with maintainability index lower than N. - # A high index indicates better maintainability (it's kind of the opposite of complexity). - # Default: 20 - under: 100 - - makezero: - # Allow only slices initialized with a length of zero. - # Default: false - always: true - - misspell: - # Correct spellings using locale preferences for US or UK. - # Setting locale to US will correct the British spelling of 'colour' to 'color'. - # Default is to use a neutral variety of English. - locale: US - # Typos to ignore. - # Should be in lower case. - # Default: [] - ignore-rules: - - someword - # Extra word corrections. - # `typo` and `correction` should only contain letters. - # The words are case-insensitive. - # Default: [] - extra-words: - - typo: "iff" - correction: "if" - - typo: "cancelation" - correction: "cancellation" - # Mode of the analysis: - # - default: checks all the file content. - # - restricted: checks only comments. - # 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 - functions: - # The full name of the function, including the package. - - name: github.com/hashicorp/hcl/v2/hclsimple.DecodeFile - # The struct tag whose presence should be ensured. - tag: hcl - # The position of the argument to check. - arg-pos: 2 - - nakedret: - # Make an issue if func has more lines of code than this setting, and it has naked returns. - # Default: 30 - max-func-lines: 31 - - nestif: - # Minimal complexity of if statements to report. - # Default: 5 - min-complexity: 4 - - nilnil: - # To check functions with only two return values (`return nil, nil`). - # If disabled then returns like `return nil, nil, ..., nil` are supported. - # Default: true - only-two: false - # In addition, detect opposite situation (simultaneous return of non-nil error and valid value). - # E.g, `return clone, fh.indexer.Update(clone)` will be considered as invalid. - # Default: false - detect-opposite: true - # List of return types to check. - # Default: ["chan", "func", "iface", "map", "ptr", "uintptr", "unsafeptr"] - checked-types: - - chan - - func - - iface - - map - - ptr - - uintptr - - unsafeptr - - nlreturn: - # Size of the block (including return statement that is still "OK"), - # so no return split required. - # Default: 1 - block-size: 2 - - nolintlint: - # Disable to ensure that all nolint directives actually have an effect. - # Default: false - allow-unused: true - # Exclude following linters from requiring an explanation. - # Default: [] - allow-no-explanation: [ ] - # Enable to require an explanation of nonzero length after each nolint directive. - # Default: false - require-explanation: true - # Enable to require nolint directives to mention the specific linter being suppressed. - # Default: false - require-specific: true - - nonamedreturns: - # Report named error if it is assigned inside defer. - # Default: false - report-error-in-defer: true - - paralleltest: - # Ignore missing calls to `t.Parallel()` and only report incorrect uses of it. - # Default: false - ignore-missing: true - # Ignore missing calls to `t.Parallel()` in subtests. Top-level tests are - # still required to have `t.Parallel`, but subtests are allowed to skip it. - # Default: false - ignore-missing-subtests: true - - perfsprint: - # Enable/disable optimization of integer formatting. - # Default: true - integer-format: false - # Optimizes even if it requires an int or uint type cast. - # Default: true - int-conversion: false - # Enable/disable optimization of error formatting. - # Default: true - error-format: false - # Optimizes into `err.Error()` even if it is only equivalent for non-nil errors. - # Default: false - err-error: true - # Optimizes `fmt.Errorf`. - # Default: true - errorf: false - # Enable/disable optimization of string formatting. - # Default: true - string-format: false - # Optimizes `fmt.Sprintf` with only one argument. - # Default: true - sprintf1: false - # Optimizes into strings concatenation. - # Default: true - strconcat: false - # Enable/disable optimization of bool formatting. - # Default: true - bool-format: false - # Enable/disable optimization of hex formatting. - # Default: true - hex-format: false - - prealloc: - # IMPORTANT: we don't recommend using this linter before doing performance profiling. - # For most programs usage of prealloc will be a premature optimization. - - # Report pre-allocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. - # Default: true - simple: false - # Report pre-allocation suggestions on range loops. - # Default: true - range-loops: false - # Report pre-allocation suggestions on for loops. - # Default: false - for-loops: true - - predeclared: - # List of predeclared identifiers to not report on. - # Default: [] - ignore: - - new - - int - # Include method names and field names in checks. - # Default: false - qualified-name: true - - promlinter: - # Promlinter cannot infer all metrics name in static analysis. - # Enable strict mode will also include the errors caused by failing to parse the args. - # Default: false - strict: true - # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage. - # Default: [] - disabled-linters: - # Help detects issues related to the help text for a metric. - - Help - # MetricUnits detects issues with metric unit names. - - MetricUnits - # Counter detects issues specific to counters, as well as patterns that should only be used with counters. - - Counter - # HistogramSummaryReserved detects when other types of metrics use names or labels reserved for use by histograms and/or summaries. - - HistogramSummaryReserved - # MetricTypeInName detects when metric types are included in the metric name. - - MetricTypeInName - # ReservedChars detects colons in metric names. - - ReservedChars - # CamelCase detects metric names and label names written in camelCase. - - CamelCase - # UnitAbbreviations detects abbreviated units in the metric name. - - UnitAbbreviations - - protogetter: - # Skip files generated by specified generators from the checking. - # Checks only the file's initial comment, which must follow the format: "// Code generated by ". - # Files generated by protoc-gen-go, protoc-gen-go-grpc, and protoc-gen-grpc-gateway are always excluded automatically. - # Default: [] - skip-generated-by: ["protoc-gen-go-my-own-generator"] - # Skip files matching the specified glob pattern from the checking. - # Default: [] - skip-files: - - "*.pb.go" - - "*/vendor/*" - - "/full/path/to/file.go" - # Skip any generated files from the checking. - # Default: false - skip-any-generated: true - # Skip first argument of append function. - # Default: false - replace-first-arg-in-append: true - - reassign: - # Patterns for global variable names that are checked for reassignment. - # See https://github.com/curioswitch/go-reassign#usage - # Default: ["EOF", "Err.*"] - patterns: - - ".*" - - recvcheck: - # Disables the built-in method exclusions: - # - `MarshalText` - # - `MarshalJSON` - # - `MarshalYAML` - # - `MarshalXML` - # - `MarshalBinary` - # - `GobEncode` - # Default: false - disable-builtin: true - # User-defined method exclusions. - # The format is `struct_name.method_name` (ex: `Foo.MethodName`). - # A wildcard `*` can use as a struct name (ex: `*.MethodName`). - # Default: [] - exclusions: - - "*.Value" - - revive: - # Maximum number of open files at the same time. - # See https://github.com/mgechev/revive#command-line-flags - # Defaults to unlimited. - max-open-files: 2048 - - # Sets the default severity. - # See https://github.com/mgechev/revive#configuration - # Default: warning - severity: error - - # Enable all available rules. - # Default: false - enable-all-rules: true - - # Enable validation of comment directives. - # See https://github.com/mgechev/revive#comment-directives - directives: - - name: specify-disable-reason - severity: error - - # Sets the default failure confidence. - # This means that linting errors with less than 0.8 confidence will be ignored. - # Default: 0.8 - confidence: 0.1 - # Revive handles the default rules in a way that can be unexpected: - # - If there are no explicit rules, the default rules are used. - # - If there is at least one explicit rule, the default rules are not used. - # Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules. - rules: - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant - - name: add-constant - severity: warning - disabled: false - exclude: [""] - arguments: - - max-lit-count: "3" - allow-strs: '""' - allow-ints: "0,1,2" - allow-floats: "0.0,0.,1.0,1.,2.0,2." - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#argument-limit - - name: argument-limit - severity: warning - disabled: false - exclude: [""] - arguments: [ 4 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#atomic - - name: atomic - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#banned-characters - - name: banned-characters - severity: warning - disabled: false - exclude: [""] - arguments: [ "Ω","Σ","σ", "7" ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#bare-return - - name: bare-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#blank-imports - - name: blank-imports - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#bool-literal-in-expr - - name: bool-literal-in-expr - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#call-to-gc - - name: call-to-gc - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#cognitive-complexity - - name: cognitive-complexity - severity: warning - disabled: false - exclude: [""] - arguments: [ 7 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#comment-spacings - - name: comment-spacings - severity: warning - disabled: false - exclude: [""] - arguments: - - mypragma - - otherpragma - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#comments-density - - name: comments-density - severity: warning - disabled: false - exclude: [""] - arguments: [ 15 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#confusing-naming - - name: confusing-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#confusing-results - - name: confusing-results - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#constant-logical-expr - - name: constant-logical-expr - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#context-as-argument - - name: context-as-argument - severity: warning - disabled: false - exclude: [""] - arguments: - - allow-types-before: "*testing.T,*github.com/user/repo/testing.Harness" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#context-keys-type - - name: context-keys-type - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#cyclomatic - - name: cyclomatic - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#datarace - - name: datarace - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#deep-exit - - name: deep-exit - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#defer - - name: defer - severity: warning - disabled: false - exclude: [""] - arguments: - - "call-chain" - - "loop" - - "method-call" - - "recover" - - "immediate-recover" - - "return" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#dot-imports - - name: dot-imports - severity: warning - disabled: false - exclude: [""] - arguments: - - allowed-packages: ["github.com/onsi/ginkgo/v2", "github.com/onsi/gomega"] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#duplicated-imports - - name: duplicated-imports - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#early-return - - name: early-return - severity: warning - disabled: false - exclude: [""] - arguments: - - "preserve-scope" - - "allow-jump" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#empty-block - - name: empty-block - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#empty-lines - - name: empty-lines - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-map-style - - name: enforce-map-style - severity: warning - disabled: false - exclude: [""] - arguments: - - "make" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-repeated-arg-type-style - - name: enforce-repeated-arg-type-style - severity: warning - disabled: false - exclude: [""] - arguments: - - "short" - # Or this parameter: - - func-arg-style: "full" - func-ret-val-style: "short" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-slice-style - - name: enforce-slice-style - severity: warning - disabled: false - exclude: [""] - arguments: - - "make" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-switch-style - - name: enforce-switch-style - severity: warning - disabled: false - exclude: [""] - arguments: [ "allowNoDefault" ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-naming - - name: error-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-return - - name: error-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-strings - - name: error-strings - severity: warning - disabled: false - exclude: [""] - arguments: - - "xerrors.New" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#errorf - - name: errorf - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#exported - - name: exported - severity: warning - disabled: false - exclude: [""] - arguments: - - "check-private-receivers" - - "disable-stuttering-check" - - "say-repetitive-instead-of-stutters" - - "check-public-interface" - - "disable-checks-on-constants" - - "disable-checks-on-functions" - - "disable-checks-on-methods" - - "disable-checks-on-types" - - "disable-checks-on-variables" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#file-header - - name: file-header - severity: warning - disabled: false - exclude: [""] - arguments: - - This is the text that must appear at the top of source files. - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#file-length-limit - - name: file-length-limit - severity: warning - disabled: false - exclude: [""] - arguments: - - max: 100 - skip-comments: true - skip-blank-lines: true - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#filename-format - - name: filename-format - severity: warning - disabled: false - exclude: [""] - arguments: - - "^[_a-z][_a-z0-9]*\\.go$" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#flag-parameter - - name: flag-parameter - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#function-length - - name: function-length - severity: warning - disabled: false - exclude: [""] - arguments: [ 10, 0 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#function-result-limit - - name: function-result-limit - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#get-return - - name: get-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-branches - - name: identical-branches - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-ifelseif-branches - - name: identical-ifelseif-branches - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-ifelseif-conditions - - name: identical-ifelseif-conditions - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-switch-branches - - name: identical-switch-branches - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#identical-switch-conditions - - name: identical-switch-conditions - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#if-return - - name: if-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#import-alias-naming - - name: import-alias-naming - severity: warning - disabled: false - exclude: [""] - arguments: - - "^[a-z][a-z0-9]{0,}$" - # Or this parameter: - - allow-regex: "^[a-z][a-z0-9]{0,}$" - deny-regex: '^v\d+$' - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#import-shadowing - - name: import-shadowing - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#imports-blocklist - - name: imports-blocklist - severity: warning - disabled: false - exclude: [""] - arguments: - - "crypto/md5" - - "crypto/sha1" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#increment-decrement - - name: increment-decrement - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#indent-error-flow - - name: indent-error-flow - severity: warning - disabled: false - exclude: [""] - arguments: - - "preserve-scope" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#line-length-limit - - name: line-length-limit - severity: warning - disabled: false - exclude: [""] - arguments: [ 80 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#max-control-nesting - - name: max-control-nesting - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#max-public-structs - - name: max-public-structs - severity: warning - disabled: false - exclude: [""] - arguments: [ 3 ] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#modifies-parameter - - name: modifies-parameter - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#modifies-value-receiver - - name: modifies-value-receiver - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#nested-structs - - name: nested-structs - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#optimize-operands-order - - name: optimize-operands-order - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#package-comments - - name: package-comments - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#package-directory-mismatch - - name: package-directory-mismatch - severity: warning - disabled: false - exclude: [""] - arguments: - - ignore-directories: ["testcases", "testinfo"] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range - - name: range - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range-val-address - - name: range-val-address - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#range-val-in-closure - - name: range-val-in-closure - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#receiver-naming - - name: receiver-naming - severity: warning - disabled: false - exclude: [""] - arguments: - - max-length: 2 - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redefines-builtin-id - - name: redefines-builtin-id - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-build-tag - - name: redundant-build-tag - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-import-alias - - name: redundant-import-alias - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#redundant-test-main-exit - - name: redundant-test-main-exit - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#string-format - - name: string-format - severity: warning - disabled: false - exclude: [""] - arguments: - - - 'core.WriteError[1].Message' - - '/^([^A-Z]|$)/' - - must not start with a capital letter - - - 'fmt.Errorf[0]' - - '/(^|[^\.!?])$/' - - must not end in punctuation - - - panic - - '/^[^\n]*$/' - - must not contain line breaks - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#string-of-int - - name: string-of-int - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#struct-tag - - name: struct-tag - severity: warning - disabled: false - exclude: [""] - arguments: - - "json,inline" - - "bson,outline,gnu" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#superfluous-else - - name: superfluous-else - severity: warning - disabled: false - exclude: [""] - arguments: - - "preserve-scope" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-date - - name: time-date - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-equal - - name: time-equal - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#time-naming - - name: time-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unchecked-type-assertion - - name: unchecked-type-assertion - severity: warning - disabled: false - exclude: [""] - arguments: - - accept-ignored-assertion-result: true - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unconditional-recursion - - name: unconditional-recursion - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unexported-naming - - name: unexported-naming - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unexported-return - - name: unexported-return - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unhandled-error - - name: unhandled-error - severity: warning - disabled: false - exclude: [""] - arguments: - - "^fmt.Printf" - - "myFunction" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-format - - name: unnecessary-format - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-stmt - - name: unnecessary-stmt - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unreachable-code - - name: unreachable-code - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unsecure-url-scheme - - name: unsecure-url-scheme - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-parameter - - name: unused-parameter - severity: warning - disabled: false - exclude: [""] - arguments: - - allow-regex: "^_" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-receiver - - name: unused-receiver - severity: warning - disabled: false - exclude: [""] - arguments: - - allow-regex: "^_" - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-any - - name: use-any - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-errors-new - - name: use-errors-new - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-fmt-print - - name: use-fmt-print - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-waitgroup-go - - name: use-waitgroup-go - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-break - - name: useless-break - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#useless-fallthrough - - name: useless-fallthrough - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#var-declaration - - name: var-declaration - severity: warning - disabled: false - exclude: [""] - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#var-naming - - name: var-naming - severity: warning - disabled: false - exclude: [""] - arguments: - - [ "ID" ] # AllowList - - [ "VM" ] # DenyList - - - skip-initialism-name-checks: true - upper-case-const: true - skip-package-name-checks: true - extra-bad-package-names: - - helpers - - models - # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#waitgroup-by-value - - name: waitgroup-by-value - severity: warning - disabled: false - exclude: [""] - - rowserrcheck: - # database/sql is always checked. - # Default: [] - packages: - - github.com/jmoiron/sqlx - - sloglint: - # Enforce not mixing key-value pairs and attributes. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-mixed-arguments - # Default: true - no-mixed-args: false - # 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 - kv-only: true - # 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 - attr-only: true - # Enforce not using global loggers. - # Values: - # - "": disabled - # - "all": report all global loggers - # - "default": report only the default slog logger - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-global - # Default: "" - no-global: "all" - # Enforce using methods that accept a context. - # Values: - # - "": disabled - # - "all": report all contextless calls - # - "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: "" - context: "all" - # Enforce using static values for log messages. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#static-messages - # Default: false - static-msg: true - # Enforce message style. - # Values: lowercased, capitalized - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#message-style - # Default: "" - msg-style: capitalized - # Enforce using constants instead of raw keys. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-raw-keys - # Default: false - no-raw-keys: true - # Enforce key naming convention. - # Values: snake, kebab, camel, pascal - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-naming-convention - # Default: "" - key-naming-case: snake - # Enforce not using specific keys. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#forbidden-keys - # Default: [] - forbidden-keys: - - time - - level - - msg - - source - - foo - # Enforce putting arguments on separate lines. - # https://github.com/go-simpler/sloglint?tab=readme-ov-file#arguments-on-separate-lines - # Default: false - args-on-sep-lines: true - - spancheck: - # Checks to enable. - # Options include: - # - `end`: check that `span.End()` is called - # - `record-error`: check that `span.RecordError(err)` is called when an error is returned - # - `set-status`: check that `span.SetStatus(codes.Error, msg)` is called when an error is returned - # Default: ["end"] - checks: - - end - - record-error - - set-status - # A list of regexes for function signatures that silence `record-error` and `set-status` reports - # if found in the call path to a returned error. - # https://github.com/jjti/go-spancheck#ignore-check-signatures - # 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 `:`, 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: - # https://staticcheck.dev/docs/configuration/options/#dot_import_whitelist - # Default: ["github.com/mmcloughlin/avo/build", "github.com/mmcloughlin/avo/operand", "github.com/mmcloughlin/avo/reg"] - dot-import-whitelist: - - fmt - # https://staticcheck.dev/docs/configuration/options/#initialisms - # Default: ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"] - initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS" ] - # https://staticcheck.dev/docs/configuration/options/#http_status_code_whitelist - # Default: ["200", "400", "404", "500"] - http-status-code-whitelist: [ "200", "400", "404", "500" ] - # SAxxxx checks in https://staticcheck.dev/docs/configuration/options/#checks - # Example (to disable some checks): [ "all", "-SA1000", "-SA1001"] - # Run `GL_DEBUG=staticcheck golangci-lint run --enable=staticcheck` to see all available checks and enabled by config checks. - # Default: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"] - checks: - # Invalid regular expression. - # https://staticcheck.dev/docs/checks/#SA1000 - - SA1000 - # Invalid template. - # https://staticcheck.dev/docs/checks/#SA1001 - - SA1001 - # Invalid format in 'time.Parse'. - # https://staticcheck.dev/docs/checks/#SA1002 - - SA1002 - # Unsupported argument to functions in 'encoding/binary'. - # https://staticcheck.dev/docs/checks/#SA1003 - - SA1003 - # Suspiciously small untyped constant in 'time.Sleep'. - # https://staticcheck.dev/docs/checks/#SA1004 - - SA1004 - # Invalid first argument to 'exec.Command'. - # https://staticcheck.dev/docs/checks/#SA1005 - - SA1005 - # 'Printf' with dynamic first argument and no further arguments. - # https://staticcheck.dev/docs/checks/#SA1006 - - SA1006 - # Invalid URL in 'net/url.Parse'. - # https://staticcheck.dev/docs/checks/#SA1007 - - SA1007 - # Non-canonical key in 'http.Header' map. - # https://staticcheck.dev/docs/checks/#SA1008 - - SA1008 - # '(*regexp.Regexp).FindAll' called with 'n == 0', which will always return zero results. - # https://staticcheck.dev/docs/checks/#SA1010 - - SA1010 - # Various methods in the "strings" package expect valid UTF-8, but invalid input is provided. - # https://staticcheck.dev/docs/checks/#SA1011 - - SA1011 - # A nil 'context.Context' is being passed to a function, consider using 'context.TODO' instead. - # https://staticcheck.dev/docs/checks/#SA1012 - - SA1012 - # 'io.Seeker.Seek' is being called with the whence constant as the first argument, but it should be the second. - # https://staticcheck.dev/docs/checks/#SA1013 - - SA1013 - # Non-pointer value passed to 'Unmarshal' or 'Decode'. - # https://staticcheck.dev/docs/checks/#SA1014 - - SA1014 - # Using 'time.Tick' in a way that will leak. Consider using 'time.NewTicker', and only use 'time.Tick' in tests, commands and endless functions. - # https://staticcheck.dev/docs/checks/#SA1015 - - SA1015 - # Trapping a signal that cannot be trapped. - # https://staticcheck.dev/docs/checks/#SA1016 - - SA1016 - # Channels used with 'os/signal.Notify' should be buffered. - # https://staticcheck.dev/docs/checks/#SA1017 - - SA1017 - # 'strings.Replace' called with 'n == 0', which does nothing. - # https://staticcheck.dev/docs/checks/#SA1018 - - SA1018 - # Using a deprecated function, variable, constant or field. - # https://staticcheck.dev/docs/checks/#SA1019 - - SA1019 - # Using an invalid host:port pair with a 'net.Listen'-related function. - # https://staticcheck.dev/docs/checks/#SA1020 - - SA1020 - # Using 'bytes.Equal' to compare two 'net.IP'. - # https://staticcheck.dev/docs/checks/#SA1021 - - SA1021 - # Modifying the buffer in an 'io.Writer' implementation. - # https://staticcheck.dev/docs/checks/#SA1023 - - SA1023 - # A string cutset contains duplicate characters. - # https://staticcheck.dev/docs/checks/#SA1024 - - SA1024 - # It is not possible to use '(*time.Timer).Reset''s return value correctly. - # https://staticcheck.dev/docs/checks/#SA1025 - - SA1025 - # Cannot marshal channels or functions. - # https://staticcheck.dev/docs/checks/#SA1026 - - SA1026 - # Atomic access to 64-bit variable must be 64-bit aligned. - # https://staticcheck.dev/docs/checks/#SA1027 - - SA1027 - # 'sort.Slice' can only be used on slices. - # https://staticcheck.dev/docs/checks/#SA1028 - - SA1028 - # Inappropriate key in call to 'context.WithValue'. - # https://staticcheck.dev/docs/checks/#SA1029 - - SA1029 - # Invalid argument in call to a 'strconv' function. - # https://staticcheck.dev/docs/checks/#SA1030 - - SA1030 - # Overlapping byte slices passed to an encoder. - # https://staticcheck.dev/docs/checks/#SA1031 - - SA1031 - # Wrong order of arguments to 'errors.Is'. - # https://staticcheck.dev/docs/checks/#SA1032 - - SA1032 - # 'sync.WaitGroup.Add' called inside the goroutine, leading to a race condition. - # https://staticcheck.dev/docs/checks/#SA2000 - - SA2000 - # Empty critical section, did you mean to defer the unlock?. - # https://staticcheck.dev/docs/checks/#SA2001 - - SA2001 - # Called 'testing.T.FailNow' or 'SkipNow' in a goroutine, which isn't allowed. - # https://staticcheck.dev/docs/checks/#SA2002 - - SA2002 - # Deferred 'Lock' right after locking, likely meant to defer 'Unlock' instead. - # https://staticcheck.dev/docs/checks/#SA2003 - - SA2003 - # 'TestMain' doesn't call 'os.Exit', hiding test failures. - # https://staticcheck.dev/docs/checks/#SA3000 - - SA3000 - # Assigning to 'b.N' in benchmarks distorts the results. - # https://staticcheck.dev/docs/checks/#SA3001 - - SA3001 - # Binary operator has identical expressions on both sides. - # https://staticcheck.dev/docs/checks/#SA4000 - - SA4000 - # '&*x' gets simplified to 'x', it does not copy 'x'. - # https://staticcheck.dev/docs/checks/#SA4001 - - SA4001 - # Comparing unsigned values against negative values is pointless. - # https://staticcheck.dev/docs/checks/#SA4003 - - SA4003 - # The loop exits unconditionally after one iteration. - # https://staticcheck.dev/docs/checks/#SA4004 - - SA4004 - # Field assignment that will never be observed. Did you mean to use a pointer receiver?. - # https://staticcheck.dev/docs/checks/#SA4005 - - SA4005 - # A value assigned to a variable is never read before being overwritten. Forgotten error check or dead code?. - # https://staticcheck.dev/docs/checks/#SA4006 - - SA4006 - # The variable in the loop condition never changes, are you incrementing the wrong variable?. - # https://staticcheck.dev/docs/checks/#SA4008 - - SA4008 - # A function argument is overwritten before its first use. - # https://staticcheck.dev/docs/checks/#SA4009 - - SA4009 - # The result of 'append' will never be observed anywhere. - # https://staticcheck.dev/docs/checks/#SA4010 - - SA4010 - # Break statement with no effect. Did you mean to break out of an outer loop?. - # https://staticcheck.dev/docs/checks/#SA4011 - - SA4011 - # Comparing a value against NaN even though no value is equal to NaN. - # https://staticcheck.dev/docs/checks/#SA4012 - - SA4012 - # Negating a boolean twice ('!!b') is the same as writing 'b'. This is either redundant, or a typo. - # https://staticcheck.dev/docs/checks/#SA4013 - - SA4013 - # An if/else if chain has repeated conditions and no side-effects; if the condition didn't match the first time, it won't match the second time, either. - # https://staticcheck.dev/docs/checks/#SA4014 - - SA4014 - # Calling functions like 'math.Ceil' on floats converted from integers doesn't do anything useful. - # https://staticcheck.dev/docs/checks/#SA4015 - - SA4015 - # Certain bitwise operations, such as 'x ^ 0', do not do anything useful. - # https://staticcheck.dev/docs/checks/#SA4016 - - SA4016 - # Discarding the return values of a function without side effects, making the call pointless. - # https://staticcheck.dev/docs/checks/#SA4017 - - SA4017 - # Self-assignment of variables. - # https://staticcheck.dev/docs/checks/#SA4018 - - SA4018 - # Multiple, identical build constraints in the same file. - # https://staticcheck.dev/docs/checks/#SA4019 - - SA4019 - # Unreachable case clause in a type switch. - # https://staticcheck.dev/docs/checks/#SA4020 - - SA4020 - # "x = append(y)" is equivalent to "x = y". - # https://staticcheck.dev/docs/checks/#SA4021 - - SA4021 - # Comparing the address of a variable against nil. - # https://staticcheck.dev/docs/checks/#SA4022 - - SA4022 - # Impossible comparison of interface value with untyped nil. - # https://staticcheck.dev/docs/checks/#SA4023 - - SA4023 - # Checking for impossible return value from a builtin function. - # https://staticcheck.dev/docs/checks/#SA4024 - - SA4024 - # Integer division of literals that results in zero. - # https://staticcheck.dev/docs/checks/#SA4025 - - SA4025 - # Go constants cannot express negative zero. - # https://staticcheck.dev/docs/checks/#SA4026 - - SA4026 - # '(*net/url.URL).Query' returns a copy, modifying it doesn't change the URL. - # https://staticcheck.dev/docs/checks/#SA4027 - - SA4027 - # 'x % 1' is always zero. - # https://staticcheck.dev/docs/checks/#SA4028 - - SA4028 - # Ineffective attempt at sorting slice. - # https://staticcheck.dev/docs/checks/#SA4029 - - SA4029 - # Ineffective attempt at generating random number. - # https://staticcheck.dev/docs/checks/#SA4030 - - SA4030 - # Checking never-nil value against nil. - # https://staticcheck.dev/docs/checks/#SA4031 - - SA4031 - # Comparing 'runtime.GOOS' or 'runtime.GOARCH' against impossible value. - # https://staticcheck.dev/docs/checks/#SA4032 - - SA4032 - # Assignment to nil map. - # https://staticcheck.dev/docs/checks/#SA5000 - - SA5000 - # Deferring 'Close' before checking for a possible error. - # https://staticcheck.dev/docs/checks/#SA5001 - - SA5001 - # The empty for loop ("for {}") spins and can block the scheduler. - # https://staticcheck.dev/docs/checks/#SA5002 - - SA5002 - # Defers in infinite loops will never execute. - # https://staticcheck.dev/docs/checks/#SA5003 - - SA5003 - # "for { select { ..." with an empty default branch spins. - # https://staticcheck.dev/docs/checks/#SA5004 - - SA5004 - # The finalizer references the finalized object, preventing garbage collection. - # https://staticcheck.dev/docs/checks/#SA5005 - - SA5005 - # Infinite recursive call. - # https://staticcheck.dev/docs/checks/#SA5007 - - SA5007 - # Invalid struct tag. - # https://staticcheck.dev/docs/checks/#SA5008 - - SA5008 - # Invalid Printf call. - # https://staticcheck.dev/docs/checks/#SA5009 - - SA5009 - # Impossible type assertion. - # https://staticcheck.dev/docs/checks/#SA5010 - - SA5010 - # Possible nil pointer dereference. - # https://staticcheck.dev/docs/checks/#SA5011 - - SA5011 - # Passing odd-sized slice to function expecting even size. - # https://staticcheck.dev/docs/checks/#SA5012 - - SA5012 - # Using 'regexp.Match' or related in a loop, should use 'regexp.Compile'. - # https://staticcheck.dev/docs/checks/#SA6000 - - SA6000 - # Missing an optimization opportunity when indexing maps by byte slices. - # https://staticcheck.dev/docs/checks/#SA6001 - - SA6001 - # Storing non-pointer values in 'sync.Pool' allocates memory. - # https://staticcheck.dev/docs/checks/#SA6002 - - SA6002 - # Converting a string to a slice of runes before ranging over it. - # https://staticcheck.dev/docs/checks/#SA6003 - - SA6003 - # Inefficient string comparison with 'strings.ToLower' or 'strings.ToUpper'. - # https://staticcheck.dev/docs/checks/#SA6005 - - SA6005 - # Using io.WriteString to write '[]byte'. - # https://staticcheck.dev/docs/checks/#SA6006 - - SA6006 - # Defers in range loops may not run when you expect them to. - # https://staticcheck.dev/docs/checks/#SA9001 - - SA9001 - # Using a non-octal 'os.FileMode' that looks like it was meant to be in octal. - # https://staticcheck.dev/docs/checks/#SA9002 - - SA9002 - # Empty body in an if or else branch. - # https://staticcheck.dev/docs/checks/#SA9003 - - SA9003 - # Only the first constant has an explicit type. - # https://staticcheck.dev/docs/checks/#SA9004 - - SA9004 - # Trying to marshal a struct with no public fields nor custom marshaling. - # https://staticcheck.dev/docs/checks/#SA9005 - - SA9005 - # Dubious bit shifting of a fixed size integer value. - # https://staticcheck.dev/docs/checks/#SA9006 - - SA9006 - # Deleting a directory that shouldn't be deleted. - # https://staticcheck.dev/docs/checks/#SA9007 - - SA9007 - # 'else' branch of a type assertion is probably not reading the right value. - # https://staticcheck.dev/docs/checks/#SA9008 - - SA9008 - # Ineffectual Go compiler directive. - # https://staticcheck.dev/docs/checks/#SA9009 - - SA9009 - # Incorrect or missing package comment. - # https://staticcheck.dev/docs/checks/#ST1000 - - ST1000 - # Dot imports are discouraged. - # https://staticcheck.dev/docs/checks/#ST1001 - - ST1001 - # Poorly chosen identifier. - # https://staticcheck.dev/docs/checks/#ST1003 - - ST1003 - # Incorrectly formatted error string. - # https://staticcheck.dev/docs/checks/#ST1005 - - ST1005 - # Poorly chosen receiver name. - # https://staticcheck.dev/docs/checks/#ST1006 - - ST1006 - # A function's error value should be its last return value. - # https://staticcheck.dev/docs/checks/#ST1008 - - ST1008 - # Poorly chosen name for variable of type 'time.Duration'. - # https://staticcheck.dev/docs/checks/#ST1011 - - ST1011 - # Poorly chosen name for error variable. - # https://staticcheck.dev/docs/checks/#ST1012 - - ST1012 - # Should use constants for HTTP error codes, not magic numbers. - # https://staticcheck.dev/docs/checks/#ST1013 - - ST1013 - # A switch's default case should be the first or last case. - # https://staticcheck.dev/docs/checks/#ST1015 - - ST1015 - # Use consistent method receiver names. - # https://staticcheck.dev/docs/checks/#ST1016 - - ST1016 - # Don't use Yoda conditions. - # https://staticcheck.dev/docs/checks/#ST1017 - - ST1017 - # Avoid zero-width and control characters in string literals. - # https://staticcheck.dev/docs/checks/#ST1018 - - ST1018 - # Importing the same package multiple times. - # https://staticcheck.dev/docs/checks/#ST1019 - - ST1019 - # The documentation of an exported function should start with the function's name. - # https://staticcheck.dev/docs/checks/#ST1020 - - ST1020 - # The documentation of an exported type should start with type's name. - # https://staticcheck.dev/docs/checks/#ST1021 - - ST1021 - # The documentation of an exported variable or constant should start with variable's name. - # https://staticcheck.dev/docs/checks/#ST1022 - - ST1022 - # Redundant type in variable declaration. - # https://staticcheck.dev/docs/checks/#ST1023 - - ST1023 - # Use plain channel send or receive instead of single-case select. - # https://staticcheck.dev/docs/checks/#S1000 - - S1000 - # Replace for loop with call to copy. - # https://staticcheck.dev/docs/checks/#S1001 - - S1001 - # Omit comparison with boolean constant. - # https://staticcheck.dev/docs/checks/#S1002 - - S1002 - # Replace call to 'strings.Index' with 'strings.Contains'. - # https://staticcheck.dev/docs/checks/#S1003 - - S1003 - # Replace call to 'bytes.Compare' with 'bytes.Equal'. - # https://staticcheck.dev/docs/checks/#S1004 - - S1004 - # Drop unnecessary use of the blank identifier. - # https://staticcheck.dev/docs/checks/#S1005 - - S1005 - # Use "for { ... }" for infinite loops. - # https://staticcheck.dev/docs/checks/#S1006 - - S1006 - # Simplify regular expression by using raw string literal. - # https://staticcheck.dev/docs/checks/#S1007 - - S1007 - # Simplify returning boolean expression. - # https://staticcheck.dev/docs/checks/#S1008 - - S1008 - # Omit redundant nil check on slices, maps, and channels. - # https://staticcheck.dev/docs/checks/#S1009 - - S1009 - # Omit default slice index. - # https://staticcheck.dev/docs/checks/#S1010 - - S1010 - # Use a single 'append' to concatenate two slices. - # https://staticcheck.dev/docs/checks/#S1011 - - S1011 - # Replace 'time.Now().Sub(x)' with 'time.Since(x)'. - # https://staticcheck.dev/docs/checks/#S1012 - - S1012 - # Use a type conversion instead of manually copying struct fields. - # https://staticcheck.dev/docs/checks/#S1016 - - S1016 - # Replace manual trimming with 'strings.TrimPrefix'. - # https://staticcheck.dev/docs/checks/#S1017 - - S1017 - # Use "copy" for sliding elements. - # https://staticcheck.dev/docs/checks/#S1018 - - S1018 - # Simplify "make" call by omitting redundant arguments. - # https://staticcheck.dev/docs/checks/#S1019 - - S1019 - # Omit redundant nil check in type assertion. - # https://staticcheck.dev/docs/checks/#S1020 - - S1020 - # Merge variable declaration and assignment. - # https://staticcheck.dev/docs/checks/#S1021 - - S1021 - # Omit redundant control flow. - # https://staticcheck.dev/docs/checks/#S1023 - - S1023 - # Replace 'x.Sub(time.Now())' with 'time.Until(x)'. - # https://staticcheck.dev/docs/checks/#S1024 - - S1024 - # Don't use 'fmt.Sprintf("%s", x)' unnecessarily. - # https://staticcheck.dev/docs/checks/#S1025 - - S1025 - # Simplify error construction with 'fmt.Errorf'. - # https://staticcheck.dev/docs/checks/#S1028 - - S1028 - # Range over the string directly. - # https://staticcheck.dev/docs/checks/#S1029 - - S1029 - # Use 'bytes.Buffer.String' or 'bytes.Buffer.Bytes'. - # https://staticcheck.dev/docs/checks/#S1030 - - S1030 - # Omit redundant nil check around loop. - # https://staticcheck.dev/docs/checks/#S1031 - - S1031 - # Use 'sort.Ints(x)', 'sort.Float64s(x)', and 'sort.Strings(x)'. - # https://staticcheck.dev/docs/checks/#S1032 - - S1032 - # Unnecessary guard around call to "delete". - # https://staticcheck.dev/docs/checks/#S1033 - - S1033 - # Use result of type assertion to simplify cases. - # https://staticcheck.dev/docs/checks/#S1034 - - S1034 - # Redundant call to 'net/http.CanonicalHeaderKey' in method call on 'net/http.Header'. - # https://staticcheck.dev/docs/checks/#S1035 - - S1035 - # Unnecessary guard around map access. - # https://staticcheck.dev/docs/checks/#S1036 - - S1036 - # Elaborate way of sleeping. - # https://staticcheck.dev/docs/checks/#S1037 - - S1037 - # Unnecessarily complex way of printing formatted string. - # https://staticcheck.dev/docs/checks/#S1038 - - S1038 - # Unnecessary use of 'fmt.Sprint'. - # https://staticcheck.dev/docs/checks/#S1039 - - S1039 - # Type assertion to current type. - # https://staticcheck.dev/docs/checks/#S1040 - - S1040 - # Apply De Morgan's law. - # https://staticcheck.dev/docs/checks/#QF1001 - - QF1001 - # Convert untagged switch to tagged switch. - # https://staticcheck.dev/docs/checks/#QF1002 - - QF1002 - # Convert if/else-if chain to tagged switch. - # https://staticcheck.dev/docs/checks/#QF1003 - - QF1003 - # Use 'strings.ReplaceAll' instead of 'strings.Replace' with 'n == -1'. - # https://staticcheck.dev/docs/checks/#QF1004 - - QF1004 - # Expand call to 'math.Pow'. - # https://staticcheck.dev/docs/checks/#QF1005 - - QF1005 - # Lift 'if'+'break' into loop condition. - # https://staticcheck.dev/docs/checks/#QF1006 - - QF1006 - # Merge conditional assignment into variable declaration. - # https://staticcheck.dev/docs/checks/#QF1007 - - QF1007 - # Omit embedded fields from selector expression. - # https://staticcheck.dev/docs/checks/#QF1008 - - QF1008 - # Use 'time.Time.Equal' instead of '==' operator. - # https://staticcheck.dev/docs/checks/#QF1009 - - QF1009 - # Convert slice of bytes to string when printing it. - # https://staticcheck.dev/docs/checks/#QF1010 - - QF1010 - # Omit redundant type from variable declaration. - # https://staticcheck.dev/docs/checks/#QF1011 - - QF1011 - # Use 'fmt.Fprintf(x, ...)' instead of 'x.Write(fmt.Sprintf(...))'. - # https://staticcheck.dev/docs/checks/#QF1012 - - QF1012 - - tagalign: - # Align and sort can be used together or separately. - # - # Whether enable align. If true, the struct tags will be aligned. - # E.g.: - # type FooBar struct { - # Bar string `json:"bar" validate:"required"` - # FooFoo int8 `json:"foo_foo" validate:"required"` - # } - # will be formatted to: - # type FooBar struct { - # Bar string `json:"bar" validate:"required"` - # FooFoo int8 `json:"foo_foo" validate:"required"` - # } - # Default: true. - 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"`. - # Default: true - sort: false - # Specify the order of tags, the other tags will be sorted by name. - # This option will be ignored if `sort` is false. - # Default: [] - order: - - json - - yaml - - yml - - toml - - mapstructure - - binding - - validate - # Whether enable strict style. - # In this style, the tags will be sorted and aligned in the dictionary order, - # and the tags with the same name will be aligned together. - # Note: This option will be ignored if 'align' or 'sort' is false. - # Default: false - strict: true - - tagliatelle: - # Checks the struct tag name case. - case: - # Defines the association between tag name and case. - # Any struct tag name can be used. - # Supported string cases: - # - `camel` - # - `pascal` - # - `kebab` - # - `snake` - # - `upperSnake` - # - `goCamel` - # - `goPascal` - # - `goKebab` - # - `goSnake` - # - `upper` - # - `lower` - # - `header` - rules: - json: camel - yaml: camel - xml: camel - toml: camel - bson: camel - avro: snake - mapstructure: kebab - env: upperSnake - envconfig: upperSnake - whatever: snake - # Defines the association between tag name and case. - # Important: the `extended-rules` overrides `rules`. - # Default: empty - extended-rules: - json: - # Supported string cases: - # - `camel` - # - `pascal` - # - `kebab` - # - `snake` - # - `upperSnake` - # - `goCamel` - # - `goPascal` - # - `goKebab` - # - `goSnake` - # - `header` - # - `lower` - # - `header` - # - # Required - case: camel - # Adds 'AMQP', 'DB', 'GID', 'RTP', 'SIP', 'TS' to initialisms, - # and removes 'LHS', 'RHS' from initialisms. - # Default: false - extra-initialisms: true - # Defines initialism additions and overrides. - # Default: empty - initialism-overrides: - DB: true # add a new initialism - LHS: false # disable a default initialism. - # ... - # Uses the struct field name to check the name of the struct tag. - # Default: false - use-field-name: true - # The field names to ignore. - # Default: [] - ignored-fields: - - Bar - - Foo - # Overrides the default/root configuration. - # Default: [] - overrides: - - - # The package path (uses `/` only as a separator). - # Required - pkg: foo/bar - # Default: empty or the same as the default/root configuration. - rules: - json: snake - xml: pascal - # Default: empty or the same as the default/root configuration. - extended-rules: - # Same options as the base `extended-rules`. - # Default: false (WARNING: it doesn't follow the default/root configuration) - use-field-name: true - # The field names to ignore. - # Default: [] or the same as the default/root configuration. - ignored-fields: - - Bar - - Foo - # Ignore the package (takes precedence over all other configurations). - # Default: false - ignore: true - - testifylint: - # Enable all checkers (https://github.com/Antonboom/testifylint#checkers). - # Default: false - enable-all: true - # Disable checkers by name - # (in addition to default - # suite-thelper - # ). - disable: - - blank-import - - bool-compare - - compares - - contains - - empty - - encoded-compare - - equal-values - - error-is-as - - error-nil - - expected-actual - - float-compare - - formatter - - go-require - - len - - negative-positive - - nil-compare - - regexp - - require-error - - suite-broken-parallel - - suite-dont-use-pkg - - suite-extra-assert-call - - suite-method-signature - - suite-subtest-run - - suite-thelper - - useless-assert - - # Disable all checkers (https://github.com/Antonboom/testifylint#checkers). - # Default: false - disable-all: true - # Enable checkers by name - # (in addition to default - # blank-import, bool-compare, compares, contains, empty, encoded-compare, equal-values, error-is-as, error-nil, - # expected-actual, go-require, float-compare, formatter, len, negative-positive, nil-compare, regexp, require-error, - # suite-broken-parallel, suite-dont-use-pkg, suite-extra-assert-call, suite-subtest-run, suite-method-signature, - # useless-assert - # ). - enable: - - blank-import - - bool-compare - - compares - - contains - - empty - - encoded-compare - - equal-values - - error-is-as - - error-nil - - expected-actual - - float-compare - - formatter - - go-require - - len - - negative-positive - - nil-compare - - regexp - - require-error - - suite-broken-parallel - - suite-dont-use-pkg - - suite-extra-assert-call - - suite-method-signature - - suite-subtest-run - - suite-thelper - - useless-assert - - bool-compare: - # To ignore user defined types (over builtin bool). - # Default: false - ignore-custom-types: true - expected-actual: - # Regexp for expected variable name. - # Default: (^(exp(ected)?|want(ed)?)([A-Z]\w*)?$)|(^(\w*[a-z])?(Exp(ected)?|Want(ed)?)$) - pattern: ^expected - formatter: - # To enable go vet's printf checks. - # Default: true - check-format-string: false - # To require f-assertions (e.g. `assert.Equalf`) if format string is used, even if there are no variable-length - # variables, i.e. it requires `require.NoErrorf` for both these cases: - # - require.NoErrorf(t, err, "unexpected error") - # - require.NoErrorf(t, err, "unexpected error for sid: %v", sid) - # To understand this behavior, please read the - # https://github.com/Antonboom/testifylint?tab=readme-ov-file#historical-reference-of-formatter. - # Default: false - require-f-funcs: true - # To require that the first element of msgAndArgs (msg) has a string type. - # For example, in such case assertion like `assert.True(t, b, tt.case)` will be considered as invalid. - # Default: true - require-string-msg: false - go-require: - # To ignore HTTP handlers (like http.HandlerFunc). - # Default: false - ignore-http-handlers: true - require-error: - # Regexp for assertions to analyze. If defined, then only matched error assertions will be reported. - # Default: "" - fn-pattern: ^(Errorf?|NoErrorf?)$ - suite-extra-assert-call: - # To require or remove extra Assert() call? - # Default: remove - mode: require - - testpackage: - # Regexp pattern to skip files. - # Default: "(export|internal)_test\\.go" - skip-regexp: (export|internal)_test\.go - # List of packages that don't end with _test that tests are allowed to be in. - # Default: "main" - allow-packages: - - example - - main - - thelper: - test: - # Check *testing.T is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.T param has name t. - # Default: true - name: false - # Check t.Helper() begins helper function. - # Default: true - begin: false - benchmark: - # Check *testing.B is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.B param has name b. - # Default: true - name: false - # Check b.Helper() begins helper function. - # Default: true - begin: false - tb: - # Check *testing.TB is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.TB param has name tb. - # Default: true - name: false - # Check tb.Helper() begins helper function. - # Default: true - begin: false - fuzz: - # Check *testing.F is first param (or after context.Context) of helper function. - # Default: true - first: false - # Check *testing.F param has name f. - # Default: true - name: false - # Check f.Helper() begins helper function. - # Default: true - begin: false - - usestdlibvars: - # Suggest the use of http.MethodXX. - # Default: true - http-method: false - # Suggest the use of http.StatusXX. - # Default: true - http-status-code: false - # Suggest the use of time.Month in time.Date. - # Default: false - time-date-month: true - # Suggest the use of time.Weekday.String(). - # Default: true - time-weekday: true - # Suggest the use of time.Month.String(). - # Default: false - time-month: true - # Suggest the use of time.Layout. - # Default: false - time-layout: true - # Suggest the use of crypto.Hash.String(). - # Default: false - crypto-hash: true - # Suggest the use of rpc.DefaultXXPath. - # Default: false - default-rpc-path: true - # Suggest the use of sql.LevelXX.String(). - # Default: false - sql-isolation-level: true - # Suggest the use of tls.SignatureScheme.String(). - # Default: false - tls-signature-scheme: true - # Suggest the use of constant.Kind.String(). - # Default: false - constant-kind: true - - usetesting: - # Enable/disable `os.CreateTemp("", ...)` detections. - # Default: true - os-create-temp: false - - # Enable/disable `os.MkdirTemp()` detections. - # Default: true - os-mkdir-temp: false - - # Enable/disable `os.Setenv()` detections. - # Default: true - os-setenv: false - - # Enable/disable `os.TempDir()` detections. - # Default: false - os-temp-dir: true - - # Enable/disable `os.Chdir()` detections. - # Disabled if Go < 1.24. - # Default: true - os-chdir: false - - # Enable/disable `context.Background()` detections. - # Disabled if Go < 1.24. - # Default: false - context-background: true - - # Enable/disable `context.TODO()` detections. - # Disabled if Go < 1.24. - # Default: false - context-todo: true - - unconvert: - # Remove conversions that force intermediate rounding. - # Default: false - fast-math: true - # Be more conservative (experimental). - # Default: false - safe: true - - unparam: - # Inspect exported functions. - # - # Set to true if no external program/library imports your code. - # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: - # if it's called for subdir of a project it can't find external interfaces. All text editor integrations - # with golangci-lint call it on a directory with the changed file. - # - # Default: false - check-exported: true - - unqueryvet: - # Enable SQL builder checking. - # Default: true - check-sql-builders: false - # Regex patterns for acceptable SELECT * usage. - # Default: - # - "SELECT \\* FROM information_schema\\..*" - # - "SELECT \\* FROM pg_catalog\\..*" - # - "SELECT COUNT\\(\\*\\)" - # - "SELECT MAX\\(\\*\\)" - # - "SELECT MIN\\(\\*\\)" - allowed-patterns: - - "SELECT \\* FROM temp_.*" - - "SELECT \\* FROM.*-- migration" - - unused: - # Mark all struct fields that have been written to as used. - # Default: true - field-writes-are-uses: false - # Treat IncDec statement (e.g. `i++` or `i--`) as both read and write operation instead of just write. - # Default: false - post-statements-are-reads: true - # Mark all exported fields as used. - # default: true - exported-fields-are-used: false - # Mark all function parameters as used. - # default: true - parameters-are-used: false - # Mark all local variables as used. - # default: true - local-variables-are-used: false - # Mark all identifiers inside generated files as used. - # Default: true - generated-is-used: false - - varnamelen: - # The longest distance, in source lines, that is being considered a "small scope". - # Variables used in at most this many lines will be ignored. - # Default: 5 - max-distance: 6 - # The minimum length of a variable's name that is considered "long". - # Variable names that are at least this long will be ignored. - # Default: 3 - min-name-length: 2 - # Check method receivers. - # Default: false - check-receiver: true - # Check named return values. - # Default: false - check-return: true - # Check type parameters. - # Default: false - check-type-param: true - # Ignore "ok" variables that hold the bool return value of a type assertion. - # Default: false - ignore-type-assert-ok: true - # Ignore "ok" variables that hold the bool return value of a map index. - # Default: false - ignore-map-index-ok: true - # Ignore "ok" variables that hold the bool return value of a channel receive. - # Default: false - ignore-chan-recv-ok: true - # Optional list of variable names that should be ignored completely. - # Default: [] - ignore-names: - - err - # Optional list of variable declarations that should be ignored completely. - # Entries must be in one of the following forms (see below for examples): - # - for variables, parameters, named return values, method receivers, or type parameters: - # ( can also be a pointer/slice/map/chan/...) - # - for constants: const - # - # Default: [] - ignore-decls: - - c echo.Context - - t testing.T - - f *foo.Bar - - e error - - i int - - const C - - T any - - m map[string]int - - whitespace: - # Enforces newlines (or comments) after every multi-line if statement. - # Default: false - multi-if: true - # Enforces newlines (or comments) after every multi-line function signature. - # Default: false - multi-func: true - - wrapcheck: - # An array of strings specifying additional substrings of signatures to ignore. - # Unlike 'ignore-sigs', this option extends the default set (or the set specified in 'ignore-sigs') without replacing it entirely. - # This allows you to add specific signatures to the ignore list - # while retaining the defaults or any items in 'ignore-sigs'. - # Default: [] - extra-ignore-sigs: - - .CustomError( - - .SpecificWrap( - - # An array of strings that specify substrings of signatures to ignore. - # If this set, it will override the default set of ignored signatures. - # See https://github.com/tomarrell/wrapcheck#configuration for more information. - # Default: [".Errorf(", "errors.New(", "errors.Unwrap(", "errors.Join(", ".Wrap(", ".Wrapf(", ".WithMessage(", ".WithMessagef(", ".WithStack("] - ignore-sigs: - - .Errorf( - - errors.New( - - errors.Unwrap( - - errors.Join( - - .Wrap( - - .Wrapf( - - .WithMessage( - - .WithMessagef( - - .WithStack( - # An array of strings that specify regular expressions of signatures to ignore. - # Default: [] - ignore-sig-regexps: - - \.New.*Error\( - # An array of strings that specify globs of packages to ignore. - # Default: [] - ignore-package-globs: - - encoding/* - - github.com/pkg/* - # An array of strings that specify regular expressions of interfaces to ignore. - # Default: [] - ignore-interface-regexps: - - ^(?i)c(?-i)ach(ing|e) - # Determines whether wrapcheck should report errors returned from inside the package. - # Default: false - report-internal-errors: true - - wsl: - # Do strict checking when assigning from append (x = append(x, y)). - # If this is set to true - the append call must append either a variable - # assigned, called or used on the line above. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#strict-append - # Default: true - strict-append: false - - # Allows assignments to be cuddled with variables used in calls on - # line above and calls to be cuddled with assignments of variables - # used in call on line above. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-assign-and-call - # Default: true - allow-assign-and-call: false - - # Allows assignments to be cuddled with anything. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-assign-and-anything - # Default: false - allow-assign-and-anything: true - - # Allows cuddling to assignments even if they span over multiple lines. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-multiline-assign - # Default: true - allow-multiline-assign: false - - # If the number of lines in a case block is equal to or lager than this number, - # the case *must* end white a newline. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-case-trailing-whitespace - # Default: 0 - force-case-trailing-whitespace: 1 - - # Allow blocks to end with comments. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-trailing-comment - # Default: false - allow-trailing-comment: true - - # Allow multiple comments in the beginning of a block separated with newline. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-separated-leading-comment - # Default: false - allow-separated-leading-comment: true - - # Allow multiple var/declaration statements to be cuddled. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-cuddle-declarations - # Default: false - allow-cuddle-declarations: true - - # A list of call idents that everything can be cuddled with. - # Defaults: [ "Lock", "RLock" ] - allow-cuddle-with-calls: [ "Foo", "Bar" ] - - # AllowCuddleWithRHS is a list of right hand side variables that is allowed - # to be cuddled with anything. - # Defaults: [ "Unlock", "RUnlock" ] - allow-cuddle-with-rhs: [ "Foo", "Bar" ] - - # Allow cuddling with any block as long as the variable is used somewhere in - # the block. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-cuddle-used-in-block - # Default: false - allow-cuddle-used-in-block: true - - # Causes an error when an If statement that checks an error variable doesn't - # cuddle with the assignment of that variable. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-err-cuddling - # Default: false - force-err-cuddling: true - - # When force-err-cuddling is enabled this is a list of names - # used for error variables to check for in the conditional. - # Default: [ "err" ] - error-variable-names: [ "foo" ] - - # Causes an error if a short declaration (:=) cuddles with anything other than - # another short declaration. - # This logic overrides force-err-cuddling among others. - # https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-short-decl-cuddling - # Default: false - force-short-decl-cuddling: true - - wsl_v5: - # Allow cuddling a variable if it's used first in the immediate following block, - # even if the statement with the block doesn't use the variable. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: true - allow-first-in-block: false - - # Same as above, - # but allows cuddling if the variable is used anywhere in the following (or nested) block. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: false - allow-whole-block: true - - # If a block contains more than this number of lines, - # the branch statement needs to be separated by whitespace. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: 2 - branch-max-lines: 4 - - # If set to a non-negative number, - # case blocks need to end with whitespace if exceeding this number - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#configuration - # Default: 0 - case-max-lines: 2 - - # Default checks to use. - # Can be `all`, `none`, `default` or empty. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#checks-and-configuration - # Default: "" - default: all - - # Enabled checks. - # Will be additive to any presets. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#checks-and-configuration - # Default: [] - enable: - - assign - - branch - - decl - - defer - - expr - - for - - go - - if - - inc-dec - - label - - range - - return - - select - - send - - switch - - type-switch - - append - - assign-exclusive - - assign-expr - - err - - leading-whitespace - - trailing-whitespace - - # Disable checks. - # Will be subtractive to any preset. - # https://github.com/bombsimon/wsl/tree/main?tab=readme-ov-file#checks-and-configuration - # Default: [] - disable: - - assign - - branch - - decl - - defer - - expr - - for - - go - - if - - inc-dec - - label - - range - - return - - select - - send - - switch - - type-switch - - append - - assign-exclusive - - assign-expr - - err - - leading-whitespace - - trailing-whitespace - - # The custom section can be used to define linter plugins to be loaded at runtime. - # See README documentation for more info. - custom: - # Each custom linter should have a unique name. - example: - # The plugin type. - # It can be `goplugin` or `module`. - # Default: goplugin - type: module - # The path to the plugin *.so. Can be absolute or local. - # Required for each custom linter. - path: /path/to/example.so - # The description of the linter. - # Optional. - description: This is an example usage of a plugin linter. - # Intended to point to the repo location of the linter. - # Optional. - original-url: github.com/golangci/example-linter - # Plugins settings/configuration. - # Only work with plugin based on `linterdb.PluginConstructor`. - # Optional. - settings: - foo: bar - - # Defines a set of rules to ignore issues. - # It does not skip the analysis, and so does not ignore "typecheck" errors. - exclusions: - # Mode of the generated files analysis. - # - # - `strict`: sources are excluded by strictly following the Go generated file convention. - # 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. - # https://go.dev/s/generatedcode - # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc. - # - `disable`: disable the generated files exclusion. - # - # Default: strict - generated: lax - # Log a warning if an exclusion rule is unused. - # Default: false - warn-unused: true - # Predefined exclusion rules. - # Default: [] - presets: - - comments - - std-error-handling - - common-false-positives - - legacy - - # Excluding configuration per-path, per-linter, per-text and per-source. - rules: - # Exclude some linters from running on tests files. - - path: _test\.go - linters: - - gocyclo - - errcheck - - dupl - - gosec - - # Run some linter only for test files by excluding its issues for everything else. - - path-except: _test\.go - linters: - - forbidigo - - # Exclude known linters from partially hard-vendored code, - # which is impossible to exclude via `nolint` comments. - # `/` will be replaced by the current OS file path separator to properly work on Windows. - - path: internal/hmac/ - text: "weak cryptographic primitive" - linters: - - gosec - - # Exclude some `staticcheck` messages. - - linters: - - staticcheck - text: "SA9003:" - - # Exclude `lll` issues for long lines with `go:generate`. - - linters: - - lll - source: "^//go:generate " - - # Which file paths to exclude: they will be analyzed, but issues from them won't be reported. - # "/" will be replaced by the current OS file path separator to properly work on Windows. - # Default: [] - paths: - - ".*\\.my\\.go$" - - lib/bad.go - # Which file paths to not exclude. - # Default: [] - paths-except: - - ".*\\.my\\.go$" - - lib/bad.go - -formatters: - # Enable specific formatter. - # Default: [] (uses standard Go formatting) - enable: - - gci - - gofmt - - gofumpt - - goimports - - golines - - swaggo - - # Formatters settings. - settings: - 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`. - # If `custom-order` is `true`, it follows the order of `sections` option. - # Default: ["standard", "default"] - sections: - - standard # Standard section: captures all standard packages. - - default # Default section: contains all imports that could not be matched to another section type. - - prefix(github.com/org/project) # Custom section: groups all imports with the specified Prefix. - - 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. - - # Checks that no inline comments are present. - # Default: false - no-inline-comments: true - - # Checks that no prefix comments (comment lines above an import) are present. - # Default: false - no-prefix-comments: true - - # Enable custom order of sections. - # If `true`, make the section order the same as the order of `sections`. - # Default: false - custom-order: true - - # Drops lexical ordering for custom sections. - # Default: false - no-lex-order: true - - gofmt: - # Simplify code: gofmt with `-s` option. - # Default: true - simplify: false - # Apply the rewrite rules to the source before reformatting. - # https://pkg.go.dev/cmd/gofmt - # Default: [] - rewrite-rules: - - pattern: 'interface{}' - replacement: 'any' - - pattern: 'a[b:len(a)]' - replacement: 'a[b:]' - - gofumpt: - # Module path which contains the source code being formatted. - # Default: "" - module-path: github.com/org/project - - # Choose whether to use the extra rules. - # Default: false - extra-rules: true - - goimports: - # A list of prefixes, which, if set, checks import paths - # with the given prefixes are grouped after 3rd-party packages. - # Default: [] - local-prefixes: - - github.com/org/project - - golines: - # Target maximum line length. - # Default: 100 - max-len: 200 - # Length of a tabulation. - # Default: 4 - tab-len: 8 - # Shorten single-line comments. - # Default: false - shorten-comments: true - # Default: true - reformat-tags: false - # Split chained methods on the dots as opposed to the arguments. - # Default: true - chain-split-dots: false - - exclusions: - # Log a warning if an exclusion path is unused. - # Default: false - warn-unused: true - # Mode of the generated files analysis. - # - # - `strict`: sources are excluded by strictly following the Go generated file convention. - # 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. - # https://go.dev/s/generatedcode - # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc. - # - `disable`: disable the generated files exclusion. - # - # Default: lax - generated: strict - # Which file paths to exclude. - # This option is ignored when using `--stdin` as the path is unknown. - # Default: [] - paths: - - ".*\\.my\\.go$" - - lib/bad.go - -issues: - # Maximum issues count per one linter. - # Set to 0 to disable. - # Default: 50 - max-issues-per-linter: 0 - - # Maximum count of issues with the same text. - # Set to 0 to disable. - # Default: 3 - max-same-issues: 0 - - # Make issues output unique by line. - # Default: true - uniq-by-line: false - - # Show only new issues: if there are unstaged changes or untracked files, - # only those changes are analyzed, else only changes in HEAD~ are analyzed. - # It's a super-useful option for integration of golangci-lint into existing large codebase. - # It's not practical to fix all existing issues at the moment of integration: - # much better don't allow issues in new code. - # - # Default: false - new: true - - # Show only new issues created after the best common ancestor (merge-base against HEAD). - # Default: "" - new-from-merge-base: main - - # Show only new issues created after git revision `REV`. - # Default: "" - new-from-rev: HEAD - - # Show only new issues created in git patch with set file path. - # Default: "" - new-from-patch: path/to/patch/file - - # Show issues in any part of update files (requires new-from-rev or new-from-patch). - # Default: false - whole-files: true - - # Fix found issues (if it's supported by the linter). - # Default: false - fix: true - - -# Output configuration options. -output: - # The formats used to render issues. - formats: - # Prints issues in a text format with colors, line number, and linter name. - # This format is the default format. - text: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.txt - # Print linter name in the end of issue text. - # Default: true - print-linter-name: false - # Print lines of code with issue. - # Default: true - print-issued-lines: false - # Use colors. - # Default: true - colors: false - # Prints issues in a JSON representation. - json: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.json - # Prints issues in columns representation separated by tabulations. - tab: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.txt - # Print linter name in the end of issue text. - # Default: true - print-linter-name: true - # Use colors. - # Default: true - colors: false - # Prints issues in an HTML page. - # It uses the Cloudflare CDN (cdnjs) and React. - html: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.html - # Prints issues in the Checkstyle format. - checkstyle: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.xml - # Prints issues in the Code Climate format. - code-climate: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.json - # Prints issues in the JUnit XML format. - junit-xml: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.xml - # Support extra JUnit XML fields. - # Default: false - extended: true - # Prints issues in the TeamCity format. - teamcity: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.txt - # Prints issues in the SARIF format. - sarif: - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # Default: stdout - path: ./path/to/output.json - - # Add a prefix to the output file references. - # This option is ignored when using `output.path-mode: abs` mode. - # Default: "" - path-prefix: "" - - # By default, the report are related to the path obtained by `run.relative-path-mode`. - # The mode `abs` allows to show absolute file paths instead of relative file paths. - # The option `output.path-prefix` is ignored when using `abs` mode. - # Default: "" - path-mode: "abs" - - # Order to use when sorting results. - # Possible values: `file`, `linter`, and `severity`. - # - # If the severity values are inside the following list, they are ordered in this order: - # 1. error - # 2. warning - # 3. high - # 4. medium - # 5. low - # Either they are sorted alphabetically. - # - # Default: ["linter", "file"] - sort-order: - - linter - - severity - - file # filepath, line, and column. - - # Show statistics per linter. - # Default: true - show-stats: false - - -# Options for analysis running. -run: - # Timeout for total work, e.g. 30s, 5m, 5m30s. - # If the value is lower or equal to 0, the timeout is disabled. - # Default: 0 (disabled) - timeout: 5m - - # The mode used to evaluate relative paths. - # It's used by exclusions, Go plugins, and some linters. - # The value can be: - # - `gomod`: the paths will be relative to the directory of the `go.mod` file. - # - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`). - # - `cfg`: the paths will be relative to the configuration file. - # - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run. - # Default: cfg - relative-path-mode: gomod - - # Exit code when at least one issue was found. - # Default: 1 - issues-exit-code: 2 - - # Include test files or not. - # Default: true - tests: false - - # List of build tags, all linters use it. - # Default: [] - build-tags: - - mytag - - # If set, we pass it to "go list -mod={option}". From "go help modules": - # If invoked with -mod=readonly, the go command is disallowed from the implicit - # automatic updating of go.mod described above. Instead, it fails when any changes - # to go.mod are needed. This setting is most useful to check that go.mod does - # not need updates, such as in a continuous integration and testing system. - # If invoked with -mod=vendor, the go command assumes that the vendor - # directory holds the correct copies of dependencies and ignores - # the dependency descriptions in go.mod. - # - # Allowed values: readonly|vendor|mod - # Default: "" - modules-download-mode: readonly - - # Allow multiple parallel golangci-lint instances running. - # If false, golangci-lint acquires file lock on start. - # Default: false - allow-parallel-runners: true - - # Allow multiple golangci-lint instances running, but serialize them around a lock. - # If false, golangci-lint exits with an error if it fails to acquire file lock on start. - # Default: false - allow-serial-runners: true - - # Define the Go version limit. - # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.22. - go: '1.23' - - # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. - # Default: 0 (automatically set to match Linux container CPU quota and - # fall back to the number of logical CPUs in the machine) - concurrency: 4 - - -severity: - # 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. - # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity - # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel - # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message - # - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance - # - # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...) - # - # Default: "" - default: error - - # When a list of severity rules are provided, severity information will be added to lint issues. - # Severity rules have the same filtering capability as exclude rules - # except you are allowed to specify one matcher per severity rule. - # - # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...) - # - # Only affects out formats that support setting severity information. - # - # Default: [] - rules: - - linters: - - dupl - severity: info diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index b9da446104fe..000000000000 --- a/.golangci.yml +++ /dev/null @@ -1,218 +0,0 @@ -# This configuration file is not a recommendation. -# -# We intentionally use a limited set of linters. -# This configuration file is used with different version of golangci-lint to avoid regressions: -# the linters can change between version, -# their configuration may be not compatible or their reports can be different, -# and this can break some of our tests. -# Also, some linters are not relevant for the project (e.g. linters related to SQL). -# -# 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. - -version: "2" - -linters: - default: none - # This list of linters is not a recommendation (same thing for all this configuration file). - # We intentionally use a limited set of linters. - # See the comment on top of this file. - enable: - - bodyclose - - copyloopvar - - depguard - - dogsled - - dupl - - errcheck - - errorlint - - funlen - - gocheckcompilerdirectives - - gochecknoinits - - goconst - - gocritic - - gocyclo - - godox - - mnd - - goprintffuncname - - gosec - - govet - - intrange - - ineffassign - - lll - - misspell - - nakedret - - noctx - - nolintlint - - revive - - staticcheck - - testifylint - - unconvert - - unparam - - unused - - whitespace - - settings: - depguard: - rules: - logger: - deny: - # logging is allowed only by logutils.Log, - - pkg: "github.com/sirupsen/logrus" - desc: logging is allowed only by logutils.Log. - - pkg: "github.com/pkg/errors" - desc: Should be replaced by standard lib errors package. - - pkg: "github.com/instana/testify" - desc: It's a fork of github.com/stretchr/testify. - files: - # logrus is allowed to use only in logutils package. - - "!**/pkg/logutils/**.go" - dupl: - threshold: 100 - funlen: - lines: -1 # the number of lines (code + empty lines) is not a right metric and leads to code without empty line or one-liner. - statements: 50 - goconst: - min-len: 2 - min-occurrences: 3 - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - disabled-checks: - - dupImport # https://github.com/go-critic/go-critic/issues/845 - - ifElseChain - - octalLiteral - - whyNoLint - gocyclo: - min-complexity: 15 - godox: - keywords: - - FIXME - mnd: - # don't include the "operation" and "assign" - checks: - - argument - - case - - condition - - return - ignored-numbers: - - '0' - - '1' - - '2' - - '3' - ignored-functions: - - strings.SplitN - govet: - settings: - printf: - funcs: - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Infof - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Warnf - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Errorf - - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Fatalf - enable: - - nilness - - shadow - errorlint: - asserts: false - lll: - line-length: 140 - misspell: - locale: US - ignore-rules: - - "importas" # linter name - nolintlint: - allow-unused: false # report any unused nolint directives - require-explanation: true # require an explanation for nolint directives - require-specific: true # require nolint directives to be specific about which linter is being skipped - revive: - rules: - - name: indent-error-flow - - name: unexported-return - disabled: true - - name: unused-parameter - - name: unused-receiver - - exclusions: - presets: - - comments - - std-error-handling - - common-false-positives - - legacy - paths: - - test/testdata_etc # test files - - internal/go # extracted from Go code - - internal/x # extracted from x/tools code - - pkg/goformatters/gci/internal # extracted from gci code - - pkg/goanalysis/runner_checker.go # extracted from x/tools code - rules: - - path: (.+)_test\.go - linters: - - dupl - - mnd - - lll - - # Based on existing code, the modifications should be limited to make maintenance easier. - - path: pkg/golinters/unused/unused.go - linters: [gocritic] - text: "rangeValCopy: each iteration copies 160 bytes \\(consider pointers or indexing\\)" - - # Related to the result of computation but divided multiple times by 1024. - - path: test/bench/bench_test.go - linters: [gosec] - text: "G115: integer overflow conversion uint64 -> int" - - # The files created during the tests don't need to be secured. - - path: scripts/website/expand_templates/linters_test.go - linters: [gosec] - text: "G306: Expect WriteFile permissions to be 0600 or less" - - # Related to migration command. - - path: pkg/commands/internal/migrate/two/ - linters: - - lll - - # Related to migration command. - - path: pkg/commands/internal/migrate/ - linters: - - gocritic - text: "hugeParam:" - - # The codes are close but this is not duplication. - - path: pkg/commands/(formatters|linters).go - linters: - - dupl - - # Deprecated linters - - path: pkg/lint/lintersdb/builder_linter.go - text: "SA1019: wsl.NewV4 is deprecated: use NewV5 instead." - linters: - - staticcheck - - path: pkg/golinters/wsl/wsl.go - text: "SA1019: config.WSLv4Settings is deprecated: use WSLv5Settings instead." - linters: - - staticcheck - -formatters: - enable: - - gofmt - - goimports - settings: - gofmt: - rewrite-rules: - - pattern: 'interface{}' - replacement: 'any' - goimports: - local-prefixes: - - github.com/golangci/golangci-lint/v2 - exclusions: - paths: - - test/testdata_etc # test files - - internal/go # extracted from Go code - - internal/x # extracted from x/tools code - - pkg/goformatters/gci/internal # extracted from gci code - - pkg/goanalysis/runner_checker.go # extracted from x/tools code diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 8153340cc9e6..000000000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,338 +0,0 @@ -version: 2 - -project_name: golangci-lint - -builds: - - binary: golangci-lint - main: ./cmd/golangci-lint/ - flags: - - -trimpath - ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} - env: - - CGO_ENABLED=0 - goos: - - darwin - - windows - - linux - - freebsd - - netbsd - - illumos - goarch: - - amd64 - - arm64 - - arm - - 386 - - ppc64le - - s390x - - mips64 - - mips64le - - riscv64 - - loong64 - goarm: - - 6 - - 7 - gomips: - - hardfloat - ignore: - - goos: darwin - goarch: 386 - -archives: - - formats: [ 'tar.gz' ] - wrap_in_directory: true - format_overrides: - - goos: windows - formats: [ 'zip' ] - name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - files: - - LICENSE - - README.md - -snapshot: - version_template: SNAPSHOT-{{ .Commit }} - -checksum: - disable: false - name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt' - -changelog: - sort: asc - filters: - exclude: - - '(?i)^docs?:' - - '(?i)^docs\([^:]+\):' - - '(?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 - -release: - skip_upload: false - github: - owner: golangci - name: golangci-lint - header: | - `golangci-lint` is a free and open-source project built by volunteers. - - If you value it, consider supporting us, the [maintainers](https://donate.golangci.org) and [linter authors](https://golangci-lint.run/docs/product/thanks/). - - We appreciate it! :heart: - - For key updates, see the [changelog](https://golangci-lint.run/docs/product/changelog/#{{ .Major }}{{ .Minor }}{{ .Patch }}). - -source: - enabled: true - name_template: '{{ .ProjectName }}-{{ .Version }}-source' - -brews: - - description: Fast linters runner for Go. - homepage: https://golangci.com - skip_upload: false - repository: - owner: golangci - name: homebrew-tap - commit_author: - name: golangci-releaser - email: 65486276+golangci-releaser@users.noreply.github.com - directory: Formula - install: | - bin.install "golangci-lint" - output = Utils.popen_read("#{bin}/golangci-lint completion bash") - (bash_completion/"golangci-lint").write output - output = Utils.popen_read("#{bin}/golangci-lint completion zsh") - (zsh_completion/"_golangci-lint").write output - output = Utils.popen_read("#{bin}/golangci-lint completion fish") - (fish_completion/"golangci-lint.fish").write output - prefix.install_metafiles - test: | - system "#{bin}/golangci-lint --version" - -#chocolateys: -# - summary: Fast linters Runner for Go -# description: | -# {{ .ProjectName }} installer package. -# Fast linters Runner for Go. -# project_url: https://golangci-lint.run -# skip_publish: false -# name: golangci-lint -# title: Golangci-lint -# owners: golangci -# authors: golangci -# copyright: 2024 GolangCI -# url_template: "https://github.com/golangci/golangci-lint/releases/download/%7B%7B%20.Tag%20%7D%7D/%7B%7B%20.ArtifactName%20%7D%7D" -# icon_url: "https://cdn.rawgit.com/golangci/golangci-lint/HEAD/assets/go.png" -# license_url: https://github.com/golangci/golangci-lint/blob/HEAD/LICENSE -# require_license_acceptance: false -# project_source_url: https://github.com/golangci/golangci-lint -# package_source_url: https://github.com/golangci/golangci-lint -# docs_url: https://golangci-lint.run -# bug_tracker_url: https://github.com/golangci/golangci-lint/issues -# tags: "go golang lint linter" -# release_notes: "https://github.com/golangci/golangci-lint/releases/tag/v%7B%7B%20.Version%20%7D%7D" -# api_key: "{{ .Env.CHOCOLATEY_API_KEY }}" -# source_repo: "https://push.chocolatey.org/" -# goamd64: v1 - -aurs: - - description: Fast linters runner for Go. - skip_upload: false - homepage: https://golangci.com - provides: - - "golangci-lint-bin" - maintainers: - - "Fernandez Ludovic " - license: GPL-3.0 - private_key: "{{ .Env.AUR_KEY }}" - git_url: "ssh://aur@aur.archlinux.org/golangci-lint-bin.git" - commit_author: - name: golangci-releaser - email: 65486276+golangci-releaser@users.noreply.github.com - package: |- - local x86_64=amd64 i686=386 aarch64=arm64 armv6h=armv6 armv7h=armv7 - cd "golangci-lint-${pkgver}-linux-${!CARCH}" - - # bin - install -Dm755 "./golangci-lint" "${pkgdir}/usr/bin/golangci-lint" - - # license - install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/golangci-lint/LICENSE" - - # completions - mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" - mkdir -p "${pkgdir}/usr/share/zsh/site-functions/" - mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/" - ./golangci-lint completion bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/golangci-lint" - ./golangci-lint completion zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_golangci-lint" - ./golangci-lint completion fish | install -Dm644 /dev/stdin "${pkgdir}/usr/share/fish/vendor_completions.d/golangci-lint.fish" - -snapcrafts: - - summary: Fast linters runner for Go. - description: | - It runs linters in parallel, uses caching, supports YAML configuration, integrates with all major IDEs, and includes over a hundred linters. - disable: false - publish: true - name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - grade: stable - confinement: classic - license: GPL-3.0 - base: core22 - -nfpms: - - description: Fast linters Runner for Go - homepage: https://golangci-lint.run/ - id: golangci-lint-nfpms - package_name: golangci-lint - file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - maintainer: "Golangci-lint Maintainers <65486276+golangci-releaser@users.noreply.github.com>" - license: GPLv3 - vendor: golangci - section: golang - formats: - - deb - - rpm - umask: 0o022 - overrides: - deb: - contents: - - src: LICENSE - dst: /usr/share/doc/golangci-lint/copyright - - src: README.md - dst: /usr/share/doc/golangci-lint/README.md - recommends: - - golang-go - rpm: - contents: - - src: LICENSE - dst: /usr/share/doc/golangci-lint/LICENSE - type: license - - src: README.md - dst: /usr/share/doc/golangci-lint/README.md - type: readme - recommends: - - /usr/bin/go - rpm: - group: Development/Tools - -docker_manifests: - # basic - - name_template: 'golangci/golangci-lint:latest' - image_templates: - - 'golangci/golangci-lint:{{ .Tag }}-amd64' - - 'golangci/golangci-lint:{{ .Tag }}-arm64' - - - name_template: 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}' - image_templates: - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-amd64' - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-arm64' - - - name_template: 'golangci/golangci-lint:{{ .Tag }}' - image_templates: - - 'golangci/golangci-lint:{{ .Tag }}-amd64' - - 'golangci/golangci-lint:{{ .Tag }}-arm64' - - # alpine - - name_template: 'golangci/golangci-lint:latest-alpine' - image_templates: - - 'golangci/golangci-lint:{{ .Tag }}-alpine-amd64' - - 'golangci/golangci-lint:{{ .Tag }}-alpine-arm64' - - - name_template: 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-alpine' - image_templates: - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-alpine-amd64' - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-alpine-arm64' - - - name_template: 'golangci/golangci-lint:{{ .Tag }}-alpine' - image_templates: - - 'golangci/golangci-lint:{{ .Tag }}-alpine-amd64' - - 'golangci/golangci-lint:{{ .Tag }}-alpine-arm64' - -dockers: - - use: buildx - skip_push: false - goos: linux - goarch: amd64 - dockerfile: build/buildx.Dockerfile - image_templates: - - 'golangci/golangci-lint:latest-amd64' - - 'golangci/golangci-lint:{{ .Tag }}-amd64' - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-amd64' - build_flag_templates: - - '--pull' - # https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys - - '--label=org.opencontainers.image.title={{.ProjectName}}' - - '--label=org.opencontainers.image.description=Fast linters Runner for Go' - - '--label=org.opencontainers.image.source={{.GitURL}}' - - '--label=org.opencontainers.image.url={{.GitURL}}' - - '--label=org.opencontainers.image.documentation=https://golangci-lint.run' - - '--label=org.opencontainers.image.created={{.Date}}' - - '--label=org.opencontainers.image.revision={{.FullCommit}}' - - '--label=org.opencontainers.image.version={{.Version}}' - - '--platform=linux/amd64' - - - use: buildx - goos: linux - goarch: arm64 - dockerfile: build/buildx.Dockerfile - image_templates: - - 'golangci/golangci-lint:latest-arm64' - - 'golangci/golangci-lint:{{ .Tag }}-arm64' - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-arm64' - build_flag_templates: - - '--pull' - # https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys - - '--label=org.opencontainers.image.title={{.ProjectName}}' - - '--label=org.opencontainers.image.description=Fast linters Runner for Go' - - '--label=org.opencontainers.image.source={{.GitURL}}' - - '--label=org.opencontainers.image.url={{.GitURL}}' - - '--label=org.opencontainers.image.documentation=https://golangci-lint.run' - - '--label=org.opencontainers.image.created={{.Date}}' - - '--label=org.opencontainers.image.revision={{.FullCommit}}' - - '--label=org.opencontainers.image.version={{.Version}}' - - '--platform=linux/arm64' - - - use: buildx - goos: linux - goarch: amd64 - dockerfile: build/buildx-alpine.Dockerfile - image_templates: - - 'golangci/golangci-lint:latest-alpine-amd64' - - 'golangci/golangci-lint:{{ .Tag }}-alpine-amd64' - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-alpine-amd64' - build_flag_templates: - - '--pull' - # https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys - - '--label=org.opencontainers.image.title={{.ProjectName}}' - - '--label=org.opencontainers.image.description=Fast linters Runner for Go' - - '--label=org.opencontainers.image.source={{.GitURL}}' - - '--label=org.opencontainers.image.url={{.GitURL}}' - - '--label=org.opencontainers.image.documentation=https://golangci-lint.run' - - '--label=org.opencontainers.image.created={{.Date}}' - - '--label=org.opencontainers.image.revision={{.FullCommit}}' - - '--label=org.opencontainers.image.version={{.Version}}' - - '--platform=linux/amd64' - - - use: buildx - goos: linux - goarch: arm64 - dockerfile: build/buildx-alpine.Dockerfile - image_templates: - - 'golangci/golangci-lint:latest-alpine-arm64' - - 'golangci/golangci-lint:{{ .Tag }}-alpine-arm64' - - 'golangci/golangci-lint:v{{ .Major }}.{{ .Minor }}-alpine-arm64' - build_flag_templates: - - '--pull' - # https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys - - '--label=org.opencontainers.image.title={{.ProjectName}}' - - '--label=org.opencontainers.image.description=Fast linters Runner for Go' - - '--label=org.opencontainers.image.source={{.GitURL}}' - - '--label=org.opencontainers.image.url={{.GitURL}}' - - '--label=org.opencontainers.image.documentation=https://golangci-lint.run' - - '--label=org.opencontainers.image.created={{.Date}}' - - '--label=org.opencontainers.image.revision={{.FullCommit}}' - - '--label=org.opencontainers.image.version={{.Version}}' - - '--platform=linux/arm64' diff --git a/pkg/commands/internal/migrate/testdata/json/empty.json b/.nojekyll similarity index 100% rename from pkg/commands/internal/migrate/testdata/json/empty.json rename to .nojekyll diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml deleted file mode 100644 index 9738d4b25755..000000000000 --- a/.pre-commit-hooks.yaml +++ /dev/null @@ -1,31 +0,0 @@ -- id: golangci-lint - name: golangci-lint - description: Fast linters runner for Go. Note that only modified files are linted, so linters like 'unused' that need to scan all files won't work as expected. - entry: golangci-lint run --new-from-rev HEAD --fix - types: [go] - language: golang - require_serial: true - pass_filenames: false -- id: golangci-lint-full - name: golangci-lint-full - description: Fast linters runner for Go. Runs on all files in the module. Use this hook if you use pre-commit in CI. - entry: golangci-lint run --fix - types: [go] - language: golang - require_serial: true - pass_filenames: false -- id: golangci-lint-fmt - name: golangci-lint-fmt - description: Fast linters runner for Go. Formats all files in the repo. - entry: golangci-lint fmt - types: [go] - language: golang - require_serial: true - pass_filenames: false -- id: golangci-lint-config-verify - name: golangci-lint-config-verify - description: Verifies the configuration file - entry: golangci-lint config verify - files: '\.golangci\.(?:yml|yaml|toml|json)' - language: golang - pass_filenames: false diff --git a/404.html b/404.html new file mode 100644 index 000000000000..eb0bc96270e5 --- /dev/null +++ b/404.html @@ -0,0 +1,68 @@ +404 Page not found – Golangci-lint
New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
\ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 908de70c2e75..000000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,2027 +0,0 @@ -Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint) and on [Bluesky](https://bsky.app/profile/golangci-lint.run). - -`golangci-lint` is a free and open-source project built by volunteers. - -If you value it, consider supporting us, we appreciate it! - -[![Donate](https://img.shields.io/badge/Donate-❤️-blue?style=for-the-badge)](https://donate.golangci.org) - - - -### v2.5.0 - -1. New linters - * Add `godoclint` linter https://github.com/godoc-lint/godoc-lint - * Add `unqueryvet` linter https://github.com/MirrexOne/unqueryvet - * Add `iotamixing` linter https://github.com/AdminBenni/iota-mixing -2. Linters new features or changes - * `embeddedstructfieldcheck`: from 0.3.0 to 0.4.0 (new option: `empty-line`) - * `err113`: from aea10b59be24 to 0.1.1 (skip internals of `Is` methods for `error` type) - * `ginkgolinter`: from 0.20.0 to 0.21.0 (new option: `force-tonot`) - * `gofumpt`: from 0.8.0 to 0.9.1 (new rule is to "clothe" naked returns for the sake of clarity) - * `ineffassign`: from 0.1.0 to 0.2.0 (new option: `check-escaping-errors`) - * `musttag`: from 0.13.1 to 0.14.0 (support interface methods) - * `revive`: from 1.11.0 to 1.12.0 (new options: `identical-ifelseif-branches`, `identical-ifelseif-conditions`, `identical-switch-branches`, `identical-switch-conditions`, `package-directory-mismatch`, `unsecure-url-scheme`, `use-waitgroup-go`, `useless-fallthrough`) - * `thelper`: from 0.6.3 to 0.7.1 (skip `t.Helper` in functions passed to `synctest.Test`) - * `wsl`: from 5.1.1 to 5.2.0 (improvements related to subexpressions) -3. Linters bug fixes - * `asciicheck`: from 0.4.1 to 0.5.0 - * `errname`: from 1.1.0 to 1.1.1 - * `fatcontext`: from 0.8.0 to 0.8.1 - * `go-printf-func-name`: from 0.1.0 to 0.1.1 - * `godot`: from 1.5.1 to 1.5.4 - * `gosec`: from 2.22.7 to 2.22.8 - * `nilerr`: from 0.1.1 to a temporary fork - * `nilnil`: from 1.1.0 to 1.1.1 - * `protogetter`: from 0.3.15 to 0.3.16 - * `tagliatelle`: from 0.7.1 to 0.7.2 - * `testifylint`: from 1.6.1 to 1.6.4 -4. Misc. - * fix: "no export data" errors are now handled as a standard typecheck error -5. Documentation - * Improve nolint section about syntax - -### v2.4.0 - -1. Enhancements - * 🎉 go1.25 support -2. Linters new features or changes - * `exhaustruct`: from v3.3.1 to 4.0.0 (new options: `allow-empty`, `allow-empty-rx`, `allow-empty-returns`, `allow-empty-declarations`) -3. Linters bug fixes - * `godox`: trim filepath from report messages - * `staticcheck`: allow empty options - * `tagalign`: from 1.4.2 to 1.4.3 -4. Documentation - * 🌟 New website (with a search engine) - -### v2.3.1 - -1. Linters bug fixes - * `gci`: from 0.13.6 to 0.13.7 - * `gosec`: from 2.22.6 to 2.22.7 - * `noctx`: from 0.3.5 to 0.4.0 - * `wsl`: from 5.1.0 to 5.1.1 - * tagliatelle: force upper case for custom initialisms - -### v2.3.0 - -1. Linters new features or changes - * `ginkgolinter`: from 0.19.1 to 0.20.0 (new option: `force-assertion-description`) - * `iface`: from 1.4.0 to 1.4.1 (report message improvements) - * `noctx`: from 0.3.4 to 0.3.5 (new detections: `log/slog`, `exec`, `crypto/tls`) - * `revive`: from 1.10.0 to 1.11.0 (new rule: `enforce-switch-style`) - * `wsl`: from 5.0.0 to 5.1.0 -2. Linters bug fixes - * `gosec`: from 2.22.5 to 2.22.6 - * `noinlineerr`: from 1.0.4 to 1.0.5 - * `sloglint`: from 0.11.0 to 0.11.1 -3. Misc. - * fix: panic close of closed channel - -### v2.2.2 - -1. Linters bug fixes - * `noinlineerr`: from 1.0.3 to 1.0.4 -2. Documentation - * Improve debug keys documentation -3. Misc. - * fix: panic close of closed channel - * godot: add noinline value into the JSONSchema - -### v2.2.1 - -1. Linters bug fixes - * `varnamelen`: fix configuration - -### v2.2.0 - -1. New linters - * Add `arangolint` linter https://github.com/Crocmagnon/arangolint - * Add `embeddedstructfieldcheck` linter https://github.com/manuelarte/embeddedstructfieldcheck - * Add `noinlineerr` linter https://github.com/AlwxSin/noinlineerr - * Add `swaggo` formatter https://github.com/golangci/swaggoswag -2. Linters new features or changes - * `errcheck`: add `verbose` option - * `funcorder`: from 0.2.1 to 0.5.0 (new option `alphabetical`) - * `gomoddirectives`: from 0.6.1 to 0.7.0 (new option `ignore-forbidden`) - * `iface`: from 1.3.1 to 1.4.0 (new option `unexported`) - * `noctx`: from 0.1.0 to 0.3.3 (new report messages, and new rules related to `database/sql`) - * `noctx`: from 0.3.3 to 0.3.4 (new SQL functions detection) - * `revive`: from 1.9.0 to 1.10.0 (new rules: `time-date`, `unnecessary-format`, `use-fmt-print`) - * `usestdlibvars`: from 1.28.0 to 1.29.0 (new option `time-date-month`) - * `wsl`: deprecation - * `wsl_v5`: from 4.7.0 to 5.0.0 (major version with new configuration) -3. Linters bug fixes - * `dupword`: from 0.1.3 to 0.1.6 - * `exptostd`: from 0.4.3 to 0.4.4 - * `forbidigo`: from 1.6.0 to 2.1.0 - * `gci`: consistently format the code - * `go-spancheck`: from 0.6.4 to 0.6.5 - * `goconst`: from 1.8.1 to 1.8.2 - * `gosec`: from 2.22.3 to 2.22.4 - * `gosec`: from 2.22.4 to 2.22.5 - * `makezero`: from 1.2.0 to 2.0.1 - * `misspell`: from 0.6.0 to 0.7.0 - * `usetesting`: from 0.4.3 to 0.5.0 -4. Misc. - * exclusions: fix `path-expect` - * formatters: write the input to `stdout` when using `stdin` and there are no changes - * migration: improve the error message when trying to migrate a migrated config - * `typecheck`: deduplicate errors - * `typecheck`: stops the analysis after the first error - * Deprecate `print-resources-usage` flag - * Unique version per custom build -5. Documentation - * Improves typecheck FAQ - * Adds plugin systems recommendations - * Add description for `linters.default` sets - -### v2.1.6 - -1. Linters bug fixes - * `godot`: from 1.5.0 to 1.5.1 - * `musttag`: from 0.13.0 to 0.13.1 -2. Documentation - * Add note about golangci-lint v2 integration in VS Code - -### v2.1.5 - -Due to an error related to Snapcraft, some artifacts of the v2.1.4 release have not been published. - -This release contains the same things as v2.1.3. - -### v2.1.4 - -Due to an error related to Snapcraft, some artifacts of the v2.1.3 release have not been published. - -This release contains the same things as v2.1.3. - -### v2.1.3 - -1. Linters bug fixes - * `fatcontext`: from 0.7.2 to 0.8.0 -2. Misc. - * migration: fix `nakedret.max-func-lines: 0` - * migration: fix order of `staticcheck` settings - * fix: add `go.mod` hash to the cache salt - * fix: use diagnostic position for related information position - -### v2.1.2 - -1. Linters bug fixes - * `exptostd`: from 0.4.2 to 0.4.3 - * `gofumpt`: from 0.7.0 to 0.8.0 - * `protogetter`: from 0.3.13 to 0.3.15 - * `usetesting`: from 0.4.2 to 0.4.3 - -### v2.1.1 - -The release process of v2.1.0 failed due to a regression inside goreleaser. - -The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Docker, etc.). - -### v2.1.0 - -1. Enhancements - * Add an option to display absolute paths (`--path-mode=abs`) - * Add configuration path placeholder (`${config-path}`) - * Add `warn-unused` option for `fmt` command - * Colored diff for `fmt` command (`golangci-lint fmt --diff-colored`) -2. New linters - * Add `funcorder` linter https://github.com/manuelarte/funcorder -3. Linters new features or changes - * `go-errorlint`: from 1.7.1 to 1.8.0 (automatic error comparison and type assertion fixes) - * ⚠️ `goconst`: `ignore-strings` is deprecated and replaced by `ignore-string-values` - * `goconst`: from 1.7.1 to 1.8.1 (new options: `find-duplicates`, `eval-const-expressions`) - * `govet`: add `httpmux` analyzer - * `nilnesserr`: from 0.1.2 to 0.2.0 (detect more cases) - * `paralleltest`: from 1.0.10 to 1.0.14 (checks only `_test.go` files) - * `revive`: from 1.7.0 to 1.9.0 (support kebab case for setting names) - * `sloglint`: from 0.9.0 to 0.11.0 (autofix, new option `msg-style`, suggest `slog.DiscardHandler`) - * `wrapcheck`: from 2.10.0 to 2.11.0 (new option `report-internal-errors`) - * `wsl`: from 4.6.0 to 4.7.0 (cgo files are always excluded) -4. Linters bug fixes - * `fatcontext`: from 0.7.1 to 0.7.2 - * `gocritic`: fix `importshadow` checker - * `gosec`: from 2.22.2 to 2.22.3 - * `ireturn`: from 0.3.1 to 0.4.0 - * `loggercheck`: from 0.10.1 to 0.11.0 - * `nakedret`: from 2.0.5 to 2.0.6 - * `nonamedreturns`: from 1.0.5 to 1.0.6 - * `protogetter`: from 0.3.12 to 0.3.13 - * `testifylint`: from 1.6.0 to 1.6.1 - * `unconvert`: update to HEAD -5. Misc. - * Fixes memory leaks when using go1.(N) with golangci-lint built with go1.(N-X) - * Adds `golangci-lint-fmt` pre-commit hook -6. Documentation - * Improvements - * Updates section about vscode integration - -### v2.0.2 - -1. Misc. - * Fixes flags parsing for formatters - * Fixes the filepath used by the exclusion `source` option -2. Documentation - * Adds a section about flags migration - * Cleaning pages with v1 options - -### v2.0.1 - -1. Linters/formatters bug fixes - * `golines`: fix settings during linter load -2. Misc. - * Validates the `version` field before the configuration - * `forbidigo`: fix migration - -### v2.0.0 - -1. Enhancements - * 🌟 New `golangci-lint fmt` command with dedicated [formatter configuration](https://golangci-lint.run/docs/welcome/quick-start/#formatting) - * ♻️ New `golangci-lint migrate` command to help migration from v1 to v2 (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#command-migrate)) - * ⚠️ New default values (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/)) - * ⚠️ No exclusions by default (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#issuesexclude-use-default)) - * ⚠️ New default sort order (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#outputsort-order)) - * 🌟 New option `run.relative-path-mode` (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#runrelative-path-mode)) - * 🌟 New linters configuration (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#linters)) - * 🌟 New output format configuration (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#output)) - * 🌟 New `--fast-only` flag (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#lintersfast)) - * 🌟 New option `linters.exclusions.warn-unused` to log a warning if an exclusion rule is unused. -2. New linters/formatters - * Add `golines` formatter https://github.com/segmentio/golines -3. Linters new features - * ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter (`staticcheck`) (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck)) - * `go-critic`: from 0.12.0 to 0.13.0 - * `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect dependencies) - * `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`) - * `perfsprint`: from 0.8.2 to 0.9.1 (checker name in the diagnostic message) - * `staticcheck`: new `quickfix` set of rules - * `testifylint`: from 1.5.2 to 1.6.0 (new options: `equal-values`, `suite-method-signature`, `require-string-msg`) - * `wsl`: from 4.5.0 to 4.6.0 (new option: `allow-cuddle-used-in-block`) -4. Linters bug fixes - * `bidichk`: from 0.3.2 to 0.3.3 - * `errchkjson`: from 0.4.0 to 0.4.1 - * `errname`: from 1.0.0 to 1.1.0 - * `funlen`: fix `ignore-comments` option - * `gci`: from 0.13.5 to 0.13.6 - * `gosmopolitan`: from 1.2.2 to 1.3.0 - * `inamedparam`: from 0.1.3 to 0.2.0 - * `intrange`: from 0.3.0 to 0.3.1 - * `protogetter`: from 0.3.9 to 0.3.12 - * `unparam`: from 8a5130ca722f to 0df0534333a4 -5. Misc. - * 🧹 Configuration options renaming (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/)) - * 🧹 Remove options (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/)) - * 🧹 Remove flags (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/)) - * 🧹 Remove alternative names (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/#alternative-linter-names)) - * 🧹 Remove or replace deprecated elements (cf. [Migration guide](https://golangci-lint.run/docs/product/migration-guide/)) - * Adds an option to display some commands as JSON: - * `golangci-lint config path --json` - * `golangci-lint help linters --json` - * `golangci-lint help formatters --json` - * `golangci-lint linters --json` - * `golangci-lint formatters --json` - * `golangci-lint version --json` -6. Documentation - * [Migration guide](https://golangci-lint.run/docs/product/migration-guide/) - -### v1.64.8 - -* Detects use of configuration files from golangci-lint v2 - -### v1.64.7 - -1. Linters bug fixes - * `depguard`: from 2.2.0 to 2.2.1 - * `dupl`: from 3e9179ac440a to f665c8d69b32 - * `gosec`: from 2.22.1 to 2.22.2 - * `staticcheck`: from 0.6.0 to 0.6.1 -2. Documentation - * Add GitLab documentation - -### v1.64.6 - -1. Linters bug fixes - * `asciicheck`: from 0.4.0 to 0.4.1 - * `contextcheck`: from 1.1.5 to 1.1.6 - * `errcheck`: from 1.8.0 to 1.9.0 - * `exptostd`: from 0.4.1 to 0.4.2 - * `ginkgolinter`: from 0.19.0 to 0.19.1 - * `go-exhaustruct`: from 3.3.0 to 3.3.1 - * `gocheckcompilerdirectives`: from 1.2.1 to 1.3.0 - * `godot`: from 1.4.20 to 1.5.0 - * `perfsprint`: from 0.8.1 to 0.8.2 - * `revive`: from 1.6.1 to 1.7.0 - * `tagalign`: from 1.4.1 to 1.4.2 - -### v1.64.5 - -1. Bug fixes - * Add missing flag `new-from-merge-base-flag` -2. Linters bug fixes - * `asciicheck`: from 0.3.0 to 0.4.0 - * `forcetypeassert`: from 0.1.0 to 0.2.0 - * `gosec`: from 2.22.0 to 2.22.1 - -### v1.64.4 - -1. Linters bug fixes - * `gci`: fix standard packages list for go1.24 - -### v1.64.3 - -1. Linters bug fixes - * `ginkgolinter`: from 0.18.4 to 0.19.0 - * `go-critic`: from 0.11.5 to 0.12.0 - * `revive`: from 1.6.0 to 1.6.1 - * `gci`: fix standard packages list for go1.24 -2. Misc. - * Build Docker images with go1.24 - -### v1.64.2 - -This is the last minor release of golangci-lint v1. -The next release will be golangci-lint [v2](https://github.com/golangci/golangci-lint/issues/5300). - -1. Enhancements - * 🎉 go1.24 support - * New `issues.new-from-merge-base` option - * New `run.relative-path-mode` option -2. Linters new features - * `copyloopvar`: from 1.1.0 to 1.2.1 (support suggested fixes) - * `exptostd`: from 0.3.1 to 0.4.1 (handles `golang.org/x/exp/constraints.Ordered`) - * `fatcontext`: from 0.5.3 to 0.7.1 (new option: `check-struct-pointers`) - * `perfsprint`: from 0.7.1 to 0.8.1 (new options: `integer-format`, `error-format`, `string-format`, `bool-format`, and `hex-format`) - * `revive`: from 1.5.1 to 1.6.0 (new rules: `redundant-build-tag`, `use-errors-new`. New option `early-return.early-return`) -3. Linters bug fixes - * `go-errorlint`: from 1.7.0 to 1.7.1 - * `gochecknoglobals`: from 0.2.1 to 0.2.2 - * `godox`: from 006bad1f9d26 to 1.1.0 - * `gosec`: from 2.21.4 to 2.22.0 - * `iface`: from 1.3.0 to 1.3.1 - * `nilnesserr`: from 0.1.1 to 0.1.2 - * `protogetter`: from 0.3.8 to 0.3.9 - * `sloglint`: from 0.7.2 to 0.9.0 - * `spancheck`: fix default `StartSpanMatchersSlice` values - * `staticcheck`: from 0.5.1 to 0.6.0 -4. Deprecations - * ⚠️ `tenv` is deprecated and replaced by `usetesting.os-setenv: true`. - * ⚠️ `exportloopref` deprecation step 2 -5. Misc. - * Sanitize severities by output format - * Avoid panic with plugin without description -6. Documentation - * Clarify `depguard` configuration - -### v1.64.1 - -Cancelled due to CI failure. - -### v1.64.0 - -Cancelled due to CI failure. - -### v1.63.4 - -1. Linters bug fixes - * `dupl`, `gomodguard`, `revive`: keep only Go-files. - -### v1.63.3 - -1. Linters bug fixes - * `gofmt`, `gofumpt`, `goimports`, `gci`: panic with several trailing EOL - * `goheader`: skip issues with invalid positions - -### v1.63.2 - -1. Linters bug fixes - * `gofmt`, `gofumpt`, `goimports`, `gci`: panic with missing trailing EOL - -### v1.63.1 - -1. Linters bug fixes - * `cgi`: invalid reports with cgo - * `gofumpt`: panic with autofix and cgo - -### v1.63.0 - -1. Enhancements - * Add support for SuggestedFixes 🎉 (35 linters can "autofix" reports). - * Formatters (`gofmt`, `goimports`, `gofumpt`, `gci`) are applied after the suggested fixes. -2. New linters - * Add `exptostd` linter https://github.com/ldez/exptostd - * Add `nilnesserr` linter https://github.com/alingse/nilnesserr - * Add `usetesting` linter https://github.com/ldez/usetesting -3. Linters new features - * `gci`: new options: `no-inline-comments`, `no-prefix-comments` - * `gomoddirectives`: from 0.2.4 to 0.6.0 (new options: `go-version-pattern`, `toolchain-pattern`,`toolchain-forbidden`, `tool-forbidden`, `go-debug-forbidden`) - * `govet`: new `stdversion`, `waitgroup` analyzers - * `importas`: allow multiple empty aliases - * `loggercheck`: new `slog` option - * `recvcheck`: from 0.1.2 to 0.2.0 (new options: `disable-builtin`, `exclusions`) - * `tagliatelle`: from 0.5.0 to 0.7.1 (new options: `ignored-fields`, `extended-rules`,`overrides`, `pkg`, `ignore`) - * `usestdlibvars`: from 1.27.0 to 1.28.0 (autofix) - * `wrapcheck`: from 2.9.0 to 2.10.0 (new option: `extra-ignore-sigs`) -4. Linters bug fixes - * `asciicheck`: from 0.2.0 to 0.3.0 - * `bodyclose`: from 574207250966 to ed6a65f985e - * `funlen`: from 0.1.0 to 0.2.0 - * `ginkgolinter`: from 0.18.3 to 0.18.4 - * `gochecksumtype`: from 0.2.0 to 0.3.1 - * `gocognit`: from 1.1.3 to 1.2.0 - * `godot`: from 1.4.18 to 1.4.20 - * `goheader`: report position improvement - * `gosec`: handling of global nosec option when it is false - * `iface`: from 1.2.1 to 1.3.0 - * `importas`: from 0.1.0 to 0.2.0 - * `intrange`: from 0.2.1 to 0.3.0 - * `makezero`: from 1.1.1 to 1.2.0 - * `mirror`: from 1.2.0 to 1.3.0 - * `nilnil`: from 1.0.0 to 1.0.1 - * `nosprintfhostport`: from 0.1.1 to 0.2.0 - * `reassign`: from 0.2.0 to 0.3.0 - * `spancheck`: from 0.6.2 to 0.6.4 - * `tagalign`: from 1.3.4 to 1.4.1 - * `wastedassign`: from 2.0.7 to 2.1.0 - * `whitespace`: from 0.1.1 to 0.2.0 - * `wsl`: from 4.4.1 to 4.5.0 -5. Deprecations - * ⚠️ `output.uniq-by-line` is deprecated and replaced by `issues.uniq-by-line`. -6. Misc. - * Improvements of the help command (color and JSON support). - * Removes `decoder`, `sloglint`, `tagalign` from `format` preset. - * Enables paths with junction inside Windows. - * The timeout is disabled if `run.timeout` <= 0. - -### v1.62.2 - -1. Linters bug fixes - * `fatcontext`: from 0.5.2 to 0.5.3 - * `ginkgolinter`: from 0.18.0 to 0.18.3 - * `errorlint`: from 1.6.0 to 1.7.0 - * `iface`: from 1.2.0 to 1.2.1 - * `revive`: from 1.5.0 to 1.5.1 - * `testifylint`: from 1.5.0 to 1.5.2 -2. Misc. - * fix: ignore cache error when file not found - -### v1.62.1 - -Cancelled due to CI failure. - -### v1.62.0 - -1. New linters - * Add `recvcheck` linter https://github.com/raeperd/recvcheck - * Add `iface` linter https://github.com/uudashr/iface -2. Linters new features - * `ginkgolinter`: from 0.17.0 to 0.18.0 (new option: `force-succeed`) - * `gochecksumtype`: from 0.1.4 to 0.2.0 (new option: `default-signifies-exhaustive`) - * `loggercheck`: from 0.9.4 to 0.10.1 (`log/slog` support) - * `nilnil`: from 0.1.9 to 1.0.0 (new option: `detect-opposite`) - * `revive`: from 1.3.9 to 1.5.0 (new rules: `filename-format`, and `file-length-limit`) - * `tenv`: from 1.10.0 to 1.12.1 (handle dot import) - * `testifylint`: from 1.4.3 to 1.5.0 (new checkers: `contains`, `encoded-compare`, `regexp`) -3. Linters bug fixes - * `bidichk`: from 0.2.7 to 0.3.2 (important performance improvement) - * `canonicalheader`: from 1.1.1 to 1.1.2 - * `cyclop`: from 1.2.1 to 1.2.3 - * `dupword`: from 0.1.1 to 0.1.3 - * `errcheck`: from 1.7.0 to 1.8.0 - * `errchkjson`: from 0.3.6 to 0.4.0 - * `errname`: from 0.1.13 to 1.0.0 - * `gocritic`: from 0.11.4 to 0.11.5 - * `goprintffuncname`: from 7558a9eaa5af to v0.1.0 - * `godot`: from 1.4.17 to 1.4.18 - * `gosec`: from 2.21.2 to 2.21.4 - * `intrange`: from 0.2.0 to 0.2.1 - * `musttag`: from 0.12.2 to 0.13.0 - * `nakedret`: from 2.0.4 to 2.0.5 - * `noctx`: from 0.0.2 to 0.1.0 - * `protogetter`: from 0.3.6 to 0.3.8 -4. Deprecations - * ⚠️ `execinquery`: deprecation step 2 - * ⚠️ `gomnd`: deprecation step 2 (replaced by `mnd`) -5. Misc. - * Type sizing when cross-compiling (32-bit). - * code-climate: add check_name field - * Improve Go version detection - * Fix Go version propagation -6. Documentation - * Adds a section about `exclude-dirs-use-default` - * Improve 'install from sources' section - * Improve FAQ about Go versions - * Improve linter/rule/check docs - * Improve new linter section - * Improve `forbidigo` pattern examples for built-in functions - -### v1.61.0 - -1. Enhancements - * Add `junit-xml-extended` format - * Exclude Swagger Codegen files by default -2. Linters new features - * `gci`: from 0.13.4 to 0.13.5 (new option `no-lex-order`) - * `nolintlint`: remove the empty line in the directive replacement -3. Linters bug fixes - * `dupword`: from 0.0.14 to 0.1.1 - * `fatcontext`: from 0.4.0 to 0.5.2 - * `go-ruleguard`: from 0.4.2 to 0fe6f58b47b1 (fix panic with custom linters) - * `godot`: from 1.4.16 to 1.4.17 - * `gomodguard`: from 1.3.3 to 1.3.5 - * `gosec`: disable temporarily `G407` - * `gosec`: from ab3f6c1c83a0 to 2.21.2 (partially fix `G115`) - * `intrange`: from 0.1.2 to 0.2.0 -4. Misc. - * Improve runtime version parsing -5. Documentation - * Add additional info about `typecheck` - -### v1.60.3 - -1. Updated linters - * `gosec`: from 81cda2f91fbe to ab3f6c1c83a0 (fix `G115` false positives) -2. Misc. - * Check that the Go version use to build is greater or equals to the Go version of the project - -### v1.60.2 - -1. Linters new features - * `gosec`: from 5f0084eb01a9 to 81cda2f91fbe (adds `G115`, `G405`, `G406`, `G506`, `G507`) -2. Linters bug fixes - * `gofmt`: update to HEAD (go1.22) - * `gofumpt`: from 0.6.0 to 0.7.0 - * `gosec`: fix G602 analyzer - * `staticcheck`: from 0.5.0 to 0.5.1 - * `staticcheck`: propagate Go version - * `wrapcheck`: from 2.8.3 to 2.9.0 -3. Deprecations - * ⚠️ `exportloopref`: deprecation - -### v1.60.1 - -1. Misc. - * 🎉 go1.23 support -2. Linters new features - * `exhaustruct`: from 3.2.0 to 3.3.0 (recognize custom error values in return) - * `govet` (`printf`): report non-constant format, no args - * `lll`: advertise max line length instead of just reporting failure - * `revive`: from 1.3.7 to 1.3.9 (new rule: `comments-density`) - * `staticcheck`: from 0.4.7 to 0.5.0 - * `testifylint`: from 1.3.1 to 1.4.3 (new options: `formatter`, `suite-broken-parallel`, `suite-subtest-run`) -3. Linters bug fixes - * `errorlint`: from 1.5.2 to 1.6.0 - * `fatcontext`: from 0.2.2 to 0.4.0 (fix false positives for context stored in structs) - * `gocognit`: from 1.1.2 to 1.1.3 - * `gomodguard`: from 1.3.2 to 1.3.3 - * `sloglint`: from 0.7.1 to 0.7.2 - * `spancheck`: from 0.6.1 to 0.6.2 - * `tenv`: from 1.7.1 to 1.10.0 (remove reports on fuzzing) - * `tparallel`: from 0.3.1 to 0.3.2 - * `usestdlibvars`: from 1.26.0 to 1.27.0 (fix false-positive with number used inside a mathematical operations) - * `wsl`: from 4.2.1 to 4.4.1 -4. Deprecations - * ️⚠️ `unused`: remove `exported-is-used` option -5. Fixes - * SARIF: sanitize level property - * ️⚠️ `typecheck` issues should never be ignored -6. Documentation - * Add link on linter without configuration - * Remove 'trusted by' page - * `wsl` update documentation of the configuration - -### v1.60.0 - -Cancelled due to a CI problem. - -### v1.59.1 - -1. Updated linters - * `errorlint`: from 1.5.1 to 1.5.2 - * `gomnd`: deprecated configuration compatibility - * `intrange`: add `style` preset - * `misspell`: from 0.5.1 to 0.6.0 - * `sloglint`: from 0.7.0 to 0.7.1 - * `testifylint`: from 1.3.0 to 1.3.1 - * `unparam`: bump to HEAD - * `usestdlibvars`: from 1.25.0 to 1.26.0 -2. Fixes - * SARIF: init empty result slice - * SARIF: issue column >= 1 -3. Documentation - * `revive`: update documentation of the configuration - -### 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 - * `gocritic`: 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 - -1. Updated linters - * `canonicalheader`: from 1.0.6 to 1.1.1 - * `gosec`: from 2.19.0 to 2.20.0 - * `musttag`: from 0.12.1 to 0.12.2 - * `nilnil`: from 0.1.8 to 0.1.9 -2. Documentation - * Improve integrations and install pages - -### v1.58.1 - -1. Updated linters - * `tagalign`: from 1.3.3 to 1.3.4 - * `protogetter`: from 0.3.5 to 0.3.6 - * `gochecknoinits`: fix analyzer name -2. Fixes - * Restores previous `github-actions` output format (removes GitHub Action problem matchers) - -### v1.58.0 - -1. New linters - * `fatcontext`: https://github.com/Crocmagnon/fatcontext - * `canonicalheader`: https://github.com/lasiar/canonicalheader -2. Updated linters - * `copyloopvar`: from 1.0.10 to 1.1.0 (`ignore-alias` is replaced by `check-alias` with the opposite behavior) - * `decorder`: from 0.4.1 to 0.4.2 - * `errname`: from 0.1.12 to 0.1.13 - * `errorlint`: from 1.4.8 to 1.5.1 (new options `allowed-errors` and `allowed-errors-wildcard`) - * `execinquery`: deprecate linter ⚠️ - * `gci`: from 0.12.3 to 0.13.4 (new section `localModule`) - * `gocritic`: from 0.11.2 to 0.11.3 - * `spancheck`: from 0.5.3 to 0.6.1 - * `goerr113` is replaced by `err113` ⚠️ - * `gomnd` is replaced by `mnd` ⚠️ - * `gomodguard`: from 1.3.1 to 1.3.2 - * `grouper`: from 1.1.1 to 1.1.2 - * `intrange`: from 0.1.1 to 0.1.2 - * `mirror`: from 1.1.0 to 1.2.0 - * `misspell`: from 0.4.1 to 0.5.1 - * `musttag`: from 0.9.0 to 0.12.1 - * `nilnil`: from 0.1.7 to 0.1.8 - * `nonamedreturns`: from 1.0.4 to 1.0.5 - * `promlinter`: from 0.2.0 to 0.3.0 - * `sloglint`: from 0.5.0 to 0.6.0 - * `unparam`: bump to HEAD (063aff900ca150b80930c8de76f11d7e6488222f) - * `whitespace`: from 0.1.0 to 0.1.1 -3. Enhancements - * Speed up "fast" linters when only "fast" linters are run: between 40% and 80% faster at first run (i.e. without cache) -4. Fixes - * Use version with module plugins - * Skip `go.mod` report inside autogenerated processor - * Keep only `typecheck` issues when needed - * Don't hide `typecheck` errors inside diff processor -5. Misc. - * ⚠️ log an error when using previously deprecated linters ([Linter Deprecation Cycle](https://golangci-lint.run/docs/product/roadmap/#linter-deprecation-cycle)) - * [`deadcode`](https://github.com/remyoudompheng/go-misc/tree/HEAD/deadcode): deprecated since v1.49.0 (2022-08-23). - * [`exhaustivestruct`](https://github.com/mbilski/exhaustivestruct): deprecated since v1.46.0 (2022-05-08). - * [`golint`](https://github.com/golang/lint): deprecated since v1.41.0 (2021-06-15). - * [`ifshort`](https://github.com/esimonov/ifshort): deprecated since v1.48.0 (2022-08-04). - * [`interfacer`](https://github.com/mvdan/interfacer): deprecated since v1.38.0 (2021-03-03). - * [`maligned`](https://github.com/mdempsky/maligned): deprecated since v1.38.0 (2021-03-03). - * [`nosnakecase`](https://github.com/sivchari/nosnakecase): deprecated since v1.48.0 (2022-08-04). - * [`scopelint`](https://github.com/kyoh86/scopelint): deprecated since v1.39.0 (2021-03-25). - * [`structcheck`](https://github.com/opennota/check): deprecated since v1.49.0 (2022-08-23). - * [`varcheck`](https://github.com/opennota/check): deprecated since v1.49.0 (2022-08-23). - * ⚠️ Deprecate usage of linter alternative names - * Remove help display on errors with `config verify` command - * Add `pre-commit` hook to run `config verify` - * Improve `github-action` output -6. Documentation - * Remove deprecated Atom from Editor Integrations - -GitHub Action (v5.1.0) for golangci-lint: -- supports for `pull`, `pull_request_target`, and `merge_group` events with the option `only-new-issues`. -- ️️⚠️ `skip-pkg-cache` and `skip-build-cache` have been removed because the cache related to Go itself is already handled by `actions/setup-go`. -- with golangci-lint v1.58, the file information (path and position) will be displayed on the log. - -### v1.57.2 - -1. Updated linters - * `contextcheck`: from 1.1.4 to 1.1.5 - * `copyloopvar`: from 1.0.8 to 1.0.10 - * `ginkgolinter`: from 0.16.1 to 0.16.2 - * `goconst`: from 1.7.0 to 1.7.1 - * `gomoddirectives`: from 0.2.3 to 0.2.4 - * `intrange`: from 0.1.0 to 0.1.1 -2. Misc. - * Display warnings on deprecated linter options - * Fix missing `colored-tab` output format - * Fix TeamCity `inspectionType` service message -3. Documentation - * Remove invalid example about mixing files and directory - * Improve linters page - -### v1.57.1 - -1. Fixes - * Ignore issues with invalid position (e.g. `contextcheck`). - -### 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/docs/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 `config 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/docs/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 - * `go-critic`: from 0.11.0 to 0.11.1 - * `gosec`: from 2.18.2 to 2.19.0 - * `testifylint`: from 1.1.1 to 1.1.2 - * `usestdlibvars`: from 1.24.0 to 1.25.0 - * `wsl`: from 4.2.0 to 4.2.1 -2. misc. - * Fix missing version in Docker image -3. Documentation - * Explain the limitation of `new-from-rev` and `new-from-patch` - -### v1.56.1 - -1. updated linters - * `errcheck`: from 1.6.3 to 1.7.0 - * `govet`: disable `loopclosure` with go1.22 - * `revive`: from 1.3.6 to 1.3.7 - * `testifylint`: from 1.1.0 to 1.1.1 - -### v1.56.0 - -1. new linters - * `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 - * `exhaustruct`: from 3.1.0 to 3.2.0 - * `gci`: from 0.11.2 to 0.12.1 - * `ginkgolinter`: from 0.14.1 to 0.15.2 - * `go-check-sumtype`: from 0.1.3 to 0.1.4 - * `go-critic`: from 0.9.0 to 0.11.0 - * `go-errorlint`: from 1.4.5 to 1.4.8 - * `go-spancheck`: from 0.4.2 to 0.5.2 - * `goconst`: from 1.6.0 to 1.7.0 - * `godot`: from 1.4.15 to 1.4.16 - * `gofumpt`: from 0.5.0 to 0.6.0 - * `inamedparam`: from 0.1.2 to 0.1.3 - * `ineffassign`: from 0.0.0-20230610083614-0e73809eb601 to 0.1.0 - * `ireturn`: from 0.2.2 to 0.3.0 - * `misspell`: add mode option - * `musttag`: from v0.7.2 to v0.8.0 - * `paralleltest`: from 1.0.8 to 1.0.9 - * `perfsprint`: from 0.2.0 to 0.6.0 - * `protogetter`: from 0.2.3 to 0.3.4 - * `revive`: from 1.3.4 to 1.3.6 - * `sloglint`: add static-msg option - * `sloglint`: from 0.1.2 to 0.4.0 - * `testifylint`: from 0.2.3 to 1.1.0 - * `unparam`: from 20221223090309-7455f1af531d to 20240104100049-c549a3470d14 - * `whitespace`: update after moving to the `analysis` package - * `wsl`: from 3.4.0 to 4.2.0 - * `zerologlint`: from 0.1.3 to 0.1.5 -3. misc. - * 🎉 go1.22 support - * Implement stats per linter with a flag - * Make versioning inside Docker image consistent with binaries - * Parse Go RC version -4. Documentation - * 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** - -`testifylint` has [breaking changes](https://github.com/Antonboom/testifylint/releases/tag/v1.0.0) about enabling/disabling checks: - -- If you were using the option `enable` with a filtered list of checks, you should either add `disable-all: true` (1) or use `disable` field (2). - - ```yml - # Example (1) - testifylint: - disable-all: true - enable: - - 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 - - suite-thelper - ``` - - ```yml - # Example (2) - testifylint: - disable: - - suite-dont-use-pkg - ``` - -### v1.55.2 - -1. updated linters - * `ireturn`: from 0.2.1 to 0.2.2 - * `ginkgolinter`: from 0.14.0 to 0.14.1 - -### v1.55.1 - -1. updated linters - * `gosec`: from 2.18.1 to 2.18.2 -2. misc. - * `revgrep`: from v0.5.0 to v0.5.2 (support git < 2.41.0) - * output: convert backslashes to forward slashes for GitHub Action annotations printer - -### v1.55.0 - -1. new linters - * `gochecksumtype`: https://github.com/alecthomas/go-check-sumtype - * `inamedparam`: https://github.com/macabu/inamedparam - * `perfsprint`: https://github.com/catenacyber/perfsprint - * `protogetter`: https://github.com/ghostiam/protogetter - * `sloglint`: https://github.com/go-simpler/sloglint - * `testifylint`: https://github.com/Antonboom/testifylint -2. updated linters - * `bidichk`: from 0.2.4 to 0.2.7 - * `decorder`: from 0.4.0 to 0.4.1 - * `dupword`: from 0.0.12 to 0.0.13 - * `errchkjson`: from 0.3.1 to 0.3.6 - * `gci`: from 0.11.0 to 0.11.2 - * `ginkgolinter`: from 0.13.5 to 0.14.0 - * `go-errorlint`: from 1.4.4 to 1.4.5 - * `gocognit`: from 1.0.7 to 1.1.0 - * `goconst`: from 1.5.1 to 1.6.0 - * `godot`: from 1.4.14 to 1.4.15 - * `gofmt`: update to HEAD - * `goimports`: update to HEAD - * `gosec`: from 2.17.0 to 2.18.1 - * `gosmopolitan`: from 1.2.1 to 1.2.2 - * `govet`: add `appends` analyzer - * `ireturn`: from 0.2.0 to 0.2.1 - * `protogetter`: from 0.2.2 to 0.2.3 - * `revgrep`: from 745bb2f7c2e6 to v0.5.0 - * `revive`: from 1.3.2 to 1.3.4 - * `sqlclosecheck`: from 0.4.0 to 0.5.1 - * `staticcheck`: from 0.4.5 to 0.4.6 - * `tagalign`: from 1.3.2 to 1.3.3 - * `unused`: support passing in options -3. misc. - * Add a pre-commit hook to check all files -4. Documentation - * add source options to exclude-rules docs - * `gosec`: add G602 to includes/excludes inside .golangci.reference.yml - -### v1.54.2 - -1. updated linters: - * `errname`: from 0.1.10 to 0.1.12 - * `ginkgolinter`: from 0.13.3 to 0.13.5 - * `go-errorlint`: from 1.4.3 to 1.4.4 - * `godot`: from 1.4.11 to 1.4.14 - * `gosec`: from 2.16.0 to 2.17.0 - * `musttag`: from 0.7.1 to 0.7.2 - * `nilnil`: from 0.1.5 to 0.1.7 - * `staticcheck`: from 0.4.3 to 0.4.5 - * `usestdlibvars`: from 1.23.0 to 1.24.0 - * `govet`: add missing `directive` and `slog` passes - -### v1.54.1 - -1. updated linters: - * `go-critic`: from 0.8.2 to 0.9.0 -2. misc. - * plugin: temporarily hide warning about using plugins using the old API - -### v1.54.0 - -1. updated linters: - * `decorder`: from 0.2.3 to 0.4.0 - * `dupword`: from 0.0.11 to 0.0.12 - * `errorlint`: from 1.4.2 to 1.4.3 - * `exhaustruct`: from 2.3.0 to 3.1.0 - * `forbidigo`: from 1.5.3 to 1.6.0 - * `funlen`: from 0.0.3 to 0.1.0 - * `gci`: from 0.10.1 to 0.11.0 - * `ginkgolinter`: from 0.12.1 to 0.13.3 - * `go-critic`: from 0.8.1 to 0.8.2 - * `go-errorlint`: from 1.4.2 to 1.4.3 - * `go-exhaustruct`: from 2.3.0 to 3.1.0 - * `gocognit`: from 1.0.6 to 1.0.7 - * `gocritic`: from 0.8.1 to 0.8.2 - * `gofmt`: autofix missing newline at EOF - * `misspell`: 0.4.0 to 0.4.1 - * `musttag`: from 0.7.0 to 0.7.1 - * `paralleltest`: from 1.0.7 to 1.0.8 - * `tagalign`: from 1.2.2 to 1.3.2 - * `typecheck`: explain it and remove it from the linter list - * `zerologlint`: from 0.1.2 to 0.1.3 -2. misc. - * 🎉 go1.21 support - * plugin: include custom linters in `enable-all` - * plugin: allow to use settings for plugins -3. Documentation - * Add linter descriptions. - -**Important** - -`ruleguard` (a "rule" inside `gocritic`) was disabled in this release (v1.54.0) and was enabled again in the next release (v1.54.1). - -`exhaustruct` has breaking changes with regular expressions, more details [here](https://github.com/GaijinEntertainment/go-exhaustruct/releases/tag/v3.0.0). - -### v1.53.3 - -1. updated linters: - * `cyclop`: from 1.2.0 to 1.2.1 - * `exhaustive`: from 0.10.0 to 0.11.0 - * `forbidigo`: from 1.5.1 to 1.5.3 - * `ginkgolinter`: from 0.12.2 to 0.12.1 - * `ineffassign`: bump to HEAD - * `nakedret`: from 2.0.1 to 2.0.2 - * `zerologlint`: from 0.1.1 to 0.1.2 -2. misc. - * codeclimate: reduce memory allocation - * support illumos/amd64 - -### v1.53.2 - -1. updated linters - * `depguard`: from v2.0.1 to 2.1.0 -2. misc. - * `depguard`: throw error only when the linter is called - -### v1.53.1 - -1. misc. - * `depguard`: fix GOROOT detection - * `importas`: fix duplication detection when aliases use regular expression replacement pattern - -### v1.53.0 - -1. new linters - * `gosmopolitan`: https://github.com/xen0n/gosmopolitan - * `mirror`: https://github.com/butuzov/mirror - * `tagalign`: https://github.com/4meepo/tagalign - * `zerologlint`: https://github.com/ykadowak/zerologlint -2. updated linters - * `bodyclose`: bump to HEAD - * `containedctx`: from 1.0.2 to 1.0.3 - * `depguard`: migrate to v2 - * `errname`: from 0.1.9 to 0.1.10 - * `exhaustive`: from 0.9.5 to 0.10.0 - * `forbidigo`: better support for configuring complex rules - * `gci`: improve error message - * `ginkgolinter`: add suppress-async-assertion option - * `ginkgolinter`: from 0.9.0 to 0.12.0 - * `go-critic`: from 0.7.0 to 0.8.1 - * `go-errorlint`: from 1.4.0 to 1.4.2 - * `gofumpt`: from 0.4.0 to 0.5.0 - * `gosec`: convert global settings as map with proper key type - * `gosec`: from 2.15.0 to 2.16.0 - * `importas`: detect duplicate alias or package in the configuration - * `importas`: fix typo in logs - * `ireturn`: from 0.1.1 to 0.2.0 - * `musttag`: from 0.5.0 to 0.7.0 - * `nakedret`: to 2.0.1 - * `nilnil`: from 0.1.3 to 0.1.5 - * `paralleltest`: from 1.0.6 to 1.0.7 - * `revive`: from 1.3.1 to 1.3.2 - * `tagliatelle`: from 0.4.0 to 0.5.0 - * `usestdlibvars`: fix configuration -3. misc. - * `golang.org/x/tools`: from 0.7.0 to 0.9.2 - * add loongarch64 to the install script - * output: add colored-tab - * remove warning when the config file is explicitly stdin - * rules: support inverted path match -4. Documentation - * `mnd`: clarify ignore usage examples to be regexps - * `tagliatelle`: update documentation - * improve features section - * update supported Go versions FAQ - -### v1.52.2 - -1. updated linters - * `tparallel`: from 0.3.0 to 0.3.1 -2. misc. - * fix: pre-commit `require_serial` and `pass_filenames` - -### v1.52.1 - -1. misc. - * fix: improve panic management - * fix: the combination of --fix and --path-prefix - -### v1.52.0 - -1. updated linters - * `asciicheck`: from 0.1.1 to 0.2.0 - * `bidichk`: from 0.2.3 to 0.2.4 - * `contextcheck`: from 1.1.3 to 1.1.4 - * `dupword`: from 0.0.9 to 0.0.11 - * `durationcheck`: from 0.0.9 to 0.0.10 - * `errchkjson`: from 0.3.0 to 0.3.1 - * `errname`: from 0.1.7 to 0.1.9 - * `forbidigo`: from 1.4.0 to 1.5.1 - * `gci`: from 0.9.1 to 0.10.1 - * `ginkgolinter`: from 0.8.1 to 0.9.0 - * `go-critic`: from 0.6.7 to 0.7.0 - * `go-errorlint`: from 1.1.0 to 1.4.0 - * `godox`: bump to HEAD - * `lll`: skip go command - * `loggercheck`: from 0.9.3 to 0.9.4 - * `musttag`: from 0.4.5 to 0.5.0 - * `nilnil`: from 0.1.1 to 0.1.3 - * `noctx`: from 0.0.1 to 0.0.2 - * `revive`: from 1.2.5 to 1.3.1 - * `rowserrcheck`: remove limitation related to generics support - * `staticcheck`: from 0.4.2 to 0.4.3 - * `testpackage`: from 1.1.0 to 1.1.1 - * `tparallel`: from 0.2.1 to 0.3.0 - * `wastedassign`: remove limitation related to generics support - * `wrapcheck`: from 2.8.0 to 2.8.1 -2. misc. - * Add TeamCity output format - * Consider path prefix when matching path patterns - * Add Go version to version information -3. Documentation - * Add Tekton in Trusted By page - * Clarify that custom linters are not enabled by default - * Remove description for deprecated "go" option - -### v1.51.2 - -1. updated linters - * `forbidigo`: from 1.3.0 to 1.4.0 - * `gci`: from 0.9.0 to 0.9.1 - * `go-critic`: from 0.6.5 to 0.6.7 - * `go-errorlint`: from 1.0.6 to 1.1.0 - * `gosec`: from 2.14.0 to 2.15.0 - * `musttag`: from 0.4.4 to 0.4.5 - * `staticcheck`: from 0.4.0 to 0.4.2 - * `tools`: from 0.5.0 to 0.6.0 - * `usestdlibvars`: from 1.21.1 to 1.23.0 - * `wsl`: from 3.3.0 to 3.4.0 - * `govet`: enable `timeformat` by default -2. misc. - * fix: cache status size calculation - * add new source archive -3. Documentation - * Improve installation section - * Replace links to godoc.org with pkg.go.dev - -### v1.51.1 - -1. updated linters - * `ginkgolinter`: from 0.7.1 to 0.8.1 - * `ineffassign`: bump to HEAD - * `musttag`: from 0.4.3 to 0.4.4 - * `sqlclosecheck`: from 0.3.0 to 0.4.0 - * `staticcheck`: bump to v0.4.0 - * `wastedassign`: from 2.0.6 to 2.0.7 - * `wrapcheck`: from 2.7.0 to 2.8.0 - -### v1.51.0 - -1. new linters - * `ginkgolinter`: https://github.com/nunnatsa/ginkgolinter - * `musttag`: https://github.com/tmzane/musttag - * `gocheckcompilerdirectives`: https://github.com/leighmcculloch/gocheckcompilerdirectives -2. updated linters - * `bodyclose`: to HEAD - * `dupword`: from 0.0.7 to 0.0.9 - * `errcheck`: from 1.6.2 to 1.6.3 - * `exhaustive`: from 0.8.3 to 0.9.5 - * `exportloopref`: from 0.1.8 to 0.1.11 - * `gci`: from 0.8.1 to 0.9.0 - * `ginkgolinter`: from 0.6.0 to 0.7.1 - * `go-errorlint`: from 1.0.5 to 1.0.6 - * `go-ruleguard`: from 0.3.21 to 0.3.22 - * `gocheckcompilerdirectives`: from 1.1.0 to 1.2.1 - * `gochecknoglobals`: from 0.1.0 to 0.2.1 - * `gomodguard`: from 1.2.4 to 1.3.0 - * `gosec`: from 2.13.1 to 2.14.0 - * `govet`: Add `timeformat` to analysers - * `grouper`: from 1.1.0 to 1.1.1 - * `musttag`: from 0.4.1 to 0.4.3 - * `revive`: from 1.2.4 to 1.2.5 - * `tagliatelle`: from 0.3.1 to 0.4.0 - * `tenv`: from 1.7.0 to 1.7.1 - * `unparam`: bump to HEAD - * `usestdlibvars`: from 1.20.0 to 1.21.1 - * `wsl`: fix `force-err-cuddling` flag -3. misc. - * go1.20 support - * remove deprecated linters from presets - * Build NetBSD binaries - * Build loong64 binaries -4. Documentation - * `goimport`: improve documentation for local-prefixes - * `gomnd`: add missing always ignored functions - * `nolint`: fix typo - * `tagliatelle` usage typo - * add note about binary requirement for plugin - * cache preserving and colored output on docker runs - * improve documentation about debugging. - * improve Editor Integration section - * More specific default cache directory - * update output example to use valid checkstyle example; add json example - -### v1.50.1 - -1. updated linters - * `contextcheck`: from 1.1.2 to 1.1.3 - * `go-mnd`: from 2.5.0 to 2.5.1 - * `wrapcheck`: from 2.6.2 to 2.7.0 - * `revive`: fix configuration parsing - * `lll`: skip imports -2. misc. - * windows: remove redundant character escape '\/' - * code-climate: add default severity - -### v1.50.0 - -1. new linters - * `dupword`: https://github.com/Abirdcfly/dupword - * `testableexamples`: https://github.com/maratori/testableexamples -2. updated linters - * `contextcheck`: change owner - * `contextcheck`: from 1.0.6 to 1.1.2 - * `depguard`: from 1.1.0 to 1.1.1 - * `exhaustive`: add missing config - * `exhaustive`: from 0.8.1 to 0.8.3 - * `gci`: from 0.6.3 to 0.8.0 - * `go-critic`: from 0.6.4 to 0.6.5 - * `go-errorlint`: from 1.0.2 to 1.0.5 - * `go-reassign`: v0.1.2 to v0.2.0 - * `gofmt`: add option `rewrite-rules` - * `gofumpt` from 0.3.1 to 0.4.0 - * `goimports`: update to HEAD - * `interfacebloat`: fix configuration loading - * `logrlint`: rename `logrlint` to `loggercheck` - * `paralleltest`: add tests of the ignore-missing option - * `revive`: from 1.2.3 to 1.2.4 - * `usestdlibvars`: from 1.13.0 to 1.20.0 - * `wsl`: support all configs and update docs -3. misc. - * Normalize `exclude-rules` paths for Windows - * add riscv64 to the install script -4. Documentation - * cli: remove reference to old service - -### v1.49.0 - -IMPORTANT: `varcheck` and `deadcode` has been removed of default linters. - -1. new linters - * `interfacebloat`: https://github.com/sashamelentyev/interfacebloat - * `logrlint`: https://github.com/timonwong/logrlint - * `reassign`: https://github.com/curioswitch/go-reassign -2. updated linters - * `go-colorable`: from 0.1.12 to 0.1.13 - * `go-critic`: from 0.6.3 to 0.6.4 - * `go-errorlint`: from 1.0.0 to 1.0.2 - * `go-exhaustruct`: from 2.2.2 to 2.3.0 - * `gopsutil`: from 3.22.6 to 3.22.7 - * `gosec`: from 2.12.0 to 2.13.1 - * `revive`: from 1.2.1 to 1.2.3 - * `usestdlibvars`: from 1.8.0 to 1.13.0 - * `contextcheck`: from v1.0.4 to v1.0.6 && re-enable - * `nosnakecase`: This linter is deprecated. - * `varcheck`: This linter is deprecated use `unused` instead. - * `deadcode`: This linter is deprecated use `unused` instead. - * `structcheck`: This linter is deprecated use `unused` instead. -3. documentation - * `revive`: fix wrong URL - * Add a section about default exclusions - * `usestdlibvars`: fix typo in documentation - * `nolintlint`: remove allow-leading-space option - * Update documentation and assets -4. misc. - * dev: rewrite the internal tests framework - * fix: exit early on run --version - * fix: set an explicit `GOROOT` in the Docker image for `go-critic` - -### v1.48.0 - -1. new linters - * `usestdlibvars`:https://github.com/sashamelentyev/usestdlibvars -2. updated linters - * `contextcheck`: disable linter - * `errcheck`: from 1.6.1 to 1.6.2 - * `gci`: add missing `custom-order` setting - * `gci`: from 0.5.0 to 0.6.0 - * `ifshort`: deprecate linter - * `nolint`: drop allow-leading-space option and add "nolint:all" - * `revgrep`: bump to HEAD -3. documentation - * remove outdated info on source install -4. misc - * go1.19 support - -### v1.47.3 - -1. updated linters: - * remove some go1.18 limitations - * `asasalint`: from 0.0.10 to 0.0.11 - * `decorder`: from 0.2.2 to v0.2.3 - * `gci`: fix panic with invalid configuration option - * `gci`: from 0.4.3 to v0.5.0 - * `go-exhaustruct`: from 2.2.0 to 2.2.2 - * `gomodguard`: from 1.2.3 to 1.2.4 - * `nosnakecase`: from 1.5.0 to 1.7.0 - * `honnef.co/go/tools`: from 0.3.2 to v0.3.3 -2. misc - * cgo: fix linters ignoring CGo files - -### v1.47.2 - -1. updated linters: - * `revive`: ignore slow rules - -### v1.47.1 - -1. updated linters: - * `gci`: from 0.4.2 to 0.4.3 - * `gci`: remove the use of stdin - * `gci`: fix options display - * `tenv`: from 1.6.0 to 1.7.0 - * `unparam`: bump to HEAD - -### v1.47.0 - -1. new linters: - * `asasalint`: https://github.com/alingse/asasalint - * `nosnakecase`: https://github.com/sivchari/nosnakecase -2. updated linters: - * `decorder`: from 0.2.1 to 0.2.2 - * `errcheck`: from 1.6.0 to 1.6.1 - * `errname`: from 0.1.6 to 0.1.7 - * `exhaustive`: from 0.7.11 to 0.8.1 - * `gci`: fix issues and re-enable autofix - * `gci`: from 0.3.4 to 0.4.2 - * `go-exhaustruct`: from 2.1.0 to 2.2.0 - * `go-ruleguard`: from 0.3.19 to 0.3.21 - * `gocognit`: from 1.0.5 to 1.0.6 - * `gocyclo`: from 0.5.1 to 0.6.0 - * `golang.org/x/tools`: bump to HEAD - * `gosec`: allow `global` config - * `gosec`: from 2.11.0 to 2.12.0 - * `nonamedreturns`: from 1.0.1 to 1.0.4 - * `paralleltest`: from 1.0.3 to 1.0.6 - * `staticcheck`: fix generics - * `staticcheck`: from 0.3.1 to 0.3.2 - * `tenv`: from 1.5.0 to 1.6.0 - * `testpackage`: from 1.0.1 to 1.1.0 - * `thelper`: from 0.6.2 to 0.6.3 - * `wrapcheck`: from 2.6.1 to 2.6.2 -3. documentation: - * add thanks page - * add a clear explanation about the `staticcheck` integration. - * `depguard`: add `ignore-file-rules` - * `depguard`: adjust phrasing - * `gocritic`: add `enable` and `disable` ruleguard settings - * `gomnd`: fix typo - * `gosec`: add configs for all existing rules - * `govet`: add settings for `shadow` and `unusedresult` - * `thelper`: add `fuzz` config and description - * linters: add defaults - -### v1.46.2 - -1. updated linters: - * `execinquery`: bump from v1.2.0 to v1.2.1 - * `errorlint`: bump to v1.0.0 - * `thelper`: allow to disable one option -2. documentation: - * rename `.golangci.example.yml` to `.golangci.reference.yml` - * add `containedctx` linter to the list of available linters - -### v1.46.1 - -1. updated linters: - * `execinquery`: bump from v0.6.0 to v0.6.1 -2. documentation: - * add missing linters - -### v1.46.0 - -1. new linters: - * `execinquery`: https://github.com/lufeee/execinquery - * `nonamedreturns`: https://github.com/firefart/nonamedreturns - * `nosprintfhostport`: https://github.com/stbenjam/no-sprintf-host-port - * `exhaustruct`: https://github.com/GaijinEntertainment/go-exhaustruct -2. updated linters: - * `bidichk`: from 0.2.2 to 0.2.3 - * `deadcode`: bump to HEAD - * `errchkjson`: from 0.2.3 to 0.3.0 - * `errname`: from 0.1.5 to 0.1.6 - * `go-critic`: from 0.6.2 to 0.6.3 - * `gocyclo`: from 0.4.0 to 0.5.1 - * `gofumpt` from 0.3.0 to 0.3.1 - * `gomoddirectives`: from 0.2.2 to 0.2.3 - * `gosec`: from 2.10.0 to 2.11.0 - * `honnef.co/go/tools`: from 0.2.2to 0.3.1 (go1.18 support) - * `nilnil`: from 0.1.0 to 0.1.1 - * `nonamedreturns`: bump from 1.0.0 to 1.0.1 - * `predeclared`: from 0.2.1 to 0.2.2 - * `promlinter`: bump to v0.2.0 - * `revive`: from 1.1.4 to 1.2.1 - * `tenv`: from 1.4.7 to 1.5.0 - * `thelper`: from 0.5.1 to 0.6.2 - * `unused`: fix false-positive - * `varnamelen`: bump to v0.8.0 - * `wrapcheck`: from 2.5.0 to 2.6.1 - * `exhaustivestruct`: This linter is deprecated use `exhaustruct` instead. -3. documentation: - * Update "Shell Completion" instruction on Linux - * Update FAQ page -4. misc: - * log: enable override coloring based on `CLICOLOR` and `CLICOLOR_FORCE` - -### v1.45.2 - -1. misc: - * fix: help command - -### v1.45.1 - -1. updated linters: - * `interfacer`: inactivate with go1.18 - * `govet`: inactivate unsupported analyzers (go1.18) - * `depguard`: reduce requirements - * `structcheck`: inactivate with go1.18 - * `varnamelen`: bump from v0.6.0 to v0.6.1 -2. misc: - * Automatic Go version detection 🎉 (go1.18) - * docker: update base images (go1.18) - -### v1.45.0 - -1. updated linters: - * `cobra`: from 1.3.0 to 1.4.0 - * `containedctx`: from 1.0.1 to 1.0.2 - * `errcheck`: add an option to remove default exclusions - * `gci`: from 0.3.1 to 0.3.2 - * `go-header`: from 0.4.2 to 0.4.3 - * `gofumpt`: add module-path setting - * `gofumpt`: from 0.2.1 to 0.3.0 - * `gopsutil`: from 3.22.1 to 3.22.2 - * `gosec`: from 2.9.6 to 2.10.0 - * `makezero`: from 1.1.0 to 1.1.1 - * `revive`: fix default values - * `wrapcheck`: from 2.4.0 to 2.5.0 -2. documentation: - * docs: add "back to the top" button - * docs: add `forbidigo` example that uses comments - * docs: improve linters page -3. misc: - * go1.18 support 🎉 - * Add an option to manage the targeted version of Go - * Default to YAML when config file has no extension - -### v1.44.2 - -1. updated linters: - * `gci`: bump to HEAD - * `gci`: restore defaults for sections - * `whitespace`: from 0.0.4 to 0.0.5 -2. documentation: - * add link to configuration in the linters list - -### v1.44.1 - -1. updated linters: - * `bidichk`: from 0.2.1 to 0.2.2 - * `errchkjson`: from 0.2.1 to 0.2.3 - * `thelper`: from 0.5.0 to 0.5.1 - * `tagliatelle`: from 0.3.0 to 0.3.1 - * `gopsutil`: from 3.21.12 to 3.22.1 - * `gci`: from 0.2.9 to 0.3.0 - * `revive`: from v1.1.3 to v1.1.4 - * `varnamelen`: from v0.5.0 to v0.6.0 -2. documentation: - * linters: improve configuration pages - * `decorder`: fix `disable-init-func-first-check: false` elaboration -3. misc: - * fix debug output - -### v1.44.0 - -1. new linters: - * `containedctx`: https://github.com/sivchari/containedctx - * `decorder`: https://gitlab.com/bosi/decorder - * `errchkjson`: https://github.com/breml/errchkjson - * `maintidx`: https://github.com/yagipy/maintidx - * `grouper`: https://github.com/leonklingele/grouper -2. updated linters: - * `asciicheck`: bump to v0.1.1 - * `bidichk`: from 0.1.1 to 0.2.1 - * `bodyclose`: bump to HEAD - * `decorder`: from 0.2.0 to 0.2.1 - * `depguard`: from 1.0.1 to 1.1.0 - * `errchkjson`: from 0.2.0 to 0.2.1 - * `errorlint`: bump to HEAD - * `exhaustive`: drop deprecated/unused settings - * `exhaustive`: from v0.2.3 to 0.7.11 - * `forbidigo`: from 1.2.0 to 1.3.0 - * `forcetypeassert`: bump to v0.1.0 - * `gocritic`: from 0.6.1 to 0.6.2 - * `gocritic`: support autofix - * `gocyclo`: from 0.3.1 to 0.4.0 - * `godot`: add period option - * `gofumpt`: from 0.1.1 to 0.2.1 - * `gomnd`: from 2.4.0 to 2.5.0 - * `gomnd`: new configuration - * `gosec`: from 2.9.1 to 2.9.6 - * `ifshort`: from 1.0.3 to 1.0.4 - * `ineffassign`: bump to HEAD - * `makezero`: to v1.1.0 - * `promlinter`: from v0.1.0 to HEAD - * `revive`: fix `enableAllRules` - * `revive`: from 1.1.2 to 1.1.3 - * `staticcheck`: from 0.2.1 to 0.2.2 - * `tagliatelle`: from 0.2.0 to 0.3.0 - * `thelper`: from 0.4.0 to 0.5.0 - * `unparam`: bump to HEAD - * `varnamelen`: bump to v0.5.0 - * `wrapcheck`: update configuration to include `ignoreSignRegexps` -3. documentation: - * linters: improve pages about configuration - * improve page about false-positive - * `nolintlint`: fix wrong default value in comment - * `revive`: add a more detailed configuration -4. misc: - * outputs: Add support for multiple outputs - * outputs: Print error text in `` tag content for more readable JUnit output - * outputs: ensure that the Issues key in JSON format is a list - * Return error if any linter fails to run - * cli: Show deprecated mark in the CLI linters help - -### November 2021 - -1. new linters: - * `bidichk`: https://github.com/breml/bidichk -2. update linters: - * `nestif`: from 0.3.0 to 0.3.1 - * `rowserrcheck`: from 1.1.0 to 1.1.1 - * `gopsutil`: from 3.21.9 to 3.21.10 - * `wrapcheck`: from 2.3.1 to 2.4.0 - * `gocritic`: add support for variable substitution in `ruleguard` path settings -3. documentation: - * improve `go-critic` documentation - * improve `nolintlint` documentation -4. Misc: - * cli: don't hide `enable-all` option - -### october 2021 - -1. new linters: - * `contextcheck`: https://github.com/kkHAIKE/contextcheck - * `varnamelen`: https://github.com/blizzy78/varnamelen -2. update linters: - * `gochecknoglobals`: to v0.1.0 - * `gosec`: filter issues according to the severity and confidence - * `errcheck`: empty selector name. - * `ifshort`: from 1.0.2 to 1.0.3 - * `go-critic`: from 0.5.6 to 0.6.0 - * `gosec`: from 2.8.1 to 2.9.1 - * `durationcheck`: from 0.0.8 to 0.0.9 - * `wrapcheck`: from 2.3.0 to 2.3.1 - * `revive`: from 1.1.1 to 1.1.2 - -### September 2021 - -1. new linters: - * `ireturn`: https://github.com/butuzov/ireturn - * `nilnil`: https://github.com/Antonboom/nilnil - * `tenv`: https://github.com/sivchari/tenv -2. update linters: - * `errcheck`: update to HEAD - * `errname`: from 0.1.4 to 0.1.5 - * `gci`: Parse the settings more similarly to the CLI - * `godot`: from 1.4.9 to 1.4.11 - * `ireturn`: from 0.1.0 to 0.1.1 - * `nlreturn`: add block-size option - * `paralleltest`: from 1.0.2 to 1.0.3 -3. Misc: - * new-from-rev: add support for finding issues in entire files in a diff - -### August 2021 - -1. new linters: - * `errname`: https://github.com/Antonboom/errname -2. update linters: - * `errname`: from 0.1.3 to 0.1.4 - * `go-critic`: fix invalid type conversions. - * `godot`: from 1.4.8 to 1.4.9 - * `gomodguard`: from 1.2.2 to 1.2.3 - * `revive`: from 1.0.9 to 1.1.1 - * `staticcheck`: bump to 2021.1.1 (v0.2.1) - * `wrapcheck`: bump to v2.3.0 -3. Misc: - * build binaries and Docker images with go1.17 - -### July 2021 - -1. update linters: - * `errcheck`: allow exclude config without extra file - * `exhaustive`: from 0.1.0 to 0.2.3 - * `gocognit`: from 1.0.1 to 1.0.5 - * `godot`: from 1.4.7 to 1.4.8 - * `gomoddirectives`: from 0.2.1 to 0.2.2 - * `revive`: from 1.0.8 to 1.0.9 -2. documentation: - * improve `goconst` documentation - * improve `goimports` description - -### June 2021 - -1. update linters: - * `durationcheck`: from 0.0.7 to 0.0.8 - * `gci`: from 0.2.8 to 0.2.9 - * `goconst`: from 0.5.6 to 0.5.7 - * `gofumpt`: Add lang-version option - * `gomodguard`: from 1.2.1 to 1.2.2 - * `gosec`: from 2.8.0 to 2.8.1 - * `revive`: add enable-all-rules. - * `revive`: allow to disable rule - * `revive`: fix exclude comment rule for const block - * `revive`: from 1.0.7 to 1.0.8 - * `wrapcheck`: from 2.1.0 to 2.2.0 -2. documentation: - * add all integrations to docs introduction page -3. Misc: - * 🎉 Un-deprecate enable-all option - * output: generate HTML report - * Support RISV64 - -### May 2021 - -1. new linters: - * `tagliatelle`: https://github.com/ldez/tagliatelle - * `promlinter`: https://github.com/yeya24/promlinter -2. update linters: - * `durationcheck`: from 0.0.6 to 0.0.7 - * `errorlint`: bump to HEAD - * `forbidigo`: from 1.1.0 to 1.2.0 - * `go-critic`: from 0.5.5 to 0.5.6 - * `godot`: from 1.4.6 to 1.4.7 - * ⚠ `golint`: deprecated - * `gomnd`: from 2.3.2 to 2.4.0 - * `gomodguard`: fix problem where duplicate issues were reported - * `gosec`: from 2.7.0 to 2.8.0 - * `govet`: fix `sigchanyzer` - * `govet`: Update vet passes - * `importas`: allow repeated aliases - * `importas`: bump to HEAD - * `makezero`: bump to HEAD - * `nolintlint`: fix false positive - * `revive`: convert hard coded excludes into default exclude patterns - * `revive`: fix add-constant rule support - * `revive`: fix excludes - * `revive`: from 1.0.6 to 1.0.7 - * `revive`: improve 'exported' rule output - * `rowserrcheck`: bump to v1.1.0 - * `staticcheck`: configuration for `staticcheck`, `gosimple`, `stylecheck` - * `staticcheck`: from 0.1.3 to 0.1.4 - * `staticcheck`: from v0.1.4 to v0.2.0 - * `wastedassign`: from 0.2.0 to 1.0.0 - * `wastedassign`: from 1.0.0 to v2.0.6 - * `wrapcheck`: from 1.2.0 to 2.1.0 -3. documentation: - * improve linters page - * `exhaustivestruct` example explanation - * fix pattern of `forbidigo` in example config yaml - * bump documentation dependencies - * fix typos -4. Misc: - * set the minimum Go version to go1.15 - * non-zero exit code when a linter produces a panic - -### April 2021 - -1. new linters: - * `tagliatelle`: https://github.com/ldez/tagliatelle - * `promlinter`: https://github.com/yeya24/promlinter -2. update linters: - * `godot`: from 1.4.4 to 1.4.6 - * `wrapcheck`: from 1.0.0 to 1.2.0 - * `go-mnd`: from 2.3.1 to 2.3.2 - * `wsl`: from 3.2.0 to 3.3.0 - * `revive`: from 1.0.5 to 1.0.6 - * `importas`: bump to HEAD - * `staticcheck`: configurable Go version - * `gosec`: add configuration - * `typecheck`: improve error stack parsing -3. documentation: - * bump documentation dependencies - * fix typos -4. Misc: - * fix: comma in exclude pattern leads to unexpected results - -### March 2021 - -1. new linters: - * `gomoddirectives`: https://github.com/ldez/gomoddirectives -2. update linters: - * `go-critic`: from 0.5.4 to 0.5.5 - * `gofumpt`: from v0.1.0 to v0.1.1 - * `gosec`: from 2.6.1 to 2.7.0 - * `ifshort`: bump to v1.0.2 - * `importas`: bump to HEAD - * `makezero`: bump to HEAD - * `nolintlint`: allow to fix //nolint lines - * `revive`: from 1.0.3 to 1.0.5 - * `revive`: the default configuration is only applied when no dedicated configuration - * `rowserrcheck`: bump to HEAD - * ⚠ `scopelint`: deprecated - * `staticcheck`: from v0.1.2 (2020.2.2) to v0.1.3 (2020.2.3) - * 🎉 `typecheck`: display compilation errors as report instead of error - * `wastedassign`: bump to v0.2.0 - * `wrapcheck`: bump to v1.0.0 -3. documentation: - * improve [linters page](https://golangci-lint.run/docs/linters/) (versions, deprecation, and presets) - * add [cache directory](https://golangci-lint.run/docs/configuration/cli/#cache) information - * adding missing format options - * fix typos -4. Misc: - * Set `version` command output to Stdout - * fix linters load mode - * Restore fast linters meaning - -### February 2021 - -1. new linters: - * `durationcheck`: https://github.com/charithe/durationcheck - * `revive`: https://github.com/mgechev/revive - * `cyclop`: https://github.com/bkielbasa/cyclop - * `wastedassign`: https://github.com/sanposhiho/wastedassign - * `importas`: https://github.com/julz/importas - * `nilerr`: https://github.com/gostaticanalysis/nilerr - * `forcetypeassert`: https://github.com/gostaticanalysis/forcetypeassert - * `govet`: add `stringintconv` and `ifaceassert` -2. update linters: - * `prealloc`: Use upstream version - * `errcheck`: Use upstream version - * `ineffassign`: Use upstream version - * `gocyclo`: Use upstream version - * `godot` from 1.3.2 to 1.4.3 - * `exhaustivestruct` from 1.1.0 to 1.2.0 - * `forbidigo` from 1.0.0 to 1.1.0 - * `thelper` from 0.2.1 to 0.3.1 - * `ruleguard`: print error message and exit with non-zero status when parsing error occurs - * fix wrong load mode for `asciicheck`, `exhaustivestruct`, `exportloopref`, and `makezero` - * `wsl`: bump to v3.2.0 - * `durationcheck`: from 0.0.4 to 0.0.6 - * `staticcheck`: from 2020.1.6 to v0.1.2 (2020.2.2) - * `thelper` from 0.3.1 to 0.4.0 - * `bodyclose`: bump to HEAD - * `go-err113`: bump to HEAD - * ⚠ `interfacer`: deprecated - * ⚠ `maligned`: deprecated (govet `fieldalignment` as replacement) - * `govet`: use same default linter as go vet - * `go-printf-func-name`: to `v0.0.0-20200119135958-7558a9eaa5af` - * `godox`: to `v0.0.0-20210227103229-6504466cf951` - * `asciicheck`: to `v0.0.0-20200416200610-e657995f937b` - * `wrapcheck`: to `v0.0.0-20201130113247-1683564d9756` - * `unparam`: to `v0.0.0-20210104141923-aac4ce9116a7` -3. CLI: truncate multiline descriptions -4. fix: new-from-rev for a large repository -5. Support RelatedInformation for analysis Diagnostic -6. use go1.16 to create binaries -7. fix: MIPS release -8. documentation: - * bump documentation dependencies - * fix `go-header` usage - * improve `gocritic` description - * update deprecated hyperlink for Sublime Text plugin - * add docs on using homebrew tap - -### January 2021 - -1. new linters: - * `predeclared`: https://github.com/nishanths/predeclared - * `ifshort`: https://github.com/esimonov/ifshort -2. update linters: - * `go-critic` from 0.5.2 to 0.5.3 - * `thelper` from 0.1.0 to 0.2.1 - * Validate `go-critic` settings - * `gofumpt` to v0.1.0 - * `gci` to v0.2.8 - * `go-mnd` to v2.3.1 - * `gosec` from 2.5.0 to 2.6.1 - * `godot` from 1.3.2 to 1.4.3 - * `ifshort` to v1.0.1 - * `rowserrcheck`: fix reports false positive -3. fix: modules-download-mode support -4. documentation: - * bump documentation dependencies - -### December 2020 - -1. new linters: - * `forbidigo`: https://github.com/ashanbrown/forbidigo - * `makezero`: https://github.com/ashanbrown/makezero - * `thelper`: https://github.com/kulti/thelper -2. update linters: - * `go-header` from v0.3.1 to v0.4.2 - * `go-mnd` from v2.0.0 to v2.2.0 - * `godot` from v1.3.0 to v1.3.2 - * `gci` from v0.2.4 to v0.2.7 - * `gomodguard` from v1.1.0 to v1.2.0 - * `go-errorlint` from v0.0.0-20201006195004-351e25ade6e3 to v0.0.0-20201127212506-19bd8db6546f - * `gofumpt` from v0.0.0-20200802201014-ab5a8192947d to v0.0.0-20201129102820-5c11c50e9475 - * `nolintlint` fix comment analysis. (#1571) -3. result/processors: treat all non-Go source as special autogenerated files -4. throw an error on panic. (#1540) -5. resolve custom linters' path relative to config file directory (#1572) -6. treat all non-Go source as special autogenerated files -7. documentation: - * add settings examples for `gocritic` (#1562) - * removing reference to no-longer-existing linter-in-the-cloud (#1553) -8. others: - * bump `gopkg.in/yaml.v2` from 2.3.0 to 2.4.0 (#1528) - * bump `gatsby-remark-responsive-iframe` in /docs (#1533) - * bump `gatsby-remark-images` from 3.3.29 to 3.6.0 in /docs (#1531) - * bump `ini` from 1.3.5 to 1.3.8 in /tools (#1560) - * bump `react-headroom` from 3.0.0 to 3.0.1 in /docs (#1532) - * bump `react-live` from 2.2.2 to 2.2.3 in /docs (#1534) - * bump `react` from 16.13.1 to 16.14.0 in /docs (#1481) - * Fix `forbidigo` linter name in reports (#1590) - -### November 2020 - -1. new linters: - * `paralleltest`: https://github.com/kunwardeep/paralleltest -2. update linters: - * `godot` from v0.4.9 to v1.3.0 - * `exportloopref` from v0.1.7 to v0.1.8 - * `gosec` from 2.4.0 to 2.5.0 - * `goconst` using upstream https://github.com/jgautheron/goconst -3. `DefaultExcludePatterns` should only be used for specified linter (#1494) -4. unknown linter breaks //nolint (#1497) -5. report all unknown linters at once (#1477) -6. CI: - * fix Docker tag for Alpine build -7. documentation: - * missing sort-results in the docs (#1514) - * add description of Homebrew's official formula (#1421) -8. others: - * bump `golang.org/x/text` to v0.3.4 (#1293) - * bump `github.com/fatih/color` to from 1.9.0 to 1.10.0 (#1485) - * bump `lodash` from 4.17.15 to 4.17.19 in /.github/peril (#1252) - * bump `polished` from 3.6.6 to 4.0.3 in /docs (#1482) - * bump `gatsby-alias-imports` from 1.0.4 to 1.0.6 in /docs (#1479) - * bump `puppeteer` from 5.3.1 to 5.4.1 in /docs (#1480) - * bump `gatsby-remark-embedder` from 3.0.0 to 4.0.0 in /docs (#1478) - -### October 2020 - -1. new linters: - * `exhaustivestruct`: https://github.com/mbilski/exhaustivestruct - * `go-errorlint`: https://github.com/polyfloyd/go-errorlint - * `tparallel`: https://github.com/moricho/tparallel - * `wrapcheck`: https://github.com/tomarrell/wrapcheck -2. update linters: - * `honnef.co/go/tools` from 2020.1.5 to 2020.1.6 - * `exhaustivestruct` from v1.0.1 to v1.1.0 - * `exhaustive` to v0.1.0 - * `gochecknoglobals`: use https://github.com/leighmcculloch/gochecknoglobals -3. add support for powershell completion (#1408) -4. add `.golangci.yaml` to list of configuration files searched on startup (#1364) -5. support for only specifying default severity (#1396) -6. documentation: - * mention macports installation procedure on macOS (#1352) - * sort linters (#1451) -7. CI: - * add codeQL scanning (#1405) - * fix version details in Docker image (#1471) - * releasing docker image for arm64 (#1383) - * change interval for npm to monthly (#1424) -8. others: - * use tag version for cobra (#1458) - * bump `nancy` to 1.0.1 (#1410) - * bump `gatsby-plugin-catch-links` in /docs (#1415) - * bump `gatsby-plugin-mdx` from 1.2.40 to 1.2.43 in /docs (#1419) - * bump `gatsby-plugin-sharp` from 2.6.31 to 2.6.40 in /docs (#1423) - * bump `gatsby-plugin-sitemap` from 2.4.12 to 2.4.14 in /docs (#1417) - * bump `github.com/mattn/go-colorable` from 0.1.7 to 0.1.8 (#1413) - * bump `github.com/sirupsen/logrus` from 1.6.0 to 1.7.0 (#1412) - * bump `github.com/sourcegraph/go-diff` from 0.6.0 to 0.6.1 (#1414) - * bump `golangci/golangci-lint-action` from v2 to v2.3.0 (#1447) (#1469) - * bump `puppeteer` from 3.3.0 to 5.3.1 in /docs (#1418) - -### September 2020 - -1. update linters: - * `godot` from 0.4.8 to 0.4.9 - * `exhaustive` from v0.0.0-20200708172631-8866003e3856 to v0.0.0-20200811152831-6cf413ae40e0 - * `gofumpt` from v0.0.0-20200709182408-4fd085cb6d5f to v0.0.0-20200802201014-ab5a8192947d -2. add support for fish completion (#1201) -3. documentation: - * fix typo in performance docs (#1350) -4. CI: - * prevent macos to be marked as passing upon failure (#1381) - * check only for go.mod file (#1397) - * check if go.mod and go.sum are up to dated (#1377) - * trigger Netlify (#1358) -5. others: - * bump `github.com/sourcegraph/go-diff` from 0.5.3 to 0.6.0 (#1353) - * bump `github.com/valyala/quicktemplate` from 1.6.2 to 1.6.3 (#1385) - * ignore known dependency failure in nancy (#1378) - * bump `@mdx-js/mdx` from 1.6.16 to 1.6.18 in /docs (#1401) - * bump `gatsby` from 2.24.52 to 2.24.65 in /docs (#1400) - * bump `gatsby-plugin-canonical-urls` in /docs (#1390) - * bump `gatsby-plugin-google-analytics` in /docs (#1388) - * bump `gatsby-plugin-manifest` from 2.4.23 to 2.4.27 in /docs (#1355) - * bump `gatsby-plugin-mdx` from 1.2.35 to 1.2.40 in /docs (#1386) - * bump `gatsby-plugin-offline` from 3.2.23 to 3.2.27 in /docs (#1368) - * bump `gatsby-plugin-sharp` from 2.6.25 to 2.6.31 in /docs (#1354) - * bump `gatsby-plugin-sitemap` from 2.4.11 to 2.4.12 in /docs (#1344) - * bump `gatsby-remark-autolink-headers` in /docs (#1387) - * bump `gatsby-remark-images` from 3.3.25 to 3.3.28 in /docs (#1345) - * bump `gatsby-remark-images` from 3.3.28 to 3.3.29 in /docs (#1365) - * bump `gatsby-remark-mermaid` from 2.0.0 to 2.1.0 in /docs (#1369) - * bump `gatsby-source-filesystem` in /docs (#1366) - * bump `gatsby-source-filesystem` in /docs (#1389) - * bump `gatsby-transformer-sharp` in /docs (#1402) - * bump `gatsby-transformer-yaml` from 2.4.10 to 2.4.11 in /docs (#1367) - * bump `node-fetch` in /.github/contributors (#1363) - * bump `polished` from 3.6.5 to 3.6.6 in /docs (#1347) - -### August 2020 - -1. new `nlreturn` linter: https://github.com/ssgreg/nlreturn -2. new `gci` linter: https://github.com/daixiang0/gci -3. support `latest` version of golangci-lint in golangci-lint-action -4. update `gosec` linter from 2.3.0 to 2.4.0 -5. update `godot` linter from 0.4.2 to 0.4.8 -6. update `go-critic` from 0.5.0 to 0.5.2 (#1307) -7. update `nlreturn` from 2.0.1 to 2.0.2 (#1287), 2.0.2 to 2.1.0 (#1327) -8. update `gci` to v0.2.1 (#1292), to v0.2.2 (#1305), to v0.2.4 (#1337), -9. update `funlen` from 0.0.2 to 0.0.3 (#1341) -10. upgrade to golang 1.15 for smaller binary (#1303) -11. support short and json formats for version cmd (#1315) -12. add home directory to config file search paths (#1325) -13. allow for serializing multiple golangci-lint invocations (#1302) - -### July 2020 - -1. `gofumpt` linter: - * update linter - * add `extra-rules` option - * support auto-fixing -2. upgrade `exhaustive` linter -3. upgrade `exportloopref` linter -4. improve 'no such linter' error message -5. sorting result.Issues implementation -6. enhancements in CI: - * Run `nancy` validation for all dependencies - * Move dependabot config to `.github` folder -7. other - * bump `lodash` from 4.17.15 to 4.17.19 in /tools - * bump `golangci/golangci-lint-action` from v1.2.2 to v2 - * bump `github.com/valyala/quicktemplate` from 1.5.0 to 1.5.1 - - -### June 2020 - -1. Add new linters: `gofumpt` - -### May 2020 - -1. Add new linters: `nolintlint`, `goerr113` -2. Updated linters: `godot`, `staticcheck` -3. Launch a [website](https://golangci-lint.run) - -### April 2020 - -1. Add new linters: `testpackage`, `nestif`, `godot`, `gomodguard`, `asciicheck` -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" -6. Self-isolate due to unexpected pandemics -7. Support case-sensitive excludes -8. Allow granular re-enabling excludes by ID, e.g. `EXC0002` - -### September 2019 - -1. Support go1.13 -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. Fix false-positives in `unused` -6. Support `--skip-dirs-use-default` -7. Add support for bash completions - -### July 2019 - -1. Fix parallel writes race condition -2. Update bodyclose with fixed panic - -### June 2019 - -1. Treat Go source files as a plain text by `misspell`: it allows detecting issues in strings, variable names, etc. -2. Implement richer and more stable auto-fix of `misspell` issues. - -### May 2019 - -1. Add [bodyclose](https://github.com/timakin/bodyclose) linter. -2. Support junit-xml output. - -### April 2019 - -1. Update go-critic, new checkers were added: badCall, dupImports, evalOrder, newDeref -2. Fix staticcheck panic on packages that do not compile -3. Make install script work on Windows -4. Fix compatibility with the latest x/tools version and update golang.org/x/tools -5. Correct import path of module sourcegraph/go-diff -6. Fix `max-issues-per-linter` name -7. Fix linting of preprocessed files (e.g. `*.qtpl.go`, goyacc) -8. Enable auto-fixing when running via pre-commit - -### March 2019 - -1. Support the newest `go vet` (with `go/analysis`) -2. Support configuration of `go vet`: e.g. you can set print functions by `linters-settings.govet.settings.printf.funcs` -3. Update megacheck (staticcheck) to 2019.1.1 -4. Add [information](https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint) about controlling space-time trade-off into README -5. Exclude issues by source code line regexp by `issues.exclude-rules[i].source` -6. Build and test on go 1.12 -7. Support `--color` option -8. Update x/tools to fix c++ issues -9. Include support for log level -10. Sort linters list in help commands diff --git a/docs/static/CNAME b/CNAME similarity index 100% rename from docs/static/CNAME rename to CNAME diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e72bfddabc15..000000000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 0b445cab5f02..000000000000 --- a/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -.DEFAULT_GOAL = test -.PHONY: FORCE - -# enable consistent Go 1.12/1.13 GOPROXY behavior. -export GOPROXY = https://proxy.golang.org - -BINARY = golangci-lint -ifeq ($(OS),Windows_NT) - BINARY := $(BINARY).exe -endif - -# Build - -build: $(BINARY) -.PHONY: build - -build_race: - go build -race -o $(BINARY) ./cmd/golangci-lint -.PHONY: build_race - -clean: - rm -f $(BINARY) - rm -f test/path - rm -f tools/Dracula.itermcolors - rm -f tools/svg-term - rm -rf tools/node_modules -.PHONY: clean - -# Test -test: export GOLANGCI_LINT_INSTALLED = true -test: CGO_ENABLED=1 -test: build - GL_TEST_RUN=1 ./$(BINARY) run -v - GL_TEST_RUN=1 go test -v -parallel 2 ./... -.PHONY: test - -test_race: build_race - GL_TEST_RUN=1 ./$(BINARY) run -v --timeout=5m -.PHONY: test_race - -# ex: T=output.go make test_integration -# the value of `T` is the name of a file from `test/testdata` -test_integration: - GL_TEST_RUN=1 go test -v ./test -count 1 -run TestSourcesFromTestdata/$T -.PHONY: test_integration - -# ex: T=multiple-issues-fix.go make test_integration_fix -# the value of `T` is the name of a file from `test/testdata/fix` -test_integration_fix: build - GL_TEST_RUN=1 go test -v ./test -count 1 -run TestFix/$T -.PHONY: test_integration_fix - -# Maintenance - -fast_generate: assets/github-action-config.json -.PHONY: fast_generate - -fast_check_generated: - $(MAKE) --always-make fast_generate - git checkout -- go.mod go.sum # can differ between go1.16 and go1.17 - git diff --exit-code # check no changes - -# Migration - -clone_config: - go run ./pkg/commands/internal/migrate/cloner/ - -# Benchmark - -# Benchmark with a local version -# LINTER=gosec VERSION=v1.59.0 make bench_local -bench_local: hyperfine - @:$(call check_defined, LINTER VERSION, 'missing parameter(s)') - @./scripts/bench/bench_local.sh $(LINTER) $(VERSION) -.PHONY: bench_local - -# Benchmark between 2 existing versions -# make bench_version LINTER=gosec VERSION_OLD=v1.58.2 VERSION_NEW=v1.59.0 -bench_version: hyperfine - @:$(call check_defined, LINTER VERSION_OLD VERSION_NEW, 'missing parameter(s)') - @./scripts/bench/bench_version.sh $(LINTER) $(VERSION_OLD) $(VERSION_NEW) -.PHONY: bench_version - -hyperfine: - @which hyperfine > /dev/null || (echo "Please install hyperfine https://github.com/sharkdp/hyperfine#installation" && exit 1) -.PHONY: hyperfine - -# Non-PHONY targets (real files) - -$(BINARY): FORCE - go build -o $@ ./cmd/golangci-lint - -assets/github-action-config.json: FORCE $(BINARY) - # go run ./scripts/gen_github_action_config/main.go $@ - cd ./scripts/gen_github_action_config/; go run . ../../$@ - -go.mod: FORCE - go mod tidy - go mod verify -go.sum: go.mod - -# Documentation - -docs_serve: website_expand_templates - @make -C ./docs serve -.PHONY: docs_serve - -docs_clean: - @make -C ./docs clean -.PHONY: docs_clean - -docs_build: website_copy_jsonschema website_expand_templates - @make -C ./docs build -.PHONY: docs_build - -docs/static/demo.gif: FORCE - vhs docs/golangci-lint.tape - -website_copy_jsonschema: - go run ./scripts/website/copy_jsonschema/ -.PHONY: website_copy_jsonschema - -website_expand_templates: - go run ./scripts/website/expand_templates/ -.PHONY: website_expand_templates - -website_dump_info: - go run ./scripts/website/dump_info/ -.PHONY: website_dump_info - -# Functions - -# Check that given variables are set and all have non-empty values, -# die with an error otherwise. -# -# Params: -# 1. Variable name(s) to test. -# 2. (optional) Error message to print. -# -# https://stackoverflow.com/a/10858332/8228109 -check_defined = \ - $(strip $(foreach 1,$1, \ - $(call __check_defined,$1,$(strip $(value 2))))) -__check_defined = \ - $(if $(value $1),, \ - $(error Undefined $1$(if $2, ($2)))) diff --git a/README.md b/README.md deleted file mode 100644 index e34bc2af2de0..000000000000 --- a/README.md +++ /dev/null @@ -1,70 +0,0 @@ -

- golangci-lint logo -

golangci-lint

-

Fast linters runner for Go

-

- ---- - -`golangci-lint` is a fast Go linters runner. - -It runs linters in parallel, uses caching, supports YAML configuration, -integrates with all major IDEs, and includes over a hundred linters. - -## Install `golangci-lint` - -- [On my machine](https://golangci-lint.run/docs/welcome/install/#local-installation); -- [On CI/CD systems](https://golangci-lint.run/docs/welcome/install/#ci-installation). - -## Documentation - -Documentation is hosted at https://golangci-lint.run. - -## Social Networks - -[![Join Slack](https://img.shields.io/badge/Slack-4285F4?logo=slack&logoColor=white)](https://gophers.slack.com/archives/CS0TBRKPC) -[![Follow on Mastodon](https://img.shields.io/badge/Mastodon-6364FF?logo=mastodon&logoColor=white)](https://fosstodon.org/@golangcilint) -[![Follow on Bluesky](https://img.shields.io/badge/Bluesky-0a7aff?logo=bluesky&logoColor=white)](https://bsky.app/profile/golangci-lint.run) -[![Follow on Twitter](https://img.shields.io/badge/Twitter-1DA1F2?logo=x&logoColor=white)](https://twitter.com/golangci) - -## Support Us - -`golangci-lint` is a free and open-source project built by volunteers. - -If you value it, consider supporting us, we appreciate it! :heart: - -[![Golangci-lint](https://img.shields.io/badge/Support-golangci_lint-blue?style=for-the-badge)](https://donate.golangci.org) -[![Linter Authors](https://img.shields.io/badge/Support-Linter_Authors-blue?style=for-the-badge)](https://golangci-lint.run/docs/product/thanks/) - -## Badges - -![Build Status](https://github.com/golangci/golangci-lint/workflows/CI/badge.svg) -[![License](https://img.shields.io/github/license/golangci/golangci-lint)](/LICENSE) -[![Release](https://img.shields.io/github/release/golangci/golangci-lint.svg)](https://github.com/golangci/golangci-lint/releases/latest) -[![Docker](https://img.shields.io/docker/pulls/golangci/golangci-lint)](https://hub.docker.com/r/golangci/golangci-lint) -[![GitHub Releases Stats of golangci-lint](https://img.shields.io/github/downloads/golangci/golangci-lint/total.svg?logo=github)](https://somsubhra.github.io/github-release-stats/?username=golangci&repository=golangci-lint) - -## Contributors - -This project exists thanks to all the people who contribute. [How to contribute](https://golangci-lint.run/docs/contributing/). - - - - - -## Sponsors - -

 

-

- - - - - The complete IDE crafted for professional Go developers. - - -

- -## Stargazers over time - -[![Stargazers over time](https://starchart.cc/golangci/golangci-lint.svg?variant=adaptive)](https://starchart.cc/golangci/golangci-lint) diff --git a/docs/static/android-chrome-192x192.png b/android-chrome-192x192.png similarity index 100% rename from docs/static/android-chrome-192x192.png rename to android-chrome-192x192.png diff --git a/docs/static/android-chrome-512x512.png b/android-chrome-512x512.png similarity index 100% rename from docs/static/android-chrome-512x512.png rename to android-chrome-512x512.png diff --git a/docs/static/apple-touch-icon.png b/apple-touch-icon.png similarity index 100% rename from docs/static/apple-touch-icon.png rename to apple-touch-icon.png diff --git a/assets/github-action-config-v1.json b/assets/github-action-config-v1.json deleted file mode 100644 index cc3c65f7189a..000000000000 --- a/assets/github-action-config-v1.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "MinorVersionToConfig": { - "latest": { - "TargetVersion": "v1.64.8" - }, - "v1.10": { - "Error": "golangci-lint version 'v1.10' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.11": { - "Error": "golangci-lint version 'v1.11' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.12": { - "Error": "golangci-lint version 'v1.12' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.13": { - "Error": "golangci-lint version 'v1.13' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.14": { - "Error": "golangci-lint version 'v1.14' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.15": { - "Error": "golangci-lint version 'v1.15' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.16": { - "Error": "golangci-lint version 'v1.16' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.17": { - "Error": "golangci-lint version 'v1.17' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.18": { - "Error": "golangci-lint version 'v1.18' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.19": { - "Error": "golangci-lint version 'v1.19' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.20": { - "Error": "golangci-lint version 'v1.20' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.21": { - "Error": "golangci-lint version 'v1.21' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.22": { - "Error": "golangci-lint version 'v1.22' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.23": { - "Error": "golangci-lint version 'v1.23' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.24": { - "Error": "golangci-lint version 'v1.24' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.25": { - "Error": "golangci-lint version 'v1.25' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.26": { - "Error": "golangci-lint version 'v1.26' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.27": { - "Error": "golangci-lint version 'v1.27' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.28": { - "TargetVersion": "v1.28.3" - }, - "v1.29": { - "TargetVersion": "v1.29.0" - }, - "v1.3": { - "Error": "golangci-lint version 'v1.3' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.30": { - "TargetVersion": "v1.30.0" - }, - "v1.31": { - "TargetVersion": "v1.31.0" - }, - "v1.32": { - "TargetVersion": "v1.32.2" - }, - "v1.33": { - "TargetVersion": "v1.33.2" - }, - "v1.34": { - "TargetVersion": "v1.34.1" - }, - "v1.35": { - "TargetVersion": "v1.35.2" - }, - "v1.36": { - "TargetVersion": "v1.36.0" - }, - "v1.37": { - "TargetVersion": "v1.37.1" - }, - "v1.38": { - "TargetVersion": "v1.38.0" - }, - "v1.39": { - "TargetVersion": "v1.39.0" - }, - "v1.4": { - "Error": "golangci-lint version 'v1.4' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.40": { - "TargetVersion": "v1.40.1" - }, - "v1.41": { - "TargetVersion": "v1.41.1" - }, - "v1.42": { - "TargetVersion": "v1.42.1" - }, - "v1.43": { - "TargetVersion": "v1.43.0" - }, - "v1.44": { - "TargetVersion": "v1.44.2" - }, - "v1.45": { - "TargetVersion": "v1.45.2" - }, - "v1.46": { - "TargetVersion": "v1.46.2" - }, - "v1.47": { - "TargetVersion": "v1.47.3" - }, - "v1.48": { - "TargetVersion": "v1.48.0" - }, - "v1.49": { - "TargetVersion": "v1.49.0" - }, - "v1.5": { - "Error": "golangci-lint version 'v1.5' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.50": { - "TargetVersion": "v1.50.1" - }, - "v1.51": { - "TargetVersion": "v1.51.2" - }, - "v1.52": { - "TargetVersion": "v1.52.2" - }, - "v1.53": { - "TargetVersion": "v1.53.3" - }, - "v1.54": { - "TargetVersion": "v1.54.2" - }, - "v1.55": { - "TargetVersion": "v1.55.2" - }, - "v1.56": { - "TargetVersion": "v1.56.2" - }, - "v1.57": { - "TargetVersion": "v1.57.2" - }, - "v1.58": { - "TargetVersion": "v1.58.2" - }, - "v1.59": { - "TargetVersion": "v1.59.1" - }, - "v1.6": { - "Error": "golangci-lint version 'v1.6' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.60": { - "TargetVersion": "v1.60.3" - }, - "v1.61": { - "TargetVersion": "v1.61.0" - }, - "v1.62": { - "TargetVersion": "v1.62.2" - }, - "v1.63": { - "TargetVersion": "v1.63.4" - }, - "v1.64": { - "TargetVersion": "v1.64.8" - }, - "v1.7": { - "Error": "golangci-lint version 'v1.7' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.8": { - "Error": "golangci-lint version 'v1.8' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.9": { - "Error": "golangci-lint version 'v1.9' isn't supported: we support only v1.28.3 and later versions" - }, - "v2.0": { - "Error": "golangci-lint version 'v2.0' isn't supported: only v1 versions are supported" - }, - "v2.1": { - "Error": "golangci-lint version 'v2.1' isn't supported: only v1 versions are supported" - }, - "v2.2": { - "Error": "golangci-lint version 'v2.2' isn't supported: only v1 versions are supported" - }, - "v2.3": { - "Error": "golangci-lint version 'v2.3' isn't supported: only v1 versions are supported" - }, - "v2.4": { - "Error": "golangci-lint version 'v2.4' isn't supported: only v1 versions are supported" - }, - "v2.5": { - "Error": "golangci-lint version 'v2.5' isn't supported: only v1 versions are supported" - } - } -} diff --git a/assets/github-action-config-v2.json b/assets/github-action-config-v2.json deleted file mode 100644 index 5d3ac85eb165..000000000000 --- a/assets/github-action-config-v2.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "MinorVersionToConfig": { - "latest": { - "TargetVersion": "v2.5.0" - }, - "v1.10": { - "Error": "golangci-lint version 'v1.10' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.11": { - "Error": "golangci-lint version 'v1.11' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.12": { - "Error": "golangci-lint version 'v1.12' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.13": { - "Error": "golangci-lint version 'v1.13' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.14": { - "Error": "golangci-lint version 'v1.14' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.15": { - "Error": "golangci-lint version 'v1.15' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.16": { - "Error": "golangci-lint version 'v1.16' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.17": { - "Error": "golangci-lint version 'v1.17' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.18": { - "Error": "golangci-lint version 'v1.18' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.19": { - "Error": "golangci-lint version 'v1.19' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.20": { - "Error": "golangci-lint version 'v1.20' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.21": { - "Error": "golangci-lint version 'v1.21' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.22": { - "Error": "golangci-lint version 'v1.22' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.23": { - "Error": "golangci-lint version 'v1.23' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.24": { - "Error": "golangci-lint version 'v1.24' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.25": { - "Error": "golangci-lint version 'v1.25' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.26": { - "Error": "golangci-lint version 'v1.26' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.27": { - "Error": "golangci-lint version 'v1.27' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.28": { - "Error": "golangci-lint version 'v1.28' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.29": { - "Error": "golangci-lint version 'v1.29' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.3": { - "Error": "golangci-lint version 'v1.3' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.30": { - "Error": "golangci-lint version 'v1.30' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.31": { - "Error": "golangci-lint version 'v1.31' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.32": { - "Error": "golangci-lint version 'v1.32' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.33": { - "Error": "golangci-lint version 'v1.33' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.34": { - "Error": "golangci-lint version 'v1.34' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.35": { - "Error": "golangci-lint version 'v1.35' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.36": { - "Error": "golangci-lint version 'v1.36' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.37": { - "Error": "golangci-lint version 'v1.37' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.38": { - "Error": "golangci-lint version 'v1.38' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.39": { - "Error": "golangci-lint version 'v1.39' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.4": { - "Error": "golangci-lint version 'v1.4' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.40": { - "Error": "golangci-lint version 'v1.40' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.41": { - "Error": "golangci-lint version 'v1.41' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.42": { - "Error": "golangci-lint version 'v1.42' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.43": { - "Error": "golangci-lint version 'v1.43' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.44": { - "Error": "golangci-lint version 'v1.44' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.45": { - "Error": "golangci-lint version 'v1.45' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.46": { - "Error": "golangci-lint version 'v1.46' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.47": { - "Error": "golangci-lint version 'v1.47' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.48": { - "Error": "golangci-lint version 'v1.48' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.49": { - "Error": "golangci-lint version 'v1.49' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.5": { - "Error": "golangci-lint version 'v1.5' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.50": { - "Error": "golangci-lint version 'v1.50' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.51": { - "Error": "golangci-lint version 'v1.51' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.52": { - "Error": "golangci-lint version 'v1.52' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.53": { - "Error": "golangci-lint version 'v1.53' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.54": { - "Error": "golangci-lint version 'v1.54' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.55": { - "Error": "golangci-lint version 'v1.55' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.56": { - "Error": "golangci-lint version 'v1.56' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.57": { - "Error": "golangci-lint version 'v1.57' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.58": { - "Error": "golangci-lint version 'v1.58' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.59": { - "Error": "golangci-lint version 'v1.59' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.6": { - "Error": "golangci-lint version 'v1.6' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.60": { - "Error": "golangci-lint version 'v1.60' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.61": { - "Error": "golangci-lint version 'v1.61' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.62": { - "Error": "golangci-lint version 'v1.62' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.63": { - "Error": "golangci-lint version 'v1.63' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.64": { - "Error": "golangci-lint version 'v1.64' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.7": { - "Error": "golangci-lint version 'v1.7' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.8": { - "Error": "golangci-lint version 'v1.8' isn't supported: we support only v2.0.0 and later versions" - }, - "v1.9": { - "Error": "golangci-lint version 'v1.9' isn't supported: we support only v2.0.0 and later versions" - }, - "v2.0": { - "TargetVersion": "v2.0.2" - }, - "v2.1": { - "TargetVersion": "v2.1.6" - }, - "v2.2": { - "TargetVersion": "v2.2.2" - }, - "v2.3": { - "TargetVersion": "v2.3.1" - }, - "v2.4": { - "TargetVersion": "v2.4.0" - }, - "v2.5": { - "TargetVersion": "v2.5.0" - } - } -} diff --git a/assets/github-action-config.json b/assets/github-action-config.json deleted file mode 100644 index cc3c65f7189a..000000000000 --- a/assets/github-action-config.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "MinorVersionToConfig": { - "latest": { - "TargetVersion": "v1.64.8" - }, - "v1.10": { - "Error": "golangci-lint version 'v1.10' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.11": { - "Error": "golangci-lint version 'v1.11' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.12": { - "Error": "golangci-lint version 'v1.12' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.13": { - "Error": "golangci-lint version 'v1.13' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.14": { - "Error": "golangci-lint version 'v1.14' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.15": { - "Error": "golangci-lint version 'v1.15' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.16": { - "Error": "golangci-lint version 'v1.16' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.17": { - "Error": "golangci-lint version 'v1.17' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.18": { - "Error": "golangci-lint version 'v1.18' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.19": { - "Error": "golangci-lint version 'v1.19' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.20": { - "Error": "golangci-lint version 'v1.20' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.21": { - "Error": "golangci-lint version 'v1.21' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.22": { - "Error": "golangci-lint version 'v1.22' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.23": { - "Error": "golangci-lint version 'v1.23' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.24": { - "Error": "golangci-lint version 'v1.24' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.25": { - "Error": "golangci-lint version 'v1.25' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.26": { - "Error": "golangci-lint version 'v1.26' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.27": { - "Error": "golangci-lint version 'v1.27' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.28": { - "TargetVersion": "v1.28.3" - }, - "v1.29": { - "TargetVersion": "v1.29.0" - }, - "v1.3": { - "Error": "golangci-lint version 'v1.3' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.30": { - "TargetVersion": "v1.30.0" - }, - "v1.31": { - "TargetVersion": "v1.31.0" - }, - "v1.32": { - "TargetVersion": "v1.32.2" - }, - "v1.33": { - "TargetVersion": "v1.33.2" - }, - "v1.34": { - "TargetVersion": "v1.34.1" - }, - "v1.35": { - "TargetVersion": "v1.35.2" - }, - "v1.36": { - "TargetVersion": "v1.36.0" - }, - "v1.37": { - "TargetVersion": "v1.37.1" - }, - "v1.38": { - "TargetVersion": "v1.38.0" - }, - "v1.39": { - "TargetVersion": "v1.39.0" - }, - "v1.4": { - "Error": "golangci-lint version 'v1.4' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.40": { - "TargetVersion": "v1.40.1" - }, - "v1.41": { - "TargetVersion": "v1.41.1" - }, - "v1.42": { - "TargetVersion": "v1.42.1" - }, - "v1.43": { - "TargetVersion": "v1.43.0" - }, - "v1.44": { - "TargetVersion": "v1.44.2" - }, - "v1.45": { - "TargetVersion": "v1.45.2" - }, - "v1.46": { - "TargetVersion": "v1.46.2" - }, - "v1.47": { - "TargetVersion": "v1.47.3" - }, - "v1.48": { - "TargetVersion": "v1.48.0" - }, - "v1.49": { - "TargetVersion": "v1.49.0" - }, - "v1.5": { - "Error": "golangci-lint version 'v1.5' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.50": { - "TargetVersion": "v1.50.1" - }, - "v1.51": { - "TargetVersion": "v1.51.2" - }, - "v1.52": { - "TargetVersion": "v1.52.2" - }, - "v1.53": { - "TargetVersion": "v1.53.3" - }, - "v1.54": { - "TargetVersion": "v1.54.2" - }, - "v1.55": { - "TargetVersion": "v1.55.2" - }, - "v1.56": { - "TargetVersion": "v1.56.2" - }, - "v1.57": { - "TargetVersion": "v1.57.2" - }, - "v1.58": { - "TargetVersion": "v1.58.2" - }, - "v1.59": { - "TargetVersion": "v1.59.1" - }, - "v1.6": { - "Error": "golangci-lint version 'v1.6' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.60": { - "TargetVersion": "v1.60.3" - }, - "v1.61": { - "TargetVersion": "v1.61.0" - }, - "v1.62": { - "TargetVersion": "v1.62.2" - }, - "v1.63": { - "TargetVersion": "v1.63.4" - }, - "v1.64": { - "TargetVersion": "v1.64.8" - }, - "v1.7": { - "Error": "golangci-lint version 'v1.7' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.8": { - "Error": "golangci-lint version 'v1.8' isn't supported: we support only v1.28.3 and later versions" - }, - "v1.9": { - "Error": "golangci-lint version 'v1.9' isn't supported: we support only v1.28.3 and later versions" - }, - "v2.0": { - "Error": "golangci-lint version 'v2.0' isn't supported: only v1 versions are supported" - }, - "v2.1": { - "Error": "golangci-lint version 'v2.1' isn't supported: only v1 versions are supported" - }, - "v2.2": { - "Error": "golangci-lint version 'v2.2' isn't supported: only v1 versions are supported" - }, - "v2.3": { - "Error": "golangci-lint version 'v2.3' isn't supported: only v1 versions are supported" - }, - "v2.4": { - "Error": "golangci-lint version 'v2.4' isn't supported: only v1 versions are supported" - }, - "v2.5": { - "Error": "golangci-lint version 'v2.5' isn't supported: only v1 versions are supported" - } - } -} diff --git a/assets/go.png b/assets/go.png deleted file mode 100644 index 836180cd8498..000000000000 Binary files a/assets/go.png and /dev/null differ diff --git a/assets/goland-white.svg b/assets/goland-white.svg deleted file mode 100644 index 019568321983..000000000000 --- a/assets/goland-white.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/goland.svg b/assets/goland.svg deleted file mode 100644 index 2622c97c95aa..000000000000 --- a/assets/goland.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/build/buildx-alpine.Dockerfile b/build/buildx-alpine.Dockerfile deleted file mode 100644 index c9a3615d67b0..000000000000 --- a/build/buildx-alpine.Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# syntax=docker/dockerfile:1.4 -FROM golang:1.25-alpine - -# related to https://github.com/golangci/golangci-lint/issues/3107 -ENV GOROOT /usr/local/go - -# Allow to download a more recent version of Go. -# https://go.dev/doc/toolchain -# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto -ENV GOTOOLCHAIN auto - -# gcc is required to support cgo; -# git and mercurial are needed most times for go get`, etc. -# See https://github.com/docker-library/golang/issues/80 -RUN apk --no-cache add gcc musl-dev git mercurial - -# Set all directories as safe -RUN git config --global --add safe.directory '*' - -COPY golangci-lint /usr/bin/ -CMD ["golangci-lint"] diff --git a/build/buildx.Dockerfile b/build/buildx.Dockerfile deleted file mode 100644 index bcebe98bbe08..000000000000 --- a/build/buildx.Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -# syntax=docker/dockerfile:1.4 -FROM golang:1.25 - -# related to https://github.com/golangci/golangci-lint/issues/3107 -ENV GOROOT /usr/local/go - -# Allow to download a more recent version of Go. -# https://go.dev/doc/toolchain -# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto -ENV GOTOOLCHAIN auto - -# Set all directories as safe -RUN git config --global --add safe.directory '*' - -COPY golangci-lint /usr/bin/ -CMD ["golangci-lint"] diff --git a/casts/demo.cast b/casts/demo.cast new file mode 100644 index 000000000000..cbb32c39a944 --- /dev/null +++ b/casts/demo.cast @@ -0,0 +1,19 @@ +{"version": 2, "width": 80, "height": 24, "timestamp": 1640995200, "env": {"TERM": "xterm-256color", "SHELL": "/bin/bash"}, "title": "Demo Terminal Session"} +[0.0, "o", "Welcome to the demo!\r\n"] +[1.0, "o", "$ "] +[2.0, "o", "ls -la\r\n"] +[2.5, "o", "total 8\r\n"] +[2.6, "o", "drwxr-xr-x 2 user user 4096 Jan 1 12:00 .\r\n"] +[2.7, "o", "drwxr-xr-x 20 user user 4096 Jan 1 12:00 ..\r\n"] +[2.8, "o", "-rw-r--r-- 1 user user 0 Jan 1 12:00 demo.txt\r\n"] +[3.0, "o", "$ "] +[4.0, "o", "cat demo.txt\r\n"] +[4.5, "o", "Hello, this is a demo file!\r\n"] +[5.0, "o", "$ "] +[6.0, "o", "echo 'This is a test command'\r\n"] +[6.5, "o", "This is a test command\r\n"] +[7.0, "o", "$ "] +[8.0, "o", "pwd\r\n"] +[8.5, "o", "/home/user/demo\r\n"] +[9.0, "o", "$ "] +[10.0, "o", "exit\r\n"] \ No newline at end of file diff --git a/categories/index.html b/categories/index.html new file mode 100644 index 000000000000..910ed8610ac7 --- /dev/null +++ b/categories/index.html @@ -0,0 +1,65 @@ +Categories – Golangci-lint
New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
\ No newline at end of file diff --git a/categories/index.xml b/categories/index.xml new file mode 100644 index 000000000000..641585b7ef09 --- /dev/null +++ b/categories/index.xml @@ -0,0 +1 @@ +Golangci-lint – Categorieshttps://golangci-lint.run/categories/Recent content in Categories on Golangci-lintHugo -- gohugo.ioen-us \ No newline at end of file diff --git a/cmd/golangci-lint/main.go b/cmd/golangci-lint/main.go deleted file mode 100644 index acb09cd8c0be..000000000000 --- a/cmd/golangci-lint/main.go +++ /dev/null @@ -1,80 +0,0 @@ -package main - -import ( - "cmp" - "fmt" - "os" - "regexp" - "runtime/debug" - "strings" - - "github.com/golangci/golangci-lint/v2/pkg/commands" - "github.com/golangci/golangci-lint/v2/pkg/exitcodes" -) - -var ( - goVersion = "unknown" - - // Populated by goreleaser during build - version = "unknown" - commit = "?" - date = "" -) - -func main() { - info := createBuildInfo() - - if err := commands.Execute(info); err != nil { - _, _ = fmt.Fprintf(os.Stderr, "The command is terminated due to an error: %v\n", err) - os.Exit(exitcodes.Failure) - } -} - -func createBuildInfo() commands.BuildInfo { - info := commands.BuildInfo{ - Commit: commit, - Version: version, - GoVersion: goVersion, - Date: date, - } - - buildInfo, available := debug.ReadBuildInfo() - if !available { - return info - } - - info.GoVersion = buildInfo.GoVersion - - if date != "" { - return info - } - - info.Version = buildInfo.Main.Version - - matched, _ := regexp.MatchString(`v\d+\.\d+\.\d+`, buildInfo.Main.Version) - if matched { - info.Version = strings.TrimPrefix(buildInfo.Main.Version, "v") - } - - var revision string - var modified string - for _, setting := range buildInfo.Settings { - // The `vcs.xxx` information is only available with `go build`. - // This information is not available with `go install` or `go run`. - switch setting.Key { - case "vcs.time": - info.Date = setting.Value - case "vcs.revision": - revision = setting.Value - case "vcs.modified": - modified = setting.Value - } - } - - info.Date = cmp.Or(info.Date, "(unknown)") - - info.Commit = fmt.Sprintf("(%s, modified: %s, mod sum: %q)", - cmp.Or(revision, "unknown"), cmp.Or(modified, "?"), buildInfo.Main.Sum) - - return info -} diff --git a/cmd/golangci-lint/plugins.go b/cmd/golangci-lint/plugins.go deleted file mode 100644 index 541ff7624271..000000000000 --- a/cmd/golangci-lint/plugins.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -// This file is used to declare module plugins. diff --git a/contributing/architecture/index.html b/contributing/architecture/index.html new file mode 100644 index 000000000000..d1cf69973658 --- /dev/null +++ b/contributing/architecture/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/architecture/ \ No newline at end of file diff --git a/contributing/debug/index.html b/contributing/debug/index.html new file mode 100644 index 000000000000..40848e7d198c --- /dev/null +++ b/contributing/debug/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/debug/ \ No newline at end of file diff --git a/contributing/faq/index.html b/contributing/faq/index.html new file mode 100644 index 000000000000..0676d79499c8 --- /dev/null +++ b/contributing/faq/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/faq/ \ No newline at end of file diff --git a/contributing/new-linters/index.html b/contributing/new-linters/index.html new file mode 100644 index 000000000000..efabfd441d06 --- /dev/null +++ b/contributing/new-linters/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/new-linters/ \ No newline at end of file diff --git a/contributing/quick-start/index.html b/contributing/quick-start/index.html new file mode 100644 index 000000000000..a28245028547 --- /dev/null +++ b/contributing/quick-start/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/ \ No newline at end of file diff --git a/contributing/website/index.html b/contributing/website/index.html new file mode 100644 index 000000000000..edcf135ad3c0 --- /dev/null +++ b/contributing/website/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/website/ \ No newline at end of file diff --git a/contributing/workflow/index.html b/contributing/workflow/index.html new file mode 100644 index 000000000000..d4ce86ae9d16 --- /dev/null +++ b/contributing/workflow/index.html @@ -0,0 +1 @@ +https://golangci-lint.run/docs/contributing/workflow/ \ No newline at end of file diff --git a/css/compiled/main.min.c99eb1436102388d2cebf5474f124d13d69054b69976dcf1b5d377c9ebfc0b79.css b/css/compiled/main.min.c99eb1436102388d2cebf5474f124d13d69054b69976dcf1b5d377c9ebfc0b79.css new file mode 100644 index 000000000000..b1713a7fd7b8 --- /dev/null +++ b/css/compiled/main.min.c99eb1436102388d2cebf5474f124d13d69054b69976dcf1b5d377c9ebfc0b79.css @@ -0,0 +1 @@ +:root{--hextra-max-page-width:100%;--hextra-max-navbar-width:90rem;--hextra-max-footer-width:90rem}.hextra-max-page-width{max-width:var(--hextra-max-page-width)}.hextra-max-navbar-width{max-width:var(--hextra-max-navbar-width)}.hextra-max-footer-width{max-width:var(--hextra-max-footer-width)}/*!tailwindcss v4.1.11 | MIT License | https://tailwindcss.com*/@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--hx-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--hx-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--hx-color-red-100:oklch(93.6% .032 17.717);--hx-color-red-200:oklch(88.5% .062 18.334);--hx-color-red-900:oklch(39.6% .141 25.723);--hx-color-orange-50:oklch(98% .016 73.684);--hx-color-orange-100:oklch(95.4% .038 75.164);--hx-color-orange-300:oklch(83.7% .128 66.29);--hx-color-orange-400:oklch(75% .183 55.934);--hx-color-orange-800:oklch(47% .157 37.304);--hx-color-amber-100:oklch(96.2% .059 95.617);--hx-color-amber-200:oklch(92.4% .12 95.746);--hx-color-amber-900:oklch(41.4% .112 45.904);--hx-color-yellow-50:oklch(98.7% .026 102.212);--hx-color-yellow-100:oklch(97.3% .071 103.193);--hx-color-yellow-200:oklch(94.5% .129 101.54);--hx-color-yellow-700:oklch(55.4% .135 66.442);--hx-color-yellow-900:oklch(42.1% .095 57.708);--hx-color-green-100:oklch(96.2% .044 156.743);--hx-color-green-200:oklch(92.5% .084 155.995);--hx-color-green-900:oklch(39.3% .095 152.535);--hx-color-blue-100:oklch(93.2% .032 255.585);--hx-color-blue-200:oklch(88.2% .059 254.128);--hx-color-blue-900:oklch(37.9% .146 265.522);--hx-color-indigo-100:oklch(93% .034 272.788);--hx-color-indigo-200:oklch(87% .065 274.039);--hx-color-indigo-900:oklch(35.9% .144 278.697);--hx-color-purple-100:oklch(94.6% .033 307.174);--hx-color-purple-200:oklch(90.2% .063 306.703);--hx-color-purple-900:oklch(38.1% .176 304.987);--hx-color-slate-50:oklch(98.4% .003 247.858);--hx-color-slate-100:oklch(96.8% .007 247.896);--hx-color-slate-900:oklch(20.8% .042 265.755);--hx-color-gray-50:oklch(98.5% .002 247.839);--hx-color-gray-100:oklch(96.7% .003 264.542);--hx-color-gray-200:oklch(92.8% .006 264.531);--hx-color-gray-300:oklch(87.2% .01 258.338);--hx-color-gray-400:oklch(70.7% .022 261.325);--hx-color-gray-500:oklch(55.1% .027 264.364);--hx-color-gray-600:oklch(44.6% .03 256.802);--hx-color-gray-700:oklch(37.3% .034 259.733);--hx-color-gray-800:oklch(27.8% .033 256.848);--hx-color-gray-900:oklch(21% .034 264.665);--hx-color-neutral-50:oklch(98.5% 0 0);--hx-color-neutral-200:oklch(92.2% 0 0);--hx-color-neutral-300:oklch(87% 0 0);--hx-color-neutral-400:oklch(70.8% 0 0);--hx-color-neutral-500:oklch(55.6% 0 0);--hx-color-neutral-600:oklch(43.9% 0 0);--hx-color-neutral-700:oklch(37.1% 0 0);--hx-color-neutral-800:oklch(26.9% 0 0);--hx-color-neutral-900:oklch(20.5% 0 0);--hx-color-black:#000;--hx-color-white:#fff;--hx-spacing:.25rem;--hx-breakpoint-xl:80rem;--hx-container-6xl:72rem;--hx-text-xs:.75rem;--hx-text-xs--line-height:calc(1/.75);--hx-text-sm:.875rem;--hx-text-sm--line-height:calc(1.25/.875);--hx-text-base:1rem;--hx-text-base--line-height:calc(1.5/1);--hx-text-lg:1.125rem;--hx-text-lg--line-height:calc(1.75/1.125);--hx-text-xl:1.25rem;--hx-text-xl--line-height:calc(1.75/1.25);--hx-text-2xl:1.5rem;--hx-text-2xl--line-height:calc(2/1.5);--hx-text-3xl:1.875rem;--hx-text-3xl--line-height:calc(2.25/1.875);--hx-text-4xl:2.25rem;--hx-text-4xl--line-height:calc(2.5/2.25);--hx-text-5xl:3rem;--hx-text-5xl--line-height:1;--hx-font-weight-normal:400;--hx-font-weight-medium:500;--hx-font-weight-semibold:600;--hx-font-weight-bold:700;--hx-font-weight-extrabold:800;--hx-tracking-tighter:-.05em;--hx-tracking-tight:-.025em;--hx-leading-tight:1.25;--hx-radius-xs:.125rem;--hx-radius-sm:.25rem;--hx-radius-md:.375rem;--hx-radius-lg:.5rem;--hx-radius-xl:.75rem;--hx-radius-3xl:1.5rem;--hx-ease-in:cubic-bezier(.4,0,1,1);--hx-ease-out:cubic-bezier(0,0,.2,1);--hx-ease-in-out:cubic-bezier(.4,0,.2,1);--hx-blur-md:12px;--hx-default-transition-duration:.15s;--hx-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--hx-default-font-family:var(--hx-font-sans);--hx-default-mono-font-family:var(--hx-font-mono);--hx-color-primary-50:hsl(var(--primary-hue)var(--primary-saturation)calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness))/50)*47));--hx-color-primary-100:hsl(var(--primary-hue)var(--primary-saturation)calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness))/50)*44));--hx-color-primary-200:hsl(var(--primary-hue)var(--primary-saturation)calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness))/50)*36));--hx-color-primary-300:hsl(var(--primary-hue)var(--primary-saturation)calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness))/50)*27));--hx-color-primary-400:hsl(var(--primary-hue)var(--primary-saturation)calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness))/50)*16));--hx-color-primary-500:hsl(var(--primary-hue)var(--primary-saturation)var(--primary-lightness));--hx-color-primary-600:hsl(var(--primary-hue)var(--primary-saturation)calc(calc(var(--primary-lightness)/50)*45));--hx-color-primary-700:hsl(var(--primary-hue)var(--primary-saturation)calc(calc(var(--primary-lightness)/50)*39));--hx-color-primary-800:hsl(var(--primary-hue)var(--primary-saturation)calc(calc(var(--primary-lightness)/50)*32));--hx-color-primary-900:hsl(var(--primary-hue)var(--primary-saturation)calc(calc(var(--primary-lightness)/50)*24));--hx-color-dark:#111}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--hx-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--hx-default-font-feature-settings,normal);font-variation-settings:var(--hx-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--hx-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--hx-default-mono-font-feature-settings,normal);font-variation-settings:var(--hx-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.hx\:pointer-events-none{pointer-events:none}.hx\:sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.hx\:absolute{position:absolute}.hx\:relative{position:relative}.hx\:sticky{position:sticky}.hx\:inset-x-0{inset-inline:calc(var(--hx-spacing)*0)}.hx\:inset-y-0{inset-block:calc(var(--hx-spacing)*0)}.hx\:top-0{top:calc(var(--hx-spacing)*0)}.hx\:top-8{top:calc(var(--hx-spacing)*8)}.hx\:top-16{top:calc(var(--hx-spacing)*16)}.hx\:top-\[40\%\]{top:40%}.hx\:top-full{top:100%}.hx\:right-0{right:calc(var(--hx-spacing)*0)}.hx\:bottom-0{bottom:calc(var(--hx-spacing)*0)}.hx\:left-\[24px\]{left:24px}.hx\:left-\[36px\]{left:36px}.hx\:z-20{z-index:20}.hx\:z-\[-1\]{z-index:-1}.hx\:order-last{order:9999}.hx\:m-\[11px\]{margin:11px}.hx\:mx-1{margin-inline:calc(var(--hx-spacing)*1)}.hx\:mx-4{margin-inline:calc(var(--hx-spacing)*4)}.hx\:mx-auto{margin-inline:auto}.hx\:my-1\.5{margin-block:calc(var(--hx-spacing)*1.5)}.hx\:my-2{margin-block:calc(var(--hx-spacing)*2)}.hx\:-mt-20{margin-top:calc(var(--hx-spacing)*-20)}.hx\:mt-1{margin-top:calc(var(--hx-spacing)*1)}.hx\:mt-1\.5{margin-top:calc(var(--hx-spacing)*1.5)}.hx\:mt-2{margin-top:calc(var(--hx-spacing)*2)}.hx\:mt-4{margin-top:calc(var(--hx-spacing)*4)}.hx\:mt-5{margin-top:calc(var(--hx-spacing)*5)}.hx\:mt-6{margin-top:calc(var(--hx-spacing)*6)}.hx\:mt-8{margin-top:calc(var(--hx-spacing)*8)}.hx\:mt-12{margin-top:calc(var(--hx-spacing)*12)}.hx\:mt-16{margin-top:calc(var(--hx-spacing)*16)}.hx\:-mr-2{margin-right:calc(var(--hx-spacing)*-2)}.hx\:mr-1{margin-right:calc(var(--hx-spacing)*1)}.hx\:mr-2{margin-right:calc(var(--hx-spacing)*2)}.hx\:-mb-0\.5{margin-bottom:calc(var(--hx-spacing)*-.5)}.hx\:mb-2{margin-bottom:calc(var(--hx-spacing)*2)}.hx\:mb-4{margin-bottom:calc(var(--hx-spacing)*4)}.hx\:mb-6{margin-bottom:calc(var(--hx-spacing)*6)}.hx\:mb-8{margin-bottom:calc(var(--hx-spacing)*8)}.hx\:mb-10{margin-bottom:calc(var(--hx-spacing)*10)}.hx\:mb-12{margin-bottom:calc(var(--hx-spacing)*12)}.hx\:mb-16{margin-bottom:calc(var(--hx-spacing)*16)}.hx\:-ml-2{margin-left:calc(var(--hx-spacing)*-2)}.hx\:ml-4{margin-left:calc(var(--hx-spacing)*4)}.hx\:line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.hx\:block{display:block}.hx\:flex{display:flex}.hx\:grid{display:grid}.hx\:hidden{display:none}.hx\:inline{display:inline}.hx\:inline-block{display:inline-block}.hx\:inline-flex{display:inline-flex}.hx\:aspect-auto{aspect-ratio:auto}.hx\:h-0{height:calc(var(--hx-spacing)*0)}.hx\:h-2{height:calc(var(--hx-spacing)*2)}.hx\:h-3\.5{height:calc(var(--hx-spacing)*3.5)}.hx\:h-4{height:calc(var(--hx-spacing)*4)}.hx\:h-5{height:calc(var(--hx-spacing)*5)}.hx\:h-7{height:calc(var(--hx-spacing)*7)}.hx\:h-10{height:calc(var(--hx-spacing)*10)}.hx\:h-16{height:calc(var(--hx-spacing)*16)}.hx\:h-\[18px\]{height:18px}.hx\:h-full{height:100%}.hx\:max-h-\(--menu-height\){max-height:var(--menu-height)}.hx\:max-h-64{max-height:calc(var(--hx-spacing)*64)}.hx\:max-h-\[calc\(100vh-var\(--navbar-height\)-env\(safe-area-inset-bottom\)\)\]{max-height:calc(100vh - var(--navbar-height) - env(safe-area-inset-bottom))}.hx\:max-h-\[min\(calc\(50vh-11rem-env\(safe-area-inset-bottom\)\)\,400px\)\]{max-height:min(calc(50vh - 11rem - env(safe-area-inset-bottom)),400px)}.hx\:min-h-\[100px\]{min-height:100px}.hx\:min-h-\[calc\(100vh-var\(--navbar-height\)\)\]{min-height:calc(100vh - var(--navbar-height))}.hx\:w-2{width:calc(var(--hx-spacing)*2)}.hx\:w-3\.5{width:calc(var(--hx-spacing)*3.5)}.hx\:w-4{width:calc(var(--hx-spacing)*4)}.hx\:w-10{width:calc(var(--hx-spacing)*10)}.hx\:w-64{width:calc(var(--hx-spacing)*64)}.hx\:w-\[110\%\]{width:110%}.hx\:w-\[180\%\]{width:180%}.hx\:w-full{width:100%}.hx\:w-max{width:max-content}.hx\:w-screen{width:100vw}.hx\:max-w-6xl{max-width:var(--hx-container-6xl)}.hx\:max-w-\[50\%\]{max-width:50%}.hx\:max-w-\[90rem\]{max-width:90rem}.hx\:max-w-\[min\(calc\(100vw-2rem\)\,calc\(100\%\+20rem\)\)\]{max-width:min(100vw - 2rem,100% + 20rem)}.hx\:max-w-full{max-width:100%}.hx\:max-w-none{max-width:none}.hx\:max-w-screen-xl{max-width:var(--hx-breakpoint-xl)}.hx\:min-w-0{min-width:calc(var(--hx-spacing)*0)}.hx\:min-w-\[18px\]{min-width:18px}.hx\:min-w-\[24px\]{min-width:24px}.hx\:min-w-full{min-width:100%}.hx\:shrink-0{flex-shrink:0}.hx\:grow{flex-grow:1}.hx\:origin-center{transform-origin:50%}.hx\:cursor-default{cursor:default}.hx\:cursor-pointer{cursor:pointer}.hx\:scroll-my-6{scroll-margin-block:calc(var(--hx-spacing)*6)}.hx\:scroll-py-6{scroll-padding-block:calc(var(--hx-spacing)*6)}.hx\:list-none{list-style-type:none}.hx\:appearance-none{appearance:none}.hx\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.hx\:flex-col{flex-direction:column}.hx\:flex-wrap{flex-wrap:wrap}.hx\:items-center{align-items:center}.hx\:items-start{align-items:flex-start}.hx\:justify-between{justify-content:space-between}.hx\:justify-center{justify-content:center}.hx\:justify-end{justify-content:flex-end}.hx\:justify-start{justify-content:flex-start}.hx\:justify-items-start{justify-items:start}.hx\:gap-1{gap:calc(var(--hx-spacing)*1)}.hx\:gap-2{gap:calc(var(--hx-spacing)*2)}.hx\:gap-4{gap:calc(var(--hx-spacing)*4)}.hx\:gap-x-1\.5{column-gap:calc(var(--hx-spacing)*1.5)}.hx\:gap-x-2{column-gap:calc(var(--hx-spacing)*2)}.hx\:gap-y-1{row-gap:calc(var(--hx-spacing)*1)}.hx\:gap-y-2{row-gap:calc(var(--hx-spacing)*2)}.hx\:overflow-auto{overflow:auto}.hx\:overflow-hidden{overflow:hidden}.hx\:overflow-x-auto{overflow-x:auto}.hx\:overflow-x-hidden{overflow-x:hidden}.hx\:overflow-y-auto{overflow-y:auto}.hx\:overflow-y-hidden{overflow-y:hidden}.hx\:overscroll-contain{overscroll-behavior:contain}.hx\:overscroll-x-contain{overscroll-behavior-x:contain}.hx\:rounded-3xl{border-radius:var(--hx-radius-3xl)}.hx\:rounded-full{border-radius:3.40282e38px}.hx\:rounded-lg{border-radius:var(--hx-radius-lg)}.hx\:rounded-md{border-radius:var(--hx-radius-md)}.hx\:rounded-sm{border-radius:var(--hx-radius-sm)}.hx\:rounded-xl{border-radius:var(--hx-radius-xl)}.hx\:rounded-xs{border-radius:var(--hx-radius-xs)}.hx\:rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.hx\:border{border-style:var(--tw-border-style);border-width:1px}.hx\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.hx\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.hx\:border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.hx\:border-amber-200{border-color:var(--hx-color-amber-200)}.hx\:border-black\/5{border-color:var(--hx-color-black)}@supports (color:color-mix(in lab, red, red)){.hx\:border-black\/5{border-color:color-mix(in oklab,var(--hx-color-black)5%,transparent)}}.hx\:border-blue-200{border-color:var(--hx-color-blue-200)}.hx\:border-gray-200{border-color:var(--hx-color-gray-200)}.hx\:border-gray-500{border-color:var(--hx-color-gray-500)}.hx\:border-green-200{border-color:var(--hx-color-green-200)}.hx\:border-indigo-200{border-color:var(--hx-color-indigo-200)}.hx\:border-orange-100{border-color:var(--hx-color-orange-100)}.hx\:border-purple-200{border-color:var(--hx-color-purple-200)}.hx\:border-red-200{border-color:var(--hx-color-red-200)}.hx\:border-transparent{border-color:#0000}.hx\:border-yellow-100{border-color:var(--hx-color-yellow-100)}.hx\:bg-amber-100{background-color:var(--hx-color-amber-100)}.hx\:bg-black\/\[\.05\]{background-color:var(--hx-color-black)}@supports (color:color-mix(in lab, red, red)){.hx\:bg-black\/\[\.05\]{background-color:color-mix(in oklab,var(--hx-color-black)5%,transparent)}}.hx\:bg-blue-100{background-color:var(--hx-color-blue-100)}.hx\:bg-gray-100{background-color:var(--hx-color-gray-100)}.hx\:bg-green-100{background-color:var(--hx-color-green-100)}.hx\:bg-indigo-100{background-color:var(--hx-color-indigo-100)}.hx\:bg-neutral-50{background-color:var(--hx-color-neutral-50)}.hx\:bg-neutral-900{background-color:var(--hx-color-neutral-900)}.hx\:bg-orange-50{background-color:var(--hx-color-orange-50)}.hx\:bg-primary-100{background-color:var(--hx-color-primary-100)}.hx\:bg-primary-400{background-color:var(--hx-color-primary-400)}.hx\:bg-primary-600{background-color:var(--hx-color-primary-600)}.hx\:bg-primary-700\/5{background-color:var(--hx-color-primary-700)}@supports (color:color-mix(in lab, red, red)){.hx\:bg-primary-700\/5{background-color:color-mix(in oklab,var(--hx-color-primary-700)5%,transparent)}}.hx\:bg-purple-100{background-color:var(--hx-color-purple-100)}.hx\:bg-red-100{background-color:var(--hx-color-red-100)}.hx\:bg-transparent{background-color:#0000}.hx\:bg-white{background-color:var(--hx-color-white)}.hx\:bg-yellow-50{background-color:var(--hx-color-yellow-50)}.hx\:bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hx\:from-gray-900{--tw-gradient-from:var(--hx-color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hx\:to-gray-600{--tw-gradient-to:var(--hx-color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hx\:bg-clip-text{-webkit-background-clip:text;background-clip:text}.hx\:p-0\.5{padding:calc(var(--hx-spacing)*.5)}.hx\:p-1{padding:calc(var(--hx-spacing)*1)}.hx\:p-1\.5{padding:calc(var(--hx-spacing)*1.5)}.hx\:p-2{padding:calc(var(--hx-spacing)*2)}.hx\:p-4{padding:calc(var(--hx-spacing)*4)}.hx\:p-6{padding:calc(var(--hx-spacing)*6)}.hx\:px-1\.5{padding-inline:calc(var(--hx-spacing)*1.5)}.hx\:px-2{padding-inline:calc(var(--hx-spacing)*2)}.hx\:px-2\.5{padding-inline:calc(var(--hx-spacing)*2.5)}.hx\:px-3{padding-inline:calc(var(--hx-spacing)*3)}.hx\:px-4{padding-inline:calc(var(--hx-spacing)*4)}.hx\:px-6{padding-inline:calc(var(--hx-spacing)*6)}.hx\:px-8{padding-inline:calc(var(--hx-spacing)*8)}.hx\:py-1{padding-block:calc(var(--hx-spacing)*1)}.hx\:py-1\.5{padding-block:calc(var(--hx-spacing)*1.5)}.hx\:py-2{padding-block:calc(var(--hx-spacing)*2)}.hx\:py-2\.5{padding-block:calc(var(--hx-spacing)*2.5)}.hx\:py-3{padding-block:calc(var(--hx-spacing)*3)}.hx\:py-4{padding-block:calc(var(--hx-spacing)*4)}.hx\:py-12{padding-block:calc(var(--hx-spacing)*12)}.hx\:pt-4{padding-top:calc(var(--hx-spacing)*4)}.hx\:pt-6{padding-top:calc(var(--hx-spacing)*6)}.hx\:pt-8{padding-top:calc(var(--hx-spacing)*8)}.hx\:pr-2{padding-right:calc(var(--hx-spacing)*2)}.hx\:pr-4{padding-right:calc(var(--hx-spacing)*4)}.hx\:pr-\[calc\(env\(safe-area-inset-right\)-1\.5rem\)\]{padding-right:calc(env(safe-area-inset-right) - 1.5rem)}.hx\:pr-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\]{padding-right:max(env(safe-area-inset-left),1.5rem)}.hx\:pr-\[max\(env\(safe-area-inset-right\)\,1\.5rem\)\]{padding-right:max(env(safe-area-inset-right),1.5rem)}.hx\:pb-8{padding-bottom:calc(var(--hx-spacing)*8)}.hx\:pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.hx\:pb-px{padding-bottom:1px}.hx\:pl-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\]{padding-left:max(env(safe-area-inset-left),1.5rem)}.hx\:text-center{text-align:center}.hx\:text-left{text-align:left}.hx\:align-\[-2\.5px\]{vertical-align:-2.5px}.hx\:align-baseline{vertical-align:baseline}.hx\:align-middle{vertical-align:middle}.hx\:align-text-bottom{vertical-align:text-bottom}.hx\:font-mono{font-family:var(--hx-font-mono)}.hx\:text-2xl{font-size:var(--hx-text-2xl);line-height:var(--tw-leading,var(--hx-text-2xl--line-height))}.hx\:text-4xl{font-size:var(--hx-text-4xl);line-height:var(--tw-leading,var(--hx-text-4xl--line-height))}.hx\:text-base{font-size:var(--hx-text-base);line-height:var(--tw-leading,var(--hx-text-base--line-height))}.hx\:text-lg{font-size:var(--hx-text-lg);line-height:var(--tw-leading,var(--hx-text-lg--line-height))}.hx\:text-sm{font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height))}.hx\:text-xl{font-size:var(--hx-text-xl);line-height:var(--tw-leading,var(--hx-text-xl--line-height))}.hx\:text-xs{font-size:var(--hx-text-xs);line-height:var(--tw-leading,var(--hx-text-xs--line-height))}.hx\:text-\[\.65rem\]{font-size:.65rem}.hx\:text-\[10px\]{font-size:10px}.hx\:leading-5{--tw-leading:calc(var(--hx-spacing)*5);line-height:calc(var(--hx-spacing)*5)}.hx\:leading-6{--tw-leading:calc(var(--hx-spacing)*6);line-height:calc(var(--hx-spacing)*6)}.hx\:leading-7{--tw-leading:calc(var(--hx-spacing)*7);line-height:calc(var(--hx-spacing)*7)}.hx\:leading-none{--tw-leading:1;line-height:1}.hx\:leading-tight{--tw-leading:var(--hx-leading-tight);line-height:var(--hx-leading-tight)}.hx\:font-bold{--tw-font-weight:var(--hx-font-weight-bold);font-weight:var(--hx-font-weight-bold)}.hx\:font-extrabold{--tw-font-weight:var(--hx-font-weight-extrabold);font-weight:var(--hx-font-weight-extrabold)}.hx\:font-medium{--tw-font-weight:var(--hx-font-weight-medium);font-weight:var(--hx-font-weight-medium)}.hx\:font-normal{--tw-font-weight:var(--hx-font-weight-normal);font-weight:var(--hx-font-weight-normal)}.hx\:font-semibold{--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold)}.hx\:tracking-tight{--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight)}.hx\:tracking-tighter{--tw-tracking:var(--hx-tracking-tighter);letter-spacing:var(--hx-tracking-tighter)}.hx\:break-words{overflow-wrap:break-word}.hx\:text-ellipsis{text-overflow:ellipsis}.hx\:whitespace-nowrap{white-space:nowrap}.hx\:text-\[color\:hsl\(var\(--primary-hue\)\,100\%\,50\%\)\]{color:hsl(var(--primary-hue),100%,50%)}.hx\:text-amber-900{color:var(--hx-color-amber-900)}.hx\:text-blue-900{color:var(--hx-color-blue-900)}.hx\:text-current{color:currentColor}.hx\:text-gray-100{color:var(--hx-color-gray-100)}.hx\:text-gray-500{color:var(--hx-color-gray-500)}.hx\:text-gray-600{color:var(--hx-color-gray-600)}.hx\:text-gray-700{color:var(--hx-color-gray-700)}.hx\:text-gray-800{color:var(--hx-color-gray-800)}.hx\:text-gray-900{color:var(--hx-color-gray-900)}.hx\:text-green-900{color:var(--hx-color-green-900)}.hx\:text-indigo-900{color:var(--hx-color-indigo-900)}.hx\:text-orange-800{color:var(--hx-color-orange-800)}.hx\:text-primary-800{color:var(--hx-color-primary-800)}.hx\:text-purple-900{color:var(--hx-color-purple-900)}.hx\:text-red-900{color:var(--hx-color-red-900)}.hx\:text-slate-50{color:var(--hx-color-slate-50)}.hx\:text-slate-900{color:var(--hx-color-slate-900)}.hx\:text-transparent{color:#0000}.hx\:text-white{color:var(--hx-color-white)}.hx\:text-yellow-900{color:var(--hx-color-yellow-900)}.hx\:capitalize{text-transform:capitalize}.hx\:no-underline{text-decoration-line:none}.hx\:underline{text-decoration-line:underline}.hx\:decoration-from-font{text-decoration-thickness:from-font}.hx\:underline-offset-2{text-underline-offset:2px}.hx\:opacity-0{opacity:0}.hx\:opacity-50{opacity:.5}.hx\:opacity-80{opacity:.8}.hx\:shadow-\[0_-12px_16px_\#fff\]{--tw-shadow:0 -12px 16px var(--tw-shadow-color,#fff);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-\[0_-12px_16px_white\]{--tw-shadow:0 -12px 16px var(--tw-shadow-color,white);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-\[0_2px_4px_rgba\(0\,0\,0\,\.02\)\,0_1px_0_rgba\(0\,0\,0\,\.06\)\]{--tw-shadow:0 2px 4px var(--tw-shadow-color,#00000005),0 1px 0 var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:shadow-gray-100{--tw-shadow-color:var(--hx-color-gray-100)}@supports (color:color-mix(in lab, red, red)){.hx\:shadow-gray-100{--tw-shadow-color:color-mix(in oklab,var(--hx-color-gray-100)var(--tw-shadow-alpha),transparent)}}.hx\:ring-black\/5{--tw-ring-color:var(--hx-color-black)}@supports (color:color-mix(in lab, red, red)){.hx\:ring-black\/5{--tw-ring-color:color-mix(in oklab,var(--hx-color-black)5%,transparent)}}.hx\:transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.hx\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.hx\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.hx\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.hx\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.hx\:duration-75{--tw-duration:75ms;transition-duration:75ms}.hx\:duration-200{--tw-duration:.2s;transition-duration:.2s}.hx\:ease-in{--tw-ease:var(--hx-ease-in);transition-timing-function:var(--hx-ease-in)}.hx\:ease-in-out{--tw-ease:var(--hx-ease-in-out);transition-timing-function:var(--hx-ease-in-out)}.hx\:select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.hx\:group-hover\:underline:is(:where(.hx\:group):hover *){text-decoration-line:underline}.hx\:group-hover\/code\:opacity-100:is(:where(.hx\:group\/code):hover *){opacity:1}}.hx\:group-data-\[theme\=dark\]\:hidden:is(:where(.hx\:group)[data-theme=dark] *),.hx\:group-data-\[theme\=light\]\:hidden:is(:where(.hx\:group)[data-theme=light] *),.hx\:group-data-\[theme\=system\]\:hidden:is(:where(.hx\:group)[data-theme=system] *){display:none}.hx\:group-\[\.copied\]\/copybtn\:block:is(:where(.hx\:group\/copybtn).copied *){display:block}.hx\:group-\[\.copied\]\/copybtn\:hidden:is(:where(.hx\:group\/copybtn).copied *){display:none}.hx\:placeholder\:text-gray-500::placeholder{color:var(--hx-color-gray-500)}.hx\:before\:pointer-events-none:before{content:var(--tw-content);pointer-events:none}.hx\:before\:absolute:before{content:var(--tw-content);position:absolute}.hx\:before\:inset-0:before{content:var(--tw-content);inset:calc(var(--hx-spacing)*0)}.hx\:before\:inset-y-1:before{content:var(--tw-content);inset-block:calc(var(--hx-spacing)*1)}.hx\:before\:mr-1:before{content:var(--tw-content);margin-right:calc(var(--hx-spacing)*1)}.hx\:before\:inline-block:before{content:var(--tw-content);display:inline-block}.hx\:before\:w-px:before{content:var(--tw-content);width:1px}.hx\:before\:bg-gray-200:before{content:var(--tw-content);background-color:var(--hx-color-gray-200)}.hx\:before\:opacity-25:before{content:var(--tw-content);opacity:.25}.hx\:before\:transition-transform:before{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.hx\:before\:content-\[\"\"\]:before{content:var(--tw-content);--tw-content:"";content:var(--tw-content)}.hx\:before\:content-\[\'\#\'\]:before{content:var(--tw-content);--tw-content:"#";content:var(--tw-content)}.hx\:before\:content-\[\'\'\]:before{content:var(--tw-content);--tw-content:"";content:var(--tw-content)}.hx\:before\:content-\[\\\"\\\"\]:before{content:var(--tw-content);--tw-content:\"\";content:var(--tw-content)}.hx\:group-open\:before\:rotate-90:is(:where(.hx\:group):is([open],:popover-open,:open) *):before{content:var(--tw-content);rotate:90deg}.hx\:first\:mt-0:first-child{margin-top:calc(var(--hx-spacing)*0)}.hx\:last-of-type\:mb-0:last-of-type{margin-bottom:calc(var(--hx-spacing)*0)}@media (hover:hover){.hx\:hover\:border-gray-200:hover{border-color:var(--hx-color-gray-200)}.hx\:hover\:border-gray-300:hover{border-color:var(--hx-color-gray-300)}.hx\:hover\:border-gray-400:hover{border-color:var(--hx-color-gray-400)}.hx\:hover\:border-gray-900:hover{border-color:var(--hx-color-gray-900)}.hx\:hover\:bg-gray-100:hover{background-color:var(--hx-color-gray-100)}.hx\:hover\:bg-gray-800\/5:hover{background-color:var(--hx-color-gray-800)}@supports (color:color-mix(in lab, red, red)){.hx\:hover\:bg-gray-800\/5:hover{background-color:color-mix(in oklab,var(--hx-color-gray-800)5%,transparent)}}.hx\:hover\:bg-primary-50:hover{background-color:var(--hx-color-primary-50)}.hx\:hover\:bg-primary-700:hover{background-color:var(--hx-color-primary-700)}.hx\:hover\:bg-slate-50:hover{background-color:var(--hx-color-slate-50)}.hx\:hover\:text-black:hover{color:var(--hx-color-black)}.hx\:hover\:text-gray-800:hover{color:var(--hx-color-gray-800)}.hx\:hover\:text-gray-900:hover{color:var(--hx-color-gray-900)}.hx\:hover\:text-primary-600:hover{color:var(--hx-color-primary-600)}.hx\:hover\:opacity-60:hover{opacity:.6}.hx\:hover\:opacity-75:hover{opacity:.75}.hx\:hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:hover\:shadow-gray-100:hover{--tw-shadow-color:var(--hx-color-gray-100)}@supports (color:color-mix(in lab, red, red)){.hx\:hover\:shadow-gray-100:hover{--tw-shadow-color:color-mix(in oklab,var(--hx-color-gray-100)var(--tw-shadow-alpha),transparent)}}}.hx\:focus\:bg-white:focus{background-color:var(--hx-color-white)}.hx\:focus\:hextra-focus:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:var(--hx-color-primary-200);--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-offset-color:var(--hx-color-primary-300);--tw-outline-style:none;outline-style:none}.hx\:focus\:hextra-focus:focus:where(.dark,.dark *){--tw-ring-color:var(--hx-color-primary-800);--tw-ring-offset-color:var(--hx-color-primary-700)}.hx\:focus\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:focus\:ring-primary-300:focus{--tw-ring-color:var(--hx-color-primary-300)}.hx\:focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.hx\:focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.hx\:active\:bg-gray-400\/20:active{background-color:var(--hx-color-gray-400)}@supports (color:color-mix(in lab, red, red)){.hx\:active\:bg-gray-400\/20:active{background-color:color-mix(in oklab,var(--hx-color-gray-400)20%,transparent)}}.hx\:active\:opacity-50:active{opacity:.5}.hx\:active\:shadow-sm:active{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:active\:shadow-gray-200:active{--tw-shadow-color:var(--hx-color-gray-200)}@supports (color:color-mix(in lab, red, red)){.hx\:active\:shadow-gray-200:active{--tw-shadow-color:color-mix(in oklab,var(--hx-color-gray-200)var(--tw-shadow-alpha),transparent)}}.hx\:data-\[state\=closed\]\:hidden[data-state=closed],.hx\:data-\[state\=open\]\:hidden[data-state=open]{display:none}.hx\:data-\[state\=selected\]\:block[data-state=selected]{display:block}.hx\:data-\[state\=selected\]\:border-primary-500[data-state=selected]{border-color:var(--hx-color-primary-500)}.hx\:data-\[state\=selected\]\:text-primary-600[data-state=selected]{color:var(--hx-color-primary-600)}@media (prefers-contrast:more){.hx\:contrast-more\:border{border-style:var(--tw-border-style);border-width:1px}.hx\:contrast-more\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.hx\:contrast-more\:border-current{border-color:currentColor}.hx\:contrast-more\:border-gray-800{border-color:var(--hx-color-gray-800)}.hx\:contrast-more\:border-gray-900{border-color:var(--hx-color-gray-900)}.hx\:contrast-more\:border-neutral-400{border-color:var(--hx-color-neutral-400)}.hx\:contrast-more\:border-primary-500{border-color:var(--hx-color-primary-500)}.hx\:contrast-more\:border-transparent{border-color:#0000}.hx\:contrast-more\:font-bold{--tw-font-weight:var(--hx-font-weight-bold);font-weight:var(--hx-font-weight-bold)}.hx\:contrast-more\:text-current{color:currentColor}.hx\:contrast-more\:text-gray-700{color:var(--hx-color-gray-700)}.hx\:contrast-more\:text-gray-800{color:var(--hx-color-gray-800)}.hx\:contrast-more\:text-gray-900{color:var(--hx-color-gray-900)}.hx\:contrast-more\:underline{text-decoration-line:underline}.hx\:contrast-more\:shadow-\[0_0_0_1px_\#000\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:contrast-more\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media (hover:hover){.hx\:contrast-more\:hover\:border-gray-900:hover{border-color:var(--hx-color-gray-900)}}}@media not all and (min-width:80rem){.hx\:max-xl\:hidden{display:none}}@media not all and (min-width:64rem){.hx\:max-lg\:min-h-\[340px\]{min-height:340px}}@media not all and (min-width:48rem){.hx\:max-md\:sticky{position:sticky}.hx\:max-md\:hidden{display:none}.hx\:max-md\:min-h-\[340px\]{min-height:340px}.hx\:max-md\:\[transform\:translate3d\(0\,-100\%\,0\)\]{transform:translateY(-100%)}.hx\:max-md\:\[transform\:translate3d\(0\,0\,0\)\]{transform:translate(0)}}@media not all and (min-width:40rem){.hx\:max-sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media (min-width:40rem){.hx\:sm\:block{display:block}.hx\:sm\:flex{display:flex}.hx\:sm\:w-\[110\%\]{width:110%}.hx\:sm\:items-start{align-items:flex-start}.hx\:sm\:text-xl{font-size:var(--hx-text-xl);line-height:var(--tw-leading,var(--hx-text-xl--line-height))}@media not all and (min-width:64rem){.hx\:sm\:max-lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@media (min-width:48rem){.hx\:md\:sticky{position:sticky}.hx\:md\:top-16{top:calc(var(--hx-spacing)*16)}.hx\:md\:mr-0{margin-right:calc(var(--hx-spacing)*0)}.hx\:md\:hidden{display:none}.hx\:md\:inline-block{display:inline-block}.hx\:md\:inline-flex{display:inline-flex}.hx\:md\:aspect-\[1\.1\/1\]{aspect-ratio:1.1}.hx\:md\:h-\[calc\(100vh-var\(--navbar-height\)-var\(--menu-height\)\)\]{height:calc(100vh - var(--navbar-height) - var(--menu-height))}.hx\:md\:max-h-\[min\(calc\(100vh-5rem-env\(safe-area-inset-bottom\)\)\,400px\)\]{max-height:min(calc(100vh - 5rem - env(safe-area-inset-bottom)),400px)}.hx\:md\:w-64{width:calc(var(--hx-spacing)*64)}.hx\:md\:shrink-0{flex-shrink:0}.hx\:md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.hx\:md\:justify-start{justify-content:flex-start}.hx\:md\:self-start{align-self:flex-start}.hx\:md\:overflow-auto{overflow:auto}.hx\:md\:px-12{padding-inline:calc(var(--hx-spacing)*12)}.hx\:md\:pt-12{padding-top:calc(var(--hx-spacing)*12)}.hx\:md\:text-3xl{font-size:var(--hx-text-3xl);line-height:var(--tw-leading,var(--hx-text-3xl--line-height))}.hx\:md\:text-5xl{font-size:var(--hx-text-5xl);line-height:var(--tw-leading,var(--hx-text-5xl--line-height))}.hx\:md\:text-lg{font-size:var(--hx-text-lg);line-height:var(--tw-leading,var(--hx-text-lg--line-height))}.hx\:md\:text-sm{font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height))}}@media (min-width:64rem){.hx\:lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:80rem){.hx\:xl\:block{display:block}.hx\:xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.hx\:ltr\:right-1\.5:where(:dir(ltr),[dir=ltr],[dir=ltr] *){right:calc(var(--hx-spacing)*1.5)}.hx\:ltr\:right-3:where(:dir(ltr),[dir=ltr],[dir=ltr] *){right:calc(var(--hx-spacing)*3)}.hx\:ltr\:-mr-4:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-right:calc(var(--hx-spacing)*-4)}.hx\:ltr\:mr-auto:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-right:auto}.hx\:ltr\:ml-1:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--hx-spacing)*1)}.hx\:ltr\:ml-3:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--hx-spacing)*3)}.hx\:ltr\:ml-auto:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:auto}.hx\:ltr\:rotate-180:where(:dir(ltr),[dir=ltr],[dir=ltr] *){rotate:180deg}.hx\:ltr\:border-l:where(:dir(ltr),[dir=ltr],[dir=ltr] *){border-left-style:var(--tw-border-style);border-left-width:1px}.hx\:ltr\:pr-0:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-right:calc(var(--hx-spacing)*0)}.hx\:ltr\:pr-2:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-right:calc(var(--hx-spacing)*2)}.hx\:ltr\:pr-4:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-right:calc(var(--hx-spacing)*4)}.hx\:ltr\:pr-9:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-right:calc(var(--hx-spacing)*9)}.hx\:ltr\:pl-3:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*3)}.hx\:ltr\:pl-4:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*4)}.hx\:ltr\:pl-5:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*5)}.hx\:ltr\:pl-6:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*6)}.hx\:ltr\:pl-8:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*8)}.hx\:ltr\:pl-12:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*12)}.hx\:ltr\:pl-16:where(:dir(ltr),[dir=ltr],[dir=ltr] *){padding-left:calc(var(--hx-spacing)*16)}.hx\:ltr\:text-right:where(:dir(ltr),[dir=ltr],[dir=ltr] *){text-align:right}.hx\:ltr\:before\:left-0:where(:dir(ltr),[dir=ltr],[dir=ltr] *):before{content:var(--tw-content);left:calc(var(--hx-spacing)*0)}@media (min-width:48rem){.hx\:ltr\:md\:left-auto:where(:dir(ltr),[dir=ltr],[dir=ltr] *){left:auto}}.hx\:rtl\:left-1\.5:where(:dir(rtl),[dir=rtl],[dir=rtl] *){left:calc(var(--hx-spacing)*1.5)}.hx\:rtl\:left-3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){left:calc(var(--hx-spacing)*3)}.hx\:rtl\:mr-1:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--hx-spacing)*1)}.hx\:rtl\:mr-3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--hx-spacing)*3)}.hx\:rtl\:mr-auto:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:auto}.hx\:rtl\:-ml-4:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-left:calc(var(--hx-spacing)*-4)}.hx\:rtl\:ml-auto:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-left:auto}.hx\:rtl\:-rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:-180deg}.hx\:rtl\:rotate-270:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:270deg}.hx\:rtl\:border-r:where(:dir(rtl),[dir=rtl],[dir=rtl] *){border-right-style:var(--tw-border-style);border-right-width:1px}.hx\:rtl\:pr-3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*3)}.hx\:rtl\:pr-4:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*4)}.hx\:rtl\:pr-5:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*5)}.hx\:rtl\:pr-6:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*6)}.hx\:rtl\:pr-8:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*8)}.hx\:rtl\:pr-12:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*12)}.hx\:rtl\:pr-16:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-right:calc(var(--hx-spacing)*16)}.hx\:rtl\:pl-2:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-left:calc(var(--hx-spacing)*2)}.hx\:rtl\:pl-4:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-left:calc(var(--hx-spacing)*4)}.hx\:rtl\:pl-9:where(:dir(rtl),[dir=rtl],[dir=rtl] *){padding-left:calc(var(--hx-spacing)*9)}.hx\:rtl\:text-left:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:left}.hx\:rtl\:before\:right-0:where(:dir(rtl),[dir=rtl],[dir=rtl] *):before{content:var(--tw-content);right:calc(var(--hx-spacing)*0)}.hx\:rtl\:before\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *):before{content:var(--tw-content);rotate:180deg}@media (min-width:48rem){.hx\:rtl\:md\:right-auto:where(:dir(rtl),[dir=rtl],[dir=rtl] *){right:auto}}.hx\:dark\:block:where(.dark,.dark *){display:block}.hx\:dark\:hidden:where(.dark,.dark *){display:none}.hx\:dark\:border-amber-200\/30:where(.dark,.dark *){border-color:var(--hx-color-amber-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-amber-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-amber-200)30%,transparent)}}.hx\:dark\:border-blue-200\/30:where(.dark,.dark *){border-color:var(--hx-color-blue-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-blue-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-blue-200)30%,transparent)}}.hx\:dark\:border-gray-100\/20:where(.dark,.dark *){border-color:var(--hx-color-gray-100)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-gray-100\/20:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-gray-100)20%,transparent)}}.hx\:dark\:border-gray-400:where(.dark,.dark *){border-color:var(--hx-color-gray-400)}.hx\:dark\:border-green-200\/30:where(.dark,.dark *){border-color:var(--hx-color-green-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-green-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-green-200)30%,transparent)}}.hx\:dark\:border-indigo-200\/30:where(.dark,.dark *){border-color:var(--hx-color-indigo-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-indigo-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-indigo-200)30%,transparent)}}.hx\:dark\:border-neutral-700:where(.dark,.dark *){border-color:var(--hx-color-neutral-700)}.hx\:dark\:border-neutral-800:where(.dark,.dark *){border-color:var(--hx-color-neutral-800)}.hx\:dark\:border-orange-400\/30:where(.dark,.dark *){border-color:var(--hx-color-orange-400)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-orange-400\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-orange-400)30%,transparent)}}.hx\:dark\:border-purple-200\/30:where(.dark,.dark *){border-color:var(--hx-color-purple-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-purple-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-purple-200)30%,transparent)}}.hx\:dark\:border-red-200\/30:where(.dark,.dark *){border-color:var(--hx-color-red-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-red-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-red-200)30%,transparent)}}.hx\:dark\:border-white\/10:where(.dark,.dark *){border-color:var(--hx-color-white)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-white\/10:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-white)10%,transparent)}}.hx\:dark\:border-yellow-200\/30:where(.dark,.dark *){border-color:var(--hx-color-yellow-200)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:border-yellow-200\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-yellow-200)30%,transparent)}}.hx\:dark\:bg-amber-900\/30:where(.dark,.dark *){background-color:var(--hx-color-amber-900)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-amber-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-amber-900)30%,transparent)}}.hx\:dark\:bg-blue-900\/30:where(.dark,.dark *){background-color:var(--hx-color-blue-900)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-blue-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-blue-900)30%,transparent)}}.hx\:dark\:bg-dark:where(.dark,.dark *),.hx\:dark\:bg-dark\/50:where(.dark,.dark *){background-color:var(--hx-color-dark)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-dark\/50:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-dark)50%,transparent)}}.hx\:dark\:bg-gray-50\/10:where(.dark,.dark *){background-color:var(--hx-color-gray-50)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-gray-50\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-gray-50)10%,transparent)}}.hx\:dark\:bg-green-900\/30:where(.dark,.dark *){background-color:var(--hx-color-green-900)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-green-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-green-900)30%,transparent)}}.hx\:dark\:bg-indigo-900\/30:where(.dark,.dark *){background-color:var(--hx-color-indigo-900)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-indigo-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-indigo-900)30%,transparent)}}.hx\:dark\:bg-neutral-800:where(.dark,.dark *){background-color:var(--hx-color-neutral-800)}.hx\:dark\:bg-neutral-900:where(.dark,.dark *){background-color:var(--hx-color-neutral-900)}.hx\:dark\:bg-orange-400\/20:where(.dark,.dark *){background-color:var(--hx-color-orange-400)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-orange-400\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-orange-400)20%,transparent)}}.hx\:dark\:bg-primary-300\/10:where(.dark,.dark *){background-color:var(--hx-color-primary-300)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-primary-300\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-primary-300)10%,transparent)}}.hx\:dark\:bg-primary-400\/10:where(.dark,.dark *){background-color:var(--hx-color-primary-400)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-primary-400\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-primary-400)10%,transparent)}}.hx\:dark\:bg-primary-600:where(.dark,.dark *){background-color:var(--hx-color-primary-600)}.hx\:dark\:bg-purple-900\/30:where(.dark,.dark *){background-color:var(--hx-color-purple-900)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-purple-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-purple-900)30%,transparent)}}.hx\:dark\:bg-red-900\/30:where(.dark,.dark *){background-color:var(--hx-color-red-900)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-red-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-red-900)30%,transparent)}}.hx\:dark\:bg-yellow-700\/30:where(.dark,.dark *){background-color:var(--hx-color-yellow-700)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:bg-yellow-700\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-yellow-700)30%,transparent)}}.hx\:dark\:from-gray-100:where(.dark,.dark *){--tw-gradient-from:var(--hx-color-gray-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hx\:dark\:to-gray-400:where(.dark,.dark *){--tw-gradient-to:var(--hx-color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hx\:dark\:text-amber-200:where(.dark,.dark *){color:var(--hx-color-amber-200)}.hx\:dark\:text-blue-200:where(.dark,.dark *){color:var(--hx-color-blue-200)}.hx\:dark\:text-gray-50:where(.dark,.dark *){color:var(--hx-color-gray-50)}.hx\:dark\:text-gray-100:where(.dark,.dark *){color:var(--hx-color-gray-100)}.hx\:dark\:text-gray-200:where(.dark,.dark *){color:var(--hx-color-gray-200)}.hx\:dark\:text-gray-300:where(.dark,.dark *){color:var(--hx-color-gray-300)}.hx\:dark\:text-gray-400:where(.dark,.dark *){color:var(--hx-color-gray-400)}.hx\:dark\:text-green-200:where(.dark,.dark *){color:var(--hx-color-green-200)}.hx\:dark\:text-indigo-200:where(.dark,.dark *){color:var(--hx-color-indigo-200)}.hx\:dark\:text-neutral-200:where(.dark,.dark *){color:var(--hx-color-neutral-200)}.hx\:dark\:text-neutral-400:where(.dark,.dark *){color:var(--hx-color-neutral-400)}.hx\:dark\:text-orange-300:where(.dark,.dark *){color:var(--hx-color-orange-300)}.hx\:dark\:text-primary-600:where(.dark,.dark *){color:var(--hx-color-primary-600)}.hx\:dark\:text-purple-200:where(.dark,.dark *){color:var(--hx-color-purple-200)}.hx\:dark\:text-red-200:where(.dark,.dark *){color:var(--hx-color-red-200)}.hx\:dark\:text-slate-100:where(.dark,.dark *){color:var(--hx-color-slate-100)}.hx\:dark\:text-white:where(.dark,.dark *){color:var(--hx-color-white)}.hx\:dark\:text-yellow-200:where(.dark,.dark *){color:var(--hx-color-yellow-200)}.hx\:dark\:opacity-80:where(.dark,.dark *){opacity:.8}.hx\:dark\:shadow-\[0_-1px_0_rgba\(255\,255\,255\,\.1\)_inset\]:where(.dark,.dark *){--tw-shadow:0 -1px 0 var(--tw-shadow-color,#ffffff1a)inset;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:dark\:shadow-\[0_-12px_16px_\#111\]:where(.dark,.dark *){--tw-shadow:0 -12px 16px var(--tw-shadow-color,#111);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:dark\:shadow-none:where(.dark,.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:dark\:ring-white\/20:where(.dark,.dark *){--tw-ring-color:var(--hx-color-white)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:ring-white\/20:where(.dark,.dark *){--tw-ring-color:color-mix(in oklab,var(--hx-color-white)20%,transparent)}}.hx\:dark\:placeholder\:text-gray-400:where(.dark,.dark *)::placeholder{color:var(--hx-color-gray-400)}.hx\:dark\:before\:bg-neutral-800:where(.dark,.dark *):before{content:var(--tw-content);background-color:var(--hx-color-neutral-800)}.hx\:dark\:before\:invert:where(.dark,.dark *):before{content:var(--tw-content);--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}@media (hover:hover){.hx\:dark\:hover\:border-gray-100:where(.dark,.dark *):hover{border-color:var(--hx-color-gray-100)}.hx\:dark\:hover\:border-gray-600:where(.dark,.dark *):hover{border-color:var(--hx-color-gray-600)}.hx\:dark\:hover\:border-neutral-500:where(.dark,.dark *):hover{border-color:var(--hx-color-neutral-500)}.hx\:dark\:hover\:border-neutral-700:where(.dark,.dark *):hover{border-color:var(--hx-color-neutral-700)}.hx\:dark\:hover\:border-neutral-800:where(.dark,.dark *):hover{border-color:var(--hx-color-neutral-800)}.hx\:dark\:hover\:bg-gray-100\/5:where(.dark,.dark *):hover{background-color:var(--hx-color-gray-100)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:hover\:bg-gray-100\/5:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--hx-color-gray-100)5%,transparent)}}.hx\:dark\:hover\:bg-neutral-700:where(.dark,.dark *):hover{background-color:var(--hx-color-neutral-700)}.hx\:dark\:hover\:bg-neutral-800:where(.dark,.dark *):hover{background-color:var(--hx-color-neutral-800)}.hx\:dark\:hover\:bg-neutral-900:where(.dark,.dark *):hover{background-color:var(--hx-color-neutral-900)}.hx\:dark\:hover\:bg-primary-100\/5:where(.dark,.dark *):hover{background-color:var(--hx-color-primary-100)}@supports (color:color-mix(in lab, red, red)){.hx\:dark\:hover\:bg-primary-100\/5:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--hx-color-primary-100)5%,transparent)}}.hx\:dark\:hover\:bg-primary-700:where(.dark,.dark *):hover{background-color:var(--hx-color-primary-700)}.hx\:hover\:dark\:bg-primary-500\/10:hover:where(.dark,.dark *){background-color:var(--hx-color-primary-500)}@supports (color:color-mix(in lab, red, red)){.hx\:hover\:dark\:bg-primary-500\/10:hover:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-primary-500)10%,transparent)}}.hx\:dark\:hover\:text-gray-50:where(.dark,.dark *):hover{color:var(--hx-color-gray-50)}.hx\:dark\:hover\:text-gray-100:where(.dark,.dark *):hover{color:var(--hx-color-gray-100)}.hx\:dark\:hover\:text-gray-200:where(.dark,.dark *):hover{color:var(--hx-color-gray-200)}.hx\:dark\:hover\:text-gray-300:where(.dark,.dark *):hover{color:var(--hx-color-gray-300)}.hx\:dark\:hover\:text-neutral-50:where(.dark,.dark *):hover{color:var(--hx-color-neutral-50)}.hx\:dark\:hover\:text-white:where(.dark,.dark *):hover{color:var(--hx-color-white)}.hx\:hover\:dark\:text-primary-600:hover:where(.dark,.dark *){color:var(--hx-color-primary-600)}.hx\:dark\:hover\:shadow-none:where(.dark,.dark *):hover{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.hx\:dark\:focus\:bg-dark:where(.dark,.dark *):focus{background-color:var(--hx-color-dark)}.hx\:dark\:focus\:ring-primary-800:where(.dark,.dark *):focus{--tw-ring-color:var(--hx-color-primary-800)}.hx\:data-\[state\=selected\]\:dark\:border-primary-500[data-state=selected]:where(.dark,.dark *){border-color:var(--hx-color-primary-500)}.hx\:data-\[state\=selected\]\:dark\:text-primary-600[data-state=selected]:where(.dark,.dark *){color:var(--hx-color-primary-600)}@media (prefers-contrast:more){.hx\:contrast-more\:dark\:border-current:where(.dark,.dark *){border-color:currentColor}.hx\:contrast-more\:dark\:border-gray-50:where(.dark,.dark *){border-color:var(--hx-color-gray-50)}.hx\:contrast-more\:dark\:border-neutral-400:where(.dark,.dark *){border-color:var(--hx-color-neutral-400)}.hx\:contrast-more\:dark\:border-primary-500:where(.dark,.dark *){border-color:var(--hx-color-primary-500)}.hx\:dark\:contrast-more\:border-neutral-400:where(.dark,.dark *){border-color:var(--hx-color-neutral-400)}.hx\:contrast-more\:dark\:text-current:where(.dark,.dark *){color:currentColor}.hx\:contrast-more\:dark\:text-gray-50:where(.dark,.dark *){color:var(--hx-color-gray-50)}.hx\:contrast-more\:dark\:text-gray-100:where(.dark,.dark *){color:var(--hx-color-gray-100)}.hx\:contrast-more\:dark\:text-gray-300:where(.dark,.dark *){color:var(--hx-color-gray-300)}.hx\:contrast-more\:dark\:shadow-\[0_0_0_1px_\#fff\]:where(.dark,.dark *){--tw-shadow:0 0 0 1px var(--tw-shadow-color,#fff);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hx\:contrast-more\:dark\:shadow-none:where(.dark,.dark *){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media (hover:hover){.hx\:contrast-more\:dark\:hover\:border-gray-50:where(.dark,.dark *):hover{border-color:var(--hx-color-gray-50)}}}@media print{.hx\:print\:\[display\:none\],.hx\:print\:hidden{display:none}.hx\:print\:bg-transparent{background-color:#0000}}}html{font-size:var(--hx-text-base);line-height:var(--tw-leading,var(--hx-text-base--line-height));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:var(--hx-color-white);width:100%}body:where(.dark,.dark *){background-color:var(--hx-color-dark);color:var(--hx-color-gray-100)}:root{--primary-hue:212deg;--primary-saturation:100%;--primary-lightness:50%;--navbar-height:4rem;--hextra-banner-height:2rem;--menu-height:3.75rem}.dark{--primary-hue:204deg;--primary-saturation:100%;--primary-lightness:50%}.content :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*2);font-size:var(--hx-text-4xl);line-height:var(--tw-leading,var(--hx-text-4xl--line-height));--tw-font-weight:var(--hx-font-weight-bold);font-weight:var(--hx-font-weight-bold);--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight);color:var(--hx-color-slate-900)}.content :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){color:var(--hx-color-slate-100)}.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*10);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--hx-color-neutral-200)}@supports(color:color-mix(in lab,red,red)){.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:color-mix(in oklab,var(--hx-color-neutral-200)70%,transparent)}}.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){padding-bottom:calc(var(--hx-spacing)*1);font-size:var(--hx-text-3xl);line-height:var(--tw-leading,var(--hx-text-3xl--line-height));--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold);--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight);color:var(--hx-color-slate-900)}@media(prefers-contrast:more){.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--hx-color-neutral-400)}}.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-primary-100)}@supports(color:color-mix(in lab,red,red)){.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-primary-100)10%,transparent)}}.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){color:var(--hx-color-slate-100)}@media(prefers-contrast:more){.content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-neutral-400)}}.content :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*8);font-size:var(--hx-text-2xl);line-height:var(--tw-leading,var(--hx-text-2xl--line-height));--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold);--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight);color:var(--hx-color-slate-900)}.content :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){color:var(--hx-color-slate-100)}.content :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*8);font-size:var(--hx-text-xl);line-height:var(--tw-leading,var(--hx-text-xl--line-height));--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold);--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight);color:var(--hx-color-slate-900)}.content :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){color:var(--hx-color-slate-100)}.content :where(h5):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*8);font-size:var(--hx-text-lg);line-height:var(--tw-leading,var(--hx-text-lg--line-height));--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold);--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight);color:var(--hx-color-slate-900)}.content :where(h5):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){color:var(--hx-color-slate-100)}.content :where(h6):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*8);font-size:var(--hx-text-base);line-height:var(--tw-leading,var(--hx-text-base--line-height));--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold);--tw-tracking:var(--hx-tracking-tight);letter-spacing:var(--hx-tracking-tight);color:var(--hx-color-slate-900)}.content :where(h6):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){color:var(--hx-color-slate-100)}.content :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*6);--tw-leading:calc(var(--hx-spacing)*7);line-height:calc(var(--hx-spacing)*7)}.content :where(p):not(:where([class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}.content :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--hx-color-primary-600);text-decoration-line:underline;text-decoration-thickness:from-font}.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*6);border-color:var(--hx-color-gray-300);color:var(--hx-color-gray-700);font-style:italic}.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)):where(:dir(ltr),[dir=ltr],[dir=ltr] *){border-left-style:var(--tw-border-style);padding-left:calc(var(--hx-spacing)*6);border-left-width:2px}.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)):where(:dir(rtl),[dir=rtl],[dir=rtl] *){border-right-style:var(--tw-border-style);padding-right:calc(var(--hx-spacing)*6);border-right-width:2px}.content :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-gray-700);color:var(--hx-color-gray-400)}.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){margin-bottom:calc(var(--hx-spacing)*4);border-radius:var(--hx-radius-xl);background-color:var(--hx-color-primary-700);overflow-x:auto}@supports(color:color-mix(in lab,red,red)){.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){background-color:color-mix(in oklab,var(--hx-color-primary-700)5%,transparent)}}.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){padding-block:calc(var(--hx-spacing)*4);--tw-font-weight:var(--hx-font-weight-medium);font-size:.9em;font-weight:var(--hx-font-weight-medium);-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}@media(prefers-contrast:more){.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){border-style:var(--tw-border-style);border-width:1px;border-color:var(--hx-color-primary-900)}@supports(color:color-mix(in lab,red,red)){.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){border-color:color-mix(in oklab,var(--hx-color-primary-900)20%,transparent)}}.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){--tw-contrast:contrast(150%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:var(--hx-color-primary-300)}@supports(color:color-mix(in lab,red,red)){.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-primary-300)10%,transparent)}}@media(prefers-contrast:more){.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-primary-100)}@supports(color:color-mix(in lab,red,red)){.content :where(pre):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-primary-100)40%,transparent)}}}.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)){border-radius:var(--hx-radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--hx-color-black)}@supports(color:color-mix(in lab,red,red)){.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)){border-color:color-mix(in oklab,var(--hx-color-black)4%,transparent)}}.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)){background-color:var(--hx-color-black)}@supports(color:color-mix(in lab,red,red)){.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)){background-color:color-mix(in oklab,var(--hx-color-black)3%,transparent)}}.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)){padding-inline:.25em;padding-block:calc(var(--hx-spacing)*.5);overflow-wrap:break-word;font-size:.9em}.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-white)}@supports(color:color-mix(in lab,red,red)){.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-white)10%,transparent)}}.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:var(--hx-color-white)}@supports(color:color-mix(in lab,red,red)){.content :where(code):not(:where(.hextra-code-block code,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-white)10%,transparent)}}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)){margin-block:calc(var(--hx-spacing)*6);width:100%;padding:calc(var(--hx-spacing)*0);font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height));--tw-leading:calc(var(--hx-spacing)*5);line-height:calc(var(--hx-spacing)*5);display:block;overflow-x:auto}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) thead{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--hx-color-gray-200)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) thead:where(.dark,.dark *){border-color:var(--hx-color-neutral-800)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) tbody tr{margin:calc(var(--hx-spacing)*0);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--hx-color-gray-100)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) tbody tr:where(.dark,.dark *){border-color:var(--hx-color-neutral-800)}@supports(color:color-mix(in lab,red,red)){.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) tbody tr:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-neutral-800)50%,transparent)}}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) th{margin:calc(var(--hx-spacing)*0);padding:calc(var(--hx-spacing)*2);--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) th:first-child{padding-left:calc(var(--hx-spacing)*0)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) th:last-child{padding-right:calc(var(--hx-spacing)*0)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) td{margin:calc(var(--hx-spacing)*0);padding:calc(var(--hx-spacing)*2)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) td:first-child{padding-left:calc(var(--hx-spacing)*0)}.content :where(table):not(:where(.hextra-code-block table,[class~=not-prose],[class~=not-prose] *)) td:last-child{padding-right:calc(var(--hx-spacing)*0)}.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*6);list-style-type:decimal}.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)):where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--hx-spacing)*6)}.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)):where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--hx-spacing)*6)}.content :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)) li{margin-block:calc(var(--hx-spacing)*2)}.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*6);list-style-type:disc}.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)):where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--hx-spacing)*6)}.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)):where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--hx-spacing)*6)}.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)) li{margin-block:calc(var(--hx-spacing)*2)}.content :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)):has(li input[type=checkbox]){list-style-type:none}.content :where(ul,ol)>li>:where(ul,ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:calc(var(--hx-spacing)*0)}.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:var(--hx-radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--hx-color-black)}@supports(color:color-mix(in lab,red,red)){.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:color-mix(in oklab,var(--hx-color-black)4%,transparent)}}.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:var(--hx-color-black)}@supports(color:color-mix(in lab,red,red)){.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:color-mix(in oklab,var(--hx-color-black)3%,transparent)}}.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline:.25em;padding-block:calc(var(--hx-spacing)*.5);overflow-wrap:break-word;font-size:.9em}.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-white)}@supports(color:color-mix(in lab,red,red)){.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-white)10%,transparent)}}.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:var(--hx-color-white)}@supports(color:color-mix(in lab,red,red)){.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-white)10%,transparent)}}.content :where(pre.mermaid):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)){background-color:#0000;border-radius:0}.content :where(pre.mermaid):not(:where(.hextra-code-block pre,[class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){background-color:#0000}.content :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-inline:auto;margin-block:calc(var(--hx-spacing)*4);border-radius:var(--hx-radius-md)}.content :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)) figcaption{margin-top:calc(var(--hx-spacing)*2);text-align:center;font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height));color:var(--hx-color-gray-500);display:block}.content :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)) figcaption:where(.dark,.dark *){color:var(--hx-color-gray-400)}.content :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)) dt{margin-top:calc(var(--hx-spacing)*6);--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold)}.content :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)) dd{margin-block:calc(var(--hx-spacing)*2);padding-inline-start:calc(var(--hx-spacing)*6)}.content :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-block:calc(var(--hx-spacing)*10);border-color:var(--hx-color-gray-200)}.content :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}.content :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)):last-child{margin-bottom:calc(var(--hx-spacing)*0)}.content :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)):where(.dark,.dark *){border-color:var(--hx-color-neutral-800)}.content .footnotes{margin-top:calc(var(--hx-spacing)*12);font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height))}.content .footnotes hr{border-color:var(--hx-color-gray-200)}.content .footnotes hr:where(.dark,.dark *){border-color:var(--hx-color-neutral-800)}.content .subheading-anchor{opacity:0;transition-property:opacity;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration))}.content .subheading-anchor:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--hx-spacing)*1)}.content .subheading-anchor:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--hx-spacing)*1)}span:target+:is(.content .subheading-anchor),:hover>:is(.content .subheading-anchor),.content .subheading-anchor:focus{opacity:1}span+:is(.content .subheading-anchor),:hover>:is(.content .subheading-anchor){text-decoration-line:none !important}.content .subheading-anchor:after{content:var(--tw-content);color:var(--hx-color-gray-300)}.content .subheading-anchor:where(.dark,.dark *):after{content:var(--tw-content);color:var(--hx-color-neutral-700)}.content .subheading-anchor:after{padding-inline:calc(var(--hx-spacing)*1);--tw-content:"#";content:var(--tw-content)}span:target+:is(){color:var(--hx-color-gray-400)}span:target+:is():where(.dark,.dark *){color:var(--hx-color-neutral-500)}article details>summary::-webkit-details-marker{display:none}article details>summary:before{vertical-align:-4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='hx:h-5 hx:w-5' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E");width:1.2em;height:1.2em;padding:0 .6em}:lang(fa) ol{list-style-type:persian}.highlight .chroma .err{color:#a61717;background-color:#e3d2d2}.highlight .chroma .lnlinks{color:inherit;outline:none;text-decoration:none}.highlight .chroma .line{display:flex}.highlight .chroma .k,.highlight .chroma .kc,.highlight .chroma .kd,.highlight .chroma .kn,.highlight .chroma .kp,.highlight .chroma .kr{color:#000;font-weight:700}.highlight .chroma .kt{color:#458;font-weight:700}.highlight .chroma .na{color:teal}.highlight .chroma .nb{color:#0086b3}.highlight .chroma .bp{color:#999}.highlight .chroma .nc{color:#458;font-weight:700}.highlight .chroma .no{color:teal}.highlight .chroma .nd{color:#3c5d5d;font-weight:700}.highlight .chroma .ni{color:purple}.highlight .chroma .ne,.highlight .chroma .nf,.highlight .chroma .nl{color:#900;font-weight:700}.highlight .chroma .nn{color:#555}.highlight .chroma .nt{color:navy}.highlight .chroma .nv,.highlight .chroma .vc,.highlight .chroma .vg,.highlight .chroma .vi{color:teal}.highlight .chroma .s,.highlight .chroma .sa,.highlight .chroma .sb,.highlight .chroma .sc,.highlight .chroma .dl,.highlight .chroma .sd,.highlight .chroma .s2,.highlight .chroma .se,.highlight .chroma .sh,.highlight .chroma .si,.highlight .chroma .sx{color:#d14}.highlight .chroma .sr{color:#009926}.highlight .chroma .s1{color:#d14}.highlight .chroma .ss{color:#990073}.highlight .chroma .m,.highlight .chroma .mb,.highlight .chroma .mf,.highlight .chroma .mh,.highlight .chroma .mi,.highlight .chroma .il,.highlight .chroma .mo{color:#099}.highlight .chroma .o,.highlight .chroma .ow{color:#000;font-weight:700}.highlight .chroma .c,.highlight .chroma .ch,.highlight .chroma .cm,.highlight .chroma .c1{color:#998;font-style:italic}.highlight .chroma .cs,.highlight .chroma .cp,.highlight .chroma .cpf{color:#999;font-style:italic;font-weight:700}.highlight .chroma .gd{color:#000;background-color:#fdd}.highlight .chroma .ge{color:#000;font-style:italic}.highlight .chroma .gr{color:#a00}.highlight .chroma .gh{color:#999}.highlight .chroma .gi{color:#000;background-color:#dfd}.highlight .chroma .go{color:#888}.highlight .chroma .gp{color:#555}.highlight .chroma .gs{font-weight:700}.highlight .chroma .gu{color:#aaa}.highlight .chroma .gt{color:#a00}.highlight .chroma .gl{text-decoration:underline}.highlight .chroma .w{color:#bbb}.dark .highlight .chroma .err{color:#f85149}.dark .highlight .chroma .lnlinks{color:inherit;outline:none;text-decoration:none}.dark .highlight .chroma .line{display:flex}.dark .highlight .chroma .k{color:#ff7b72}.dark .highlight .chroma .kc{color:#79c0ff}.dark .highlight .chroma .kd,.dark .highlight .chroma .kn{color:#ff7b72}.dark .highlight .chroma .kp{color:#79c0ff}.dark .highlight .chroma .kr,.dark .highlight .chroma .kt{color:#ff7b72}.dark .highlight .chroma .nc{color:#f0883e;font-weight:700}.dark .highlight .chroma .no{color:#79c0ff;font-weight:700}.dark .highlight .chroma .nd{color:#d2a8ff;font-weight:700}.dark .highlight .chroma .ni{color:#ffa657}.dark .highlight .chroma .ne{color:#f0883e;font-weight:700}.dark .highlight .chroma .nf{color:#d2a8ff;font-weight:700}.dark .highlight .chroma .nl{color:#79c0ff;font-weight:700}.dark .highlight .chroma .nn{color:#ff7b72}.dark .highlight .chroma .py{color:#79c0ff}.dark .highlight .chroma .nt{color:#7ee787}.dark .highlight .chroma .nv{color:#79c0ff}.dark .highlight .chroma .l{color:#a5d6ff}.dark .highlight .chroma .ld{color:#79c0ff}.dark .highlight .chroma .s{color:#a5d6ff}.dark .highlight .chroma .sa{color:#79c0ff}.dark .highlight .chroma .sb,.dark .highlight .chroma .sc{color:#a5d6ff}.dark .highlight .chroma .dl{color:#79c0ff}.dark .highlight .chroma .sd,.dark .highlight .chroma .s2{color:#a5d6ff}.dark .highlight .chroma .se,.dark .highlight .chroma .sh{color:#79c0ff}.dark .highlight .chroma .si,.dark .highlight .chroma .sx{color:#a5d6ff}.dark .highlight .chroma .sr{color:#79c0ff}.dark .highlight .chroma .s1,.dark .highlight .chroma .ss,.dark .highlight .chroma .m,.dark .highlight .chroma .mb,.dark .highlight .chroma .mf,.dark .highlight .chroma .mh,.dark .highlight .chroma .mi,.dark .highlight .chroma .il,.dark .highlight .chroma .mo{color:#a5d6ff}.dark .highlight .chroma .o,.dark .highlight .chroma .ow{color:#ff7b72;font-weight:700}.dark .highlight .chroma .c,.dark .highlight .chroma .ch,.dark .highlight .chroma .cm,.dark .highlight .chroma .c1{color:#8b949e;font-style:italic}.dark .highlight .chroma .cs,.dark .highlight .chroma .cp,.dark .highlight .chroma .cpf{color:#8b949e;font-style:italic;font-weight:700}.dark .highlight .chroma .gd{color:#ffa198;background-color:#490202}.dark .highlight .chroma .ge{color:inherit;font-style:italic}.dark .highlight .chroma .gr{color:#ffa198}.dark .highlight .chroma .gh{color:#79c0ff;font-weight:700}.dark .highlight .chroma .gi{color:#56d364;background-color:#0f5323}.dark .highlight .chroma .go,.dark .highlight .chroma .gp{color:#8b949e}.dark .highlight .chroma .gs{font-weight:700}.dark .highlight .chroma .gu{color:#79c0ff}.dark .highlight .chroma .gt{color:#ff7b72}.dark .highlight .chroma .gl{text-decoration:underline}.dark .highlight .chroma .w{color:#6e7681}.hextra-code-block{--tw-leading:calc(var(--hx-spacing)*5);font-size:.9em;line-height:calc(var(--hx-spacing)*5)}.hextra-code-block pre{background-color:var(--hx-color-primary-700);overflow-x:auto}@supports(color:color-mix(in lab,red,red)){.hextra-code-block pre{background-color:color-mix(in oklab,var(--hx-color-primary-700)5%,transparent)}}.hextra-code-block pre{--tw-font-weight:var(--hx-font-weight-medium);font-size:.9em;font-weight:var(--hx-font-weight-medium);-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}@media(prefers-contrast:more){.hextra-code-block pre{border-style:var(--tw-border-style);border-width:1px;border-color:var(--hx-color-primary-900)}@supports(color:color-mix(in lab,red,red)){.hextra-code-block pre{border-color:color-mix(in oklab,var(--hx-color-primary-900)20%,transparent)}}.hextra-code-block pre{--tw-contrast:contrast(150%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.hextra-code-block pre:where(.dark,.dark *){background-color:var(--hx-color-primary-300)}@supports(color:color-mix(in lab,red,red)){.hextra-code-block pre:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-primary-300)10%,transparent)}}@media(prefers-contrast:more){.hextra-code-block pre:where(.dark,.dark *){border-color:var(--hx-color-primary-100)}@supports(color:color-mix(in lab,red,red)){.hextra-code-block pre:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-primary-100)40%,transparent)}}}.hextra-code-block .hextra-code-filename{top:calc(var(--hx-spacing)*0);z-index:1;text-overflow:ellipsis;white-space:nowrap;border-top-left-radius:var(--hx-radius-xl);border-top-right-radius:var(--hx-radius-xl);background-color:var(--hx-color-primary-700);width:100%;position:absolute;overflow:hidden}@supports(color:color-mix(in lab,red,red)){.hextra-code-block .hextra-code-filename{background-color:color-mix(in oklab,var(--hx-color-primary-700)5%,transparent)}}.hextra-code-block .hextra-code-filename{padding-inline:calc(var(--hx-spacing)*4);padding-block:calc(var(--hx-spacing)*2);font-size:var(--hx-text-xs);line-height:var(--tw-leading,var(--hx-text-xs--line-height));color:var(--hx-color-gray-700)}.hextra-code-block .hextra-code-filename:where(.dark,.dark *){background-color:var(--hx-color-primary-300)}@supports(color:color-mix(in lab,red,red)){.hextra-code-block .hextra-code-filename:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-primary-300)10%,transparent)}}.hextra-code-block .hextra-code-filename:where(.dark,.dark *){color:var(--hx-color-gray-200)}.hextra-code-block .hextra-code-filename+pre:not(.lntable pre){padding-top:calc(var(--hx-spacing)*12)}.hextra-code-block pre:not(.lntable pre){margin-bottom:calc(var(--hx-spacing)*4);border-radius:var(--hx-radius-xl);padding-inline:calc(var(--hx-spacing)*4);padding-block:calc(var(--hx-spacing)*4)}.hextra-code-block div:nth-of-type(2) pre{padding-top:calc(var(--hx-spacing)*12);padding-bottom:calc(var(--hx-spacing)*4)}.chroma .lntable{margin:calc(var(--hx-spacing)*0);border-radius:var(--hx-radius-xl);width:auto;display:block;overflow:auto}.chroma .lntable pre{padding-top:calc(var(--hx-spacing)*4);padding-bottom:calc(var(--hx-spacing)*4)}.chroma .ln,.chroma .lnt:not(.hl>.lnt),.chroma .hl:not(.line){min-width:2.6rem;padding-right:calc(var(--hx-spacing)*4);padding-left:calc(var(--hx-spacing)*4);color:var(--hx-color-neutral-600)}:is(.chroma .ln,.chroma .lnt:not(.hl>.lnt),.chroma .hl:not(.line)):where(.dark,.dark *){color:var(--hx-color-neutral-300)}.chroma .lntd{padding:calc(var(--hx-spacing)*0);vertical-align:top}.chroma .lntd:last-of-type{width:100%}.chroma .hl{background-color:var(--hx-color-primary-800);width:100%;display:block}@supports(color:color-mix(in lab,red,red)){.chroma .hl{background-color:color-mix(in oklab,var(--hx-color-primary-800)10%,transparent)}}.hextra-cards{grid-template-columns:repeat(auto-fill,minmax(max(250px,calc((100% - 1rem*2)/var(--hextra-cards-grid-cols))),1fr))}.hextra-card{position:relative}.hextra-card img{-webkit-user-select:none;user-select:none}.hextra-card:hover .hextra-card-icon svg{color:currentColor}.hextra-card .hextra-card-icon svg{color:#0003;width:1.5rem;transition:color .3s}.hextra-card p{margin-top:.5rem;position:relative}.dark .hextra-card .hextra-card-icon svg{color:#fff6}.dark .hextra-card:hover .hextra-card-icon svg{color:currentColor}.hextra-card-tag{z-index:10;position:absolute;top:5px}.hextra-card-tag:where(:dir(ltr)){right:5px}.hextra-card-tag:where(:dir(rtl)){left:5px}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker){counter-increment:step}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):where(:dir(ltr),[dir=ltr],[dir=ltr] *):before{content:var(--tw-content);margin-left:-41px}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):where(:dir(rtl),[dir=rtl],[dir=rtl] *):before{content:var(--tw-content);margin-right:-44px}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):before{content:var(--tw-content);background-color:var(--hx-color-gray-100)}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):where(.dark,.dark *):before{content:var(--tw-content);background-color:var(--hx-color-neutral-800)}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):before{content:var(--tw-content);border-style:var(--tw-border-style);content:var(--tw-content);border-width:4px;border-color:var(--hx-color-white)}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):where(.dark,.dark *):before{content:var(--tw-content);border-color:var(--hx-color-dark)}.hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):before{content:counter(step);text-align:center;text-indent:-1px;width:33px;height:33px;font-size:var(--hx-text-base);line-height:var(--tw-leading,var(--hx-text-base--line-height));--tw-font-weight:var(--hx-font-weight-normal);font-weight:var(--hx-font-weight-normal);color:var(--hx-color-neutral-400);border-radius:3.40282e38px;position:absolute}:lang(fa) .hextra-steps :where(h2,h3,h4,h5,h6):not(.no-step-marker):before{content:counter(step,persian)}.hextra-search-wrapper li{margin-inline:calc(var(--hx-spacing)*2.5);border-radius:var(--hx-radius-md);overflow-wrap:break-word;color:var(--hx-color-gray-800)}@media(prefers-contrast:more){.hextra-search-wrapper li{border-style:var(--tw-border-style);border-width:1px;border-color:#0000}}.hextra-search-wrapper li:where(.dark,.dark *){color:var(--hx-color-gray-300)}.hextra-search-wrapper li a{scroll-margin:calc(var(--hx-spacing)*12);padding-inline:calc(var(--hx-spacing)*2.5);padding-block:calc(var(--hx-spacing)*2);display:block}.hextra-search-wrapper li a:focus,.hextra-search-wrapper li a:focus-visible{--tw-outline-style:none;outline-style:none}.hextra-search-wrapper li .hextra-search-title{font-size:var(--hx-text-base);line-height:var(--tw-leading,var(--hx-text-base--line-height));--tw-leading:calc(var(--hx-spacing)*5);line-height:calc(var(--hx-spacing)*5);--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold)}.hextra-search-wrapper li .hextra-search-active{border-radius:var(--hx-radius-md);background-color:var(--hx-color-primary-500)}@supports(color:color-mix(in lab,red,red)){.hextra-search-wrapper li .hextra-search-active{background-color:color-mix(in oklab,var(--hx-color-primary-500)10%,transparent)}}@media(prefers-contrast:more){.hextra-search-wrapper li .hextra-search-active{border-color:var(--hx-color-primary-500)}}.hextra-search-wrapper .hextra-search-no-result{padding:calc(var(--hx-spacing)*8);text-align:center;font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height));color:var(--hx-color-gray-400);-webkit-user-select:none;user-select:none;display:block}.hextra-search-wrapper .hextra-search-prefix{margin-inline:calc(var(--hx-spacing)*2.5);margin-top:calc(var(--hx-spacing)*6);margin-bottom:calc(var(--hx-spacing)*2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--hx-color-black)}@supports(color:color-mix(in lab,red,red)){.hextra-search-wrapper .hextra-search-prefix{border-color:color-mix(in oklab,var(--hx-color-black)10%,transparent)}}.hextra-search-wrapper .hextra-search-prefix{padding-inline:calc(var(--hx-spacing)*2.5);padding-bottom:calc(var(--hx-spacing)*1.5);font-size:var(--hx-text-xs);line-height:var(--tw-leading,var(--hx-text-xs--line-height));--tw-font-weight:var(--hx-font-weight-semibold);font-weight:var(--hx-font-weight-semibold);color:var(--hx-color-gray-500);text-transform:uppercase;-webkit-user-select:none;user-select:none}.hextra-search-wrapper .hextra-search-prefix:first-child{margin-top:calc(var(--hx-spacing)*0)}@media(prefers-contrast:more){.hextra-search-wrapper .hextra-search-prefix{border-color:var(--hx-color-gray-600);color:var(--hx-color-gray-900)}}.hextra-search-wrapper .hextra-search-prefix:where(.dark,.dark *){border-color:var(--hx-color-white)}@supports(color:color-mix(in lab,red,red)){.hextra-search-wrapper .hextra-search-prefix:where(.dark,.dark *){border-color:color-mix(in oklab,var(--hx-color-white)20%,transparent)}}.hextra-search-wrapper .hextra-search-prefix:where(.dark,.dark *){color:var(--hx-color-gray-300)}@media(prefers-contrast:more){.hextra-search-wrapper .hextra-search-prefix:where(.dark,.dark *){border-color:var(--hx-color-gray-50);color:var(--hx-color-gray-50)}}.hextra-search-wrapper .hextra-search-excerpt{margin-top:calc(var(--hx-spacing)*1);font-size:var(--hx-text-sm);line-height:var(--tw-leading,var(--hx-text-sm--line-height));--tw-leading:1.35rem;text-overflow:ellipsis;color:var(--hx-color-gray-600);line-height:1.35rem;overflow:hidden}.hextra-search-wrapper .hextra-search-excerpt:where(.dark,.dark *){color:var(--hx-color-gray-400)}@media(prefers-contrast:more){.hextra-search-wrapper .hextra-search-excerpt:where(.dark,.dark *){color:var(--hx-color-gray-50)}}.hextra-search-wrapper .hextra-search-excerpt{line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box}.hextra-search-wrapper .hextra-search-match{color:var(--hx-color-primary-600)}@media(max-width:48rem){.hextra-sidebar-container{top:calc(var(--hx-spacing)*0);bottom:calc(var(--hx-spacing)*0);z-index:15;overscroll-behavior:contain;background-color:var(--hx-color-white);width:100%;padding-top:calc(var(--navbar-height) + var(--hextra-banner-height));position:fixed}.hextra-sidebar-container:where(.dark,.dark *){background-color:var(--hx-color-dark)}.hextra-sidebar-container{will-change:transform,opacity;contain:layout style;backface-visibility:hidden;transition:transform .4s cubic-bezier(.52,.16,.04,1)}}.hextra-sidebar-container li>div{height:calc(var(--hx-spacing)*0)}.hextra-sidebar-container li.open>div{height:auto;padding-top:calc(var(--hx-spacing)*1)}.hextra-sidebar-container li.open>a>span>svg>path{rotate:90deg}.hextra-banner-hidden .hextra-banner{display:none}.hextra-banner :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:underline;text-decoration-thickness:from-font}.hextra-banner :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){--tw-leading:calc(var(--hx-spacing)*7);line-height:calc(var(--hx-spacing)*7)}.hextra-banner :where(p):not(:where([class~=not-prose],[class~=not-prose] *)):first-child{margin-top:calc(var(--hx-spacing)*0)}nav .hextra-search-wrapper{display:none}@media(min-width:48rem){nav .hextra-search-wrapper{display:inline-block}}@supports((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.hextra-nav-container-blur{background-color:var(--hx-color-white)}@supports(color:color-mix(in lab,red,red)){.hextra-nav-container-blur{background-color:color-mix(in oklab,var(--hx-color-white)85%,transparent)}}.hextra-nav-container-blur{--tw-backdrop-blur:blur(var(--hx-blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.hextra-nav-container-blur:where(.dark,.dark *){background-color:var(--hx-color-dark) !important}@supports(color:color-mix(in lab,red,red)){.hextra-nav-container-blur:where(.dark,.dark *){background-color:color-mix(in oklab,var(--hx-color-dark)80%,transparent) !important}}}.hextra-hamburger-menu svg g{transform-origin:50%;transition-property:all;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration));--tw-duration:.1s;--tw-ease:var(--hx-ease-out);transition-duration:.1s;transition-timing-function:var(--hx-ease-out)}.hextra-hamburger-menu svg path{opacity:1;transition-property:all;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration));--tw-duration:.1s;--tw-ease:var(--hx-ease-out);transition-duration:.1s;transition-delay:.1s;transition-timing-function:var(--hx-ease-out)}.hextra-hamburger-menu svg.open path{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration));--tw-duration:.1s;--tw-ease:var(--hx-ease-out);transition-duration:.1s;transition-delay:0s;transition-timing-function:var(--hx-ease-out)}.hextra-hamburger-menu svg.open g{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration));--tw-duration:.1s;--tw-ease:var(--hx-ease-out);transition-duration:.1s;transition-delay:.1s;transition-timing-function:var(--hx-ease-out)}.hextra-hamburger-menu svg.open>path{opacity:0}.hextra-hamburger-menu svg.open>g:first-of-type{rotate:45deg}.hextra-hamburger-menu svg.open>g:first-of-type path{--tw-translate-y:calc(var(--hx-spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.hextra-hamburger-menu svg.open>g:nth-of-type(2){rotate:-45deg}.hextra-hamburger-menu svg.open>g:nth-of-type(2) path{--tw-translate-y:calc(var(--hx-spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.hextra-scrollbar,.hextra-scrollbar *{scrollbar-width:thin;scrollbar-color:oklch(55.55% 0 0/.4)transparent;scrollbar-gutter:stable}:is(.hextra-scrollbar,.hextra-scrollbar *)::-webkit-scrollbar{height:calc(var(--hx-spacing)*3);width:calc(var(--hx-spacing)*3)}:is(.hextra-scrollbar,.hextra-scrollbar *)::-webkit-scrollbar-track{background-color:#0000}:is(.hextra-scrollbar,.hextra-scrollbar *)::-webkit-scrollbar-thumb{border-radius:10px}:is(.hextra-scrollbar,.hextra-scrollbar *):hover::-webkit-scrollbar-thumb{background-color:var(--tw-shadow-color);--tw-shadow-color:var(--hx-color-neutral-500);background-clip:content-box;border:3px solid #0000}@supports(color:color-mix(in lab,red,red)){:is(.hextra-scrollbar,.hextra-scrollbar *):hover::-webkit-scrollbar-thumb{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--hx-color-neutral-500)20%,transparent)var(--tw-shadow-alpha),transparent)}}@media(hover:hover){:is(.hextra-scrollbar,.hextra-scrollbar *):hover::-webkit-scrollbar-thumb:hover{--tw-shadow-color:var(--hx-color-neutral-500)}@supports(color:color-mix(in lab,red,red)){:is(.hextra-scrollbar,.hextra-scrollbar *):hover::-webkit-scrollbar-thumb:hover{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--hx-color-neutral-500)40%,transparent)var(--tw-shadow-alpha),transparent)}}}@supports((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.hextra-code-copy-btn{opacity:.85;--tw-backdrop-blur:blur(var(--hx-blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.hextra-code-copy-btn:where(.dark,.dark *){opacity:.8}}@media(min-width:1024px){.hextra-feature-grid{grid-template-columns:repeat(var(--hextra-feature-grid-cols),minmax(0,1fr))}}.hextra-jupyter-code-cell{scrollbar-gutter:auto;margin-top:calc(var(--hx-spacing)*6)}.hextra-jupyter-code-cell .hextra-jupyter-code-cell-outputs-container{font-size:var(--hx-text-xs);line-height:var(--tw-leading,var(--hx-text-xs--line-height));overflow:hidden}.hextra-jupyter-code-cell .hextra-jupyter-code-cell-outputs-container .hextra-jupyter-code-cell-outputs{max-height:50vh;overflow:auto}.hextra-jupyter-code-cell .hextra-jupyter-code-cell-outputs-container .hextra-jupyter-code-cell-outputs pre{max-width:100%;font-size:var(--hx-text-xs);line-height:var(--tw-leading,var(--hx-text-xs--line-height));overflow:auto}.hextra-badge{align-items:center;display:inline-flex}.hextra-toc a.hextra-toc-active{transition-property:all;transition-timing-function:var(--tw-ease,var(--hx-default-transition-timing-function));transition-duration:var(--tw-duration,var(--hx-default-transition-duration));--tw-duration:.2s;transition-duration:.2s;color:var(--hx-color-gray-900) !important}.hextra-toc a.hextra-toc-active:where(.dark,.dark *){color:var(--hx-color-gray-50) !important}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}:root{--primary-hue:187deg;--primary-saturation:54.4%;--primary-lightness:57.8%}.hx\:line-clamp-3.hextra-card-subtitle{-webkit-line-clamp:30}.author-cards{grid-template-columns:repeat(auto-fill,minmax(max(150px,calc((100% - 1rem * 4)/var(--hextra-cards-grid-cols))),1fr))}.support-cards{grid-template-columns:repeat(auto-fill,minmax(max(200px,calc((100% - 1rem * 4)/var(--hextra-cards-grid-cols))),1fr))}.support-cards .hextra-card-image{margin:2rem}.gl-hidden{display:none}.hextra-nav-container a[title="Support us"]{transition:ease-in-out .2s}.hextra-nav-container a[title="Support us"]:hover{transform:scale(1.3,1.3)}.hextra-footer .social-media{transition:ease-in-out .2s}.hextra-footer .social-media :hover{transform:translateY(-2px)}.hextra-banner{background:#6bb43a;background:linear-gradient(135deg,#6bb43a 0%,#1dfdfd 50%,#4591fc 100%);color:var(--hx-color-slate-900)}.extra-banner-close-button{color:var(--hx-color-slate-50)} \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 6a4a2d4e79b3..000000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -### Hugo files -.hugo_build.lock -public/ -resources/ - -### Generated files - -# Generated by /scripts/copy_jsonschema -/static/jsonschema/ - -# Generated by /scripts/expand_templates -data/version.json -data/formatter_settings.json -data/linter_settings.json -.tmp/ diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 3c7eb14a021c..000000000000 --- a/docs/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -.PHONY: default clean serve build - -default: clean serve - -clean: - rm -rf public/ - -serve: clean - hugo server --disableFastRender --buildDrafts --enableGitInfo - -# IMPORTANT used by the CI to deploy documentation -build: clean - HUGO_ENVIRONMENT=production \ - HUGO_ENV=production \ - hugo \ - --gc --minify \ - --baseURL "https://golangci-lint.run/" diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md deleted file mode 100644 index 0d5eebd0dd71..000000000000 --- a/docs/archetypes/default.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -date: '{{ .Date }}' -draft: true -title: '{{ replace .File.ContentBaseName "-" " " | title }}' ---- diff --git a/docs/assets/css/custom.css b/docs/assets/css/custom.css deleted file mode 100644 index c11634e73036..000000000000 --- a/docs/assets/css/custom.css +++ /dev/null @@ -1,52 +0,0 @@ -:root { - --primary-hue: 187deg; - --primary-saturation: 54.4%; - --primary-lightness: 57.8%; -} - -/* Allow card subtitle with more than 3 lines */ -.hx\:line-clamp-3.hextra-card-subtitle { - -webkit-line-clamp: 30; -} - -.author-cards { - grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr)); -} - -.support-cards { - grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 1rem * 4) / var(--hextra-cards-grid-cols))), 1fr)); -} - -.support-cards .hextra-card-image { - margin: 2rem; -} - -.gl-hidden { - display: none; -} - -.hextra-nav-container a[title="Support us"] { - transition: ease-in-out 0.2s; -} - -.hextra-nav-container a[title="Support us"]:hover { - transform: scale(1.3, 1.3); -} - -.hextra-footer .social-media { - transition: ease-in-out 0.2s; -} - -.hextra-footer .social-media :hover{ - transform: translateY(-2px); -} - -.hextra-banner { - background: #6BB43A; - background: linear-gradient(135deg, rgba(107, 180, 58, 1) 0%, rgba(29, 253, 253, 1) 50%, rgba(69, 145, 252, 1) 100%); - color: var(--hx-color-slate-900); -} - -.extra-banner-close-button { - color: var(--hx-color-slate-50); -} diff --git a/docs/configuration/cli/index.html b/docs/configuration/cli/index.html new file mode 100644 index 000000000000..1379a46d7a54 --- /dev/null +++ b/docs/configuration/cli/index.html @@ -0,0 +1,424 @@ +Command-Line – Golangci-lint
New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

Command-Line

$ golangci-lint -h
+Smart, fast linters runner.
+
+Usage:
+  golangci-lint [flags]
+  golangci-lint [command]
+
+Available Commands:
+  cache       Cache control and information.
+  completion  Generate the autocompletion script for the specified shell
+  config      Configuration file information and verification.
+  custom      Build a version of golangci-lint with custom linters.
+  fmt         Format Go source files.
+  formatters  List current formatters configuration.
+  help        Display extra help
+  linters     List current linters configuration.
+  migrate     Migrate configuration file from v1 to v2.
+  run         Lint the code.
+  version     Display the golangci-lint version.
+
+Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+      --version        Print version
+
+Use "golangci-lint [command] --help" for more information about a command.
+

run +

Note

This command executes enabled linters, and the formatters defined in formatters, +but it does not format the code.

To only format code, use golangci-lint fmt. +To apply both linter fixes and formatting, use golangci-lint run --fix.

The formatters cannot be enabled or disabled inside the linters section or the flags -E/--enable, -D/--disable of the command golangci-lint run.

The formatters can be enabled/disabled by defining them inside the formatters section or by using the flags -E/--enable, -D/--disable of command golangci-lint fmt.

$ golangci-lint run -h
+Lint the code.
+
+Usage:
+  golangci-lint run [flags]
+
+Flags:
+  -c, --config PATH                       Read config from file path PATH
+      --no-config                         Don't read config file
+      --default string                    Default set of linters to enable (default "standard")
+  -D, --disable strings                   Disable specific linter
+  -E, --enable strings                    Enable specific linter
+      --enable-only strings               Override linters configuration section to only run the specific linter(s)
+      --fast-only                         Filter enabled linters to run only fast linters
+  -j, --concurrency int                   Number of CPUs to use (Default: Automatically set to match Linux container CPU quota and fall back to the number of logical CPUs in the machine)
+      --modules-download-mode string      Modules download mode. If not empty, passed as -mod=<mode> to go tools
+      --issues-exit-code int              Exit code when issues were found (default 1)
+      --build-tags strings                Build tags
+      --timeout duration                  Timeout for total work. Disabled by default
+      --tests                             Analyze tests (*_test.go) (default true)
+      --allow-parallel-runners            Allow multiple parallel golangci-lint instances running.
+                                          If false (default) - golangci-lint acquires file lock on start.
+      --allow-serial-runners              Allow multiple golangci-lint instances running, but serialize them around a lock.
+                                          If false (default) - golangci-lint exits with an error if it fails to acquire file lock on start.
+      --path-prefix string                Path prefix to add to output
+      --path-mode string                  Path mode to use (empty, or 'abs')
+      --show-stats                        Show statistics per linter (default true)
+      --output.text.path stdout           Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.text.print-linter-name     Print linter name in the end of issue text. (default true)
+      --output.text.print-issued-lines    Print lines of code with issue. (default true)
+      --output.text.colors                Use colors. (default true)
+      --output.json.path stdout           Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.tab.path stdout            Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.tab.print-linter-name      Print linter name in the end of issue text. (default true)
+      --output.tab.colors                 Use colors. (default true)
+      --output.html.path stdout           Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.checkstyle.path stdout     Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.code-climate.path stdout   Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.junit-xml.path stdout      Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.junit-xml.extended         Support extra JUnit XML fields.
+      --output.teamcity.path stdout       Output path can be either stdout, `stderr` or path to the file to write to.
+      --output.sarif.path stdout          Output path can be either stdout, `stderr` or path to the file to write to.
+      --max-issues-per-linter int         Maximum issues count per one linter. Set to 0 to disable (default 50)
+      --max-same-issues int               Maximum count of issues with the same text. Set to 0 to disable (default 3)
+      --uniq-by-line                      Make issues output unique by line (default true)
+  -n, --new                               Show only new issues: if there are unstaged changes or untracked files, only those changes are analyzed, else only changes in HEAD~ are analyzed.
+                                          It's a super-useful option for integration of golangci-lint into existing large codebase.
+                                          It's not practical to fix all existing issues at the moment of integration: much better to not allow issues in new code.
+                                          For CI setups, prefer --new-from-rev=HEAD~, as --new can skip linting the current patch if any scripts generate unstaged files before golangci-lint runs.
+      --new-from-rev REV                  Show only new issues created after git revision REV
+      --new-from-patch PATH               Show only new issues created in git patch with file path PATH
+      --new-from-merge-base string        Show only new issues created after the best common ancestor (merge-base against HEAD)
+      --whole-files                       Show issues in any part of update files (requires new-from-rev or new-from-patch)
+      --fix                               Fix found issues (if it's supported by the linter)
+      --cpu-profile-path string           Path to CPU profile output file
+      --mem-profile-path string           Path to memory profile output file
+      --trace-path string                 Path to trace output file
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

When the --cpu-profile-path or --mem-profile-path arguments are specified, +golangci-lint writes runtime profiling data in the format expected by the pprof visualization tool.

When the --trace-path argument is specified, golangci-lint writes runtime tracing data in the format expected by +the go tool trace command and visualization tool.

fmt +

$ golangci-lint fmt -h
+Format Go source files.
+
+Usage:
+  golangci-lint fmt [flags]
+
+Flags:
+  -c, --config PATH      Read config from file path PATH
+      --no-config        Don't read config file
+  -E, --enable strings   Enable specific formatter
+  -d, --diff             Display diffs instead of rewriting files
+      --diff-colored     Display diffs instead of rewriting files (with colors)
+      --stdin            Use standard input for piping source files
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

migrate +

$ golangci-lint migrate -h
+Migrate configuration file from v1 to v2.
+
+Usage:
+  golangci-lint migrate [flags]
+
+Flags:
+  -c, --config PATH       Read config from file path PATH
+      --no-config         Don't read config file
+      --format string     Output file format.
+                          By default, the format of the input configuration file is used.
+                          It can be 'yml', 'yaml', 'toml', or 'json'.
+      --skip-validation   Skip validation of the configuration file against the JSON Schema for v1.
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

formatters +

$ golangci-lint formatters -h
+List current formatters configuration.
+
+Usage:
+  golangci-lint formatters [flags]
+
+Flags:
+  -c, --config PATH      Read config from file path PATH
+      --no-config        Don't read config file
+  -E, --enable strings   Enable specific formatter
+      --json             Display as JSON
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

help +

$ golangci-lint help -h
+Display extra help
+
+Usage:
+  golangci-lint help [flags]
+  golangci-lint help [command]
+
+Available Commands:
+  formatters  Display help for formatters.
+  linters     Display help for linters.
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+
+Use "golangci-lint help [command] --help" for more information about a command.
+

linters +

$ golangci-lint linters -h
+List current linters configuration.
+
+Usage:
+  golangci-lint linters [flags]
+
+Flags:
+  -c, --config PATH           Read config from file path PATH
+      --no-config             Don't read config file
+      --default string        Default set of linters to enable (default "standard")
+  -D, --disable strings       Disable specific linter
+  -E, --enable strings        Enable specific linter
+      --enable-only strings   Override linters configuration section to only run the specific linter(s)
+      --fast-only             Filter enabled linters to run only fast linters
+      --json                  Display as JSON
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

cache +

Golangci-lint stores its cache in the subdirectory golangci-lint inside the default user cache directory.

You can override the default cache directory with the environment variable GOLANGCI_LINT_CACHE; the path must be absolute.

The cache is only used by golangci-lint run (linters).

$ golangci-lint cache -h
+Cache control and information.
+
+Usage:
+  golangci-lint cache [flags]
+  golangci-lint cache [command]
+
+Available Commands:
+  clean       Clean cache
+  status      Show cache status
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+
+Use "golangci-lint cache [command] --help" for more information about a command.
+

config +

$ golangci-lint config -h
+Configuration file information and verification.
+
+Usage:
+  golangci-lint config [flags]
+  golangci-lint config [command]
+
+Available Commands:
+  path        Print used configuration path.
+  verify      Verify configuration against JSON schema.
+
+Flags:
+  -c, --config PATH   Read config from file path PATH
+      --no-config     Don't read config file
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+
+Use "golangci-lint config [command] --help" for more information about a command.
+

custom +

$ golangci-lint custom -h
+Build a version of golangci-lint with custom linters.
+
+Usage:
+  golangci-lint custom [flags]
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

version +

$ golangci-lint version -h
+Display the golangci-lint version.
+
+Usage:
+  golangci-lint version [flags]
+
+Flags:
+      --debug   Add build information
+      --json    Display as JSON
+      --short   Display only the version number
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+

completion +

$ golangci-lint completion -h
+Generate the autocompletion script for golangci-lint for the specified shell.
+See each sub-command's help for details on how to use the generated script.
+
+Usage:
+  golangci-lint completion [command]
+
+Available Commands:
+  bash        Generate the autocompletion script for bash
+  fish        Generate the autocompletion script for fish
+  powershell  Generate the autocompletion script for powershell
+  zsh         Generate the autocompletion script for zsh
+
+Global Flags:
+      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
+  -h, --help           Help for a command
+  -v, --verbose        Verbose output
+
+Use "golangci-lint completion [command] --help" for more information about a command.
+
Last updated on
\ No newline at end of file diff --git a/docs/configuration/file/index.html b/docs/configuration/file/index.html new file mode 100644 index 000000000000..02ce7248d8f2 --- /dev/null +++ b/docs/configuration/file/index.html @@ -0,0 +1,693 @@ +Configuration File – Golangci-lint
New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

Configuration File

Golangci-lint looks for config files in the following paths from the current working directory:

  • .golangci.yml
  • .golangci.yaml
  • .golangci.toml
  • .golangci.json

Golangci-lint also searches for config files in all directories from the directory of the first analyzed path up to the root. +If no configuration file has been found, golangci-lint will try to find one in your home directory. +To see which config file is being used and where it was sourced from run golangci-lint with -v option.

Config options inside the file are identical to command-line options. +You can configure specific linters’ options only within the config file (not the command-line).

There is a .golangci.reference.yml file with all supported options, their descriptions, and default values. +This file is neither a working example nor a recommended configuration, +it’s just a reference to display all the configuration options used to generate the documentation.

The configuration file can be validated with the JSON Schema: golangci.jsonschema.json

# See the dedicated "version" documentation section.
+version: "2"
+linters:
+  # See the dedicated "linters" documentation section.
+  option: value
+formatters:
+  # See the dedicated "formatters" documentation section.
+  option: value
+issues:
+  # See the dedicated "issues" documentation section.
+  option: value
+# Output configuration options.
+output:
+  # See the dedicated "output" documentation section.
+  option: value
+# Options for analysis running.
+run:
+  # See the dedicated "run" documentation section.
+  option: value
+severity:
+  # See the dedicated "severity" documentation section.
+  option: value

version configuration +

# Defines the configuration version.
+# The only possible value is "2".
+version: "2"

linters configuration +

linters:
+  # Default set of linters.
+  # The value can be:
+  # - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default
+  # - `all`: enables all linters by default.
+  # - `none`: disables all linters by default.
+  # - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`).
+  # Default: standard
+  default: all
+  # Enable specific linter.
+  enable:
+    - arangolint
+    - asasalint
+    - asciicheck
+    - bidichk
+    - bodyclose
+    - canonicalheader
+    - containedctx
+    - contextcheck
+    - copyloopvar
+    - cyclop
+    - decorder
+    - depguard
+    - dogsled
+    - dupl
+    - dupword
+    - durationcheck
+    - embeddedstructfieldcheck
+    - err113
+    - errcheck
+    - errchkjson
+    - errname
+    - errorlint
+    - exhaustive
+    - exhaustruct
+    - exptostd
+    - fatcontext
+    - forbidigo
+    - forcetypeassert
+    - funcorder
+    - funlen
+    - ginkgolinter
+    - gocheckcompilerdirectives
+    - gochecknoglobals
+    - gochecknoinits
+    - gochecksumtype
+    - gocognit
+    - goconst
+    - gocritic
+    - gocyclo
+    - godoclint
+    - godot
+    - godox
+    - goheader
+    - gomoddirectives
+    - gomodguard
+    - goprintffuncname
+    - gosec
+    - gosmopolitan
+    - govet
+    - grouper
+    - iface
+    - importas
+    - inamedparam
+    - ineffassign
+    - interfacebloat
+    - intrange
+    - iotamixing
+    - ireturn
+    - lll
+    - loggercheck
+    - maintidx
+    - makezero
+    - mirror
+    - misspell
+    - mnd
+    - musttag
+    - nakedret
+    - nestif
+    - nilerr
+    - nilnesserr
+    - nilnil
+    - nlreturn
+    - noctx
+    - noinlineerr
+    - nolintlint
+    - nonamedreturns
+    - nosprintfhostport
+    - paralleltest
+    - perfsprint
+    - prealloc
+    - predeclared
+    - promlinter
+    - protogetter
+    - reassign
+    - recvcheck
+    - revive
+    - rowserrcheck
+    - sloglint
+    - spancheck
+    - sqlclosecheck
+    - staticcheck
+    - tagalign
+    - tagliatelle
+    - testableexamples
+    - testifylint
+    - testpackage
+    - thelper
+    - tparallel
+    - unconvert
+    - unparam
+    - unqueryvet
+    - unused
+    - usestdlibvars
+    - usetesting
+    - varnamelen
+    - wastedassign
+    - whitespace
+    - wrapcheck
+    - wsl
+    - wsl_v5
+    - zerologlint
+  # Disable specific linters.
+  disable:
+    - arangolint
+    - asasalint
+    - asciicheck
+    - bidichk
+    - bodyclose
+    - canonicalheader
+    - containedctx
+    - contextcheck
+    - copyloopvar
+    - cyclop
+    - decorder
+    - depguard
+    - dogsled
+    - dupl
+    - dupword
+    - durationcheck
+    - embeddedstructfieldcheck
+    - err113
+    - errcheck
+    - errchkjson
+    - errname
+    - errorlint
+    - exhaustive
+    - exhaustruct
+    - exptostd
+    - fatcontext
+    - forbidigo
+    - forcetypeassert
+    - funcorder
+    - funlen
+    - ginkgolinter
+    - gocheckcompilerdirectives
+    - gochecknoglobals
+    - gochecknoinits
+    - gochecksumtype
+    - gocognit
+    - goconst
+    - gocritic
+    - gocyclo
+    - godoclint
+    - godot
+    - godox
+    - goheader
+    - gomoddirectives
+    - gomodguard
+    - goprintffuncname
+    - gosec
+    - gosmopolitan
+    - govet
+    - grouper
+    - iface
+    - importas
+    - inamedparam
+    - ineffassign
+    - interfacebloat
+    - intrange
+    - iotamixing
+    - ireturn
+    - lll
+    - loggercheck
+    - maintidx
+    - makezero
+    - mirror
+    - misspell
+    - mnd
+    - musttag
+    - nakedret
+    - nestif
+    - nilerr
+    - nilnesserr
+    - nilnil
+    - nlreturn
+    - noctx
+    - noinlineerr
+    - nolintlint
+    - nonamedreturns
+    - nosprintfhostport
+    - paralleltest
+    - perfsprint
+    - prealloc
+    - predeclared
+    - promlinter
+    - protogetter
+    - reassign
+    - recvcheck
+    - revive
+    - rowserrcheck
+    - sloglint
+    - spancheck
+    - sqlclosecheck
+    - staticcheck
+    - tagalign
+    - tagliatelle
+    - testableexamples
+    - testifylint
+    - testpackage
+    - thelper
+    - tparallel
+    - unconvert
+    - unparam
+    - unqueryvet
+    - unused
+    - usestdlibvars
+    - usetesting
+    - varnamelen
+    - wastedassign
+    - whitespace
+    - wrapcheck
+    - wsl
+    - wsl_v5
+    - zerologlint
+  # All available settings of specific linters.
+  settings:
+    # See the dedicated "linters.settings" documentation section.
+    option: value
+  # Defines a set of rules to ignore issues.
+  # It does not skip the analysis, and so does not ignore "typecheck" errors.
+  exclusions:
+    # Mode of the generated files analysis.
+    #
+    # - `strict`: sources are excluded by strictly following the Go generated file convention.
+    #    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.
+    #    https://go.dev/s/generatedcode
+    # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
+    # - `disable`: disable the generated files exclusion.
+    #
+    # Default: strict
+    generated: lax
+    # Log a warning if an exclusion rule is unused.
+    # Default: false
+    warn-unused: true
+    # Predefined exclusion rules.
+    # Default: []
+    presets:
+      - comments
+      - std-error-handling
+      - common-false-positives
+      - legacy
+    # Excluding configuration per-path, per-linter, per-text and per-source.
+    rules:
+      # Exclude some linters from running on tests files.
+      - path: _test\.go
+        linters:
+          - gocyclo
+          - errcheck
+          - dupl
+          - gosec
+      # Run some linter only for test files by excluding its issues for everything else.
+      - path-except: _test\.go
+        linters:
+          - forbidigo
+      # Exclude known linters from partially hard-vendored code,
+      # which is impossible to exclude via `nolint` comments.
+      # `/` will be replaced by the current OS file path separator to properly work on Windows.
+      - path: internal/hmac/
+        text: "weak cryptographic primitive"
+        linters:
+          - gosec
+      # Exclude some `staticcheck` messages.
+      - linters:
+          - staticcheck
+        text: "SA9003:"
+      # Exclude `lll` issues for long lines with `go:generate`.
+      - linters:
+          - lll
+        source: "^//go:generate "
+    # Which file paths to exclude: they will be analyzed, but issues from them won't be reported.
+    # "/" will be replaced by the current OS file path separator to properly work on Windows.
+    # Default: []
+    paths:
+      - ".*\\.my\\.go$"
+      - lib/bad.go
+    # Which file paths to not exclude.
+    # Default: []
+    paths-except:
+      - ".*\\.my\\.go$"
+      - lib/bad.go

formatters configuration +

formatters:
+  # Enable specific formatter.
+  # Default: [] (uses standard Go formatting)
+  enable:
+    - gci
+    - gofmt
+    - gofumpt
+    - goimports
+    - golines
+    - swaggo
+  # Formatters settings.
+  settings:
+    # See the dedicated "formatters.settings" documentation section.
+    option: value
+  exclusions:
+    # Log a warning if an exclusion path is unused.
+    # Default: false
+    warn-unused: true
+    # Mode of the generated files analysis.
+    #
+    # - `strict`: sources are excluded by strictly following the Go generated file convention.
+    #    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.
+    #    https://go.dev/s/generatedcode
+    # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
+    # - `disable`: disable the generated files exclusion.
+    #
+    # Default: lax
+    generated: strict
+    # Which file paths to exclude.
+    # This option is ignored when using `--stdin` as the path is unknown.
+    # Default: []
+    paths:
+      - ".*\\.my\\.go$"
+      - lib/bad.go

issues configuration +

issues:
+  # Maximum issues count per one linter.
+  # Set to 0 to disable.
+  # Default: 50
+  max-issues-per-linter: 0
+  # Maximum count of issues with the same text.
+  # Set to 0 to disable.
+  # Default: 3
+  max-same-issues: 0
+  # Make issues output unique by line.
+  # Default: true
+  uniq-by-line: false
+  # Show only new issues: if there are unstaged changes or untracked files,
+  # only those changes are analyzed, else only changes in HEAD~ are analyzed.
+  # It's a super-useful option for integration of golangci-lint into existing large codebase.
+  # It's not practical to fix all existing issues at the moment of integration:
+  # much better don't allow issues in new code.
+  #
+  # Default: false
+  new: true
+  # Show only new issues created after the best common ancestor (merge-base against HEAD).
+  # Default: ""
+  new-from-merge-base: main
+  # Show only new issues created after git revision `REV`.
+  # Default: ""
+  new-from-rev: HEAD
+  # Show only new issues created in git patch with set file path.
+  # Default: ""
+  new-from-patch: path/to/patch/file
+  # Show issues in any part of update files (requires new-from-rev or new-from-patch).
+  # Default: false
+  whole-files: true
+  # Fix found issues (if it's supported by the linter).
+  # Default: false
+  fix: true

output configuration +

# Output configuration options.
+output:
+  # The formats used to render issues.
+  formats:
+    # Prints issues in a text format with colors, line number, and linter name.
+    # This format is the default format.
+    text:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.txt
+      # Print linter name in the end of issue text.
+      # Default: true
+      print-linter-name: false
+      # Print lines of code with issue.
+      # Default: true
+      print-issued-lines: false
+      # Use colors.
+      # Default: true
+      colors: false
+    # Prints issues in a JSON representation.
+    json:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.json
+    # Prints issues in columns representation separated by tabulations.
+    tab:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.txt
+      # Print linter name in the end of issue text.
+      # Default: true
+      print-linter-name: true
+      # Use colors.
+      # Default: true
+      colors: false
+    # Prints issues in an HTML page.
+    # It uses the Cloudflare CDN (cdnjs) and React.
+    html:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.html
+    # Prints issues in the Checkstyle format.
+    checkstyle:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.xml
+    # Prints issues in the Code Climate format.
+    code-climate:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.json
+    # Prints issues in the JUnit XML format.
+    junit-xml:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.xml
+      # Support extra JUnit XML fields.
+      # Default: false
+      extended: true
+    # Prints issues in the TeamCity format.
+    teamcity:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.txt
+    # Prints issues in the SARIF format.
+    sarif:
+      # Output path can be either `stdout`, `stderr` or path to the file to write to.
+      # Default: stdout
+      path: ./path/to/output.json
+  # Add a prefix to the output file references.
+  # This option is ignored when using `output.path-mode: abs` mode.
+  # Default: ""
+  path-prefix: ""
+  # By default, the report are related to the path obtained by `run.relative-path-mode`.
+  # The mode `abs` allows to show absolute file paths instead of relative file paths.
+  # The option `output.path-prefix` is ignored when using `abs` mode.
+  # Default: ""
+  path-mode: "abs"
+  # Order to use when sorting results.
+  # Possible values: `file`, `linter`, and `severity`.
+  #
+  # If the severity values are inside the following list, they are ordered in this order:
+  #   1. error
+  #   2. warning
+  #   3. high
+  #   4. medium
+  #   5. low
+  # Either they are sorted alphabetically.
+  #
+  # Default: ["linter", "file"]
+  sort-order:
+    - linter
+    - severity
+    - file # filepath, line, and column.
+  # Show statistics per linter.
+  # Default: true
+  show-stats: false

run configuration +

# Options for analysis running.
+run:
+  # Timeout for total work, e.g. 30s, 5m, 5m30s.
+  # If the value is lower or equal to 0, the timeout is disabled.
+  # Default: 0 (disabled)
+  timeout: 5m
+  # The mode used to evaluate relative paths.
+  # It's used by exclusions, Go plugins, and some linters.
+  # The value can be:
+  # - `gomod`: the paths will be relative to the directory of the `go.mod` file.
+  # - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`).
+  # - `cfg`: the paths will be relative to the configuration file.
+  # - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run.
+  # Default: cfg
+  relative-path-mode: gomod
+  # Exit code when at least one issue was found.
+  # Default: 1
+  issues-exit-code: 2
+  # Include test files or not.
+  # Default: true
+  tests: false
+  # List of build tags, all linters use it.
+  # Default: []
+  build-tags:
+    - mytag
+  # If set, we pass it to "go list -mod={option}". From "go help modules":
+  # If invoked with -mod=readonly, the go command is disallowed from the implicit
+  # automatic updating of go.mod described above. Instead, it fails when any changes
+  # to go.mod are needed. This setting is most useful to check that go.mod does
+  # not need updates, such as in a continuous integration and testing system.
+  # If invoked with -mod=vendor, the go command assumes that the vendor
+  # directory holds the correct copies of dependencies and ignores
+  # the dependency descriptions in go.mod.
+  #
+  # Allowed values: readonly|vendor|mod
+  # Default: ""
+  modules-download-mode: readonly
+  # Allow multiple parallel golangci-lint instances running.
+  # If false, golangci-lint acquires file lock on start.
+  # Default: false
+  allow-parallel-runners: true
+  # Allow multiple golangci-lint instances running, but serialize them around a lock.
+  # If false, golangci-lint exits with an error if it fails to acquire file lock on start.
+  # Default: false
+  allow-serial-runners: true
+  # Define the Go version limit.
+  # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.22.
+  go: '1.23'
+  # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously.
+  # Default: 0 (automatically set to match Linux container CPU quota and
+  # fall back to the number of logical CPUs in the machine)
+  concurrency: 4

severity configuration +

severity:
+  # 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.
+  # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
+  # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel
+  # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
+  # - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance
+  #
+  # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...)
+  #
+  # Default: ""
+  default: error
+  # When a list of severity rules are provided, severity information will be added to lint issues.
+  # Severity rules have the same filtering capability as exclude rules
+  # except you are allowed to specify one matcher per severity rule.
+  #
+  # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...)
+  #
+  # Only affects out formats that support setting severity information.
+  #
+  # Default: []
+  rules:
+    - linters:
+        - dupl
+      severity: info
Last updated on
\ No newline at end of file diff --git a/docs/configuration/index.html b/docs/configuration/index.html new file mode 100644 index 000000000000..8bc34094eb07 --- /dev/null +++ b/docs/configuration/index.html @@ -0,0 +1,109 @@ +Configuration – Golangci-lint
New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
\ No newline at end of file diff --git a/docs/configuration/index.xml b/docs/configuration/index.xml new file mode 100644 index 000000000000..9ebccf6175de --- /dev/null +++ b/docs/configuration/index.xml @@ -0,0 +1,1137 @@ +Golangci-lint – Configurationhttps://golangci-lint.run/docs/configuration/Recent content in Configuration on Golangci-lintHugo -- gohugo.ioen-usCommand-Linehttps://golangci-lint.run/docs/configuration/cli/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/configuration/cli/ +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint -h +</span></span><span class="line"><span class="cl"><span class="go">Smart, fast linters runner. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint [command] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Available Commands: +</span></span></span><span class="line"><span class="cl"><span class="go"> cache Cache control and information. +</span></span></span><span class="line"><span class="cl"><span class="go"> completion Generate the autocompletion script for the specified shell +</span></span></span><span class="line"><span class="cl"><span class="go"> config Configuration file information and verification. +</span></span></span><span class="line"><span class="cl"><span class="go"> custom Build a version of golangci-lint with custom linters. +</span></span></span><span class="line"><span class="cl"><span class="go"> fmt Format Go source files. +</span></span></span><span class="line"><span class="cl"><span class="go"> formatters List current formatters configuration. +</span></span></span><span class="line"><span class="cl"><span class="go"> help Display extra help +</span></span></span><span class="line"><span class="cl"><span class="go"> linters List current linters configuration. +</span></span></span><span class="line"><span class="cl"><span class="go"> migrate Migrate configuration file from v1 to v2. +</span></span></span><span class="line"><span class="cl"><span class="go"> run Lint the code. +</span></span></span><span class="line"><span class="cl"><span class="go"> version Display the golangci-lint version. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span><span class="line"><span class="cl"><span class="go"> --version Print version +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Use &#34;golangci-lint [command] --help&#34; for more information about a command. +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>run</code><span class="hx:absolute hx:-mt-20" id="run"></span> +<a href="#run" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-cards hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: 3;"> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/linters" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/></svg>Linters Overview</span></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/configuration/file/#linters-configuration" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/></svg>Global Configuration</span></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/linters/configuration/" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/></svg>Linter Settings</span></a> +</div> +<div class="hx:overflow-x-auto hx:mt-6 hx:flex hx:flex-col hx:rounded-lg hx:border hx:py-4 hx:px-4 hx:border-gray-200 hx:contrast-more:border-current hx:contrast-more:dark:border-current hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"> +<p class="hx:flex hx:items-center hx:font-medium"><svg height=16px class="hx:inline-block hx:align-middle hx:mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>Note</p> +<div class="hx:w-full hx:min-w-0 hx:leading-7"> +<div class="hx:mt-6 hx:leading-7 hx:first:mt-0"><p>This command executes enabled linters, and the formatters defined in <a href="https://golangci-lint.run/docs/configuration/file/#formatters-configuration"><code>formatters</code></a>, +but it does not format the code.</p> +<p>To only format code, use <a href="https://golangci-lint.run/docs/configuration/cli/#fmt"><code>golangci-lint fmt</code></a>. +To apply both linter fixes and formatting, use <code>golangci-lint run --fix</code>.</p> +<p>The formatters cannot be enabled or disabled inside the <a href="https://golangci-lint.run/docs/configuration/file/#linters-configuration"><code>linters</code></a> section or the flags <code>-E/--enable</code>, <code>-D/--disable</code> of the command <a href="https://golangci-lint.run/docs/configuration/cli/#run"><code>golangci-lint run</code></a>.</p> +<p>The formatters can be enabled/disabled by defining them inside the <a href="https://golangci-lint.run/docs/configuration/file/#formatters-configuration"><code>formatters</code></a> section or by using the flags <code>-E/--enable</code>, <code>-D/--disable</code> of command <a href="https://golangci-lint.run/docs/configuration/cli/#fmt"><code>golangci-lint fmt</code></a>.</p></div> +</div> +</div> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint run -h +</span></span><span class="line"><span class="cl"><span class="go">Lint the code. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint run [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> -c, --config PATH Read config from file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --no-config Don&#39;t read config file +</span></span></span><span class="line"><span class="cl"><span class="go"> --default string Default set of linters to enable (default &#34;standard&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -D, --disable strings Disable specific linter +</span></span></span><span class="line"><span class="cl"><span class="go"> -E, --enable strings Enable specific linter +</span></span></span><span class="line"><span class="cl"><span class="go"> --enable-only strings Override linters configuration section to only run the specific linter(s) +</span></span></span><span class="line"><span class="cl"><span class="go"> --fast-only Filter enabled linters to run only fast linters +</span></span></span><span class="line"><span class="cl"><span class="go"> -j, --concurrency int Number of CPUs to use (Default: Automatically set to match Linux container CPU quota and fall back to the number of logical CPUs in the machine) +</span></span></span><span class="line"><span class="cl"><span class="go"> --modules-download-mode string Modules download mode. If not empty, passed as -mod=&lt;mode&gt; to go tools +</span></span></span><span class="line"><span class="cl"><span class="go"> --issues-exit-code int Exit code when issues were found (default 1) +</span></span></span><span class="line"><span class="cl"><span class="go"> --build-tags strings Build tags +</span></span></span><span class="line"><span class="cl"><span class="go"> --timeout duration Timeout for total work. Disabled by default +</span></span></span><span class="line"><span class="cl"><span class="go"> --tests Analyze tests (*_test.go) (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --allow-parallel-runners Allow multiple parallel golangci-lint instances running. +</span></span></span><span class="line"><span class="cl"><span class="go"> If false (default) - golangci-lint acquires file lock on start. +</span></span></span><span class="line"><span class="cl"><span class="go"> --allow-serial-runners Allow multiple golangci-lint instances running, but serialize them around a lock. +</span></span></span><span class="line"><span class="cl"><span class="go"> If false (default) - golangci-lint exits with an error if it fails to acquire file lock on start. +</span></span></span><span class="line"><span class="cl"><span class="go"> --path-prefix string Path prefix to add to output +</span></span></span><span class="line"><span class="cl"><span class="go"> --path-mode string Path mode to use (empty, or &#39;abs&#39;) +</span></span></span><span class="line"><span class="cl"><span class="go"> --show-stats Show statistics per linter (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.text.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.text.print-linter-name Print linter name in the end of issue text. (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.text.print-issued-lines Print lines of code with issue. (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.text.colors Use colors. (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.json.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.tab.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.tab.print-linter-name Print linter name in the end of issue text. (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.tab.colors Use colors. (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.html.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.checkstyle.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.code-climate.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.junit-xml.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.junit-xml.extended Support extra JUnit XML fields. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.teamcity.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --output.sarif.path stdout Output path can be either stdout, `stderr` or path to the file to write to. +</span></span></span><span class="line"><span class="cl"><span class="go"> --max-issues-per-linter int Maximum issues count per one linter. Set to 0 to disable (default 50) +</span></span></span><span class="line"><span class="cl"><span class="go"> --max-same-issues int Maximum count of issues with the same text. Set to 0 to disable (default 3) +</span></span></span><span class="line"><span class="cl"><span class="go"> --uniq-by-line Make issues output unique by line (default true) +</span></span></span><span class="line"><span class="cl"><span class="go"> -n, --new Show only new issues: if there are unstaged changes or untracked files, only those changes are analyzed, else only changes in HEAD~ are analyzed. +</span></span></span><span class="line"><span class="cl"><span class="go"> It&#39;s a super-useful option for integration of golangci-lint into existing large codebase. +</span></span></span><span class="line"><span class="cl"><span class="go"> It&#39;s not practical to fix all existing issues at the moment of integration: much better to not allow issues in new code. +</span></span></span><span class="line"><span class="cl"><span class="go"> For CI setups, prefer --new-from-rev=HEAD~, as --new can skip linting the current patch if any scripts generate unstaged files before golangci-lint runs. +</span></span></span><span class="line"><span class="cl"><span class="go"> --new-from-rev REV Show only new issues created after git revision REV +</span></span></span><span class="line"><span class="cl"><span class="go"> --new-from-patch PATH Show only new issues created in git patch with file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --new-from-merge-base string Show only new issues created after the best common ancestor (merge-base against HEAD) +</span></span></span><span class="line"><span class="cl"><span class="go"> --whole-files Show issues in any part of update files (requires new-from-rev or new-from-patch) +</span></span></span><span class="line"><span class="cl"><span class="go"> --fix Fix found issues (if it&#39;s supported by the linter) +</span></span></span><span class="line"><span class="cl"><span class="go"> --cpu-profile-path string Path to CPU profile output file +</span></span></span><span class="line"><span class="cl"><span class="go"> --mem-profile-path string Path to memory profile output file +</span></span></span><span class="line"><span class="cl"><span class="go"> --trace-path string Path to trace output file +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>When the <code>--cpu-profile-path</code> or <code>--mem-profile-path</code> arguments are specified, +golangci-lint writes runtime profiling data in the format expected by the <a href="https://github.com/google/pprof"target="_blank" rel="noopener">pprof</a> visualization tool.</p> +<p>When the <code>--trace-path</code> argument is specified, <code>golangci-lint</code> writes runtime tracing data in the format expected by +the <code>go tool trace</code> command and visualization tool.</p> +<h2>fmt<span class="hx:absolute hx:-mt-20" id="fmt"></span> +<a href="#fmt" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-cards hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: 3;"> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/formatters" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/></svg>Formatters Overview</span></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/configuration/file/#formatters-configuration" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/></svg>Global Configuration</span></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/formatters/configuration/" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/></svg>Formatter Settings</span></a> +</div> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint fmt -h +</span></span><span class="line"><span class="cl"><span class="go">Format Go source files. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint fmt [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> -c, --config PATH Read config from file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --no-config Don&#39;t read config file +</span></span></span><span class="line"><span class="cl"><span class="go"> -E, --enable strings Enable specific formatter +</span></span></span><span class="line"><span class="cl"><span class="go"> -d, --diff Display diffs instead of rewriting files +</span></span></span><span class="line"><span class="cl"><span class="go"> --diff-colored Display diffs instead of rewriting files (with colors) +</span></span></span><span class="line"><span class="cl"><span class="go"> --stdin Use standard input for piping source files +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>migrate</code><span class="hx:absolute hx:-mt-20" id="migrate"></span> +<a href="#migrate" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint migrate -h +</span></span><span class="line"><span class="cl"><span class="go">Migrate configuration file from v1 to v2. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint migrate [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> -c, --config PATH Read config from file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --no-config Don&#39;t read config file +</span></span></span><span class="line"><span class="cl"><span class="go"> --format string Output file format. +</span></span></span><span class="line"><span class="cl"><span class="go"> By default, the format of the input configuration file is used. +</span></span></span><span class="line"><span class="cl"><span class="go"> It can be &#39;yml&#39;, &#39;yaml&#39;, &#39;toml&#39;, or &#39;json&#39;. +</span></span></span><span class="line"><span class="cl"><span class="go"> --skip-validation Skip validation of the configuration file against the JSON Schema for v1. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>formatters</code><span class="hx:absolute hx:-mt-20" id="formatters"></span> +<a href="#formatters" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint formatters -h +</span></span><span class="line"><span class="cl"><span class="go">List current formatters configuration. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint formatters [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> -c, --config PATH Read config from file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --no-config Don&#39;t read config file +</span></span></span><span class="line"><span class="cl"><span class="go"> -E, --enable strings Enable specific formatter +</span></span></span><span class="line"><span class="cl"><span class="go"> --json Display as JSON +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>help</code><span class="hx:absolute hx:-mt-20" id="help"></span> +<a href="#help" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint <span class="nb">help</span> -h +</span></span><span class="line"><span class="cl"><span class="go">Display extra help +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint help [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint help [command] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Available Commands: +</span></span></span><span class="line"><span class="cl"><span class="go"> formatters Display help for formatters. +</span></span></span><span class="line"><span class="cl"><span class="go"> linters Display help for linters. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Use &#34;golangci-lint help [command] --help&#34; for more information about a command. +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>linters</code><span class="hx:absolute hx:-mt-20" id="linters"></span> +<a href="#linters" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint linters -h +</span></span><span class="line"><span class="cl"><span class="go">List current linters configuration. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint linters [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> -c, --config PATH Read config from file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --no-config Don&#39;t read config file +</span></span></span><span class="line"><span class="cl"><span class="go"> --default string Default set of linters to enable (default &#34;standard&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -D, --disable strings Disable specific linter +</span></span></span><span class="line"><span class="cl"><span class="go"> -E, --enable strings Enable specific linter +</span></span></span><span class="line"><span class="cl"><span class="go"> --enable-only strings Override linters configuration section to only run the specific linter(s) +</span></span></span><span class="line"><span class="cl"><span class="go"> --fast-only Filter enabled linters to run only fast linters +</span></span></span><span class="line"><span class="cl"><span class="go"> --json Display as JSON +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>cache</code><span class="hx:absolute hx:-mt-20" id="cache"></span> +<a href="#cache" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Golangci-lint stores its cache in the subdirectory <code>golangci-lint</code> inside the <a href="https://pkg.go.dev/os#UserCacheDir"target="_blank" rel="noopener">default user cache directory</a>.</p> +<p>You can override the default cache directory with the environment variable <code>GOLANGCI_LINT_CACHE</code>; the path must be absolute.</p> +<p>The cache is only used by <code>golangci-lint run</code> (linters).</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint cache -h +</span></span><span class="line"><span class="cl"><span class="go">Cache control and information. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint cache [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint cache [command] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Available Commands: +</span></span></span><span class="line"><span class="cl"><span class="go"> clean Clean cache +</span></span></span><span class="line"><span class="cl"><span class="go"> status Show cache status +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Use &#34;golangci-lint cache [command] --help&#34; for more information about a command. +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>config</code><span class="hx:absolute hx:-mt-20" id="config"></span> +<a href="#config" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint config -h +</span></span><span class="line"><span class="cl"><span class="go">Configuration file information and verification. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint config [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint config [command] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Available Commands: +</span></span></span><span class="line"><span class="cl"><span class="go"> path Print used configuration path. +</span></span></span><span class="line"><span class="cl"><span class="go"> verify Verify configuration against JSON schema. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> -c, --config PATH Read config from file path PATH +</span></span></span><span class="line"><span class="cl"><span class="go"> --no-config Don&#39;t read config file +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Use &#34;golangci-lint config [command] --help&#34; for more information about a command. +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>custom</code><span class="hx:absolute hx:-mt-20" id="custom"></span> +<a href="#custom" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint custom -h +</span></span><span class="line"><span class="cl"><span class="go">Build a version of golangci-lint with custom linters. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint custom [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>version</code><span class="hx:absolute hx:-mt-20" id="version"></span> +<a href="#version" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint version -h +</span></span><span class="line"><span class="cl"><span class="go">Display the golangci-lint version. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint version [flags] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --debug Add build information +</span></span></span><span class="line"><span class="cl"><span class="go"> --json Display as JSON +</span></span></span><span class="line"><span class="cl"><span class="go"> --short Display only the version number +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>completion</code><span class="hx:absolute hx:-mt-20" id="completion"></span> +<a href="#completion" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="gp">$</span> golangci-lint completion -h +</span></span><span class="line"><span class="cl"><span class="go">Generate the autocompletion script for golangci-lint for the specified shell. +</span></span></span><span class="line"><span class="cl"><span class="go">See each sub-command&#39;s help for details on how to use the generated script. +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Usage: +</span></span></span><span class="line"><span class="cl"><span class="go"> golangci-lint completion [command] +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Available Commands: +</span></span></span><span class="line"><span class="cl"><span class="go"> bash Generate the autocompletion script for bash +</span></span></span><span class="line"><span class="cl"><span class="go"> fish Generate the autocompletion script for fish +</span></span></span><span class="line"><span class="cl"><span class="go"> powershell Generate the autocompletion script for powershell +</span></span></span><span class="line"><span class="cl"><span class="go"> zsh Generate the autocompletion script for zsh +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Global Flags: +</span></span></span><span class="line"><span class="cl"><span class="go"> --color string Use color when printing; can be &#39;always&#39;, &#39;auto&#39;, or &#39;never&#39; (default &#34;auto&#34;) +</span></span></span><span class="line"><span class="cl"><span class="go"> -h, --help Help for a command +</span></span></span><span class="line"><span class="cl"><span class="go"> -v, --verbose Verbose output +</span></span></span><span class="line"><span class="cl"><span class="go"></span><span class="err"> +</span></span></span><span class="line"><span class="cl"><span class="err"></span><span class="go">Use &#34;golangci-lint completion [command] --help&#34; for more information about a command. +</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div>Configuration Filehttps://golangci-lint.run/docs/configuration/file/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/configuration/file/ +<p>Golangci-lint looks for config files in the following paths from the current working directory:</p> +<ul> +<li><code>.golangci.yml</code></li> +<li><code>.golangci.yaml</code></li> +<li><code>.golangci.toml</code></li> +<li><code>.golangci.json</code></li> +</ul> +<p>Golangci-lint also searches for config files in all directories from the directory of the first analyzed path up to the root. +If no configuration file has been found, golangci-lint will try to find one in your home directory. +To see which config file is being used and where it was sourced from run golangci-lint with <code>-v</code> option.</p> +<p>Config options inside the file are identical to command-line options. +You can configure specific linters&rsquo; options only within the config file (not the command-line).</p> +<p>There is a <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml"target="_blank" rel="noopener"><code>.golangci.reference.yml</code></a> file with all supported options, their descriptions, and default values. +This file is neither a working example nor a recommended configuration, +it&rsquo;s just a reference to display all the configuration options used to generate the documentation.</p> +<p>The configuration file can be validated with the JSON Schema: <a href="https://golangci-lint.run/jsonschema/golangci.jsonschema.json"target="_blank" rel="noopener">golangci.jsonschema.json</a></p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># See the dedicated &#34;version&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;2&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;linters&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;formatters&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">issues</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;issues&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c"># Output configuration options.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">output</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;output&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c"># Options for analysis running.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">run</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;run&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">severity</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;severity&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>version</code> configuration<span class="hx:absolute hx:-mt-20" id="version-configuration"></span> +<a href="#version-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># Defines the configuration version.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c"># The only possible value is &#34;2&#34;.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;2&#34;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>linters</code> configuration<span class="hx:absolute hx:-mt-20" id="linters-configuration"></span> +<a href="#linters-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-cards hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: 2;"> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/linters" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/></svg>Linters Overview</span></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/linters/configuration" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/></svg>Linters Settings</span></a> +</div> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default set of linters.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The value can be:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `all`: enables all linters by default.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `none`: disables all linters by default.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `fast`: enables only linters considered as &#34;fast&#34; (`golangci-lint help linters --json | jq &#39;[ .[] | select(.fast==true) ] | map(.name)&#39;`).</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: standard</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">default</span><span class="p">:</span><span class="w"> </span><span class="l">all</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Enable specific linter.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">enable</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">arangolint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">asasalint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">asciicheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">bidichk</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">bodyclose</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">canonicalheader</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">containedctx</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">contextcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">copyloopvar</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">cyclop</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">decorder</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">depguard</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dogsled</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dupl</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dupword</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">durationcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">embeddedstructfieldcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">err113</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errchkjson</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errname</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errorlint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">exhaustive</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">exhaustruct</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">exptostd</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">fatcontext</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">forbidigo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">forcetypeassert</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">funcorder</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">funlen</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">ginkgolinter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocheckcompilerdirectives</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gochecknoglobals</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gochecknoinits</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gochecksumtype</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocognit</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goconst</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocritic</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocyclo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">godoclint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">godot</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">godox</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goheader</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gomoddirectives</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gomodguard</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goprintffuncname</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gosec</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gosmopolitan</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">govet</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">grouper</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">iface</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">importas</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">inamedparam</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">ineffassign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">interfacebloat</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">intrange</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">iotamixing</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">ireturn</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">lll</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">loggercheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">maintidx</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">makezero</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">mirror</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">misspell</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">mnd</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">musttag</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nakedret</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nestif</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nilerr</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nilnesserr</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nilnil</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nlreturn</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">noctx</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">noinlineerr</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nolintlint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nonamedreturns</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nosprintfhostport</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">paralleltest</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">perfsprint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">prealloc</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">predeclared</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">promlinter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">protogetter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">reassign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">recvcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">revive</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">rowserrcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">sloglint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">spancheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">sqlclosecheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">staticcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">tagalign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">tagliatelle</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">testableexamples</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">testifylint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">testpackage</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">thelper</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">tparallel</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unconvert</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unparam</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unqueryvet</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unused</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">usestdlibvars</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">usetesting</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">varnamelen</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wastedassign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">whitespace</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wrapcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wsl</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wsl_v5</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">zerologlint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Disable specific linters.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">disable</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">arangolint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">asasalint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">asciicheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">bidichk</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">bodyclose</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">canonicalheader</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">containedctx</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">contextcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">copyloopvar</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">cyclop</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">decorder</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">depguard</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dogsled</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dupl</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dupword</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">durationcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">embeddedstructfieldcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">err113</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errchkjson</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errname</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errorlint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">exhaustive</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">exhaustruct</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">exptostd</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">fatcontext</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">forbidigo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">forcetypeassert</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">funcorder</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">funlen</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">ginkgolinter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocheckcompilerdirectives</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gochecknoglobals</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gochecknoinits</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gochecksumtype</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocognit</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goconst</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocritic</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocyclo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">godoclint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">godot</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">godox</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goheader</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gomoddirectives</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gomodguard</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goprintffuncname</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gosec</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gosmopolitan</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">govet</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">grouper</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">iface</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">importas</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">inamedparam</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">ineffassign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">interfacebloat</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">intrange</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">iotamixing</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">ireturn</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">lll</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">loggercheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">maintidx</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">makezero</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">mirror</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">misspell</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">mnd</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">musttag</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nakedret</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nestif</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nilerr</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nilnesserr</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nilnil</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nlreturn</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">noctx</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">noinlineerr</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nolintlint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nonamedreturns</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">nosprintfhostport</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">paralleltest</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">perfsprint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">prealloc</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">predeclared</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">promlinter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">protogetter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">reassign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">recvcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">revive</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">rowserrcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">sloglint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">spancheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">sqlclosecheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">staticcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">tagalign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">tagliatelle</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">testableexamples</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">testifylint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">testpackage</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">thelper</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">tparallel</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unconvert</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unparam</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unqueryvet</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">unused</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">usestdlibvars</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">usetesting</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">varnamelen</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wastedassign</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">whitespace</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wrapcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wsl</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">wsl_v5</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">zerologlint</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># All available settings of specific linters.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;linters.settings&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Defines a set of rules to ignore issues.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># It does not skip the analysis, and so does not ignore &#34;typecheck&#34; errors.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">exclusions</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Mode of the generated files analysis.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `strict`: sources are excluded by strictly following the Go generated file convention.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># This line must appear before the first non-comment, non-blank text in the file.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># https://go.dev/s/generatedcode</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `disable`: disable the generated files exclusion.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: strict</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">generated</span><span class="p">:</span><span class="w"> </span><span class="l">lax</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Log a warning if an exclusion rule is unused.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">warn-unused</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Predefined exclusion rules.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">presets</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">comments</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">std-error-handling</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">common-false-positives</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">legacy</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Excluding configuration per-path, per-linter, per-text and per-source.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">rules</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Exclude some linters from running on tests files.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">_test\.go</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gocyclo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">errcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dupl</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gosec</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Run some linter only for test files by excluding its issues for everything else.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">path-except</span><span class="p">:</span><span class="w"> </span><span class="l">_test\.go</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">forbidigo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Exclude known linters from partially hard-vendored code,</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># which is impossible to exclude via `nolint` comments.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># `/` will be replaced by the current OS file path separator to properly work on Windows.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">internal/hmac/</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">text</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;weak cryptographic primitive&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gosec</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Exclude some `staticcheck` messages.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">staticcheck</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">text</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;SA9003:&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Exclude `lll` issues for long lines with `go:generate`.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">lll</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">source</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;^//go:generate &#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Which file paths to exclude: they will be analyzed, but issues from them won&#39;t be reported.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># &#34;/&#34; will be replaced by the current OS file path separator to properly work on Windows.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">paths</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">&#34;.*\\.my\\.go$&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">lib/bad.go</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Which file paths to not exclude.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">paths-except</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">&#34;.*\\.my\\.go$&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">lib/bad.go</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>formatters</code> configuration<span class="hx:absolute hx:-mt-20" id="formatters-configuration"></span> +<a href="#formatters-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-cards hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: 2;"> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/formatters" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/></svg>Formatters Overview</span></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/formatters/configuration" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"/></svg>Formatters Settings</span></a> +</div> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Enable specific formatter.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: [] (uses standard Go formatting)</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">enable</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gci</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gofmt</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">gofumpt</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">goimports</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">golines</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">swaggo</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Formatters settings.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># See the dedicated &#34;formatters.settings&#34; documentation section.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">option</span><span class="p">:</span><span class="w"> </span><span class="l">value</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">exclusions</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Log a warning if an exclusion path is unused.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">warn-unused</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Mode of the generated files analysis.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `strict`: sources are excluded by strictly following the Go generated file convention.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># This line must appear before the first non-comment, non-blank text in the file.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># https://go.dev/s/generatedcode</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `disable`: disable the generated files exclusion.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: lax</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">generated</span><span class="p">:</span><span class="w"> </span><span class="l">strict</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Which file paths to exclude.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># This option is ignored when using `--stdin` as the path is unknown.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">paths</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="s2">&#34;.*\\.my\\.go$&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">lib/bad.go</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>issues</code> configuration<span class="hx:absolute hx:-mt-20" id="issues-configuration"></span> +<a href="#issues-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">issues</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Maximum issues count per one linter.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Set to 0 to disable.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 50</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">max-issues-per-linter</span><span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Maximum count of issues with the same text.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Set to 0 to disable.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 3</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">max-same-issues</span><span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Make issues output unique by line.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">uniq-by-line</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Show only new issues: if there are unstaged changes or untracked files,</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># only those changes are analyzed, else only changes in HEAD~ are analyzed.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># It&#39;s a super-useful option for integration of golangci-lint into existing large codebase.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># It&#39;s not practical to fix all existing issues at the moment of integration:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># much better don&#39;t allow issues in new code.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">new</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Show only new issues created after the best common ancestor (merge-base against HEAD).</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">new-from-merge-base</span><span class="p">:</span><span class="w"> </span><span class="l">main</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Show only new issues created after git revision `REV`.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">new-from-rev</span><span class="p">:</span><span class="w"> </span><span class="l">HEAD</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Show only new issues created in git patch with set file path.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">new-from-patch</span><span class="p">:</span><span class="w"> </span><span class="l">path/to/patch/file</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Show issues in any part of update files (requires new-from-rev or new-from-patch).</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">whole-files</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Fix found issues (if it&#39;s supported by the linter).</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">fix</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>output</code> configuration<span class="hx:absolute hx:-mt-20" id="output-configuration"></span> +<a href="#output-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># Output configuration options.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">output</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The formats used to render issues.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">formats</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in a text format with colors, line number, and linter name.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># This format is the default format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">text</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.txt</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Print linter name in the end of issue text.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">print-linter-name</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Print lines of code with issue.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">print-issued-lines</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Use colors.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">colors</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in a JSON representation.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">json</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.json</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in columns representation separated by tabulations.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">tab</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.txt</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Print linter name in the end of issue text.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">print-linter-name</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Use colors.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">colors</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in an HTML page.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># It uses the Cloudflare CDN (cdnjs) and React.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">html</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.html</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in the Checkstyle format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">checkstyle</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.xml</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in the Code Climate format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">code-climate</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.json</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in the JUnit XML format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">junit-xml</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.xml</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Support extra JUnit XML fields.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">extended</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in the TeamCity format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">teamcity</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.txt</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Prints issues in the SARIF format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">sarif</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Output path can be either `stdout`, `stderr` or path to the file to write to.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: stdout</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l">./path/to/output.json</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Add a prefix to the output file references.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># This option is ignored when using `output.path-mode: abs` mode.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path-prefix</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># By default, the report are related to the path obtained by `run.relative-path-mode`.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The mode `abs` allows to show absolute file paths instead of relative file paths.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The option `output.path-prefix` is ignored when using `abs` mode.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">path-mode</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;abs&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Order to use when sorting results.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Possible values: `file`, `linter`, and `severity`.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If the severity values are inside the following list, they are ordered in this order:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># 1. error</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># 2. warning</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># 3. high</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># 4. medium</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># 5. low</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Either they are sorted alphabetically.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: [&#34;linter&#34;, &#34;file&#34;]</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">sort-order</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">linter</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">severity</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">file</span><span class="w"> </span><span class="c"># filepath, line, and column.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Show statistics per linter.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">show-stats</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>run</code> configuration<span class="hx:absolute hx:-mt-20" id="run-configuration"></span> +<a href="#run-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># Options for analysis running.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">run</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Timeout for total work, e.g. 30s, 5m, 5m30s.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If the value is lower or equal to 0, the timeout is disabled.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 0 (disabled)</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l">5m</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The mode used to evaluate relative paths.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># It&#39;s used by exclusions, Go plugins, and some linters.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The value can be:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `gomod`: the paths will be relative to the directory of the `go.mod` file.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`).</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `cfg`: the paths will be relative to the configuration file.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: cfg</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">relative-path-mode</span><span class="p">:</span><span class="w"> </span><span class="l">gomod</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Exit code when at least one issue was found.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 1</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">issues-exit-code</span><span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Include test files or not.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">tests</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># List of build tags, all linters use it.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">build-tags</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">mytag</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If set, we pass it to &#34;go list -mod={option}&#34;. From &#34;go help modules&#34;:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If invoked with -mod=readonly, the go command is disallowed from the implicit</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># automatic updating of go.mod described above. Instead, it fails when any changes</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># to go.mod are needed. This setting is most useful to check that go.mod does</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># not need updates, such as in a continuous integration and testing system.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If invoked with -mod=vendor, the go command assumes that the vendor</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># directory holds the correct copies of dependencies and ignores</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># the dependency descriptions in go.mod.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Allowed values: readonly|vendor|mod</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">modules-download-mode</span><span class="p">:</span><span class="w"> </span><span class="l">readonly</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Allow multiple parallel golangci-lint instances running.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If false, golangci-lint acquires file lock on start.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">allow-parallel-runners</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Allow multiple golangci-lint instances running, but serialize them around a lock.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If false, golangci-lint exits with an error if it fails to acquire file lock on start.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">allow-serial-runners</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Define the Go version limit.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.22.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">go</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;1.23&#39;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 0 (automatically set to match Linux container CPU quota and</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># fall back to the number of logical CPUs in the machine)</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">concurrency</span><span class="p">:</span><span class="w"> </span><span class="m">4</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2><code>severity</code> configuration<span class="hx:absolute hx:-mt-20" id="severity-configuration"></span> +<a href="#severity-configuration" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">severity</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Set the default severity for issues.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If severity rules are defined and the issues do not match or no severity is provided to the rule</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># this will be the default severity applied.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Severities should match the supported severity names of the selected out format.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...)</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">default</span><span class="p">:</span><span class="w"> </span><span class="l">error</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># When a list of severity rules are provided, severity information will be added to lint issues.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Severity rules have the same filtering capability as exclude rules</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># except you are allowed to specify one matcher per severity rule.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...)</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Only affects out formats that support setting severity information.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c">#</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">rules</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">linters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">dupl</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">severity</span><span class="p">:</span><span class="w"> </span><span class="l">info</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> \ No newline at end of file diff --git a/docs/content/_index.md b/docs/content/_index.md deleted file mode 100644 index 22f896413bf6..000000000000 --- a/docs/content/_index.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: 'Golangci-lint' -layout: hextra-home -params: - width: wide ---- - -{{< hextra/hero-container image="images/golangci-lint-logo-anim.gif" imageWidth="300" imageHeight="300" imageTitle="golangci-lint" >}} - -
-{{< hextra/hero-headline >}} - Golangci-lint is a fast linters runner for Go -{{< /hextra/hero-headline >}} -
- -
-{{< hextra/hero-subtitle >}} - It runs linters in parallel, uses caching, supports YAML configuration, 
integrates with all major IDEs, and includes over a hundred linters. -{{< /hextra/hero-subtitle >}} -
- -
-{{< hextra/hero-button text="Get Started" link="docs" >}} -
- -{{< /hextra/hero-container >}} - -
- -{{< hextra/feature-grid cols=3 >}} - {{< hextra/feature-card - icon="fast-forward" - title="Fast" - subtitle="Runs linters in parallel, reuses Go build cache and caches analysis results." - style="background: radial-gradient(ellipse at 50% 80%,rgba(194,97,254,0.15),hsla(0,0%,100%,0));" - link="/docs/" >}} - {{< hextra/feature-card - icon="desktop-computer" - title="Integrations" - subtitle="Integrations with VS Code, Sublime Text, GoLand, GNU Emacs, Vim, GitHub Actions." - style="background: radial-gradient(ellipse at 50% 80%,rgba(142,53,74,0.15),hsla(0,0%,100%,0));" - link="/docs/welcome/integrations" >}} - {{< hextra/feature-card - icon="sparkles" - title="Nice outputs" - subtitle="Text with colors and source code lines, JSON, tab, HTML, Checkstyle, Code-Climate, JUnit-XML, TeamCity, SARIF." - style="background: radial-gradient(ellipse at 50% 80%,rgba(221,210,59,0.15),hsla(0,0%,100%,0));" - link="/docs/configuration/file/#output-configuration" >}} - {{< hextra/feature-card - icon="eye-off" - title="Minimum number of false positives" - subtitle="Tuned default settings." - link="/docs/linters/false-positives" >}} - {{< hextra/feature-card - icon="collection" - title="A lot of linters" - subtitle="No need to install them." - link="/docs/linters" >}} - {{< hextra/feature-card - icon="document-text" - title="YAML-based configuration" - subtitle="Easy to read and maintain." - link="/docs/configuration/file" >}} -{{< /hextra/feature-grid >}} diff --git a/docs/content/docs/_index.md b/docs/content/docs/_index.md deleted file mode 100644 index 988ecce901b4..000000000000 --- a/docs/content/docs/_index.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: 'Golangci-lint Documentation' ---- - -{{< hextra/hero-subtitle >}} - Everything you need to know for your golangci-lint journey. -{{< /hextra/hero-subtitle >}} - -![golangci-lint demo](/images/demo.gif) - -{{< cards >}} -{{< card - link="/docs/welcome/quick-start" - title="Getting Started" - subtitle="Get ready to use golangci-lint" - icon="arrow-circle-right" >}} -{{< card - link="/docs/linters" - title="Linters" - subtitle="List of all the linters" - icon="arrow-circle-right" >}} -{{< card - link="/docs/formatters" - title="Formatters" - subtitle="List of all the formatters" - icon="arrow-circle-right" >}} -{{< /cards >}} - -## Support Us - -Golangci-lint is a free and open-source project built by volunteers. - -If you value it, consider supporting us, we appreciate it! - -{{< golangci/button text="Donate ❤️" link="/docs/donate" >}} - -## Contributors - -This project exists thanks to all the people who contribute. [How to contribute](/docs/contributing/workflow/). - -[![golangci-lint contributors](https://opencollective.com/golangci-lint/contributors.svg?width=890&button=false&skip=golangcidev,CLAassistant,renovate,fossabot,golangcibot,kortschak,golangci-releaser,dependabot%5Bbot%5D)](https://github.com/golangci/golangci-lint/graphs/contributors) - -## Stargazers over time - -{{< golangci/starcharts repo="golangci/golangci-lint" >}} diff --git a/docs/content/docs/configuration/_index.md b/docs/content/docs/configuration/_index.md deleted file mode 100644 index 5d81cc392c8f..000000000000 --- a/docs/content/docs/configuration/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Configuration -weight: 2 -aliases: - - /usage/configuration/ ---- - -The config file has lower priority than command-line options. -If the same bool/string/int option is provided on the command-line -and in the config file, the option from command-line will be used. -Slice options (e.g. list of enabled/disabled linters) are combined from the command-line and config file. - -## More - -{{< cards cols=2 >}} - {{< card link="/docs/configuration/cli" title="Command Line" icon="terminal" >}} - {{< card link="/docs/configuration/file" title="Configuration File" icon="adjustments" >}} -{{< /cards >}} diff --git a/docs/content/docs/configuration/cli.md b/docs/content/docs/configuration/cli.md deleted file mode 100644 index 5f2974771fe5..000000000000 --- a/docs/content/docs/configuration/cli.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Command-Line -weight: 1 ---- - -{{% golangci/cli-output %}} - -## `run` - -{{< cards >}} - {{< card link="/docs/linters" title="Linters Overview" icon="collection" >}} - {{< card link="/docs/configuration/file/#linters-configuration" title="Global Configuration" icon="adjustments" >}} - {{< card link="/docs/linters/configuration/" title="Linter Settings" icon="adjustments" >}} -{{< /cards >}} - -> [!NOTE] -> This command executes enabled linters, and the formatters defined in [`formatters`](/docs/configuration/file/#formatters-configuration), -> but it does not format the code. -> -> To only format code, use [`golangci-lint fmt`](/docs/configuration/cli/#fmt). -> To apply both linter fixes and formatting, use `golangci-lint run --fix`. -> -> The formatters cannot be enabled or disabled inside the [`linters`](/docs/configuration/file/#linters-configuration) section or the flags `-E/--enable`, `-D/--disable` of the command [`golangci-lint run`](/docs/configuration/cli/#run). -> -> The formatters can be enabled/disabled by defining them inside the [`formatters`](/docs/configuration/file/#formatters-configuration) section or by using the flags `-E/--enable`, `-D/--disable` of command [`golangci-lint fmt`](/docs/configuration/cli/#fmt). - -{{% golangci/cli-output cmd="run" %}} - -When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, -golangci-lint writes runtime profiling data in the format expected by the [pprof](https://github.com/google/pprof) visualization tool. - -When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by -the `go tool trace` command and visualization tool. - -## fmt - -{{< cards >}} -{{< card link="/docs/formatters" title="Formatters Overview" icon="collection" >}} -{{< card link="/docs/configuration/file/#formatters-configuration" title="Global Configuration" icon="adjustments" >}} -{{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}} -{{< /cards >}} - -{{% golangci/cli-output cmd="fmt" %}} - -## `migrate` - -{{% golangci/cli-output cmd="migrate" %}} - -## `formatters` - -{{% golangci/cli-output cmd="formatters" %}} - -## `help` - -{{% golangci/cli-output cmd="help" %}} - -## `linters` - -{{% golangci/cli-output cmd="linters" %}} - -## `cache` - -Golangci-lint stores its cache in the subdirectory `golangci-lint` inside the [default user cache directory](https://pkg.go.dev/os#UserCacheDir). - -You can override the default cache directory with the environment variable `GOLANGCI_LINT_CACHE`; the path must be absolute. - -The cache is only used by `golangci-lint run` (linters). - -{{% golangci/cli-output cmd="cache" %}} - -## `config` - -{{% golangci/cli-output cmd="config" %}} - -## `custom` - -{{% golangci/cli-output cmd="custom" %}} - -## `version` - -{{% golangci/cli-output cmd="version" %}} - -## `completion` - -{{% golangci/cli-output cmd="completion" %}} diff --git a/docs/content/docs/configuration/file.md b/docs/content/docs/configuration/file.md deleted file mode 100644 index aaf233558921..000000000000 --- a/docs/content/docs/configuration/file.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Configuration File -weight: 2 ---- - -Golangci-lint looks for config files in the following paths from the current working directory: - -- `.golangci.yml` -- `.golangci.yaml` -- `.golangci.toml` -- `.golangci.json` - -Golangci-lint also searches for config files in all directories from the directory of the first analyzed path up to the root. -If no configuration file has been found, golangci-lint will try to find one in your home directory. -To see which config file is being used and where it was sourced from run golangci-lint with `-v` option. - -Config options inside the file are identical to command-line options. -You can configure specific linters' options only within the config file (not the command-line). - -There is a [`.golangci.reference.yml`](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml) file with all supported options, their descriptions, and default values. -This file is neither a working example nor a recommended configuration, -it's just a reference to display all the configuration options used to generate the documentation. - -The configuration file can be validated with the JSON Schema: [golangci.jsonschema.json](https://golangci-lint.run/jsonschema/golangci.jsonschema.json) - -{{% golangci/configuration-file-snippet section="root" %}} - -## `version` configuration - -{{% golangci/configuration-file-snippet section="version" %}} - -## `linters` configuration - -{{< cards cols=2 >}} -{{< card link="/docs/linters" title="Linters Overview" icon="collection" >}} -{{< card link="/docs/linters/configuration" title="Linters Settings" icon="adjustments" >}} -{{< /cards >}} - -{{% golangci/configuration-file-snippet section="linters" %}} - -## `formatters` configuration - -{{< cards cols=2 >}} -{{< card link="/docs/formatters" title="Formatters Overview" icon="collection" >}} -{{< card link="/docs/formatters/configuration" title="Formatters Settings" icon="adjustments" >}} -{{< /cards >}} - -{{% golangci/configuration-file-snippet section="formatters" %}} - -## `issues` configuration - -{{% golangci/configuration-file-snippet section="issues" %}} - -## `output` configuration - -{{% golangci/configuration-file-snippet section="output" %}} - -## `run` configuration - -{{% golangci/configuration-file-snippet section="run" %}} - -## `severity` configuration - -{{% golangci/configuration-file-snippet section="severity" %}} diff --git a/docs/content/docs/contributing/_index.md b/docs/content/docs/contributing/_index.md deleted file mode 100644 index 7094d2e2dff4..000000000000 --- a/docs/content/docs/contributing/_index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Contributing -weight: 6 -aliases: - - /contributing/quick-start/ ---- - -{{< cards >}} - {{< card link="/docs/contributing/workflow/" title="Contributing workflow" icon="document-text" >}} - {{< card link="/docs/contributing/architecture/" title="Architecture of golangci-lint" icon="code" >}} - {{< card link="/docs/contributing/new-linters/" title="How to add new linters" icon="document-text" >}} - {{< card link="/docs/contributing/debug/" title="Debugging golangci-lint" icon="code" >}} - {{< card link="/docs/contributing/faq/" title="FAQ" icon="question-mark-circle" >}} - {{< card link="/docs/contributing/website/" title="Contributing to this website" icon="globe" >}} -{{< /cards >}} diff --git a/docs/content/docs/contributing/architecture.md b/docs/content/docs/contributing/architecture.md deleted file mode 100644 index 49dbc7f4a0d2..000000000000 --- a/docs/content/docs/contributing/architecture.md +++ /dev/null @@ -1,248 +0,0 @@ ---- -title: Architecture -weight: 3 -aliases: - - /contributing/architecture/ ---- - -There are the following golangci-lint execution steps: - -```mermaid -graph LR - init[Init] - loadPackages[Load packages] - runLinters[Run linters] - postprocess[Postprocess issues] - print[Print issues] - - init --> loadPackages --> runLinters --> postprocess --> print - -``` - -## Init - -The configuration is loaded from file and flags by `config.Loader` inside `PersistentPreRun` (or `PreRun`) of the commands that require configuration. - -The linter database (`linterdb.Manager`) is fill based on the configuration: -- The linters ("internals" and plugins) are built by `linterdb.LinterBuilder` and `linterdb.PluginBuilder` builders. -- The configuration is validated by `linterdb.Validator`. - -## Load Packages - -Loading packages is listing all packages and their recursive dependencies for analysis. -Also, depending on the enabled linters set some parsing of the source code can be performed at this step. - -Packages loading starts here: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/HEAD/", filename="pkg/lint/package.go"} -func (l *PackageLoader) Load(ctx context.Context, linters []*linter.Config) (pkgs, deduplicatedPkgs []*packages.Package, err error) { - loadMode := findLoadMode(linters) - - pkgs, err = l.loadPackages(ctx, loadMode) - if err != nil { - return nil, nil, fmt.Errorf("failed to load packages: %w", err) - } -// ... -``` - -First, we find a load mode as union of load modes for all enabled linters. -We use [go/packages](https://pkg.go.dev/golang.org/x/tools/go/packages) for packages loading and use it's enum `packages.Need*` for load modes. -Load mode sets which data does a linter needs for execution. - -A linter that works only with AST need minimum of information: only filenames and AST. - -There is no need for packages dependencies or type information. -AST is built during `go/analysis` execution to reduce memory usage. -Such AST-based linters are configured with the following code: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/lint/linter/config.go"} -func (lc *Config) WithLoadFiles() *Config { - lc.LoadMode |= packages.NeedName | packages.NeedFiles | packages.NeedCompiledGoFiles - return lc -} -``` - -If a linter uses `go/analysis` and needs type information, we need to extract more data by `go/packages`: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/lint/linter/config.go"} -func (lc *Config) WithLoadForGoAnalysis() *Config { - lc = lc.WithLoadFiles() - lc.LoadMode |= packages.NeedImports | packages.NeedDeps | packages.NeedExportFile | packages.NeedTypesSizes - lc.IsSlow = true - return lc -} -``` - -After finding a load mode, we run `go/packages`: -the library get list of dirs (or `./...` as the default value) as input and outputs list of packages and requested information about them: -filenames, type information, AST, etc. - -## Run Linters - -First, we need to find all enabled linters. All linters are registered here: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/lint/lintersdb/builder_linter.go"} -func (b LinterBuilder) Build(cfg *config.Config) []*linter.Config { - // ... - return []*linter.Config{ - // ... - linter.NewConfig(golinters.NewBodyclose()). - WithSince("v1.18.0"). - WithLoadForGoAnalysis(). - WithURL("https://github.com/timakin/bodyclose"), - // ... - linter.NewConfig(golinters.NewGovet(govetCfg)). - WithGroups(config.GroupStandard). - WithSince("v1.0.0"). - WithLoadForGoAnalysis(). - WithURL("https://pkg.go.dev/cmd/vet"), - // ... - } -} -``` - -We filter requested in config and command-line linters in `EnabledSet`: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/lint/lintersdb/manager.go"} -func (m *Manager) GetEnabledLintersMap() (map[string]*linter.Config, error) -``` - -We merge enabled linters into one `MetaLinter` to improve execution time if we can: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/lint/lintersdb/manager.go"} -// GetOptimizedLinters returns enabled linters after optimization (merging) of multiple linters into a fewer number of linters. -// E.g. some go/analysis linters can be optimized into one metalinter for data reuse and speed up. -func (m *Manager) GetOptimizedLinters() ([]*linter.Config, error) { - // ... - m.combineGoAnalysisLinters(resultLintersSet) - // ... -} -``` - -The `MetaLinter` just stores all merged linters inside to run them at once: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/goanalysis/metalinter.go"} -type MetaLinter struct { - linters []*Linter - analyzerToLinterName map[*analysis.Analyzer]string -} -``` - -Currently, all linters except `unused` can be merged into this meta linter. -The `unused` isn't merged because it has high memory usage. - -Linters execution starts in `runAnalyzers`. -It's the most complex part of the golangci-lint. -We use custom [go/analysis](https://pkg.go.dev/golang.org/x/tools/go/analysis) runner there. -It runs as much as it can in parallel. -It lazy-loads as much as it can to reduce memory usage. -Also, it sets all heavyweight data to `nil` as becomes unneeded to save memory. - -We don't use existing [multichecker](https://pkg.go.dev/golang.org/x/tools/go/analysis/multichecker) because -it doesn't use caching and doesn't have some important performance optimizations. - -All found by linters issues are represented with `result.Issue` struct: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/result/issue.go"} -type Issue struct { - FromLinter string - Text string - - Severity string - - // Source lines of a code with the issue to show - SourceLines []string - - // Pkg is needed for proper caching of linting results - Pkg *packages.Package `json:"-"` - - Pos token.Position - - LineRange *Range `json:",omitempty"` - - // HunkPos is used only when golangci-lint is run over a diff - HunkPos int `json:",omitempty"` - - // If we know how to fix the issue we can provide replacement lines - SuggestedFixes []analysis.SuggestedFix `json:",omitempty"` - - // If we are expecting a nolint (because this is from nolintlint), record the expected linter - ExpectNoLint bool - ExpectedNoLintLinter string - - // ... -} -``` - -## Postprocess Issues - -We have an abstraction of `result.Processor` to postprocess found issues: - - - -{{< filetree/container >}} - {{< filetree/folder name="./pkg/result/processors/" >}} - {{< filetree/file name="cgo.go" >}} - {{< filetree/file name="diff.go" >}} - {{< filetree/file name="exclusion_generated_file_filter.go" >}} - {{< filetree/file name="exclusion_generated_file_matcher.go" >}} - {{< filetree/file name="exclusion_paths.go" >}} - {{< filetree/file name="exclusion_presets.go" >}} - {{< filetree/file name="exclusion_rules.go" >}} - {{< filetree/file name="filename_unadjuster.go" >}} - {{< filetree/file name="fixer.go" >}} - {{< filetree/file name="identifier_marker.go" >}} - {{< filetree/file name="invalid_issue.go" >}} - {{< filetree/file name="issues.go" >}} - {{< filetree/file name="max_from_linter.go" >}} - {{< filetree/file name="max_per_file_from_linter.go" >}} - {{< filetree/file name="max_same_issues.go" >}} - {{< filetree/file name="nolint_filter.go" >}} - {{< filetree/file name="path_absoluter.go" >}} - {{< filetree/file name="path_prettifier.go" >}} - {{< filetree/file name="path_relativity.go" >}} - {{< filetree/file name="path_shortener.go" >}} - {{< filetree/file name="processor.go" >}} - {{< filetree/file name="severity.go" >}} - {{< filetree/file name="sort_results.go" >}} - {{< filetree/file name="source_code.go" >}} - {{< filetree/file name="uniq_by_line.go" >}} - {{< /filetree/folder >}} -{{< /filetree/container >}} - -The abstraction is simple: - -```go {base_url="https://github.com/golangci/golangci-lint/blob/main/", filename="pkg/result/processors/processor.go"} -type Processor interface { - Process(issues []*result.Issue) ([]*result.Issue, error) - Name() string - Finish() -} -``` - -A processor can hide issues (`nolint`, `exclude`) or change issues (`path_prettifier`). - -## Print Issues - -We have an abstraction for printing found issues. - - - -{{< filetree/container >}} - {{< filetree/folder name="./pkg/printers/" >}} - {{< filetree/file name="checkstyle.go" >}} - {{< filetree/file name="codeclimate.go" >}} - {{< filetree/file name="html.go" >}} - {{< filetree/file name="json.go" >}} - {{< filetree/file name="junitxml.go" >}} - {{< filetree/file name="printer.go" >}} - {{< filetree/file name="sarif.go" >}} - {{< filetree/file name="tab.go" >}} - {{< filetree/file name="teamcity.go" >}} - {{< filetree/file name="text.go" >}} - {{< /filetree/folder >}} -{{< /filetree/container >}} diff --git a/docs/content/docs/contributing/debug.md b/docs/content/docs/contributing/debug.md deleted file mode 100644 index a20d39f96227..000000000000 --- a/docs/content/docs/contributing/debug.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Debugging -weight: 5 -aliases: - - /contributing/debug/ ---- - -You can see a verbose output of linter by using `-v` option. - -```bash -golangci-lint run -v -``` - -If you would like to see more detailed logs you can use the environment variable `GL_DEBUG`. -Its value is a list of debug tags. - -The existing debug tags are documented in the following file: [/pkg/logutils/logutils.go](https://github.com/golangci/golangci-lint/blob/HEAD/pkg/logutils/logutils.go) - -For example: - -```bash -GL_DEBUG="loader,gocritic" golangci-lint run -``` - -```bash -GL_DEBUG="loader,env" golangci-lint run -``` diff --git a/docs/content/docs/contributing/faq.md b/docs/content/docs/contributing/faq.md deleted file mode 100644 index 9ac530cfa02d..000000000000 --- a/docs/content/docs/contributing/faq.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: FAQ -weight: 6 -aliases: - - /contributing/faq/ ---- - -## How to add a new open-source linter to `golangci-lint` - -See [there](/docs/contributing/new-linters#how-to-add-a-public-linter-to-golangci-lint). - -## How to add a new private linter to `golangci-lint` - -See [there](/docs/contributing/new-linters#how-to-add-a-private-linter-to-golangci-lint). - -## How to update an existing linter - -We use [Dependabot](https://github.com/golangci/golangci-lint/blob/HEAD/.github/dependabot.yml) to update dependencies, including linters. -The updates happen at least automatically once a week (Sunday 11am UTC). - -No pull requests to update a linter will be accepted unless you are the author of the linter and specific changes are required. - -## How to add a configuration option to an existing linter - -Add a new field to the [linter settings struct](https://github.com/golangci/golangci-lint/blob/HEAD/pkg/config/linters_settings.go). -Document it in [.golangci.next.reference.yml](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.next.reference.yml). -Pass it to the linter. - -## How to see `INFO` or `DEBUG` logs - -See [tutorial about debugging](/docs/contributing/debug/). diff --git a/docs/content/docs/contributing/new-linters.md b/docs/content/docs/contributing/new-linters.md deleted file mode 100644 index eb64c707b00e..000000000000 --- a/docs/content/docs/contributing/new-linters.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: New linters -weight: 4 -aliases: - - /contributing/new-linters/ ---- - -## How to write a linter - -Use `go/analysis` and take a look at [this tutorial](https://web.archive.org/web/20250527152107/https://disaev.me/p/writing-useful-go-analysis-linter/): -it shows how to write `go/analysis` linter from scratch and integrate it into `golangci-lint`. - -## How to add a public linter to `golangci-lint` - -You need to implement a new linter using `go/analysis` API. - -We don't accept non `go/analysis` linters. - -After that: - -1. Implement functional tests for the linter: - - Add one file into directory `pkg/golinters/{yourlintername}/testdata/`. -2. Add a new file `pkg/golinters/{yourlintername}/{yourlintername}.go`. - Other linters implementation can help you. -3. Add the new struct for the linter (which you've implemented in `pkg/golinters/{yourlintername}/{yourlintername}.go`) to the - list of all supported linters in [`pkg/lint/lintersdb/builder_linter.go`](https://github.com/golangci/golangci-lint/blob/HEAD/pkg/lint/lintersdb/builder_linter.go) - to the method `LinterBuilder.Build`. - - Add `WithSince("next_version")`, where `next_version` must be replaced by the next minor version. (ex: v1.2.0 if the current version is v1.1.0) -4. Find out what options do you need to configure for the linter. - For example, `nakedret` has only 1 option: [`max-func-lines`](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml). - Choose default values to not being annoying for users of golangci-lint. Add configuration options to: - - [.golangci.next.reference.yml](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.next.reference.yml): the example of a configuration file. - You can also add them to [.golangci.yml](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.yml) - if you think that this project needs not default values. - - [config struct](https://github.com/golangci/golangci-lint/blob/HEAD/pkg/config/config.go): - don't forget about `mapstructure` tags for proper configuration files parsing. -5. Take a look at the example of [pull requests with new linter support](https://github.com/golangci/golangci-lint/pulls?q=is%3Apr+is%3Amerged+label%3A%22linter%3A+new%22). -6. Run the tests: - ```bash - go run ./cmd/golangci-lint/ run --no-config --default=none --enable={yourlintername} ./pkg/golinters/{yourlintername}/testdata/{yourlintername}.go - ``` - -## How to add a private linter to `golangci-lint` - -Some people and organizations may choose to have custom-made linters run as a part of `golangci-lint`. -Typically, these linters can't be open-sourced or too specific. - -Such linters can be added through 2 plugin systems: - -{{< cards cols=2 >}} - {{< card link="/docs/plugins/module-plugins" title="Module Plugin System" icon="puzzle" tag="Recommended" >}} - {{< card link="/docs/plugins/go-plugins" title="Go Plugin System" icon="puzzle" >}} -{{< /cards >}} diff --git a/docs/content/docs/contributing/website.md b/docs/content/docs/contributing/website.md deleted file mode 100644 index 36e86ffd7821..000000000000 --- a/docs/content/docs/contributing/website.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: This Website -weight: 7 -aliases: - - /contributing/website/ ---- - -## Technology - -We use [Hugo](https://gohugo.io/) for static site generation because sites built with it are very fast. - -## Source Code - -The website lives in `docs/` directory of [golangci-lint repository](https://github.com/golangci/golangci-lint). - -## Theme - -The site is based on [hextra](https://github.com/imfing/hextra) theme. - -## Templating - -We use [shortcodes](https://gohugo.io/templates/types/#shortcode) and [partials](https://gohugo.io/templates/types/#partial) based on files from `./docs/.tmp/` and `./docs/data/`. - -- The files in `./docs/.tmp/` are used to be embedded with the shortcode `{{%/* golangci/embed file="filename.ext" */%}}`. -- The files in `./docs/data/` are used as [data sources](https://gohugo.io/content-management/data-sources/). - -These files are created by running: - -- `make website_expand_templates` in the root of the repository. -- `make website_dump_info` in the root of the repository. (only during a release) - -### Some Notes - -[shortcodes](https://gohugo.io/templates/types/#shortcode): -- cannot be used inside another shortcode -- can only be used inside a page -- can contain Markdown or HTML, but the tag is different: `{{%/* shortcode */%}}` vs `{{}}` - -[partials](https://gohugo.io/templates/types/#partial): -- are reusable HTML blocks or "functions" -- cannot be used inside a page -- can be used inside another partial -- can be used inside a shortcode -- can be used inside a layout - -## Hosting - -We use GitHub Pages for static website hosting and CD. - -GitHub deploys the website to production after merging anything to a `main` branch. - -## Local Testing - -Install Hugo Extended (v0.148.1 or newer). - -Run: - -```bash -# (in the root of the repository) -make docs_serve -``` - -or - -```bash -# (in the root of the repository) -make website_expand_templates - -cd docs/ - -# (inside the docs/ folder) -make serve -``` - -And navigate to `http://localhost:1313` after a successful build. - -There is no need to restart the Hugo server for almost all changes: it supports hot reload. -Also, there is no need to refresh a webpage: hot reload updates changed content on the open page. - -## Website Build - -To do this, run: - -```bash -# (in the root of the repository) -make docs_build -``` -or - -```bash -# (in the root of the repository) -make website_copy_jsonschema website_expand_templates - -cd docs/ - -# (inside the docs/ folder) -make build -``` diff --git a/docs/content/docs/contributing/workflow.md b/docs/content/docs/contributing/workflow.md deleted file mode 100644 index 108b93d47298..000000000000 --- a/docs/content/docs/contributing/workflow.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Workflow -weight: 2 -aliases: - - /contributing/workflow/ ---- - -By participating in this project, you agree to abide our [code of conduct](https://github.com/golangci/golangci-lint?tab=coc-ov-file). - -## Set up your machine - -Golangci-lint is written in [Go](https://go.dev). - -Prerequisites: - -- `make` -- [Go](https://go.dev/doc/install) - -Fork and clone [golangci-lint](https://github.com/golangci/golangci-lint) repository. - -A good way of making sure everything is all right is running the following: - -```bash -make build -./golangci-lint run -v -``` - -## Test your change - -When you are satisfied with the changes, we suggest you run: - -```bash -make test -``` - -Which runs all the linters and tests. - -## Create or update parameters for docs - -Add your new or updated parameters to [.golangci.next.reference.yml](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.next.reference.yml) so they will be shown in the docs - -## Submit a pull request - -Push your branch to your golangci-lint fork and open a pull request against the -`main` branch. - -## Pull request checks - -First, please, accept CLA - [CLA assistant](https://cla-assistant.io/) will make a comment on the pull request about it. - -Also, we run a few checks in CI by using GitHub Actions, you can see them [here](https://github.com/golangci/golangci-lint/blob/HEAD/.github/workflows). - -## New releases - -First, see [our versioning policy](/docs/product/roadmap/#versioning-policy). - -To make a new release create a tag `vX.Y.Z`. -Don't forget to add zero patch version for a new minor release, e.g. `v1.99.0`. - -A GitHub Action [workflow](https://github.com/golangci/golangci-lint/blob/HEAD/.github/workflows/release.yml) will start building and publishing release after that. - -After making a release, you need to update GitHub [Action config](https://github.com/golangci/golangci-lint/blob/HEAD/assets/github-action-config.json) by running: - -```bash -make assets/github-action-config.json -``` diff --git a/docs/content/docs/donate/_index.md b/docs/content/docs/donate/_index.md deleted file mode 100644 index 07f84a5c0422..000000000000 --- a/docs/content/docs/donate/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Support Us -weight: 8 -aliases: - - /donate/ ---- - -Golangci-lint is a free and open-source project built by volunteers. - -If you value it, consider supporting us, we appreciate it! ❤️ - -You can support us via: - -{{< cards class="support-cards" cols=7 >}} - {{< card link="https://github.com/sponsors/golangci" title="GitHub Sponsors" subtitle="Credit card" image="/images/github-sponsors.svg" >}} - {{< card link="https://opencollective.com/golangci-lint" title="Open Collective" subtitle="Credit card, PayPal, etc." image="/images/open-collective.svg" >}} - {{< card link="https://thanks.dev/u/gh/golangci" title="Thanks.dev" subtitle="Credit card" image="/images/thanks-dev.svg" >}} -{{< /cards >}} diff --git a/docs/content/docs/formatters/_index.md b/docs/content/docs/formatters/_index.md deleted file mode 100644 index 9e7e7939455b..000000000000 --- a/docs/content/docs/formatters/_index.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Formatters -weight: 4 -excludeSearch: true -aliases: - - /usage/formatters/ ---- - -To see a list of supported formatters and which formatters are enabled/disabled: - -```bash -golangci-lint help formatters -``` - -To see a list of formatters enabled by your configuration, use: - -```bash -golangci-lint formatters -``` - -{{< cards cols=2 >}} - {{< card link="/docs/welcome/quick-start/#formatting" title="Quick Start" icon="terminal" >}} - {{< card link="/docs/configuration/cli/#fmt" title="CLI" icon="terminal" >}} - {{< card link="/docs/configuration/file/#formatters-configuration" title="Global Configuration" icon="adjustments" >}} - {{< card link="/docs/formatters/configuration/" title="Formatter Settings" icon="adjustments" >}} -{{< /cards >}} - -## All formatters - -{{< golangci/items/filter >}} - {{< golangci/items/filter-badge class="gl-filter" data="new" icon="fire" content="New" color="yellow" >}} - {{< golangci/items/filter-badge class="gl-filter" data="deprecated" icon="emoji-sad" content="Deprecated" color="blue" >}} - {{< golangci/items/filter-badge class="gl-filter-reset gl-hidden" icon="trash" content="Reset" color="red" border=true >}} -{{< /golangci/items/filter >}} - -{{< cards >}} - {{< golangci/items/cards path="formatters" data="formatters_info" >}} -{{< /cards >}} diff --git a/docs/content/docs/formatters/configuration.md b/docs/content/docs/formatters/configuration.md deleted file mode 100644 index 5f89c095791b..000000000000 --- a/docs/content/docs/formatters/configuration.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Settings -weight: 2 ---- - -{{% golangci/items/settings info="formatters_info" settings="formatter_settings" %}} diff --git a/docs/content/docs/linters/_index.md b/docs/content/docs/linters/_index.md deleted file mode 100644 index 61dc1c471626..000000000000 --- a/docs/content/docs/linters/_index.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Linters -weight: 3 -excludeSearch: true -aliases: - - /usage/linters/ ---- - -To see a list of supported linters and which linters are enabled/disabled: - -```bash -golangci-lint help linters -``` - -To see a list of linters enabled by your configuration, use: - -```bash -golangci-lint linters -``` - -{{< cards cols=2 >}} - {{< card link="/docs/welcome/quick-start/#linting" title="Quick Start" icon="terminal" >}} - {{< card link="/docs/configuration/cli/#run" title="CLI" icon="terminal" >}} - {{< card link="/docs/configuration/file/#linters-configuration" title="Global Configuration" icon="adjustments" >}} - {{< card link="/docs/linters/configuration/" title="Linter Settings" icon="adjustments" >}} -{{< /cards >}} - -## All Linters - -{{< golangci/items/filter >}} - {{< golangci/items/filter-badge class="gl-filter" data="default" icon="inbox" content="Default" color="indigo" >}} - {{< golangci/items/filter-badge class="gl-filter" data="new" icon="fire" content="New" color="yellow" >}} - {{< golangci/items/filter-badge class="gl-filter" data="autofix" icon="sparkles" content="Autofix" color="blue" >}} - {{< golangci/items/filter-badge class="gl-filter" data="fast" icon="fast-forward" content="Fast" >}} - {{< golangci/items/filter-badge class="gl-filter" data="slow" icon="play" content="Slow" >}} - {{< golangci/items/filter-badge class="gl-filter" data="deprecated" icon="emoji-sad" content="Deprecated" color="blue" >}} - {{< golangci/items/filter-badge class="gl-filter-reset gl-hidden" icon="trash" content="Reset" color="red" border=true >}} -{{< /golangci/items/filter >}} - -{{< cards >}} - {{< golangci/items/cards path="linters" data="linters_info" >}} -{{< /cards >}} diff --git a/docs/content/docs/linters/configuration.md b/docs/content/docs/linters/configuration.md deleted file mode 100644 index e0c76068fba6..000000000000 --- a/docs/content/docs/linters/configuration.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Settings -weight: 2 ---- - -{{% golangci/items/settings info="linters_info" settings="linter_settings" %}} diff --git a/docs/content/docs/linters/false-positives.md b/docs/content/docs/linters/false-positives.md deleted file mode 100644 index 144868e0d61b..000000000000 --- a/docs/content/docs/linters/false-positives.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: False Positives -weight: 3 -aliases: - - /usage/false-positives/ ---- - -False positives are inevitable, but we did our best to reduce their count. - -If a false positive occurred, you have several choices. - -## Specific Linter Excludes - -Most of the linters have a configuration, sometimes false-positives can be related to a bad configuration of a linter. -So it's recommended to check the linter configurations. - -Otherwise, some linters have dedicated configuration to exclude or disable rules. - -An example with `staticcheck`: - -```yaml -linters: - settings: - staticcheck: - checks: - - all - - '-SA1000' # disable the rule SA1000 - - '-SA1004' # disable the rule SA1004 -``` - -## Exclude - -### Exclude Issue by Text - -You can use `linters.exclusions.rules` config option for per-path or per-linter configuration. - -In the following example, all the reports from the linters (`linters`) that contains the text (`text`) are excluded: - -```yaml -linters: - exclusions: - rules: - - linters: - - mnd - text: "Magic number: 9" -``` - -In the following example, all the reports from the linters (`linters`) that originated from the source (`source`) are excluded: - -```yaml -linters: - exclusions: - rules: - - linters: - - lll - source: "^//go:generate " -``` - -In the following example, all the reports that contains the text (`text`) in the path (`path`) are excluded: - -```yaml -linters: - exclusions: - rules: - - path: path/to/a/file.go - text: "string `example` has (\\d+) occurrences, make it a constant" -``` - -### Exclude Issues by Path - -Exclude issues in path by `linters.exclusions.paths` or `linters.exclusions.rules` config options. - -In the following example, all the reports from the linters (`linters`) that concerns the path (`path`) are excluded: - -```yaml -linters: - exclusions: - rules: - - path: '(.+)_test\.go' - linters: - - funlen - - goconst -``` - -The opposite, excluding reports **except** for specific paths, is also possible. -In the following example, only test files get checked: - -```yaml -linters: - exclusions: - rules: - - path-except: '(.+)_test\.go' - linters: - - funlen - - goconst -``` - -In the following example, all the reports related to the files (`paths`) are excluded: - -```yaml -linters: - exclusions: - paths: - - path/to/a/file.go -``` - -In the following example, all the reports related to the directories (`paths`) are excluded: - -```yaml -linters: - exclusions: - paths: - - path/to/a/dir/ -``` - -## Nolint Directive - -To exclude issues from all linters use `//nolint:all`. -For example, if it's used inline (not from the beginning of the line) it excludes issues only for this line. - -```go -var bad_name int //nolint:all -``` - -To exclude issues from specific linters only: - -```go -var bad_name int //nolint:wsl,unused -``` - -To exclude issues for the block of code, use this directive at the beginning of a line: - -```go -//nolint:all -func allIssuesInThisFunctionAreExcluded() *string { - // ... -} - -//nolint:govet -var ( - a int - b int -) -``` - -Also, you can exclude all issues in a file by: - -```go -//nolint:unparam -package pkg -``` - -You may add a comment explaining or justifying why a `nolint` directive is being used on the same line as the flag itself: - -```go -//nolint:gocyclo // This legacy function is complex, but the team too busy to simplify it -func someLegacyFunction() *string { - // ... -} -``` - -You can see more examples of using `nolint` directives in [our tests](https://github.com/golangci/golangci-lint/tree/HEAD/pkg/result/processors/testdata) for it. - -### Syntax - -`nolint` is not regular comment but a directive. - -> A directive comment is a line matching the regular expression `//(line |extern |export |[a-z0-9]+:[a-z0-9])`. -> https://go.dev/doc/comment#syntax - -This means that no spaces are allowed between: -- `//` and `nolint` -- `nolint` and `:` -- `:` and the name of the linter. - -Invalid syntax: -```go -// nolint -// nolint:xxx -//nolint :xxx -//nolint: xxx -``` - -Valid syntax: -```go -//nolint:xxx -``` - -## Exclusion Presets - -Some exclusions are considered common. -To help golangci-lint users, those common exclusions are provided through presets. - -{{% golangci/exclusion-presets-snippet %}} - -{{% golangci/exclusion-preset-tables %}} diff --git a/docs/content/docs/plugins/_index.md b/docs/content/docs/plugins/_index.md deleted file mode 100644 index 3995aa280871..000000000000 --- a/docs/content/docs/plugins/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Plugins -weight: 7 ---- - -{{< cards >}} - {{< card link="/docs/plugins/module-plugins/" title="Module Plugin System" icon="puzzle" tag="Recommended" tagColor="icon-only:sparkles" >}} - {{< card link="/docs/plugins/go-plugins/" title="Go Plugin System" icon="puzzle" >}} -{{< /cards >}} diff --git a/docs/content/docs/plugins/go-plugins.md b/docs/content/docs/plugins/go-plugins.md deleted file mode 100644 index a3f9f1a12dae..000000000000 --- a/docs/content/docs/plugins/go-plugins.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Go Plugin System -weight: 2 -aliases: - - /plugins/go-plugins/ ---- - -{{< callout type="warning" >}} - **We recommend using [Module Plugin System](/docs/plugins/module-plugins) instead of the Go Plugin System.** -{{< /callout >}} - -Private linters can be added through [Go's plugin system](https://pkg.go.dev/plugin). - -For a private linter (which acts as a plugin) to work properly, -the plugin as well as the golangci-lint binary **needs to be built for the same environment**. - -`CGO_ENABLED` is another requirement. - -This means that `golangci-lint` needs to be built for whatever machine you intend to run it on -(cloning the golangci-lint repository and running a `CGO_ENABLED=1 make build` should do the trick for your machine). - -## Create a Plugin - -Your linter must provide one or more `golang.org/x/tools/go/analysis.Analyzer` structs. - -Your project should also use `go.mod`. - -All versions of libraries that overlap `golangci-lint` (including replaced libraries) MUST be set to the same version as `golangci-lint`. -You can see the versions by running `go version -m golangci-lint`. - -You'll also need to create a Go file like `plugin/example.go`. - -This file MUST be in the package `main`, and MUST define an exposed function called `New` with the following signature: -```go -func New(conf any) ([]*analysis.Analyzer, error) { - // ... -} -``` - -See [plugin/example.go](https://github.com/golangci/example-plugin-linter/blob/HEAD/plugin/example.go) for more info. - -To build the plugin, from the root project directory, run: -```bash -go build -buildmode=plugin plugin/example.go -``` - -This will create a plugin `*.so` file that can be copied into your project or another well-known location for usage in `golangci-lint`. - -## Configure a Plugin - -If you already have a linter plugin available, you can follow these steps to define its usage in a projects `.golangci.yml` file. - -An example linter can be found at [here](https://github.com/golangci/example-plugin-linter). - -If you're looking for instructions on how to configure your own custom linter, they can be found further down. - -1. If the project you want to lint does not have one already, copy the [.golangci.yml](https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.yml) to the root directory. -2. Adjust the YAML to appropriate `linters.settings.custom` entries as so: - ```yaml {filename=".golangci.yml"} - version: "2" - - linters: - settings: - custom: - example: - path: /example.so - description: The description of the linter - original-url: github.com/golangci/example-linter - settings: # Settings are optional. - one: Foo - two: - - name: Bar - three: - name: Bar - ``` - -That is all the configuration that is required to run a custom linter in your project. - -Custom linters are enabled by default, but abide by the same rules as other linters. - -If the 'disable all' option is specified either on command line or in `.golangci.yml` files `linters.default: none`, custom linters will be disabled; -they can be re-enabled by adding them to the `linters.enable` list, -or providing the enabled option on the command line, `golangci-lint run -Eexample`. - -The configuration inside the `linters.settings` field of linter have some limitations (there are NOT related to the plugin system itself): -we use Viper to handle the configuration, but Viper put all the keys in lowercase, and `.` cannot be used inside a key. diff --git a/docs/content/docs/plugins/module-plugins.md b/docs/content/docs/plugins/module-plugins.md deleted file mode 100644 index e5126fbf2f1f..000000000000 --- a/docs/content/docs/plugins/module-plugins.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Module Plugin System -weight: 1 -aliases: - - /plugins/module-plugins/ ---- - -> [!TIP] -> An example linter can be found at [here](https://github.com/golangci/example-plugin-module-linter). - -## The Automatic Way - -- Define your building configuration into `.custom-gcl.yml`. -- Run the command `golangci-lint custom` (or `golangci-lint custom -v` to have logs). -- Define the plugin inside the `linters.settings.custom` section with the type `module`. -- Run the resulting custom binary of golangci-lint (`./custom-gcl` by default). - -Requirements: -- Go -- git - -### Configuration Example - -```yaml {filename=".custom-gcl.yml"} -version: {{< golangci/latest-version >}} -plugins: - # a plugin from a Go proxy - - module: 'github.com/golangci/plugin1' - import: 'github.com/golangci/plugin1/foo' - version: v1.0.0 - - # a plugin from local source - - module: 'github.com/golangci/plugin2' - path: /my/local/path/plugin2 -``` - -```yaml {filename=".golangci.yml"} -version: "2" - -linters: - default: none - enable: - - foo - settings: - custom: - foo: - type: "module" - description: This is an example usage of a plugin linter. - settings: - message: hello -``` - -## The Manual Way - -- Add a blank-import of your module inside `cmd/golangci-lint/plugins.go`. -- Run `go mod tidy` (the module containing the plugin will be imported). -- Run `make build`. -- Define the plugin inside the `linters.settings.custom` section with the type `module`. -- Run your custom version of golangci-lint. - -### Configuration Example - -```yaml {filename=".golangci.yml"} -version: "2" - -linters: - default: none - enable: - - foo - settings: - custom: - foo: - type: "module" - description: This is an example usage of a plugin linter. - settings: - message: hello -``` - -## Reference - -The configuration file can be validated with the JSON Schema: [custom-gcl.jsonschema.json](https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json) - -```yml {filename=".custom-gcl.yml"} -{{% golangci/embed file=".tmp/.custom-gcl.reference.yml" %}} -``` diff --git a/docs/content/docs/product/_index.md b/docs/content/docs/product/_index.md deleted file mode 100644 index 8a20a5aeaa03..000000000000 --- a/docs/content/docs/product/_index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Product -weight: 5 ---- - -{{< cards cols=2 >}} - {{< card link="/docs/product/thanks/" title="Thanks" icon="heart" >}} - {{< card link="/docs/product/migration-guide/" title="Migration Guide" icon="switch-horizontal" >}} - {{< card link="/docs/product/changelog/" title="Changelog" icon="document-text" >}} - {{< card link="/docs/product/roadmap/" title="Roadmap" icon="document-text" >}} -{{< /cards >}} diff --git a/docs/content/docs/product/changelog.md b/docs/content/docs/product/changelog.md deleted file mode 100644 index 1bb9b5c6f145..000000000000 --- a/docs/content/docs/product/changelog.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Changelog -weight: 2 -excludeSearch: true -aliases: - - /product/changelog/ ---- - -Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint) and on [Bluesky](https://bsky.app/profile/golangci-lint.run). - -`golangci-lint` is a free and open-source project built by volunteers. - -If you value it, consider supporting us, we appreciate it! - -{{< golangci/button text="Donate ❤️" link="/docs/donate" >}} - -{{% golangci/embed file=".tmp/raw_changelog.tmp" %}} diff --git a/docs/content/docs/product/migration-guide.md b/docs/content/docs/product/migration-guide.md deleted file mode 100644 index 3a2a4061b6e4..000000000000 --- a/docs/content/docs/product/migration-guide.md +++ /dev/null @@ -1,1734 +0,0 @@ ---- -title: Migration guide -weight: 3 -aliases: - - /product/migration-guide/ ---- - -## Command `migrate` - -You can use golangci-lint to migrate your configuration with the `migrate` command: - -```bash -golangci-lint migrate -``` - -Be aware that **comments inside a configuration file are not migrated.** You need to add them manually after the migration. - -**Deprecated options from v1 or unknown fields are not migrated.** - -The migration file format is based on the extension of the [configuration file](/docs/configuration/file). -The format can be overridden by using the `--format` flag: - -```bash -golangci-lint migrate --format json -``` - -Before the migration, the previous configuration file is copied and saved to a file named `.bck.`. - -By default, before the migration process, the configuration file is validated against the JSON Schema of configuration v1. -If you want to skip this validation, you can use the `--skip-validation` flag: - -```bash -golangci-lint migrate --skip-validation -``` - -The `migrate` command enforces the following default values: - -- `run.timeout`: the existing value is ignored because, in v2, there is no timeout by default. -- `issues.show-stats`: the existing value is ignored because, in v2, stats are enabled by default. -- `run.concurrency`: if the existing value was `0`, it is removed as `0` is the new default. -- `run.relative-path-mode`: if the existing value was `cfg`, it is removed as `cfg` is the new default. - -`issues.exclude-generated` has a new default value (v1 `lax`, v2 `strict`), so this field will be added during the migration to maintain the previous behavior. - -`issues.exclude-dirs-use-default` has been removed, so it is converted to `linters.exclusions.paths` and, if needed, `formatters.exclusions.paths`. - -Other fields explicitly defined in the configuration file are migrated even if the value is the same as the default value. - -The `migrate` command automatically migrates `linters.presets` in individual linters to `linters.enable`. - -{{% golangci/cli-output cmd="migrate" %}} - -## Changes - -### `linters` - -#### `linters.disable-all` - -This property has been replaced with `linters.default: none`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - disable-all: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - default: none -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters.enable-all` - -This property has been replaced with `linters.default: all`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - enable-all: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - default: all -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters.enable[].` - -The linters `gci`, `gofmt`, `gofumpt`, and `goimports` have been moved to the `formatters` section. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - enable: - - gci - - gofmt - - gofumpt - - goimports -``` -{{< /tab >}} -{{< tab >}} -```yaml -formatters: - enable: - - gci - - gofmt - - gofumpt - - goimports -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters.enable[].{stylecheck,gosimple,staticcheck}` - -The linters `stylecheck`, `gosimple`, and `staticcheck` has been merged inside the `staticcheck`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - enable: - - gosimple - - staticcheck - - stylecheck -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - enable: - - staticcheck -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters.fast` - -This property has been removed. - -There are 2 new options (they are not strictly equivalent to the previous option): - -1. `linters.default: fast`: set all "fast" linters as the default set of linters. - ```yaml - linters: - default: fast - ``` -2. `--fast-only`: filters all enabled linters to keep only "fast" linters. - -#### `linters.presets` - -This property has been removed. - -The `migrate` command automatically migrates `linters.presets` in individual linters to `linters.enable`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -Presets: - -| name | linters | -|------|---------| -| bugs | `asasalint`, `asciicheck`, `bidichk`, `bodyclose`, `contextcheck`, `durationcheck`, `errcheck`, `errchkjson`, `errorlint`, `exhaustive`, `gocheckcompilerdirectives`, `gochecksumtype`, `gosec`, `gosmopolitan`, `govet`, `loggercheck`, `makezero`, `musttag`, `nilerr`, `nilnesserr`, `noctx`, `protogetter`, `reassign`, `recvcheck`, `rowserrcheck`, `spancheck`, `sqlclosecheck`, `staticcheck`, `testifylint`, `zerologlint` | -| comment | `dupword`, `godot`, `godox`, `misspell` | -| complexity | `cyclop`, `funlen`, `gocognit`, `gocyclo`, `maintidx`, `nestif` | -| error | `err113`, `errcheck`, `errorlint`, `wrapcheck` | -| format | `gci`, `gofmt`, `gofumpt`, `goimports` | -| import | `depguard`, `gci`, `goimports`, `gomodguard` | -| metalinter | `gocritic`, `govet`, `revive`, `staticcheck` | -| module | `depguard`, `gomoddirectives`, `gomodguard` | -| performance | `bodyclose`, `fatcontext`, `noctx`, `perfsprint`, `prealloc` | -| sql | `rowserrcheck`, `sqlclosecheck` | -| style | `asciicheck`, `canonicalheader`, `containedctx`, `copyloopvar`, `decorder`, `depguard`, `dogsled`, `dupl`, `err113`, `errname`, `exhaustruct`, `exptostd`, `forbidigo`, `forcetypeassert`, `ginkgolinter`, `gochecknoglobals`, `gochecknoinits`, `goconst`, `gocritic`, `godot`, `godox`, `goheader`, `gomoddirectives`, `gomodguard`, `goprintffuncname`, `gosimple`, `grouper`, `iface`, `importas`, `inamedparam`, `interfacebloat`, `intrange`, `ireturn`, `lll`, `loggercheck`, `makezero`, `mirror`, `misspell`, `mnd`, `musttag`, `nakedret`, `nilnil`, `nlreturn`, `nolintlint`, `nonamedreturns`, `nosprintfhostport`, `paralleltest`, `predeclared`, `promlinter`, `revive`, `sloglint`, `stylecheck`, `tagalign`, `tagliatelle`, `testpackage`, `tparallel`, `unconvert`, `usestdlibvars`, `varnamelen`, `wastedassign`, `whitespace`, `wrapcheck`, `wsl` | -| test | `exhaustruct`, `paralleltest`, `testableexamples`, `testifylint`, `testpackage`, `thelper`, `tparallel`, `usetesting` | -| unused | `ineffassign`, `unparam`, `unused` | - -{{< /tab >}} -{{< tab >}} -```yaml -# Removed -``` -{{< /tab >}} -{{< /tabs >}} - -#### `typecheck` - -This `typecheck` is not a linter, so it cannot be enabled or disabled: - -- [FAQ: Why do you have typecheck errors?](/docs/welcome/faq/#why-do-you-have-typecheck-errors) -- [FAQ: Why is it not possible to skip/ignore typecheck errors?](/docs/welcome/faq/#why-is-it-not-possible-to-skipignore-typecheck-errors) - -#### Deprecated Linters - -The following deprecated linters have been removed: - -- `deadcode` -- `execinquery` -- `exhaustivestruct` -- `exportloopref` -- `golint` -- `ifshort` -- `interfacer` -- `maligned` -- `nosnakecase` -- `scopelint` -- `structcheck` -- `tenv` -- `varcheck` - -#### Alternative Linter Names - -The alternative linters has been removed. - -| Alt Name v1 | Name v2 | -|-------------|---------------| -| `gas` | `gosec` | -| `goerr113` | `err113` | -| `gomnd` | `mnd` | -| `logrlint` | `loggercheck` | -| `megacheck` | `staticcheck` | -| `vet` | `govet` | -| `vetshadow` | `govet` | - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - enable: - - gas - - goerr113 - - gomnd - - logrlint - - megacheck - - vet - - vetshadow -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - enable: - - gosec - - err113 - - mnd - - loggercheck - - staticcheck - - govet -``` -{{< /tab >}} -{{< /tabs >}} - -### `linters-settings` - -The `linters-settings` section has been split into `linters.settings` and `formatters.settings`. - -Settings for `gci`, `gofmt`, `gofumpt`, and `goimports` are moved to the `formatters.settings` section. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - govet: - enable-all: true - gofmt: - simplify: false -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - govet: - enable-all: true - -formatters: - settings: - gofmt: - simplify: false -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.asasalint.ignore-test` - -This option has been removed. - -To ignore test files, use `linters.exclusions.rules`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - asasalint: - ignore-test: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - rules: - - path: '(.+)_test\.go' - linters: - - asasalint -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.copyloopvar.ignore-alias` - -This option has been deprecated since v1.58.0 and has been replaced with `linters.settings.copyloopvar.check-alias`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - copyloopvar: - ignore-alias: false -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - copyloopvar: - check-alias: true -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.cyclop.skip-tests` - -This option has been removed. - -To ignore test files, use `linters.exclusions.rules`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - cyclop: - skip-test: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - rules: - - path: '(.+)_test\.go' - linters: - - cyclop -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.errcheck.exclude` - -This option has been deprecated since v1.42.0 and has been removed. - -To exclude functions, use `linters.settings.errcheck.exclude-functions` instead. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - errcheck: - exclude: ./errcheck_excludes.txt -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - errcheck: - exclude-functions: - - io.ReadFile - - io.Copy(*bytes.Buffer) - - io.Copy(os.Stdout) -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.errcheck.ignore` - -This option has been deprecated since v1.13.0 and has been removed. - -To exclude functions, use `linters.settings.errcheck.exclude-functions` instead. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - errcheck: - ignore: 'io:.*' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - errcheck: - exclude-functions: - - 'io.ReadFile' - - 'io.Copy(*bytes.Buffer)' - - 'io.Copy(os.Stdout)' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.exhaustive.check-generated` - -This option has been removed. - -To analyze generated files, use `linters.exclusions.generated`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - exhaustive: - check-generated: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - generated: disable -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.forbidigo.forbid[].p` - -This field has been replaced with `linters-settings.forbidigo.forbid[].pattern`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - forbidigo: - forbid: - - p: '^fmt\.Print.*$' - msg: Do not commit print statements. -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - forbidigo: - forbid: - - pattern: '^fmt\.Print.*$' - msg: Do not commit print statements. -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.forbidigo.forbid[]` - -The `pattern` has become mandatory for the `forbid` field. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - forbidigo: - forbid: - - '^print(ln)?$' - - '^spew\.(ConfigState\.)?Dump$' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - forbidigo: - forbid: - - pattern: '^print(ln)?$' - - pattern: '^spew\.(ConfigState\.)?Dump$' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.gci.local-prefixes` - -This option has been deprecated since v1.44.0 and has been removed. - -Use `linters.settings.gci.sections` instead. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - gci: - local-prefixes: 'github.com/example/pkg' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - gci: - sections: - - standard - - default - - prefix(github.com/example/pkg) -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.gci.skip-generated` - -This option has been removed. - -To analyze generated files, use `linters.exclusions.generated`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - settings: - gci: - skip-generated: false -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - generated: disable -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.goconst.ignore-tests` - -This option has been removed. - -To ignore test files, use `linters.exclusions.rules`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - goconst: - ignore-tests: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - rules: - - path: '(.+)_test\.go' - linters: - - goconst -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.gocritic.settings.ruleguard.rules` - -The special variable `${configDir}` has been replaced with `${base-path}`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - gocritic: - settings: - ruleguard: - rules: '${configDir}/ruleguard/rules-*.go' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - gocritic: - settings: - ruleguard: - rules: '${base-path}/ruleguard/rules-*.go' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.govet.check-shadowing` - -This option has been deprecated since v1.57.0 and has been removed. - -Use `linters.settings.govet.enable: shadow` instead. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - govet: - check-shadowing: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - govet: - enable: - - shadow -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.misspell.ignore-words` - -This option has been replaced with `linters.settings.misspell.ignore-rules`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - misspell: - ignore-words: - - foo -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - misspell: - ignore-rules: - - foo -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.predeclared.ignore` - -This string option has been replaced with the slice option with the same name. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - predeclared: - ignore: "new,int" -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - predeclared: - ignore: - - new - - int -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.predeclared.q` - -This option has been replaced with `linters.settings.predeclared.qualified-name`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - predeclared: - q: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - predeclared: - qualified-name: true -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.revive.ignore-generated-header` - -This option has been removed. - -Use `linters.exclusions.generated` instead. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - revive: - ignore-generated-header: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - generated: strict -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.sloglint.context-only` - -This option has been deprecated since v1.58.0 and has been replaced with `linters.settings.sloglint.context`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - sloglint: - context-only: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - sloglint: - context: all -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.staticcheck.go` - -This option has been deprecated since v1.47.0 and has been removed. - -Use `run.go` instead. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - staticcheck: - go: '1.22' -``` -{{< /tab >}} -{{< tab >}} -```yaml -run: - go: '1.22' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.unused.exported-is-used` - -This option has been deprecated since v1.60.0 and has been removed. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - unused: - exported-is-used: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -# Removed -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.usestdlibvars.os-dev-null` - -This option has been deprecated since v1.51.0 and has been removed. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - usestdlibvars: - os-dev-null: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -# Removed -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.usestdlibvars.syslog-priority` - -This option has been deprecated since v1.51.0 and has been removed. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - usestdlibvars: - syslog-priority: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -# Removed -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.wrapcheck.ignoreInterfaceRegexps` - -This option has been renamed to `linters.settings.wrapcheck.ignore-interface-regexps`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - wrapcheck: - ignoreInterfaceRegexps: - - '^(?i)c(?-i)ach(ing|e)' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - wrapcheck: - ignore-interface-regexps: - - '^(?i)c(?-i)ach(ing|e)' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.wrapcheck.ignorePackageGlobs` - -This option has been renamed to `linters.settings.wrapcheck.ignore-package-globs`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - wrapcheck: - ignorePackageGlobs: - - 'encoding/*' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - wrapcheck: - ignore-package-globs: - - 'encoding/*' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.wrapcheck.ignoreSigRegexps` - -This option has been renamed to `linters.settings.wrapcheck.ignore-sig-regexps`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml - linters-settings: - wrapcheck: - ignoreSigRegexps: - - '\.New.*Error\(' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - wrapcheck: - ignore-sig-regexps: - - '\.New.*Error\(' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `linters-settings.wrapcheck.ignoreSigs` - -This option has been renamed to `linters.settings.wrapcheck.ignore-sigs`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters-settings: - wrapcheck: - ignoreSigs: - - '.Errorf(' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - settings: - wrapcheck: - ignore-sigs: - - '.Errorf(' -``` -{{< /tab >}} -{{< /tabs >}} - -### `issues` - -#### `issues.exclude-case-sensitive` - -This property has been removed. - -`issues.exclude`, `issues.exclude-rules.text`, and `issues.exclude-rules.source` are case-sensitive by default. - -To ignore case, use `(?i)` at the beginning of a regex syntax. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude-case-sensitive: false - exclude: - - 'abcdef' -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - rules: - - path: '(.+)\.go$' - text: (?i)abcdef -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude-dirs-use-default` - -This property has been removed. - -Use `linters.exclusions.paths` and `formatters.exclusions.paths` to exclude directories. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude-dirs-use-default: true -``` -{{< /tab >}} -{{< tab >}} - -```yaml -linters: - exclusions: - paths: - - third_party$ - - builtin$ - - examples$ -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude-dirs` - -This property has been replaced with `linters.exclusions.paths` and `formatters.exclusions.paths`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude-dirs: - - src/external_libs - - autogenerated_by_my_lib -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - paths: - - src/external_libs - - autogenerated_by_my_lib -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude-files` - -This property has been replaced with `linters.exclusions.paths` and `formatters.exclusions.paths`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude-files: - - '.*\.my\.go$' - - lib/bad.go -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - paths: - - '.*\.my\.go$' - - lib/bad.go -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude-generated-strict` - -This property has been deprecated since v1.59.0 and has been replaced with `linters.exclusions.generated: strict`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - exclude-generated-strict: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - generated: strict -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude-generated` - -This property has been replaced with `linters.exclusions.generated`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -linters: - exclude-generated: lax -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - generated: lax -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude-rules` - -This property has been replaced with `linters.exclusions.rules`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude-rules: - - path: '_test\.go' - linters: - - gocyclo - - errcheck - - dupl - - gosec - - path-except: '_test\.go' - linters: - - staticcheck - - path: internal/hmac/ - text: "weak cryptographic primitive" - linters: - - gosec - - linters: - - staticcheck - text: "SA9003:" - - linters: - - err113 - source: "foo" -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - rules: - - path: '_test\.go' - linters: - - dupl - - errcheck - - gocyclo - - gosec - - path-except: '_test\.go' - linters: - - staticcheck - - path: internal/hmac/ - text: weak cryptographic primitive - linters: - - gosec - - text: 'SA9003:' - linters: - - staticcheck - - source: foo - linters: - - err113 - ``` -{{< /tab >}} -{{< /tabs >}} - - -#### `issues.exclude-use-default` - -This property has been replaced with `linters.exclusions.presets`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude-use-default: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - presets: - - comments - - common-false-positives - - legacy - - std-error-handling -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.exclude` - -This property has been replaced with `linters.exclusions.rules`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - exclude: - - abcdef -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - rules: - - path: '(.+)\.go$' - text: abcdef -``` -{{< /tab >}} -{{< /tabs >}} - -#### `issues.include` - -This property has been replaced with `linters.exclusions.presets`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -issues: - include: - - EXC0014 - - EXC0015 -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - presets: - - common-false-positives - - legacy - - std-error-handling -``` -{{< /tab >}} -{{< /tabs >}} - -### `output` - -#### `output.format` - -This property has been deprecated since v1.57.0 and has been replaced with `output.formats`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - format: 'checkstyle:report.xml,json:stdout,colored-line-number' -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - checkstyle: - path: 'report.xml' - json: - path: stdout - text: - path: stdout - color: true -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.formats[].format: ` - -The property `output.formats[].format` has been replaced with `output.formats[].`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - formats: - - format: json - path: stderr - - format: checkstyle - path: report.xml -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - json: - path: stderr - checkstyle: - path: report.xml -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.formats[].format: line-number` - -This format has been replaced by the format `text`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - formats: - - format: line-number -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - text: - path: stdout -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.formats[].format: colored-line-number` - -This format has been replaced by the format `text` with the option `colors` (`true` by default). - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - formats: - - format: colored-line-number -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - text: - path: stdout - colors: true -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.formats[].format: colored-tab` - -This format has been replaced by the format `tab` with the option `colors` (`true` by default). - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - formats: - - format: colored-tab -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - tab: - path: stdout - colors: true -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.print-issued-lines` - -This property has been removed. - -To not print the lines with issues, use the `text` format with the option `print-issued-lines: false`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - formats: - - format: line-number - path: stdout - print-issued-lines: false -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - text: - path: stdout - print-issued-lines: false -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.print-linter-name` - -This property has been removed. - -To not print the linter name, use the `text` format with the option `print-linter-name: false`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - formats: - - format: line-number - path: stdout - print-linter-name: false -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - formats: - text: - path: stdout - print-linter-name: false -``` -{{< /tab >}} -{{< /tabs >}} - -#### `output.show-stats` - -This property is `true` by default. - -#### `output.sort-order` - -This property has a new default value `['linter', 'file']` instead of `['file']`. - -#### `output.sort-results` - -The property has been removed. - -The output results are always sorted. - -#### `output.uniq-by-line` - -This property has been deprecated since v1.63.0 and has been replaced by `issues.uniq-by-line`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -output: - uniq-by-line: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -issues: - uniq-by-line: true -``` -{{< /tab >}} -{{< /tabs >}} - -### `run` - -#### `run.go` - -The new fallback value for this property is `1.22` instead of `1.17`. - -#### `run.concurrency` - -This property value set to match Linux container CPU quota by default and fallback on the number of logical CPUs in the machine. - -#### `run.relative-path-mode` - -This property has a new default value of `cfg` instead of `wd`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -run: -# When not specified, relative-path-mode is set to 'wd' by default -``` -{{< /tab >}} -{{< tab >}} -```yaml -run: - relative-path-mode: 'cfg' -``` -{{< /tab >}} -{{< /tabs >}} - -#### `run.show-stats` - -This property has been deprecated since v1.57.0 and has been replaced by `output.show-stats`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -run: - show-stats: true -``` -{{< /tab >}} -{{< tab >}} -```yaml -output: - show-stats: true -``` -{{< /tab >}} -{{< /tabs >}} - -#### `run.skip-dirs-use-default` - -This property has been deprecated since v1.57.0 and has been replaced by `issues.exclude-dirs-use-default`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -run: - skip-dirs-use-default: false -``` -{{< /tab >}} -{{< tab >}} -```yaml -issues: - exclude-dirs-use-default: false -``` -{{< /tab >}} -{{< /tabs >}} - -#### `run.skip-dirs` - -This property has been deprecated since v1.57.0 and has been removed. - -Use `linters.exclusions.paths` and `formatters.exclusions.paths` to exclude directories. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -run: - skip-dirs: - - src/external_libs - - autogenerated_by_my_lib -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - paths: - - src/external_libs - - autogenerated_by_my_lib -``` -{{< /tab >}} -{{< /tabs >}} - -#### `run.skip-files` - -This property has been deprecated since v1.57.0 and has been removed. - -Use `linters.exclusions.paths` and `formatters.exclusions.paths` to exclude files. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -run: - skip-files: - - '.*\.my\.go$' - - lib/bad.go -``` -{{< /tab >}} -{{< tab >}} -```yaml -linters: - exclusions: - paths: - - '.*\.my\.go$' - - lib/bad.go -``` -{{< /tab >}} -{{< /tabs >}} - -#### `run.timeout` - -This property value is disabled by default (`0`). - -### `severity` - -#### `severity.default-severity` - -This property has been replaced with `severity.default`. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -severity: - default-severity: error -``` -{{< /tab >}} -{{< tab >}} -```yaml -severity: - default: error -``` -{{< /tab >}} -{{< /tabs >}} - -#### `severity.rules.case-sensitive` - -`severity.rules.text` and `severity.rules.source` are case-sensitive by default. - -To ignore case, use `(?i)` at the beginning of a regex syntax. - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```yaml -severity: - case-sensitive: true - rules: - - severity: info - linters: - - foo - text: 'Example.*' -``` -{{< /tab >}} -{{< tab >}} -```yaml -severity: - rules: - - severity: info - linters: - - foo - text: '(?i)Example.*' -``` -{{< /tab >}} -{{< /tabs >}} - -### `version` - -The `version` property has been added to the configuration file. - -```yaml -version: "2" -``` - -### Integration - -#### Visual Studio Code - -{{< tabs items="v1,v2" >}} -{{< tab >}} -```JSONata -"go.lintTool": "golangci-lint", -"go.lintFlags": [ - "--fast" -] -``` -{{< /tab >}} -{{< tab >}} -```JSONata -"go.lintTool": "golangci-lint", -"go.lintFlags": [ - "--fast-only" -], -"go.formatTool": "custom", -"go.alternateTools": { - "customFormatter": "golangci-lint" -}, -"go.formatFlags": [ - "fmt", - "--stdin" -] -``` -{{< /tab >}} -{{< /tabs >}} - -### Command Line Flags - -The following flags have been removed: - -- `--disable-all` -- `--enable-all` -- `-p, --presets` -- `--fast` -- `-e, --exclude` -- `--exclude-case-sensitive` -- `--exclude-dirs-use-default` -- `--exclude-dirs` -- `--exclude-files` -- `--exclude-generated` -- `--exclude-use-default` -- `--go string` -- `--sort-order` -- `--sort-results` -- `--out-format` -- `--print-issued-lines` -- `--print-linter-name` - -#### `--out-format` - -`--out-format` has been replaced with the following flags: - -```bash -# Previously 'colored-line-number' and 'line-number' ---output.text.path ---output.text.print-linter-name ---output.text.print-issued-lines ---output.text.colors -``` - -```bash -# Previously 'json' ---output.json.path -``` - -```bash -# Previously 'colored-tab' and 'tab' ---output.tab.path ---output.tab.print-linter-name ---output.tab.colors -``` - -```bash -# Previously 'html' ---output.html.path -``` - -```bash -# Previously 'checkstyle' ---output.checkstyle.path -``` - -```bash -# Previously 'code-climate' ---output.code-climate.path -``` - -```bash -# Previously 'junit-xml' and 'junit-xml-extended' ---output.junit-xml.path ---output.junit-xml.extended -``` - -```bash -# Previously 'teamcity' ---output.teamcity.path -``` - -```bash -# Previously 'sarif' ---output.sarif.path -``` - -#### `--print-issued-lines` - -`--print-issued-lines` has been replaced with `--output.text.print-issued-lines`. - -#### `--print-linter-name` - -`--print-linter-name` has been replaced with `--output.text.print-linter-name` or `--output.tab.print-linter-name`. - -#### `--disable-all` and `--enable-all` - -`--disable-all` has been replaced with `--default=none`. - -`--enable-all` has been replaced with `--default=all`. - -#### Examples - -Run only the `govet` linter, output results to stdout in JSON format, and sort results: - -{{< tabs items="v1,v2" >}} -{{< tab >}} - -```bash -golangci-lint run --disable-all --enable=govet --out-format=json --sort-order=linter --sort-results -``` -{{< /tab >}} -{{< tab >}} - -```bash -golangci-lint run --default=none --enable=govet --output.json.path=stdout -``` -{{< /tab >}} -{{< /tabs >}} - -Do not print issued lines, output results to stdout without colors in text format, and to `gl-code-quality-report.json` file in Code Climate's format: - -{{< tabs items="v1,v2" >}} -{{< tab >}} - -```bash -golangci-lint run --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number -``` -{{< /tab >}} -{{< tab >}} - -```bash -golangci-lint run --output.text.path=stdout --output.text.colors=false --output.text.print-issued-lines=false --output.code-climate.path=gl-code-quality-report.json -``` -{{< /tab >}} -{{< /tabs >}} diff --git a/docs/content/docs/product/roadmap.md b/docs/content/docs/product/roadmap.md deleted file mode 100644 index 25fce1af6cda..000000000000 --- a/docs/content/docs/product/roadmap.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Roadmap -weight: 4 -aliases: - - /product/roadmap/ ---- - -## 💡 Feature Requests - -Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on. - -[See Feature Requests](https://github.com/golangci/golangci-lint/issues?utf8=✓&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement) - -## 🐛 Bugs - -Please file an issue for bugs, missing documentation or unexpected behavior. - -[See Bugs](https://github.com/golangci/golangci-lint/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3A%22bug%22+sort%3Acreated-desc) - -## Versioning Policy - -golangci-lint follows [semantic versioning](https://semver.org). However, due to the nature of golangci-lint as a code quality tool, -it's not always clear when a minor or major version bump occurs. -To help clarify this for everyone, we've defined the following semantic versioning policy: - -- Patch release (intended to not break your lint build) - - A patch version update in a specific linter that results in golangci-lint reporting fewer errors. - - A bug fix to the CLI or core (packages loading, runner, postprocessors, etc). - - Improvements to documentation. - - Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage. - - Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone). -- Minor release (might break your lint build because of newly found issues) - - A major or minor version update of a specific linter that results in golangci-lint reporting more errors. - - A new linter is added. - - An existing configuration option or linter is deprecated. - - A new CLI command is created. - - Backward incompatible change of configuration. -- Major release (likely to break your lint build) - - Backward incompatible change of configuration with huge impact. - -According to our policy, any minor update may report more errors than the previous release (ex: from a bug fix). -As such, we recommend using the fixed minor version and fixed or the latest patch version to guarantee the results of your builds. - -For example, in our [GitHub Action](https://github.com/golangci/golangci-lint-action) we require users to explicitly set the minor version of golangci-lint -and we always use the latest patch version. - -## Linter Deprecation Cycle - -A linter can be deprecated for various reasons, e.g. the linter stops working with a newer version of Go or the author has abandoned its linter. - -The deprecation of a linter will follow 3 phases: - -1. **Display of a warning message**: The linter can still be used (unless it's completely non-functional), - but it's recommended to remove it from your configuration. -2. **Display of an error message**: At this point, you should remove the linter. - The original implementation is replaced by a placeholder that does nothing. - The linter is NOT enabled when using `default: all` and should be removed from the `disable` option. -3. **Removal of the linter** from golangci-lint. - -Each phase corresponds to a minor version: - -- v1.0.0 -> warning message -- v1.1.0 -> error message -- v1.2.0 -> linter removed - -We will provide clear information about those changes on different supports: changelog, logs, social network, etc. - -We consider the removal of a linter as non-breaking changes for golangci-lint itself. -No major version will be created when a linter is removed. - -## Future Plans - -1. Upstream all changes of forked linters. -2. Make it easy to write own linter/checker: it should take a minimum code, have perfect documentation, debugging and testing tooling. -3. Speed up SSA loading: on-disk cache and existing code profiling-optimizing. -4. Analyze (don't only filter) only new code: analyze only changed files and dependencies, make incremental analysis, caches. -5. Smart new issues detector: don't print existing issues on changed lines. -6. Minimize false-positives by fixing linters and improving testing tooling. -7. Documentation for every issue type. diff --git a/docs/content/docs/product/thanks.md b/docs/content/docs/product/thanks.md deleted file mode 100644 index 64884da41f85..000000000000 --- a/docs/content/docs/product/thanks.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Thanks -weight: 1 -aliases: - - /product/thanks/ ---- - -## ❤️ - -### Thanks to developers and authors of used linters - -{{< cards class="author-cards" cols=7 >}} -{{< golangci/authors >}} -{{< /cards >}} - -### Thanks to all contributors - -[![golangci-lint contributors](https://opencollective.com/golangci-lint/contributors.svg?width=890&button=false&skip=golangcidev,CLAassistant,renovate,fossabot,golangcibot,kortschak,golangci-releaser,dependabot%5Bbot%5D)](https://github.com/golangci/golangci-lint/graphs/contributors) - -### Special thanks - -Thanks to [alecthomas/gometalinter](https://github.com/alecthomas/gometalinter) for inspiration and amazing work. - -Thanks to [bradleyfalzon/revgrep](https://github.com/bradleyfalzon/revgrep) for cool diff tool. - -The golangci-lint logo is inspired by the Go gopher designed by Renee French [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/). diff --git a/docs/content/docs/welcome/_index.md b/docs/content/docs/welcome/_index.md deleted file mode 100644 index 3895e07973b3..000000000000 --- a/docs/content/docs/welcome/_index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Welcome -weight: 1 ---- - -This quickstart guide provides step-by-step instructions to help you install, configure, and begin using `golangci-lint` efficiently. - - - -{{< cards >}} - {{< card link="/docs/welcome/install/#local-installation" title="Local Installation" icon="archive" >}} - {{< card link="/docs/welcome/install/#ci-installation" title="CI Installation" icon="archive" >}} - {{< card link="/docs/welcome/integrations/" title="Integrations" icon="sparkles" >}} - {{< card link="/docs/welcome/quick-start/#linting" title="Quick Start: Linting" icon="fast-forward" >}} - {{< card link="/docs/welcome/quick-start/#formatting" title="Quick Start: Formatting" icon="fast-forward" >}} - {{< card link="/docs/welcome/faq/" title="FAQ" icon="question-mark-circle" >}} -{{< /cards >}} diff --git a/docs/content/docs/welcome/faq.md b/docs/content/docs/welcome/faq.md deleted file mode 100644 index e03026e85856..000000000000 --- a/docs/content/docs/welcome/faq.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: FAQ -toc: false -weight: 5 -aliases: - - /welcome/faq/ ---- - -## Which Go versions are supported? - -The same as the Go team (the 2 latest minor versions). - -Basically, golangci-lint supports Go versions lower or equal to the Go version used to compile it. - -New versions of Go are not automatically supported because, in addition of the Go version used to build it, -some linters and/or internal pieces of golangci-lint could need to be adapted to support this new Go version. - -## How to use golangci-lint in CI - -Run golangci-lint in CI and check the exit code. If it's non-zero - fail the build. - -See [how to properly install golangci-lint in CI](/docs/welcome/install/#ci-installation) - -## golangci-lint doesn't work - -1. Please ensure you are using the latest binary release. -2. Run it with `-v` option and check the output. -3. If it doesn't help, create a [GitHub issue](https://github.com/golangci/golangci-lint/issues/new/choose) with the output from the error and #2 above. - -## Why do you have `typecheck` errors? - -`typecheck` is like a front-end for the Go compiler errors. -Compilation errors are identified/labeled as reports of `typecheck` but they are not produced by a linter called `typecheck`. - -`typecheck` is not a linter, it doesn't perform any analysis, -it's just a way to identify, parse, and display compiling errors (produced by the `types.Checker`) and some linter errors. - -It cannot be disabled because of that. - -Of course, this is just as good as the compiler itself, and a lot of compilation issues will not properly show where in the code your error lies. - -As a consequence, the code to analyze should compile. -It means that if you try to run an analysis on a single file or a group of files or a package or a group of packages, -with dependencies on other files or packages of your project, as it doesn't compile (because of the missing pieces of code), -it also cannot be analyzed. - -If there are `typecheck` errors, golangci-lint will not be able to produce other reports because that kind of error doesn't allow it to perform any analysis. - -How to troubleshoot: - -1. Ensure the version of golangci-lint is built with a compatible version of Go (`golangci-lint version`). -2. Ensure dependencies are up to date with `go mod tidy`. -3. Ensure building works with `go run ./...`/`go build ./...` - whole package. -4. Ensure you are not running an analysis on code that depends on files/packages outside the scope of the analyzed elements. -5. If using CGO, ensure all required system libraries are installed. -6. If you are using private repositories/dependencies, ensure the [Go proxy](https://go.dev/ref/mod#module-proxy) (`GOPROXY`) and [checksum database](https://go.dev/ref/mod#checksum-database) (`GOSUMDB`) are right and/or your git configuration. - -## Why is it not possible to skip/ignore `typecheck` errors? - -For mainly the same reasons that you cannot compile when you have a compiler error. - -`typecheck` errors are reported in the same style as linter reports/issues, -but are completely different because they are related to problems that block the analysis (`typecheck` is not a linter). - -When there are `typecheck` errors, -most linters are not able to perform the analysis, -and they simply do not produce any reports, -so it's not possible to skip/ignore `typecheck` errors. - -## Why running with `--fast-only` can be slow on the first run? - -Because the first run caches type information. -All subsequent runs will be faster. -Usually this option is used during development on a local machine and compilation was already performed. - -## How do you add a custom linter? - -You can integrate it yourself, see this [manual](/docs/contributing/new-linters/). -Or you can create a [GitHub Issue](https://github.com/golangci/golangci-lint/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.yml) and we will integrate when time permits. - -## How to integrate golangci-lint into a large project with thousands of issues - -We are sure that every project can easily integrate golangci-lint, even the large one. - -The idea is to not fix all existing issues. -Fix only newly added issue: issues in new code. - -To do this, set up the CI to run golangci-lint with options `--new-from-merge-base=main` or `--new-from-rev=HEAD~1`. - -Also, take a look at option `--new`, -but consider that CI scripts that generate unstaged files will make `--new` only point out issues in those files and not in the last commit. -In that regard `--new-from-merge-base=main` or `--new-from-rev=HEAD~1` are safer. - -By doing this you won't create new issues in your code and can choose fix existing issues (or not). - -## Why `--new-from-xxx` don't seem to be working in some cases? - -The options `--new-from-merge-base`, `--new-from-rev`, and `--new-from-patch` work by comparing `git diff` output and issues. - -If an issue is not reported as the same line as the changes then the issue will be skipped. -This is the line of the issue is not inside the lines changed. - -To fix that, you have to use the option `--whole-files`. - -The side effect is the issues inside the file that contain changes but not directly related to the changes themselves will be reported. diff --git a/docs/content/docs/welcome/install.md b/docs/content/docs/welcome/install.md deleted file mode 100644 index 882a6e7e9f19..000000000000 --- a/docs/content/docs/welcome/install.md +++ /dev/null @@ -1,248 +0,0 @@ ---- -title: "Install" -weight: 1 -aliases: - - /welcome/install/ ---- - -## CI installation - -Most installations of golangci-lint are performed for CI. - -It's important to have reproducible CI: don't start to fail all builds at the same time. -With golangci-lint this can happen if you use option `linters.default: all` and a new linter is added -or even without `linters.default: all` when one upstream linter is upgraded. - -> [!IMPORTANT] -> It's highly recommended installing a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases). - -### GitHub Actions - -We recommend using [our GitHub Action](https://github.com/golangci/golangci-lint-action) for running golangci-lint in CI for GitHub projects. - -It's [fast and uses smart caching](https://github.com/golangci/golangci-lint-action#performance) inside, -and it can be much faster than the simple binary installation. - -Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues). - -{{< cards cols=2 >}} - {{< golangci/image-card src="https://github.com/images/colored-line-number.png" title="Console Output" >}} - {{< golangci/image-card src="https://github.com/images/annotations.png" title="Annotations" >}} -{{< /cards >}} - -### GitLab CI - -GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint). -A simple quickstart is their [CI component](https://gitlab.com/explore/catalog/components/code-quality-oss/codequality-os-scanners-integration), which can be used like this: - -```yaml {filename=".gitlab-ci.yml"} -include: - - component: $CI_SERVER_FQDN/components/code-quality-oss/codequality-os-scanners-integration/golangci@1.0.1 -``` - -Note that you [can only reference components in the same GitLab instance as your project](https://docs.gitlab.com/ci/components/#use-a-component) - -### Other CI - -Here is the other way to install golangci-lint: - -```bash -# binary will be $(go env GOPATH)/bin/golangci-lint -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< golangci/latest-version >}} - -# or install it into ./bin/ -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< golangci/latest-version >}} - -# In Alpine Linux (as it does not come with curl by default) -wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< golangci/latest-version >}} - -golangci-lint --version -``` - -It is advised that you periodically update the version of golangci-lint as the project is under active development and is constantly being improved. -For any problems with golangci-lint, check out recent [GitHub issues](https://github.com/golangci/golangci-lint/issues) and update if needed. - -## Local Installation - -[![Packaging status](https://repology.org/badge/vertical-allrepos/golangci-lint.svg)](https://repology.org/project/golangci-lint/versions) - -### Binaries - -```bash -# binary will be $(go env GOPATH)/bin/golangci-lint -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< golangci/latest-version >}} - -golangci-lint --version -``` - -On Windows, you can run the above commands with Git Bash, which comes with [Git for Windows](https://git-scm.com/download/win). - -### Linux - -Golangci-lint is available inside the majority of the package managers. - -### macOS - -#### Homebrew - -Note: Homebrew can use an unexpected version of Go to build the binary, -so we recommend either using our binaries or ensuring the version of Go used to build. - -You can install a binary release on macOS using [brew](https://brew.sh/): - -```bash -brew install golangci-lint -brew upgrade golangci-lint -``` - -Note: Previously, we used a [Homebrew tap](https://github.com/golangci/homebrew-tap). -We recommend using the [official formula](https://formulae.brew.sh/formula/golangci-lint) instead of the tap, -but sometimes the most recent release isn't immediately available via Homebrew core due to manual updates that need to occur from Homebrew core maintainers. -In this case, the tap formula, which is updated automatically, -can be used to install the latest version of golangci-lint: - -```bash -brew tap golangci/tap -brew install golangci/tap/golangci-lint -``` - -#### MacPorts - -It can also be installed through [MacPorts](https://www.macports.org/) -The MacPorts installation mode is community-driven and not officially maintained by the golangci team. - -```bash -sudo port install golangci-lint -``` - -### Windows - -#### Chocolatey - -You can install a binary on Windows using [chocolatey](https://community.chocolatey.org/packages/golangci-lint). - -```bash -choco install golangci-lint -``` - -#### Scoop - -You can install a binary on Windows using [scoop](https://scoop.sh). - -```bash -scoop install main/golangci-lint -``` - -The scoop package is not officially maintained by golangci team. - -### Docker - -```bash -docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run -``` - -Colored output: -```bash -docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run -``` - -Preserving caches between consecutive runs: -```bash -docker run --rm -t -v $(pwd):/app -w /app \ ---user $(id -u):$(id -g) \ --v $(go env GOCACHE):/.cache/go-build -e GOCACHE=/.cache/go-build \ --v $(go env GOMODCACHE):/.cache/mod -e GOMODCACHE=/.cache/mod \ --v ~/.cache/golangci-lint:/.cache/golangci-lint -e GOLANGCI_LINT_CACHE=/.cache/golangci-lint \ -golangci/golangci-lint:{{< golangci/latest-version >}} golangci-lint run -``` - -### Install from Sources - -> [!WARNING] -> Using `go install`/`go get`, "tools pattern", and `tool` command/directives installations aren't guaranteed to work. -> We recommend using binary installation. - -These installations aren't recommended because of the following points: - -1. These installations compile golangci-lint locally. The Go version used to build will depend on your local Go version. -2. Some users use the `-u` flag for `go get`, which upgrades our dependencies. The resulting binary was not tested and is not guaranteed to work. -3. When using the "tools pattern" or `tool` command/directives, the dependencies of a tool can modify the dependencies of another tool or your project. The resulting binary was not tested and is not guaranteed to work. -4. We've encountered issues with Go module hashes due to the unexpected recreation of dependency tags. -5. `go.mod` replacement directives don't apply transitively. It means a user will be using a patched version of golangci-lint if we use such replacements. -6. It allows installation from the main branch, which can't be considered stable. -7. It's slower than binary installation. - -```bash -go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{< golangci/latest-version >}} -``` - -{{% details title="`go tool` usage recommendations" closed="true" %}} - -> [!WARNING] -> We don't recommend using `go tool`. - -But if you want to use `go tool` to install and run golangci-lint (**once again we don't recommend that**), -the best approach is to use a dedicated module or module file to isolate golangci-lint from other tools or dependencies. - -This approach avoids modifying your project dependencies and the golangci-lint dependencies. - -> [!CAUTION] -> You should never update golangci-lint dependencies manually. - -**Method 1: dedicated module file** - -```sh -# Create a dedicated module file -go mod init -modfile=golangci-lint.mod /golangci-lint -# Example: go mod init -modfile=golangci-lint.mod github.com/org/repo/golangci-lint -``` - -```sh -# Add golangci-lint as a tool -go get -tool -modfile=golangci-lint.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{< golangci/latest-version >}} -``` - -```sh -# Run golangci-lint as a tool -go tool -modfile=golangci-lint.mod golangci-lint run -``` - -```sh -# Update golangci-lint -go get -tool -modfile=golangci-lint.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest -``` - -**Method 2: dedicated module** - -```sh -# Create a dedicated directory -mkdir golangci-lint -``` - -```sh -# Create a dedicated module file -go mod init -modfile=tools/go.mod /golangci-lint -# Example: go mod init -modfile=golangci-lint/go.mod github.com/org/repo/golangci-lint -``` - -```sh -# Setup a Go workspace -go work init . golangci-lint -``` - -```sh -# Add golangci-lint as a tool -go get -tool -modfile=golangci-lint/go.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint -``` - -```sh -# Run golangci-lint as a tool -go tool golangci-lint run -``` - -```sh -# Update golangci-lint -go get -tool -modfile=golangci-lint/go.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest -``` - -{{% /details %}} diff --git a/docs/content/docs/welcome/integrations.md b/docs/content/docs/welcome/integrations.md deleted file mode 100644 index 4c04979692ea..000000000000 --- a/docs/content/docs/welcome/integrations.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: Integrations -weight: 3 -aliases: - - /welcome/integrations/ ---- - -## Editor Integration - -### GoLand - -Starting from version 2025.1, GoLand has built-in support of golangci-lint. -For IntelliJ IDEA with the Go plugin, please install the [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter). - -Both v1 and v2 versions are supported. - -### Visual Studio Code - -Install the [extension](https://marketplace.visualstudio.com/items?itemName=golang.Go). - -{{% details title="Recommended settings for those who installed golangci-lint manually" closed="true" %}} - -```JSONata -"go.lintTool": "golangci-lint", -"go.lintFlags": [ - "--path-mode=abs", - "--fast-only" -], -"go.formatTool": "custom", -"go.alternateTools": { - "customFormatter": "golangci-lint" -}, -"go.formatFlags": [ - "fmt", - "--stdin" -] -``` - -Using it in an editor without `--fast-only` can freeze your editor. -Golangci-lint automatically discovers the `.golangci.yml` config for the edited file, so you don't need to configure it in VS Code settings. - -{{% /details %}} - -{{% details title="Recommended settings for those who installed golangci-lint via extension" closed="true" %}} - -Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. -This will enable golangci-lint v1 to co-exist with v2. -And use the following settings: - -```JSONata -"go.lintTool": "golangci-lint-v2", -"go.lintFlags": [ - "--path-mode=abs", - "--fast-only" -], -"go.formatTool": "custom", -"go.alternateTools": { - "customFormatter": "golangci-lint-v2" -}, -"go.formatFlags": [ - "fmt", - "--stdin" -] -``` - -Using it in an editor without `--fast-only` can freeze your editor. -Golangci-lint automatically discovers the `.golangci.yml` config for the edited file, so you don't need to configure it in VS Code settings. - -{{% /details %}} - -### GNU Emacs - -There are available plugins: - -- [Spacemacs](https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/go/README.org#linting) -- [Flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint) - -### Vim - -The following plugins support golangci-lint: - -- [vim-go](https://github.com/fatih/vim-go) -- [ALE](https://github.com/w0rp/ale) - -### LSP Server - -[golangci-lint-langserver](https://github.com/nametake/golangci-lint-langserver) (NeoVim, Vim, Emacs, ...) - -### Sublime Text - -There is a [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter. - -## Shell Completion - -Golangci-lint can generate Bash, fish, PowerShell, and Zsh completion files. - -See the instructions on `golangci-lint completion --help` (replace `` with your favorite one). - -{{% details title="Bash & macOS" closed="true" %}} - -There are two versions of `bash-completion`, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+. - -The golangci-lint completion script doesn’t work correctly with bash-completion v1 and Bash 3.2. It requires bash-completion v2 and Bash 4.1+. - -Thus, to be able to correctly use golangci-lint completion on macOS, you have to install and use Bash 4.1+ ([instructions](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)). - -The following instructions assume that you use Bash 4.1+ (that is, any Bash version of 4.1 or newer). - -Install `bash-completion v2`: - -```bash -brew install bash-completion@2 -echo 'export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"' >>~/.bashrc -echo '[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"' >>~/.bashrc -exec bash # reload and replace (if it was updated) shell -type _init_completion && echo "completion is OK" # verify that bash-completion v2 is correctly installed -``` - -Add golangci-lint bash completion: - -```bash -echo 'source <(golangci-lint completion bash)' >>~/.bashrc -source ~/.bashrc -``` - -{{% /details %}} - -## CI Integration - -Check out our [documentation for CI integrations](/docs/welcome/install#ci-installation). - diff --git a/docs/content/docs/welcome/quick-start.md b/docs/content/docs/welcome/quick-start.md deleted file mode 100644 index 145ae81c8dd9..000000000000 --- a/docs/content/docs/welcome/quick-start.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Quick Start -weight: 2 -aliases: - - /welcome/quick-start/ ---- - -## Linting - -To run golangci-lint: - -```bash -golangci-lint run -``` - -It's an equivalent of: - -```bash -golangci-lint run ./... -``` - -You can choose which directories or files to analyze: - -```bash -golangci-lint run dir1 dir2/... -golangci-lint run file1.go -``` - -Directories are NOT analyzed recursively. -To analyze them recursively append `/...` to their path. -It's not possible to mix files and packages/directories, and files must come from the same package. - -Golangci-lint can be used with zero configuration. By default, the following linters are enabled: - -{{% golangci/cli-output section="defaultEnabledLinters" cmd="help linters" %}} - -Pass `-E/--enable` to enable linter and `-D/--disable` to disable: - -```bash -golangci-lint run --default=none -E errcheck -``` - -More information about available linters can be found in the [linters page](/docs/linters/). - -## Formatting - -To format your code: - -```bash -golangci-lint fmt -``` - -You can choose which directories or files to analyze: - -```bash -golangci-lint fmt dir1 dir2/... -golangci-lint fmt file1.go -``` - -More information about available formatters can be found in the [formatters page](/docs/formatters/). diff --git a/docs/contributing/architecture/index.html b/docs/contributing/architecture/index.html new file mode 100644 index 000000000000..fd8a0a45d256 --- /dev/null +++ b/docs/contributing/architecture/index.html @@ -0,0 +1,234 @@ +Architecture – Golangci-lint
New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

Architecture

There are the following golangci-lint execution steps:

+  graph LR
+    init[Init]
+    loadPackages[Load packages]
+    runLinters[Run linters]
+    postprocess[Postprocess issues]
+    print[Print issues]
+
+    init --> loadPackages --> runLinters --> postprocess --> print
+

Init +

The configuration is loaded from file and flags by config.Loader inside PersistentPreRun (or PreRun) of the commands that require configuration.

The linter database (linterdb.Manager) is fill based on the configuration:

  • The linters (“internals” and plugins) are built by linterdb.LinterBuilder and linterdb.PluginBuilder builders.
  • The configuration is validated by linterdb.Validator.

Load Packages +

Loading packages is listing all packages and their recursive dependencies for analysis.
Also, depending on the enabled linters set some parsing of the source code can be performed at this step.

Packages loading starts here:

func (l *PackageLoader) Load(ctx context.Context, linters []*linter.Config) (pkgs, deduplicatedPkgs []*packages.Package, err error) {
+	loadMode := findLoadMode(linters)
+
+	pkgs, err = l.loadPackages(ctx, loadMode)
+	if err != nil {
+		return nil, nil, fmt.Errorf("failed to load packages: %w", err)
+	}
+// ...

First, we find a load mode as union of load modes for all enabled linters. +We use go/packages for packages loading and use it’s enum packages.Need* for load modes. +Load mode sets which data does a linter needs for execution.

A linter that works only with AST need minimum of information: only filenames and AST.

There is no need for packages dependencies or type information. +AST is built during go/analysis execution to reduce memory usage. +Such AST-based linters are configured with the following code:

func (lc *Config) WithLoadFiles() *Config {
+	lc.LoadMode |= packages.NeedName | packages.NeedFiles | packages.NeedCompiledGoFiles
+	return lc
+}

If a linter uses go/analysis and needs type information, we need to extract more data by go/packages:

func (lc *Config) WithLoadForGoAnalysis() *Config {
+	lc = lc.WithLoadFiles()
+	lc.LoadMode |= packages.NeedImports | packages.NeedDeps | packages.NeedExportFile | packages.NeedTypesSizes
+	lc.IsSlow = true
+	return lc
+}

After finding a load mode, we run go/packages: +the library get list of dirs (or ./... as the default value) as input and outputs list of packages and requested information about them: +filenames, type information, AST, etc.

Run Linters +

First, we need to find all enabled linters. All linters are registered here:

func (b LinterBuilder) Build(cfg *config.Config) []*linter.Config {
+	// ...
+	return []*linter.Config{
+		// ...
+		linter.NewConfig(golinters.NewBodyclose()).
+			WithSince("v1.18.0").
+			WithLoadForGoAnalysis().
+			WithURL("https://github.com/timakin/bodyclose"),
+		// ...
+		linter.NewConfig(golinters.NewGovet(govetCfg)).
+			WithGroups(config.GroupStandard).
+			WithSince("v1.0.0").
+			WithLoadForGoAnalysis().
+			WithURL("https://pkg.go.dev/cmd/vet"),
+		// ...
+	}
+}

We filter requested in config and command-line linters in EnabledSet:

func (m *Manager) GetEnabledLintersMap() (map[string]*linter.Config, error)

We merge enabled linters into one MetaLinter to improve execution time if we can:

// GetOptimizedLinters returns enabled linters after optimization (merging) of multiple linters into a fewer number of linters.
+// E.g. some go/analysis linters can be optimized into one metalinter for data reuse and speed up.
+func (m *Manager) GetOptimizedLinters() ([]*linter.Config, error) {
+	// ...
+	m.combineGoAnalysisLinters(resultLintersSet)
+	// ...
+}

The MetaLinter just stores all merged linters inside to run them at once:

type MetaLinter struct {
+	linters              []*Linter
+	analyzerToLinterName map[*analysis.Analyzer]string
+}

Currently, all linters except unused can be merged into this meta linter.
The unused isn’t merged because it has high memory usage.

Linters execution starts in runAnalyzers. +It’s the most complex part of the golangci-lint. +We use custom go/analysis runner there.
It runs as much as it can in parallel. +It lazy-loads as much as it can to reduce memory usage. +Also, it sets all heavyweight data to nil as becomes unneeded to save memory.

We don’t use existing multichecker because +it doesn’t use caching and doesn’t have some important performance optimizations.

All found by linters issues are represented with result.Issue struct:

type Issue struct {
+	FromLinter string
+	Text       string
+
+	Severity string
+
+	// Source lines of a code with the issue to show
+	SourceLines []string
+
+	// Pkg is needed for proper caching of linting results
+	Pkg *packages.Package `json:"-"`
+
+	Pos token.Position
+
+	LineRange *Range `json:",omitempty"`
+
+	// HunkPos is used only when golangci-lint is run over a diff
+	HunkPos int `json:",omitempty"`
+
+	// If we know how to fix the issue we can provide replacement lines
+	SuggestedFixes []analysis.SuggestedFix `json:",omitempty"`
+
+	// If we are expecting a nolint (because this is from nolintlint), record the expected linter
+	ExpectNoLint         bool
+	ExpectedNoLintLinter string
+
+	// ...
+}

Postprocess Issues +

We have an abstraction of result.Processor to postprocess found issues:

    • cgo.go
    • diff.go
    • exclusion_generated_file_filter.go
    • exclusion_generated_file_matcher.go
    • exclusion_paths.go
    • exclusion_presets.go
    • exclusion_rules.go
    • filename_unadjuster.go
    • fixer.go
    • identifier_marker.go
    • invalid_issue.go
    • issues.go
    • max_from_linter.go
    • max_per_file_from_linter.go
    • max_same_issues.go
    • nolint_filter.go
    • path_absoluter.go
    • path_prettifier.go
    • path_relativity.go
    • path_shortener.go
    • processor.go
    • severity.go
    • sort_results.go
    • source_code.go
    • uniq_by_line.go
  • The abstraction is simple:

    type Processor interface {
    +	Process(issues []*result.Issue) ([]*result.Issue, error)
    +	Name() string
    +	Finish()
    +}

    A processor can hide issues (nolint, exclude) or change issues (path_prettifier).

    Print Issues +

    We have an abstraction for printing found issues.

    • checkstyle.go
    • codeclimate.go
    • html.go
    • json.go
    • junitxml.go
    • printer.go
    • sarif.go
    • tab.go
    • teamcity.go
    • text.go
  • Last updated on
    \ No newline at end of file diff --git a/docs/contributing/debug/index.html b/docs/contributing/debug/index.html new file mode 100644 index 000000000000..20b3de213715 --- /dev/null +++ b/docs/contributing/debug/index.html @@ -0,0 +1,118 @@ +Debugging – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
    \ No newline at end of file diff --git a/docs/contributing/faq/index.html b/docs/contributing/faq/index.html new file mode 100644 index 000000000000..e653ef3c772c --- /dev/null +++ b/docs/contributing/faq/index.html @@ -0,0 +1,125 @@ +FAQ – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

    FAQ

    How to add a new open-source linter to golangci-lint +

    See there.

    How to add a new private linter to golangci-lint +

    See there.

    How to update an existing linter +

    We use Dependabot to update dependencies, including linters.
    The updates happen at least automatically once a week (Sunday 11am UTC).

    No pull requests to update a linter will be accepted unless you are the author of the linter and specific changes are required.

    How to add a configuration option to an existing linter +

    Add a new field to the linter settings struct.
    Document it in .golangci.next.reference.yml.
    Pass it to the linter.

    How to see INFO or DEBUG logs +

    See tutorial about debugging.

    Last updated on
    \ No newline at end of file diff --git a/docs/contributing/index.html b/docs/contributing/index.html new file mode 100644 index 000000000000..7d31ea5e8dd9 --- /dev/null +++ b/docs/contributing/index.html @@ -0,0 +1,106 @@ +Contributing – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
    \ No newline at end of file diff --git a/docs/contributing/index.xml b/docs/contributing/index.xml new file mode 100644 index 000000000000..4eefcf4d9903 --- /dev/null +++ b/docs/contributing/index.xml @@ -0,0 +1,683 @@ +Golangci-lint – Contributinghttps://golangci-lint.run/docs/contributing/Recent content in Contributing on Golangci-lintHugo -- gohugo.ioen-usWorkflowhttps://golangci-lint.run/docs/contributing/workflow/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/contributing/workflow/ +<p>By participating in this project, you agree to abide our <a href="https://github.com/golangci/golangci-lint?tab=coc-ov-file"target="_blank" rel="noopener">code of conduct</a>.</p> +<h2>Set up your machine<span class="hx:absolute hx:-mt-20" id="set-up-your-machine"></span> +<a href="#set-up-your-machine" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Golangci-lint is written in <a href="https://go.dev/"target="_blank" rel="noopener">Go</a>.</p> +<p>Prerequisites:</p> +<ul> +<li><code>make</code></li> +<li><a href="https://go.dev/doc/install"target="_blank" rel="noopener">Go</a></li> +</ul> +<p>Fork and clone <a href="https://github.com/golangci/golangci-lint"target="_blank" rel="noopener">golangci-lint</a> repository.</p> +<p>A good way of making sure everything is all right is running the following:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">make build +</span></span><span class="line"><span class="cl">./golangci-lint run -v</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>Test your change<span class="hx:absolute hx:-mt-20" id="test-your-change"></span> +<a href="#test-your-change" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>When you are satisfied with the changes, we suggest you run:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">make test</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>Which runs all the linters and tests.</p> +<h2>Create or update parameters for docs<span class="hx:absolute hx:-mt-20" id="create-or-update-parameters-for-docs"></span> +<a href="#create-or-update-parameters-for-docs" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Add your new or updated parameters to <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.next.reference.yml"target="_blank" rel="noopener">.golangci.next.reference.yml</a> so they will be shown in the docs</p> +<h2>Submit a pull request<span class="hx:absolute hx:-mt-20" id="submit-a-pull-request"></span> +<a href="#submit-a-pull-request" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Push your branch to your golangci-lint fork and open a pull request against the +<code>main</code> branch.</p> +<h2>Pull request checks<span class="hx:absolute hx:-mt-20" id="pull-request-checks"></span> +<a href="#pull-request-checks" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>First, please, accept CLA - <a href="https://cla-assistant.io/"target="_blank" rel="noopener">CLA assistant</a> will make a comment on the pull request about it.</p> +<p>Also, we run a few checks in CI by using GitHub Actions, you can see them <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.github/workflows"target="_blank" rel="noopener">here</a>.</p> +<h2>New releases<span class="hx:absolute hx:-mt-20" id="new-releases"></span> +<a href="#new-releases" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>First, see <a href="https://golangci-lint.run/docs/product/roadmap/#versioning-policy">our versioning policy</a>.</p> +<p>To make a new release create a tag <code>vX.Y.Z</code>.<br> +Don&rsquo;t forget to add zero patch version for a new minor release, e.g. <code>v1.99.0</code>.</p> +<p>A GitHub Action <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.github/workflows/release.yml"target="_blank" rel="noopener">workflow</a> will start building and publishing release after that.</p> +<p>After making a release, you need to update GitHub <a href="https://github.com/golangci/golangci-lint/blob/HEAD/assets/github-action-config.json"target="_blank" rel="noopener">Action config</a> by running:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">make assets/github-action-config.json</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div>Architecturehttps://golangci-lint.run/docs/contributing/architecture/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/contributing/architecture/ +<p>There are the following golangci-lint execution steps:</p> +<pre class="mermaid hx:mt-6"> +graph LR +init[Init] +loadPackages[Load packages] +runLinters[Run linters] +postprocess[Postprocess issues] +print[Print issues] +init --&gt; loadPackages --&gt; runLinters --&gt; postprocess --&gt; print +</pre><h2>Init<span class="hx:absolute hx:-mt-20" id="init"></span> +<a href="#init" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The configuration is loaded from file and flags by <code>config.Loader</code> inside <code>PersistentPreRun</code> (or <code>PreRun</code>) of the commands that require configuration.</p> +<p>The linter database (<code>linterdb.Manager</code>) is fill based on the configuration:</p> +<ul> +<li>The linters (&ldquo;internals&rdquo; and plugins) are built by <code>linterdb.LinterBuilder</code> and <code>linterdb.PluginBuilder</code> builders.</li> +<li>The configuration is validated by <code>linterdb.Validator</code>.</li> +</ul> +<h2>Load Packages<span class="hx:absolute hx:-mt-20" id="load-packages"></span> +<a href="#load-packages" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Loading packages is listing all packages and their recursive dependencies for analysis.<br> +Also, depending on the enabled linters set some parsing of the source code can be performed at this step.</p> +<p>Packages loading starts here:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/HEAD/pkg/lint/package.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/lint/package.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">func</span> <span class="p">(</span><span class="nx">l</span> <span class="o">*</span><span class="nx">PackageLoader</span><span class="p">)</span> <span class="nf">Load</span><span class="p">(</span><span class="nx">ctx</span> <span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span> <span class="nx">linters</span> <span class="p">[]</span><span class="o">*</span><span class="nx">linter</span><span class="p">.</span><span class="nx">Config</span><span class="p">)</span> <span class="p">(</span><span class="nx">pkgs</span><span class="p">,</span> <span class="nx">deduplicatedPkgs</span> <span class="p">[]</span><span class="o">*</span><span class="nx">packages</span><span class="p">.</span><span class="nx">Package</span><span class="p">,</span> <span class="nx">err</span> <span class="kt">error</span><span class="p">)</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="nx">loadMode</span> <span class="o">:=</span> <span class="nf">findLoadMode</span><span class="p">(</span><span class="nx">linters</span><span class="p">)</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="nx">pkgs</span><span class="p">,</span> <span class="nx">err</span> <span class="p">=</span> <span class="nx">l</span><span class="p">.</span><span class="nf">loadPackages</span><span class="p">(</span><span class="nx">ctx</span><span class="p">,</span> <span class="nx">loadMode</span><span class="p">)</span> +</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="kc">nil</span><span class="p">,</span> <span class="kc">nil</span><span class="p">,</span> <span class="nx">fmt</span><span class="p">.</span><span class="nf">Errorf</span><span class="p">(</span><span class="s">&#34;failed to load packages: %w&#34;</span><span class="p">,</span> <span class="nx">err</span><span class="p">)</span> +</span></span><span class="line"><span class="cl"> <span class="p">}</span> +</span></span><span class="line"><span class="cl"><span class="c1">// ...</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>First, we find a load mode as union of load modes for all enabled linters. +We use <a href="https://pkg.go.dev/golang.org/x/tools/go/packages"target="_blank" rel="noopener">go/packages</a> for packages loading and use it&rsquo;s enum <code>packages.Need*</code> for load modes. +Load mode sets which data does a linter needs for execution.</p> +<p>A linter that works only with AST need minimum of information: only filenames and AST.</p> +<p>There is no need for packages dependencies or type information. +AST is built during <code>go/analysis</code> execution to reduce memory usage. +Such AST-based linters are configured with the following code:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/lint/linter/config.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/lint/linter/config.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">func</span> <span class="p">(</span><span class="nx">lc</span> <span class="o">*</span><span class="nx">Config</span><span class="p">)</span> <span class="nf">WithLoadFiles</span><span class="p">()</span> <span class="o">*</span><span class="nx">Config</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="nx">lc</span><span class="p">.</span><span class="nx">LoadMode</span> <span class="o">|=</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedName</span> <span class="p">|</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedFiles</span> <span class="p">|</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedCompiledGoFiles</span> +</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="nx">lc</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>If a linter uses <code>go/analysis</code> and needs type information, we need to extract more data by <code>go/packages</code>:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/lint/linter/config.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/lint/linter/config.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">func</span> <span class="p">(</span><span class="nx">lc</span> <span class="o">*</span><span class="nx">Config</span><span class="p">)</span> <span class="nf">WithLoadForGoAnalysis</span><span class="p">()</span> <span class="o">*</span><span class="nx">Config</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="nx">lc</span> <span class="p">=</span> <span class="nx">lc</span><span class="p">.</span><span class="nf">WithLoadFiles</span><span class="p">()</span> +</span></span><span class="line"><span class="cl"> <span class="nx">lc</span><span class="p">.</span><span class="nx">LoadMode</span> <span class="o">|=</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedImports</span> <span class="p">|</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedDeps</span> <span class="p">|</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedExportFile</span> <span class="p">|</span> <span class="nx">packages</span><span class="p">.</span><span class="nx">NeedTypesSizes</span> +</span></span><span class="line"><span class="cl"> <span class="nx">lc</span><span class="p">.</span><span class="nx">IsSlow</span> <span class="p">=</span> <span class="kc">true</span> +</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="nx">lc</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>After finding a load mode, we run <code>go/packages</code>: +the library get list of dirs (or <code>./...</code> as the default value) as input and outputs list of packages and requested information about them: +filenames, type information, AST, etc.</p> +<h2>Run Linters<span class="hx:absolute hx:-mt-20" id="run-linters"></span> +<a href="#run-linters" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>First, we need to find all enabled linters. All linters are registered here:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/lint/lintersdb/builder_linter.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/lint/lintersdb/builder_linter.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">func</span> <span class="p">(</span><span class="nx">b</span> <span class="nx">LinterBuilder</span><span class="p">)</span> <span class="nf">Build</span><span class="p">(</span><span class="nx">cfg</span> <span class="o">*</span><span class="nx">config</span><span class="p">.</span><span class="nx">Config</span><span class="p">)</span> <span class="p">[]</span><span class="o">*</span><span class="nx">linter</span><span class="p">.</span><span class="nx">Config</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="p">[]</span><span class="o">*</span><span class="nx">linter</span><span class="p">.</span><span class="nx">Config</span><span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"> <span class="nx">linter</span><span class="p">.</span><span class="nf">NewConfig</span><span class="p">(</span><span class="nx">golinters</span><span class="p">.</span><span class="nf">NewBodyclose</span><span class="p">()).</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithSince</span><span class="p">(</span><span class="s">&#34;v1.18.0&#34;</span><span class="p">).</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithLoadForGoAnalysis</span><span class="p">().</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithURL</span><span class="p">(</span><span class="s">&#34;https://github.com/timakin/bodyclose&#34;</span><span class="p">),</span> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"> <span class="nx">linter</span><span class="p">.</span><span class="nf">NewConfig</span><span class="p">(</span><span class="nx">golinters</span><span class="p">.</span><span class="nf">NewGovet</span><span class="p">(</span><span class="nx">govetCfg</span><span class="p">)).</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithGroups</span><span class="p">(</span><span class="nx">config</span><span class="p">.</span><span class="nx">GroupStandard</span><span class="p">).</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithSince</span><span class="p">(</span><span class="s">&#34;v1.0.0&#34;</span><span class="p">).</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithLoadForGoAnalysis</span><span class="p">().</span> +</span></span><span class="line"><span class="cl"> <span class="nf">WithURL</span><span class="p">(</span><span class="s">&#34;https://pkg.go.dev/cmd/vet&#34;</span><span class="p">),</span> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"> <span class="p">}</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>We filter requested in config and command-line linters in <code>EnabledSet</code>:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/lint/lintersdb/manager.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/lint/lintersdb/manager.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">func</span> <span class="p">(</span><span class="nx">m</span> <span class="o">*</span><span class="nx">Manager</span><span class="p">)</span> <span class="nf">GetEnabledLintersMap</span><span class="p">()</span> <span class="p">(</span><span class="kd">map</span><span class="p">[</span><span class="kt">string</span><span class="p">]</span><span class="o">*</span><span class="nx">linter</span><span class="p">.</span><span class="nx">Config</span><span class="p">,</span> <span class="kt">error</span><span class="p">)</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>We merge enabled linters into one <code>MetaLinter</code> to improve execution time if we can:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/lint/lintersdb/manager.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/lint/lintersdb/manager.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="c1">// GetOptimizedLinters returns enabled linters after optimization (merging) of multiple linters into a fewer number of linters.</span> +</span></span><span class="line"><span class="cl"><span class="c1">// E.g. some go/analysis linters can be optimized into one metalinter for data reuse and speed up.</span> +</span></span><span class="line"><span class="cl"><span class="kd">func</span> <span class="p">(</span><span class="nx">m</span> <span class="o">*</span><span class="nx">Manager</span><span class="p">)</span> <span class="nf">GetOptimizedLinters</span><span class="p">()</span> <span class="p">([]</span><span class="o">*</span><span class="nx">linter</span><span class="p">.</span><span class="nx">Config</span><span class="p">,</span> <span class="kt">error</span><span class="p">)</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"> <span class="nx">m</span><span class="p">.</span><span class="nf">combineGoAnalysisLinters</span><span class="p">(</span><span class="nx">resultLintersSet</span><span class="p">)</span> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>The <code>MetaLinter</code> just stores all merged linters inside to run them at once:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/goanalysis/metalinter.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/goanalysis/metalinter.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">type</span> <span class="nx">MetaLinter</span> <span class="kd">struct</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="nx">linters</span> <span class="p">[]</span><span class="o">*</span><span class="nx">Linter</span> +</span></span><span class="line"><span class="cl"> <span class="nx">analyzerToLinterName</span> <span class="kd">map</span><span class="p">[</span><span class="o">*</span><span class="nx">analysis</span><span class="p">.</span><span class="nx">Analyzer</span><span class="p">]</span><span class="kt">string</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>Currently, all linters except <code>unused</code> can be merged into this meta linter.<br> +The <code>unused</code> isn&rsquo;t merged because it has high memory usage.</p> +<p>Linters execution starts in <code>runAnalyzers</code>. +It&rsquo;s the most complex part of the golangci-lint. +We use custom <a href="https://pkg.go.dev/golang.org/x/tools/go/analysis"target="_blank" rel="noopener">go/analysis</a> runner there.<br> +It runs as much as it can in parallel. +It lazy-loads as much as it can to reduce memory usage. +Also, it sets all heavyweight data to <code>nil</code> as becomes unneeded to save memory.</p> +<p>We don&rsquo;t use existing <a href="https://pkg.go.dev/golang.org/x/tools/go/analysis/multichecker"target="_blank" rel="noopener">multichecker</a> because +it doesn&rsquo;t use caching and doesn&rsquo;t have some important performance optimizations.</p> +<p>All found by linters issues are represented with <code>result.Issue</code> struct:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/result/issue.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/result/issue.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">type</span> <span class="nx">Issue</span> <span class="kd">struct</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="nx">FromLinter</span> <span class="kt">string</span> +</span></span><span class="line"><span class="cl"> <span class="nx">Text</span> <span class="kt">string</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="nx">Severity</span> <span class="kt">string</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="c1">// Source lines of a code with the issue to show</span> +</span></span><span class="line"><span class="cl"> <span class="nx">SourceLines</span> <span class="p">[]</span><span class="kt">string</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="c1">// Pkg is needed for proper caching of linting results</span> +</span></span><span class="line"><span class="cl"> <span class="nx">Pkg</span> <span class="o">*</span><span class="nx">packages</span><span class="p">.</span><span class="nx">Package</span> <span class="s">`json:&#34;-&#34;`</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="nx">Pos</span> <span class="nx">token</span><span class="p">.</span><span class="nx">Position</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="nx">LineRange</span> <span class="o">*</span><span class="nx">Range</span> <span class="s">`json:&#34;,omitempty&#34;`</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="c1">// HunkPos is used only when golangci-lint is run over a diff</span> +</span></span><span class="line"><span class="cl"> <span class="nx">HunkPos</span> <span class="kt">int</span> <span class="s">`json:&#34;,omitempty&#34;`</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="c1">// If we know how to fix the issue we can provide replacement lines</span> +</span></span><span class="line"><span class="cl"> <span class="nx">SuggestedFixes</span> <span class="p">[]</span><span class="nx">analysis</span><span class="p">.</span><span class="nx">SuggestedFix</span> <span class="s">`json:&#34;,omitempty&#34;`</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="c1">// If we are expecting a nolint (because this is from nolintlint), record the expected linter</span> +</span></span><span class="line"><span class="cl"> <span class="nx">ExpectNoLint</span> <span class="kt">bool</span> +</span></span><span class="line"><span class="cl"> <span class="nx">ExpectedNoLintLinter</span> <span class="kt">string</span> +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"> <span class="c1">// ...</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>Postprocess Issues<span class="hx:absolute hx:-mt-20" id="postprocess-issues"></span> +<a href="#postprocess-issues" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We have an abstraction of <code>result.Processor</code> to postprocess found issues:</p> +<!-- +$ tree -L 1 ./pkg/result/processors/ | grep -v test +--> +<div class="hextra-filetree hx:mt-6 hx:select-none hx:text-sm hx:text-gray-800 hx:dark:text-gray-300 not-prose"> +<div class="hx:inline-block hx:rounded-lg hx:px-4 hx:py-2 hx:border hx:border-gray-200 hx:dark:border-neutral-800"> +<li class="hx:group hx:flex hx:list-none hx:flex-col"> +<button class="hextra-filetree-folder hx:inline-flex hx:cursor-pointer hx:items-center hx:py-1 hx:hover:opacity-60"> +<span data-state="open" class="hx:data-[state=open]:hidden"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg></span> +<span data-state="open" class="hx:data-[state=closed]:hidden"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"/></svg></span> +<span class="hx:ltr:ml-1 hx:rtl:mr-1">./pkg/result/processors/</span> +</button> +<ul data-state="open" class="hx:ltr:pl-5 hx:rtl:pr-5 hx:data-[state=closed]:hidden"> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">cgo.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">diff.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">exclusion_generated_file_filter.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">exclusion_generated_file_matcher.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">exclusion_paths.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">exclusion_presets.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">exclusion_rules.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">filename_unadjuster.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">fixer.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">identifier_marker.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">invalid_issue.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">issues.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">max_from_linter.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">max_per_file_from_linter.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">max_same_issues.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">nolint_filter.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">path_absoluter.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">path_prettifier.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">path_relativity.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">path_shortener.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">processor.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">severity.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">sort_results.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">source_code.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">uniq_by_line.go</span> +</span> +</li> +</ul> +</li> +</div> +</div> +<p>The abstraction is simple:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div class="hextra-code-filename not-prose" dir="auto"><a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="https://github.com/golangci/golangci-lint/blob/main/pkg/result/processors/processor.go" target="_blank" rel="noopener noreferrer"> +<span>pkg/result/processors/processor.go</span><svg height=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg></a></div><div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">type</span> <span class="nx">Processor</span> <span class="kd">interface</span> <span class="p">{</span> +</span></span><span class="line"><span class="cl"> <span class="nf">Process</span><span class="p">(</span><span class="nx">issues</span> <span class="p">[]</span><span class="o">*</span><span class="nx">result</span><span class="p">.</span><span class="nx">Issue</span><span class="p">)</span> <span class="p">([]</span><span class="o">*</span><span class="nx">result</span><span class="p">.</span><span class="nx">Issue</span><span class="p">,</span> <span class="kt">error</span><span class="p">)</span> +</span></span><span class="line"><span class="cl"> <span class="nf">Name</span><span class="p">()</span> <span class="kt">string</span> +</span></span><span class="line"><span class="cl"> <span class="nf">Finish</span><span class="p">()</span> +</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-8"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>A processor can hide issues (<code>nolint</code>, <code>exclude</code>) or change issues (<code>path_prettifier</code>).</p> +<h2>Print Issues<span class="hx:absolute hx:-mt-20" id="print-issues"></span> +<a href="#print-issues" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We have an abstraction for printing found issues.</p> +<!-- +$ tree -L 1 ./pkg/printers/ | grep -v test +--> +<div class="hextra-filetree hx:mt-6 hx:select-none hx:text-sm hx:text-gray-800 hx:dark:text-gray-300 not-prose"> +<div class="hx:inline-block hx:rounded-lg hx:px-4 hx:py-2 hx:border hx:border-gray-200 hx:dark:border-neutral-800"> +<li class="hx:group hx:flex hx:list-none hx:flex-col"> +<button class="hextra-filetree-folder hx:inline-flex hx:cursor-pointer hx:items-center hx:py-1 hx:hover:opacity-60"> +<span data-state="open" class="hx:data-[state=open]:hidden"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg></span> +<span data-state="open" class="hx:data-[state=closed]:hidden"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"/></svg></span> +<span class="hx:ltr:ml-1 hx:rtl:mr-1">./pkg/printers/</span> +</button> +<ul data-state="open" class="hx:ltr:pl-5 hx:rtl:pr-5 hx:data-[state=closed]:hidden"> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">checkstyle.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">codeclimate.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">html.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">json.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">junitxml.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">printer.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">sarif.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">tab.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">teamcity.go</span> +</span> +</li> +<li class="hx:flex hx:list-none"> +<span class="hx:inline-flex hx:cursor-default hx:items-center hx:py-1"><svg width=1em xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg><span class="hx:ltr:ml-1 hx:rtl:mr-1">text.go</span> +</span> +</li> +</ul> +</li> +</div> +</div>New lintershttps://golangci-lint.run/docs/contributing/new-linters/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/contributing/new-linters/ +<h2>How to write a linter<span class="hx:absolute hx:-mt-20" id="how-to-write-a-linter"></span> +<a href="#how-to-write-a-linter" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Use <code>go/analysis</code> and take a look at <a href="https://web.archive.org/web/20250527152107/https://disaev.me/p/writing-useful-go-analysis-linter/"target="_blank" rel="noopener">this tutorial</a>: +it shows how to write <code>go/analysis</code> linter from scratch and integrate it into <code>golangci-lint</code>.</p> +<h2>How to add a public linter to <code>golangci-lint</code><span class="hx:absolute hx:-mt-20" id="how-to-add-a-public-linter-to-golangci-lint"></span> +<a href="#how-to-add-a-public-linter-to-golangci-lint" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>You need to implement a new linter using <code>go/analysis</code> API.</p> +<p>We don&rsquo;t accept non <code>go/analysis</code> linters.</p> +<p>After that:</p> +<ol> +<li>Implement functional tests for the linter: +<ul> +<li>Add one file into directory <code>pkg/golinters/{yourlintername}/testdata/</code>.</li> +</ul> +</li> +<li>Add a new file <code>pkg/golinters/{yourlintername}/{yourlintername}.go</code>. +Other linters implementation can help you.</li> +<li>Add the new struct for the linter (which you&rsquo;ve implemented in <code>pkg/golinters/{yourlintername}/{yourlintername}.go</code>) to the +list of all supported linters in <a href="https://github.com/golangci/golangci-lint/blob/HEAD/pkg/lint/lintersdb/builder_linter.go"target="_blank" rel="noopener"><code>pkg/lint/lintersdb/builder_linter.go</code></a> +to the method <code>LinterBuilder.Build</code>. +<ul> +<li>Add <code>WithSince(&quot;next_version&quot;)</code>, where <code>next_version</code> must be replaced by the next minor version. (ex: v1.2.0 if the current version is v1.1.0)</li> +</ul> +</li> +<li>Find out what options do you need to configure for the linter. +For example, <code>nakedret</code> has only 1 option: <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml"target="_blank" rel="noopener"><code>max-func-lines</code></a>. +Choose default values to not being annoying for users of golangci-lint. Add configuration options to: +<ul> +<li><a href="https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.next.reference.yml"target="_blank" rel="noopener">.golangci.next.reference.yml</a>: the example of a configuration file. +You can also add them to <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.yml"target="_blank" rel="noopener">.golangci.yml</a> +if you think that this project needs not default values.</li> +<li><a href="https://github.com/golangci/golangci-lint/blob/HEAD/pkg/config/config.go"target="_blank" rel="noopener">config struct</a>: +don&rsquo;t forget about <code>mapstructure</code> tags for proper configuration files parsing.</li> +</ul> +</li> +<li>Take a look at the example of <a href="https://github.com/golangci/golangci-lint/pulls?q=is%3Apr&#43;is%3Amerged&#43;label%3A%22linter%3A&#43;new%22"target="_blank" rel="noopener">pull requests with new linter support</a>.</li> +<li>Run the tests: +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">go run ./cmd/golangci-lint/ run --no-config --default<span class="o">=</span>none --enable<span class="o">={</span>yourlintername<span class="o">}</span> ./pkg/golinters/<span class="o">{</span>yourlintername<span class="o">}</span>/testdata/<span class="o">{</span>yourlintername<span class="o">}</span>.go</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +</li> +</ol> +<h2>How to add a private linter to <code>golangci-lint</code><span class="hx:absolute hx:-mt-20" id="how-to-add-a-private-linter-to-golangci-lint"></span> +<a href="#how-to-add-a-private-linter-to-golangci-lint" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Some people and organizations may choose to have custom-made linters run as a part of <code>golangci-lint</code>.<br> +Typically, these linters can&rsquo;t be open-sourced or too specific.</p> +<p>Such linters can be added through 2 plugin systems:</p> +<div class="hextra-cards hx:mt-4 hx:gap-4 hx:grid not-prose" style="--hextra-cards-grid-cols: 2;"> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/plugins/module-plugins" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M11 4a2 2 0 114 0v1a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-1a2 2 0 100 4h1a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-1a2 2 0 10-4 0v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-3a1 1 0 00-1-1H4a2 2 0 110-4h1a1 1 0 001-1V7a1 1 0 011-1h3a1 1 0 001-1V4z"/></svg>Module Plugin System</span><div class="hextra-badge hextra-card-tag" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700">Recommended</div> +</div></a> +<a +class="hextra-card hx:group hx:flex hx:flex-col hx:justify-start hx:overflow-hidden hx:rounded-lg hx:border hx:border-gray-200 hx:text-current hx:no-underline hx:dark:shadow-none hx:hover:shadow-gray-100 hx:dark:hover:shadow-none hx:shadow-gray-100 hx:active:shadow-sm hx:active:shadow-gray-200 hx:transition-all hx:duration-200 hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900"href="https://golangci-lint.run/docs/plugins/go-plugins" +><span class="hextra-card-icon hx:flex hx:font-semibold hx:items-start hx:gap-2 hx:p-4 hx:text-gray-700 hx:hover:text-gray-900 hx:dark:text-neutral-200 hx:dark:hover:text-neutral-50"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M11 4a2 2 0 114 0v1a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-1a2 2 0 100 4h1a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-1a2 2 0 10-4 0v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-3a1 1 0 00-1-1H4a2 2 0 110-4h1a1 1 0 001-1V7a1 1 0 011-1h3a1 1 0 001-1V4z"/></svg>Go Plugin System</span></a> +</div>Debugginghttps://golangci-lint.run/docs/contributing/debug/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/contributing/debug/ +<p>You can see a verbose output of linter by using <code>-v</code> option.</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">golangci-lint run -v</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>If you would like to see more detailed logs you can use the environment variable <code>GL_DEBUG</code>.<br> +Its value is a list of debug tags.</p> +<p>The existing debug tags are documented in the following file: <a href="https://github.com/golangci/golangci-lint/blob/HEAD/pkg/logutils/logutils.go"target="_blank" rel="noopener">/pkg/logutils/logutils.go</a></p> +<p>For example:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">GL_DEBUG</span><span class="o">=</span><span class="s2">&#34;loader,gocritic&#34;</span> golangci-lint run</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">GL_DEBUG</span><span class="o">=</span><span class="s2">&#34;loader,env&#34;</span> golangci-lint run</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div>FAQhttps://golangci-lint.run/docs/contributing/faq/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/contributing/faq/ +<h2>How to add a new open-source linter to <code>golangci-lint</code><span class="hx:absolute hx:-mt-20" id="how-to-add-a-new-open-source-linter-to-golangci-lint"></span> +<a href="#how-to-add-a-new-open-source-linter-to-golangci-lint" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>See <a href="https://golangci-lint.run/docs/contributing/new-linters/#how-to-add-a-public-linter-to-golangci-lint">there</a>.</p> +<h2>How to add a new private linter to <code>golangci-lint</code><span class="hx:absolute hx:-mt-20" id="how-to-add-a-new-private-linter-to-golangci-lint"></span> +<a href="#how-to-add-a-new-private-linter-to-golangci-lint" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>See <a href="https://golangci-lint.run/docs/contributing/new-linters/#how-to-add-a-private-linter-to-golangci-lint">there</a>.</p> +<h2>How to update an existing linter<span class="hx:absolute hx:-mt-20" id="how-to-update-an-existing-linter"></span> +<a href="#how-to-update-an-existing-linter" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We use <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.github/dependabot.yml"target="_blank" rel="noopener">Dependabot</a> to update dependencies, including linters.<br> +The updates happen at least automatically once a week (Sunday 11am UTC).</p> +<p>No pull requests to update a linter will be accepted unless you are the author of the linter and specific changes are required.</p> +<h2>How to add a configuration option to an existing linter<span class="hx:absolute hx:-mt-20" id="how-to-add-a-configuration-option-to-an-existing-linter"></span> +<a href="#how-to-add-a-configuration-option-to-an-existing-linter" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Add a new field to the <a href="https://github.com/golangci/golangci-lint/blob/HEAD/pkg/config/linters_settings.go"target="_blank" rel="noopener">linter settings struct</a>.<br> +Document it in <a href="https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.next.reference.yml"target="_blank" rel="noopener">.golangci.next.reference.yml</a>.<br> +Pass it to the linter.</p> +<h2>How to see <code>INFO</code> or <code>DEBUG</code> logs<span class="hx:absolute hx:-mt-20" id="how-to-see-info-or-debug-logs"></span> +<a href="#how-to-see-info-or-debug-logs" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>See <a href="https://golangci-lint.run/docs/contributing/debug/">tutorial about debugging</a>.</p>This Websitehttps://golangci-lint.run/docs/contributing/website/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/contributing/website/ +<h2>Technology<span class="hx:absolute hx:-mt-20" id="technology"></span> +<a href="#technology" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We use <a href="https://gohugo.io/"target="_blank" rel="noopener">Hugo</a> for static site generation because sites built with it are very fast.</p> +<h2>Source Code<span class="hx:absolute hx:-mt-20" id="source-code"></span> +<a href="#source-code" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The website lives in <code>docs/</code> directory of <a href="https://github.com/golangci/golangci-lint"target="_blank" rel="noopener">golangci-lint repository</a>.</p> +<h2>Theme<span class="hx:absolute hx:-mt-20" id="theme"></span> +<a href="#theme" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The site is based on <a href="https://github.com/imfing/hextra"target="_blank" rel="noopener">hextra</a> theme.</p> +<h2>Templating<span class="hx:absolute hx:-mt-20" id="templating"></span> +<a href="#templating" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We use <a href="https://gohugo.io/templates/types/#shortcode"target="_blank" rel="noopener">shortcodes</a> and <a href="https://gohugo.io/templates/types/#partial"target="_blank" rel="noopener">partials</a> based on files from <code>./docs/.tmp/</code> and <code>./docs/data/</code>.</p> +<ul> +<li>The files in <code>./docs/.tmp/</code> are used to be embedded with the shortcode <code>{{% golangci/embed file=&quot;filename.ext&quot; %}}</code>.</li> +<li>The files in <code>./docs/data/</code> are used as <a href="https://gohugo.io/content-management/data-sources/"target="_blank" rel="noopener">data sources</a>.</li> +</ul> +<p>These files are created by running:</p> +<ul> +<li><code>make website_expand_templates</code> in the root of the repository.</li> +<li><code>make website_dump_info</code> in the root of the repository. (only during a release)</li> +</ul> +<h3>Some Notes<span class="hx:absolute hx:-mt-20" id="some-notes"></span> +<a href="#some-notes" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><a href="https://gohugo.io/templates/types/#shortcode"target="_blank" rel="noopener">shortcodes</a>:</p> +<ul> +<li>cannot be used inside another shortcode</li> +<li>can only be used inside a page</li> +<li>can contain Markdown or HTML, but the tag is different: <code>{{% shortcode %}}</code> vs <code>{{&lt; shortcode &gt;}}</code></li> +</ul> +<p><a href="https://gohugo.io/templates/types/#partial"target="_blank" rel="noopener">partials</a>:</p> +<ul> +<li>are reusable HTML blocks or &ldquo;functions&rdquo;</li> +<li>cannot be used inside a page</li> +<li>can be used inside another partial</li> +<li>can be used inside a shortcode</li> +<li>can be used inside a layout</li> +</ul> +<h2>Hosting<span class="hx:absolute hx:-mt-20" id="hosting"></span> +<a href="#hosting" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We use GitHub Pages for static website hosting and CD.</p> +<p>GitHub deploys the website to production after merging anything to a <code>main</code> branch.</p> +<h2>Local Testing<span class="hx:absolute hx:-mt-20" id="local-testing"></span> +<a href="#local-testing" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Install Hugo Extended (v0.148.1 or newer).</p> +<p>Run:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># (in the root of the repository)</span> +</span></span><span class="line"><span class="cl">make docs_serve</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>or</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># (in the root of the repository)</span> +</span></span><span class="line"><span class="cl">make website_expand_templates +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> docs/ +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="c1"># (inside the docs/ folder)</span> +</span></span><span class="line"><span class="cl">make serve</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>And navigate to <code>http://localhost:1313</code> after a successful build.</p> +<p>There is no need to restart the Hugo server for almost all changes: it supports hot reload.<br> +Also, there is no need to refresh a webpage: hot reload updates changed content on the open page.</p> +<h2>Website Build<span class="hx:absolute hx:-mt-20" id="website-build"></span> +<a href="#website-build" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>To do this, run:</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># (in the root of the repository)</span> +</span></span><span class="line"><span class="cl">make docs_build</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<p>or</p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># (in the root of the repository)</span> +</span></span><span class="line"><span class="cl">make website_copy_jsonschema website_expand_templates +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="nb">cd</span> docs/ +</span></span><span class="line"><span class="cl"> +</span></span><span class="line"><span class="cl"><span class="c1"># (inside the docs/ folder)</span> +</span></span><span class="line"><span class="cl">make build</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> \ No newline at end of file diff --git a/docs/contributing/new-linters/index.html b/docs/contributing/new-linters/index.html new file mode 100644 index 000000000000..bb9bdc94aaad --- /dev/null +++ b/docs/contributing/new-linters/index.html @@ -0,0 +1,176 @@ +New linters – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

    New linters

    How to write a linter +

    Use go/analysis and take a look at this tutorial: +it shows how to write go/analysis linter from scratch and integrate it into golangci-lint.

    How to add a public linter to golangci-lint +

    You need to implement a new linter using go/analysis API.

    We don’t accept non go/analysis linters.

    After that:

    1. Implement functional tests for the linter:
      • Add one file into directory pkg/golinters/{yourlintername}/testdata/.
    2. Add a new file pkg/golinters/{yourlintername}/{yourlintername}.go. +Other linters implementation can help you.
    3. Add the new struct for the linter (which you’ve implemented in pkg/golinters/{yourlintername}/{yourlintername}.go) to the +list of all supported linters in pkg/lint/lintersdb/builder_linter.go +to the method LinterBuilder.Build.
      • Add WithSince("next_version"), where next_version must be replaced by the next minor version. (ex: v1.2.0 if the current version is v1.1.0)
    4. Find out what options do you need to configure for the linter. +For example, nakedret has only 1 option: max-func-lines. +Choose default values to not being annoying for users of golangci-lint. Add configuration options to:
    5. Take a look at the example of pull requests with new linter support.
    6. Run the tests:
      go run ./cmd/golangci-lint/ run --no-config --default=none --enable={yourlintername} ./pkg/golinters/{yourlintername}/testdata/{yourlintername}.go

    How to add a private linter to golangci-lint +

    Some people and organizations may choose to have custom-made linters run as a part of golangci-lint.
    Typically, these linters can’t be open-sourced or too specific.

    Such linters can be added through 2 plugin systems:

    Last updated on
    \ No newline at end of file diff --git a/docs/contributing/website/index.html b/docs/contributing/website/index.html new file mode 100644 index 000000000000..aa148ec38285 --- /dev/null +++ b/docs/contributing/website/index.html @@ -0,0 +1,147 @@ +This Website – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

    This Website

    Technology +

    We use Hugo for static site generation because sites built with it are very fast.

    Source Code +

    The website lives in docs/ directory of golangci-lint repository.

    Theme +

    The site is based on hextra theme.

    Templating +

    We use shortcodes and partials based on files from ./docs/.tmp/ and ./docs/data/.

    • The files in ./docs/.tmp/ are used to be embedded with the shortcode {{% golangci/embed file="filename.ext" %}}.
    • The files in ./docs/data/ are used as data sources.

    These files are created by running:

    • make website_expand_templates in the root of the repository.
    • make website_dump_info in the root of the repository. (only during a release)

    Some Notes +

    shortcodes:

    • cannot be used inside another shortcode
    • can only be used inside a page
    • can contain Markdown or HTML, but the tag is different: {{% shortcode %}} vs {{< shortcode >}}

    partials:

    • are reusable HTML blocks or “functions”
    • cannot be used inside a page
    • can be used inside another partial
    • can be used inside a shortcode
    • can be used inside a layout

    Hosting +

    We use GitHub Pages for static website hosting and CD.

    GitHub deploys the website to production after merging anything to a main branch.

    Local Testing +

    Install Hugo Extended (v0.148.1 or newer).

    Run:

    # (in the root of the repository)
    +make docs_serve

    or

    # (in the root of the repository)
    +make website_expand_templates
    +
    +cd docs/
    +
    +# (inside the docs/ folder)
    +make serve

    And navigate to http://localhost:1313 after a successful build.

    There is no need to restart the Hugo server for almost all changes: it supports hot reload.
    Also, there is no need to refresh a webpage: hot reload updates changed content on the open page.

    Website Build +

    To do this, run:

    # (in the root of the repository)
    +make docs_build

    or

    # (in the root of the repository)
    +make website_copy_jsonschema website_expand_templates
    +
    +cd docs/
    +
    +# (inside the docs/ folder)
    +make build
    Last updated on
    \ No newline at end of file diff --git a/docs/contributing/workflow/index.html b/docs/contributing/workflow/index.html new file mode 100644 index 000000000000..c3c1569ad59f --- /dev/null +++ b/docs/contributing/workflow/index.html @@ -0,0 +1,145 @@ +Workflow – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

    Workflow

    By participating in this project, you agree to abide our code of conduct.

    Set up your machine +

    Golangci-lint is written in Go.

    Prerequisites:

    Fork and clone golangci-lint repository.

    A good way of making sure everything is all right is running the following:

    make build
    +./golangci-lint run -v

    Test your change +

    When you are satisfied with the changes, we suggest you run:

    make test

    Which runs all the linters and tests.

    Create or update parameters for docs +

    Add your new or updated parameters to .golangci.next.reference.yml so they will be shown in the docs

    Submit a pull request +

    Push your branch to your golangci-lint fork and open a pull request against the +main branch.

    Pull request checks +

    First, please, accept CLA - CLA assistant will make a comment on the pull request about it.

    Also, we run a few checks in CI by using GitHub Actions, you can see them here.

    New releases +

    First, see our versioning policy.

    To make a new release create a tag vX.Y.Z.
    Don’t forget to add zero patch version for a new minor release, e.g. v1.99.0.

    A GitHub Action workflow will start building and publishing release after that.

    After making a release, you need to update GitHub Action config by running:

    make assets/github-action-config.json
    Last updated on
    \ No newline at end of file diff --git a/docs/data/cli_help.json b/docs/data/cli_help.json deleted file mode 100644 index faf36c47ad29..000000000000 --- a/docs/data/cli_help.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "defaultEnabledLinters": "Enabled by default linters:\nerrcheck: Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases.\ngovet: Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes. [auto-fix]\nineffassign: Detects when assignments to existing variables are not used. [fast]\nstaticcheck: It's the set of rules from staticcheck. [auto-fix]\nunused: Checks Go code for unused constants, variables, functions and types.", - "rootOutput": "Smart, fast linters runner.\n\nUsage:\n golangci-lint [flags]\n golangci-lint [command]\n\nAvailable Commands:\n cache Cache control and information.\n completion Generate the autocompletion script for the specified shell\n config Configuration file information and verification.\n custom Build a version of golangci-lint with custom linters.\n fmt Format Go source files.\n formatters List current formatters configuration.\n help Display extra help\n linters List current linters configuration.\n migrate Migrate configuration file from v1 to v2.\n run Lint the code.\n version Display the golangci-lint version.\n\nFlags:\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 --version Print version\n\nUse \"golangci-lint [command] --help\" for more information about a command.\n", - "runOutput": "Lint the code.\n\nUsage:\n golangci-lint run [flags]\n\nFlags:\n -c, --config PATH Read config from file path PATH\n --no-config Don't read config file\n --default string Default set of linters to enable (default \"standard\")\n -D, --disable strings Disable specific linter\n -E, --enable strings Enable specific linter\n --enable-only strings Override linters configuration section to only run the specific linter(s)\n --fast-only Filter enabled linters to run only fast linters\n -j, --concurrency int Number of CPUs to use (Default: Automatically set to match Linux container CPU quota and fall back to the number of logical CPUs in the machine)\n --modules-download-mode string Modules download mode. If not empty, passed as -mod=\u003cmode\u003e to go tools\n --issues-exit-code int Exit code when issues were found (default 1)\n --build-tags strings Build tags\n --timeout duration Timeout for total work. Disabled by default\n --tests Analyze tests (*_test.go) (default true)\n --allow-parallel-runners Allow multiple parallel golangci-lint instances running.\n If false (default) - golangci-lint acquires file lock on start.\n --allow-serial-runners Allow multiple golangci-lint instances running, but serialize them around a lock.\n If false (default) - golangci-lint exits with an error if it fails to acquire file lock on start.\n --path-prefix string Path prefix to add to output\n --path-mode string Path mode to use (empty, or 'abs')\n --show-stats Show statistics per linter (default true)\n --output.text.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.text.print-linter-name Print linter name in the end of issue text. (default true)\n --output.text.print-issued-lines Print lines of code with issue. (default true)\n --output.text.colors Use colors. (default true)\n --output.json.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.tab.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.tab.print-linter-name Print linter name in the end of issue text. (default true)\n --output.tab.colors Use colors. (default true)\n --output.html.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.checkstyle.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.code-climate.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.junit-xml.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.junit-xml.extended Support extra JUnit XML fields.\n --output.teamcity.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --output.sarif.path stdout Output path can be either stdout, `stderr` or path to the file to write to.\n --max-issues-per-linter int Maximum issues count per one linter. Set to 0 to disable (default 50)\n --max-same-issues int Maximum count of issues with the same text. Set to 0 to disable (default 3)\n --uniq-by-line Make issues output unique by line (default true)\n -n, --new Show only new issues: if there are unstaged changes or untracked files, only those changes are analyzed, else only changes in HEAD~ are analyzed.\n It's a super-useful option for integration of golangci-lint into existing large codebase.\n It's not practical to fix all existing issues at the moment of integration: much better to not allow issues in new code.\n For CI setups, prefer --new-from-rev=HEAD~, as --new can skip linting the current patch if any scripts generate unstaged files before golangci-lint runs.\n --new-from-rev REV Show only new issues created after git revision REV\n --new-from-patch PATH Show only new issues created in git patch with file path PATH\n --new-from-merge-base string Show only new issues created after the best common ancestor (merge-base against HEAD)\n --whole-files Show issues in any part of update files (requires new-from-rev or new-from-patch)\n --fix Fix found issues (if it's supported by the linter)\n --cpu-profile-path string Path to CPU profile output file\n --mem-profile-path string Path to memory profile output file\n --trace-path string Path to trace output 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", - "lintersOutput": "List current linters configuration.\n\nUsage:\n golangci-lint linters [flags]\n\nFlags:\n -c, --config PATH Read config from file path PATH\n --no-config Don't read config file\n --default string Default set of linters to enable (default \"standard\")\n -D, --disable strings Disable specific linter\n -E, --enable strings Enable specific linter\n --enable-only strings Override linters configuration section to only run the specific linter(s)\n --fast-only Filter enabled linters to run only fast linters\n --json Display as JSON\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", - "fmtOutput": "Format Go source files.\n\nUsage:\n golangci-lint fmt [flags]\n\nFlags:\n -c, --config PATH Read config from file path PATH\n --no-config Don't read config file\n -E, --enable strings Enable specific formatter\n -d, --diff Display diffs instead of rewriting files\n --diff-colored Display diffs instead of rewriting files (with colors)\n --stdin Use standard input for piping source files\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", - "formattersOutput": "List current formatters configuration.\n\nUsage:\n golangci-lint formatters [flags]\n\nFlags:\n -c, --config PATH Read config from file path PATH\n --no-config Don't read config file\n -E, --enable strings Enable specific formatter\n --json Display as JSON\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", - "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", - "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", - "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", - "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", - "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", - "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", - "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" -} diff --git a/docs/data/configuration_file.json b/docs/data/configuration_file.json deleted file mode 100644 index 90de70627432..000000000000 --- a/docs/data/configuration_file.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "formatters": "formatters:\n # Enable specific formatter.\n # Default: [] (uses standard Go formatting)\n enable:\n - gci\n - gofmt\n - gofumpt\n - goimports\n - golines\n - swaggo\n # Formatters settings.\n settings:\n # See the dedicated \"formatters.settings\" documentation section.\n option: value\n exclusions:\n # Log a warning if an exclusion path is unused.\n # Default: false\n warn-unused: true\n # Mode of the generated files analysis.\n #\n # - `strict`: sources are excluded by strictly following the Go generated file convention.\n # Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\\.$`\n # This line must appear before the first non-comment, non-blank text in the file.\n # https://go.dev/s/generatedcode\n # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.\n # - `disable`: disable the generated files exclusion.\n #\n # Default: lax\n generated: strict\n # Which file paths to exclude.\n # This option is ignored when using `--stdin` as the path is unknown.\n # Default: []\n paths:\n - \".*\\\\.my\\\\.go$\"\n - lib/bad.go\n", - "issues": "issues:\n # Maximum issues count per one linter.\n # Set to 0 to disable.\n # Default: 50\n max-issues-per-linter: 0\n # Maximum count of issues with the same text.\n # Set to 0 to disable.\n # Default: 3\n max-same-issues: 0\n # Make issues output unique by line.\n # Default: true\n uniq-by-line: false\n # Show only new issues: if there are unstaged changes or untracked files,\n # only those changes are analyzed, else only changes in HEAD~ are analyzed.\n # It's a super-useful option for integration of golangci-lint into existing large codebase.\n # It's not practical to fix all existing issues at the moment of integration:\n # much better don't allow issues in new code.\n #\n # Default: false\n new: true\n # Show only new issues created after the best common ancestor (merge-base against HEAD).\n # Default: \"\"\n new-from-merge-base: main\n # Show only new issues created after git revision `REV`.\n # Default: \"\"\n new-from-rev: HEAD\n # Show only new issues created in git patch with set file path.\n # Default: \"\"\n new-from-patch: path/to/patch/file\n # Show issues in any part of update files (requires new-from-rev or new-from-patch).\n # Default: false\n whole-files: true\n # Fix found issues (if it's supported by the linter).\n # Default: false\n fix: true\n", - "linters": "linters:\n # Default set of linters.\n # The value can be:\n # - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default\n # - `all`: enables all linters by default.\n # - `none`: disables all linters by default.\n # - `fast`: enables only linters considered as \"fast\" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`).\n # Default: standard\n default: all\n # Enable specific linter.\n enable:\n - arangolint\n - asasalint\n - asciicheck\n - bidichk\n - bodyclose\n - canonicalheader\n - containedctx\n - contextcheck\n - copyloopvar\n - cyclop\n - decorder\n - depguard\n - dogsled\n - dupl\n - dupword\n - durationcheck\n - embeddedstructfieldcheck\n - err113\n - errcheck\n - errchkjson\n - errname\n - errorlint\n - exhaustive\n - exhaustruct\n - exptostd\n - fatcontext\n - forbidigo\n - forcetypeassert\n - funcorder\n - funlen\n - ginkgolinter\n - gocheckcompilerdirectives\n - gochecknoglobals\n - gochecknoinits\n - gochecksumtype\n - gocognit\n - goconst\n - gocritic\n - gocyclo\n - godot\n - godox\n - goheader\n - gomoddirectives\n - gomodguard\n - goprintffuncname\n - gosec\n - gosmopolitan\n - govet\n - grouper\n - iface\n - importas\n - inamedparam\n - ineffassign\n - interfacebloat\n - intrange\n - ireturn\n - lll\n - loggercheck\n - maintidx\n - makezero\n - mirror\n - misspell\n - mnd\n - musttag\n - nakedret\n - nestif\n - nilerr\n - nilnesserr\n - nilnil\n - nlreturn\n - noctx\n - noinlineerr\n - nolintlint\n - nonamedreturns\n - nosprintfhostport\n - paralleltest\n - perfsprint\n - prealloc\n - predeclared\n - promlinter\n - protogetter\n - reassign\n - recvcheck\n - revive\n - rowserrcheck\n - sloglint\n - spancheck\n - sqlclosecheck\n - staticcheck\n - tagalign\n - tagliatelle\n - testableexamples\n - testifylint\n - testpackage\n - thelper\n - tparallel\n - unconvert\n - unparam\n - unused\n - usestdlibvars\n - usetesting\n - varnamelen\n - wastedassign\n - whitespace\n - wrapcheck\n - wsl\n - wsl_v5\n - zerologlint\n # Disable specific linters.\n disable:\n - arangolint\n - asasalint\n - asciicheck\n - bidichk\n - bodyclose\n - canonicalheader\n - containedctx\n - contextcheck\n - copyloopvar\n - cyclop\n - decorder\n - depguard\n - dogsled\n - dupl\n - dupword\n - durationcheck\n - embeddedstructfieldcheck\n - err113\n - errcheck\n - errchkjson\n - errname\n - errorlint\n - exhaustive\n - exhaustruct\n - exptostd\n - fatcontext\n - forbidigo\n - forcetypeassert\n - funcorder\n - funlen\n - ginkgolinter\n - gocheckcompilerdirectives\n - gochecknoglobals\n - gochecknoinits\n - gochecksumtype\n - gocognit\n - goconst\n - gocritic\n - gocyclo\n - godot\n - godox\n - goheader\n - gomoddirectives\n - gomodguard\n - goprintffuncname\n - gosec\n - gosmopolitan\n - govet\n - grouper\n - iface\n - importas\n - inamedparam\n - ineffassign\n - interfacebloat\n - intrange\n - ireturn\n - lll\n - loggercheck\n - maintidx\n - makezero\n - mirror\n - misspell\n - mnd\n - musttag\n - nakedret\n - nestif\n - nilerr\n - nilnesserr\n - nilnil\n - nlreturn\n - noctx\n - noinlineerr\n - nolintlint\n - nonamedreturns\n - nosprintfhostport\n - paralleltest\n - perfsprint\n - prealloc\n - predeclared\n - promlinter\n - protogetter\n - reassign\n - recvcheck\n - revive\n - rowserrcheck\n - sloglint\n - spancheck\n - sqlclosecheck\n - staticcheck\n - tagalign\n - tagliatelle\n - testableexamples\n - testifylint\n - testpackage\n - thelper\n - tparallel\n - unconvert\n - unparam\n - unused\n - usestdlibvars\n - usetesting\n - varnamelen\n - wastedassign\n - whitespace\n - wrapcheck\n - wsl\n - wsl_v5\n - zerologlint\n # All available settings of specific linters.\n settings:\n # See the dedicated \"linters.settings\" documentation section.\n option: value\n # Defines a set of rules to ignore issues.\n # It does not skip the analysis, and so does not ignore \"typecheck\" errors.\n exclusions:\n # Mode of the generated files analysis.\n #\n # - `strict`: sources are excluded by strictly following the Go generated file convention.\n # Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\\.$`\n # This line must appear before the first non-comment, non-blank text in the file.\n # https://go.dev/s/generatedcode\n # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.\n # - `disable`: disable the generated files exclusion.\n #\n # Default: strict\n generated: lax\n # Log a warning if an exclusion rule is unused.\n # Default: false\n warn-unused: true\n # Predefined exclusion rules.\n # Default: []\n presets:\n - comments\n - std-error-handling\n - common-false-positives\n - legacy\n # Excluding configuration per-path, per-linter, per-text and per-source.\n rules:\n # Exclude some linters from running on tests files.\n - path: _test\\.go\n linters:\n - gocyclo\n - errcheck\n - dupl\n - gosec\n # Run some linter only for test files by excluding its issues for everything else.\n - path-except: _test\\.go\n linters:\n - forbidigo\n # Exclude known linters from partially hard-vendored code,\n # which is impossible to exclude via `nolint` comments.\n # `/` will be replaced by the current OS file path separator to properly work on Windows.\n - path: internal/hmac/\n text: \"weak cryptographic primitive\"\n linters:\n - gosec\n # Exclude some `staticcheck` messages.\n - linters:\n - staticcheck\n text: \"SA9003:\"\n # Exclude `lll` issues for long lines with `go:generate`.\n - linters:\n - lll\n source: \"^//go:generate \"\n # Which file paths to exclude: they will be analyzed, but issues from them won't be reported.\n # \"/\" will be replaced by the current OS file path separator to properly work on Windows.\n # Default: []\n paths:\n - \".*\\\\.my\\\\.go$\"\n - lib/bad.go\n # Which file paths to not exclude.\n # Default: []\n paths-except:\n - \".*\\\\.my\\\\.go$\"\n - lib/bad.go\n", - "output": "# Output configuration options.\noutput:\n # The formats used to render issues.\n formats:\n # Prints issues in a text format with colors, line number, and linter name.\n # This format is the default format.\n text:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.txt\n # Print linter name in the end of issue text.\n # Default: true\n print-linter-name: false\n # Print lines of code with issue.\n # Default: true\n print-issued-lines: false\n # Use colors.\n # Default: true\n colors: false\n # Prints issues in a JSON representation.\n json:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.json\n # Prints issues in columns representation separated by tabulations.\n tab:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.txt\n # Print linter name in the end of issue text.\n # Default: true\n print-linter-name: true\n # Use colors.\n # Default: true\n colors: false\n # Prints issues in an HTML page.\n # It uses the Cloudflare CDN (cdnjs) and React.\n html:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.html\n # Prints issues in the Checkstyle format.\n checkstyle:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.xml\n # Prints issues in the Code Climate format.\n code-climate:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.json\n # Prints issues in the JUnit XML format.\n junit-xml:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.xml\n # Support extra JUnit XML fields.\n # Default: false\n extended: true\n # Prints issues in the TeamCity format.\n teamcity:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.txt\n # Prints issues in the SARIF format.\n sarif:\n # Output path can be either `stdout`, `stderr` or path to the file to write to.\n # Default: stdout\n path: ./path/to/output.json\n # Add a prefix to the output file references.\n # This option is ignored when using `output.path-mode: abs` mode.\n # Default: \"\"\n path-prefix: \"\"\n # By default, the report are related to the path obtained by `run.relative-path-mode`.\n # The mode `abs` allows to show absolute file paths instead of relative file paths.\n # The option `output.path-prefix` is ignored when using `abs` mode.\n # Default: \"\"\n path-mode: \"abs\"\n # Order to use when sorting results.\n # Possible values: `file`, `linter`, and `severity`.\n #\n # If the severity values are inside the following list, they are ordered in this order:\n # 1. error\n # 2. warning\n # 3. high\n # 4. medium\n # 5. low\n # Either they are sorted alphabetically.\n #\n # Default: [\"linter\", \"file\"]\n sort-order:\n - linter\n - severity\n - file # filepath, line, and column.\n # Show statistics per linter.\n # Default: true\n show-stats: false\n", - "root": "# See the dedicated \"version\" documentation section.\nversion: \"2\"\nlinters:\n # See the dedicated \"linters\" documentation section.\n option: value\nformatters:\n # See the dedicated \"formatters\" documentation section.\n option: value\nissues:\n # See the dedicated \"issues\" documentation section.\n option: value\n# Output configuration options.\noutput:\n # See the dedicated \"output\" documentation section.\n option: value\n# Options for analysis running.\nrun:\n # See the dedicated \"run\" documentation section.\n option: value\nseverity:\n # See the dedicated \"severity\" documentation section.\n option: value\n", - "run": "# Options for analysis running.\nrun:\n # Timeout for total work, e.g. 30s, 5m, 5m30s.\n # If the value is lower or equal to 0, the timeout is disabled.\n # Default: 0 (disabled)\n timeout: 5m\n # The mode used to evaluate relative paths.\n # It's used by exclusions, Go plugins, and some linters.\n # The value can be:\n # - `gomod`: the paths will be relative to the directory of the `go.mod` file.\n # - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`).\n # - `cfg`: the paths will be relative to the configuration file.\n # - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run.\n # Default: cfg\n relative-path-mode: gomod\n # Exit code when at least one issue was found.\n # Default: 1\n issues-exit-code: 2\n # Include test files or not.\n # Default: true\n tests: false\n # List of build tags, all linters use it.\n # Default: []\n build-tags:\n - mytag\n # If set, we pass it to \"go list -mod={option}\". From \"go help modules\":\n # If invoked with -mod=readonly, the go command is disallowed from the implicit\n # automatic updating of go.mod described above. Instead, it fails when any changes\n # to go.mod are needed. This setting is most useful to check that go.mod does\n # not need updates, such as in a continuous integration and testing system.\n # If invoked with -mod=vendor, the go command assumes that the vendor\n # directory holds the correct copies of dependencies and ignores\n # the dependency descriptions in go.mod.\n #\n # Allowed values: readonly|vendor|mod\n # Default: \"\"\n modules-download-mode: readonly\n # Allow multiple parallel golangci-lint instances running.\n # If false, golangci-lint acquires file lock on start.\n # Default: false\n allow-parallel-runners: true\n # Allow multiple golangci-lint instances running, but serialize them around a lock.\n # If false, golangci-lint exits with an error if it fails to acquire file lock on start.\n # Default: false\n allow-serial-runners: true\n # Define the Go version limit.\n # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.22.\n go: '1.23'\n # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously.\n # Default: 0 (automatically set to match Linux container CPU quota and\n # fall back to the number of logical CPUs in the machine)\n concurrency: 4\n", - "severity": "severity:\n # Set the default severity for issues.\n #\n # If severity rules are defined and the issues do not match or no severity is provided to the rule\n # this will be the default severity applied.\n # Severities should match the supported severity names of the selected out format.\n # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity\n # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel\n # - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message\n # - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance\n #\n # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...)\n #\n # Default: \"\"\n default: error\n # When a list of severity rules are provided, severity information will be added to lint issues.\n # Severity rules have the same filtering capability as exclude rules\n # except you are allowed to specify one matcher per severity rule.\n #\n # `@linter` can be used as severity value to keep the severity from linters (e.g. revive, gosec, ...)\n #\n # Only affects out formats that support setting severity information.\n #\n # Default: []\n rules:\n - linters:\n - dupl\n severity: info\n", - "version": "# Defines the configuration version.\n# The only possible value is \"2\".\nversion: \"2\"\n" -} diff --git a/docs/data/exclusion_presets.json b/docs/data/exclusion_presets.json deleted file mode 100644 index 8c9f521e29c9..000000000000 --- a/docs/data/exclusion_presets.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "comments": [ - { - "linters": [ - "staticcheck" - ], - "text": "(ST1000|ST1020|ST1021|ST1022)" - }, - { - "linters": [ - "revive" - ], - "text": "exported (.+) should have comment( \\(or a comment on this block\\))? or be unexported" - }, - { - "linters": [ - "revive" - ], - "text": "package comment should be of the form \"(.+)...\"" - }, - { - "linters": [ - "revive" - ], - "text": "comment on exported (.+) should be of the form \"(.+)...\"" - }, - { - "linters": [ - "revive" - ], - "text": "should have a package comment" - } - ], - "common-false-positives": [ - { - "linters": [ - "gosec" - ], - "text": "G103: Use of unsafe calls should be audited" - }, - { - "linters": [ - "gosec" - ], - "text": "G204: Subprocess launched with variable" - }, - { - "linters": [ - "gosec" - ], - "text": "G304: Potential file inclusion via variable" - } - ], - "legacy": [ - { - "linters": [ - "govet" - ], - "text": "(possible misuse of unsafe.Pointer|should have signature)" - }, - { - "linters": [ - "staticcheck" - ], - "text": "SA4011" - }, - { - "linters": [ - "gosec" - ], - "text": "G104" - }, - { - "linters": [ - "gosec" - ], - "text": "(G301|G302|G307): Expect (directory permissions to be 0750|file permissions to be 0600) or less" - } - ], - "std-error-handling": [ - { - "linters": [ - "errcheck" - ], - "text": "(?i)Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*print(f|ln)?|os\\.(Un)?Setenv). is not checked" - } - ] -} diff --git a/docs/data/formatters_info.json b/docs/data/formatters_info.json deleted file mode 100644 index 77b7405edea3..000000000000 --- a/docs/data/formatters_info.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "name": "gci", - "desc": "Check if code and import statements are formatted, with additional rules.", - "loadMode": 8199, - "originalURL": "https://github.com/daixiang0/gci", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.30.0" - }, - { - "name": "gofmt", - "desc": "Check if the code is formatted according to 'gofmt' command.", - "loadMode": 8199, - "originalURL": "https://pkg.go.dev/cmd/gofmt", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.0.0" - }, - { - "name": "gofumpt", - "desc": "Check if code and import statements are formatted, with additional rules.", - "loadMode": 8199, - "originalURL": "https://github.com/mvdan/gofumpt", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.28.0" - }, - { - "name": "golines", - "desc": "Checks if code is formatted, and fixes long lines", - "loadMode": 8199, - "originalURL": "https://github.com/segmentio/golines", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v2.0.0" - }, - { - "name": "goimports", - "desc": "Checks if the code and import statements are formatted according to the 'goimports' command.", - "loadMode": 8199, - "originalURL": "https://pkg.go.dev/golang.org/x/tools/cmd/goimports", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.20.0" - }, - { - "name": "swaggo", - "desc": "Check if swaggo comments are formatted", - "loadMode": 8199, - "originalURL": "https://github.com/swaggo/swaggo", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v2.2.0" - } -] diff --git a/docs/data/icons.yaml b/docs/data/icons.yaml deleted file mode 100644 index 2c4b978e1147..000000000000 --- a/docs/data/icons.yaml +++ /dev/null @@ -1 +0,0 @@ -heart-red: diff --git a/docs/data/linters_info.json b/docs/data/linters_info.json deleted file mode 100644 index 33d3723e2cf8..000000000000 --- a/docs/data/linters_info.json +++ /dev/null @@ -1,1060 +0,0 @@ -[ - { - "name": "arangolint", - "desc": "opinionated best practices for arangodb client", - "loadMode": 8767, - "originalURL": "https://github.com/Crocmagnon/arangolint", - "internal": false, - "isSlow": true, - "since": "v2.2.0" - }, - { - "name": "asasalint", - "desc": "check for pass []any as any in variadic func(...any)", - "loadMode": 8767, - "originalURL": "https://github.com/alingse/asasalint", - "internal": false, - "isSlow": true, - "since": "v1.47.0" - }, - { - "name": "asciicheck", - "desc": "checks that all code identifiers does not have non-ASCII symbols in the name", - "loadMode": 8199, - "originalURL": "https://github.com/golangci/asciicheck", - "internal": false, - "isSlow": false, - "since": "v1.26.0" - }, - { - "name": "bidichk", - "desc": "Checks for dangerous unicode character sequences", - "loadMode": 8199, - "originalURL": "https://github.com/breml/bidichk", - "internal": false, - "isSlow": false, - "since": "v1.43.0" - }, - { - "name": "bodyclose", - "desc": "checks whether HTTP response body is closed successfully", - "loadMode": 8767, - "originalURL": "https://github.com/timakin/bodyclose", - "internal": false, - "isSlow": true, - "since": "v1.18.0" - }, - { - "name": "canonicalheader", - "desc": "canonicalheader checks whether net/http.Header uses canonical header", - "loadMode": 8767, - "originalURL": "https://github.com/lasiar/canonicalheader", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.58.0" - }, - { - "name": "containedctx", - "desc": "containedctx is a linter that detects struct contained context.Context field", - "loadMode": 8767, - "originalURL": "https://github.com/sivchari/containedctx", - "internal": false, - "isSlow": true, - "since": "v1.44.0" - }, - { - "name": "contextcheck", - "desc": "check whether the function uses a non-inherited context", - "loadMode": 8767, - "originalURL": "https://github.com/kkHAIKE/contextcheck", - "internal": false, - "isSlow": true, - "since": "v1.43.0" - }, - { - "name": "copyloopvar", - "desc": "a linter detects places where loop variables are copied", - "loadMode": 8199, - "originalURL": "https://github.com/karamaru-alpha/copyloopvar", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.57.0" - }, - { - "name": "cyclop", - "desc": "checks function and package cyclomatic complexity", - "loadMode": 8199, - "originalURL": "https://github.com/bkielbasa/cyclop", - "internal": false, - "isSlow": false, - "since": "v1.37.0" - }, - { - "name": "decorder", - "desc": "check declaration order and count of types, constants, variables and functions", - "loadMode": 8199, - "originalURL": "https://gitlab.com/bosi/decorder", - "internal": false, - "isSlow": false, - "since": "v1.44.0" - }, - { - "name": "depguard", - "desc": "Go linter that checks if package imports are in a list of acceptable packages", - "loadMode": 8199, - "originalURL": "https://github.com/OpenPeeDeeP/depguard", - "internal": false, - "isSlow": false, - "since": "v1.4.0" - }, - { - "name": "dogsled", - "desc": "Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())", - "loadMode": 8199, - "originalURL": "https://github.com/alexkohler/dogsled", - "internal": false, - "isSlow": false, - "since": "v1.19.0" - }, - { - "name": "dupl", - "desc": "Detects duplicate fragments of code.", - "loadMode": 8199, - "originalURL": "https://github.com/mibk/dupl", - "internal": false, - "isSlow": false, - "since": "v1.0.0" - }, - { - "name": "dupword", - "desc": "Checks for duplicate words in the source code", - "loadMode": 8199, - "originalURL": "https://github.com/Abirdcfly/dupword", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.50.0" - }, - { - "name": "durationcheck", - "desc": "check for two durations multiplied together", - "loadMode": 8767, - "originalURL": "https://github.com/charithe/durationcheck", - "internal": false, - "isSlow": true, - "since": "v1.37.0" - }, - { - "name": "embeddedstructfieldcheck", - "desc": "Embedded types should be at the top of the field list of a struct, and there must be an empty line separating embedded fields from regular fields.", - "loadMode": 8199, - "originalURL": "https://github.com/manuelarte/embeddedstructfieldcheck", - "internal": false, - "isSlow": false, - "since": "v2.2.0" - }, - { - "name": "errcheck", - "desc": "errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases", - "groups": [ - "standard" - ], - "loadMode": 8767, - "originalURL": "https://github.com/kisielk/errcheck", - "internal": false, - "isSlow": true, - "since": "v1.0.0" - }, - { - "name": "errchkjson", - "desc": "Checks types passed to the json encoding functions. Reports unsupported types and reports occurrences where the check for the returned error can be omitted.", - "loadMode": 8767, - "originalURL": "https://github.com/breml/errchkjson", - "internal": false, - "isSlow": true, - "since": "v1.44.0" - }, - { - "name": "errname", - "desc": "Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`.", - "loadMode": 8767, - "originalURL": "https://github.com/Antonboom/errname", - "internal": false, - "isSlow": true, - "since": "v1.42.0" - }, - { - "name": "errorlint", - "desc": "Find code that can cause problems with the error wrapping scheme introduced in Go 1.13.", - "loadMode": 8767, - "originalURL": "https://github.com/polyfloyd/go-errorlint", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.32.0" - }, - { - "name": "exhaustive", - "desc": "check exhaustiveness of enum switch statements", - "loadMode": 8767, - "originalURL": "https://github.com/nishanths/exhaustive", - "internal": false, - "isSlow": true, - "since": "v1.28.0" - }, - { - "name": "exhaustruct", - "desc": "Checks if all structure fields are initialized", - "loadMode": 8767, - "originalURL": "https://github.com/GaijinEntertainment/go-exhaustruct", - "internal": false, - "isSlow": true, - "since": "v1.46.0" - }, - { - "name": "exptostd", - "desc": "Detects functions from golang.org/x/exp/ that can be replaced by std functions.", - "loadMode": 8767, - "originalURL": "https://github.com/ldez/exptostd", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.63.0" - }, - { - "name": "forbidigo", - "desc": "Forbids identifiers", - "loadMode": 8767, - "originalURL": "https://github.com/ashanbrown/forbidigo", - "internal": false, - "isSlow": true, - "since": "v1.34.0" - }, - { - "name": "forcetypeassert", - "desc": "Find forced type assertions", - "loadMode": 8767, - "originalURL": "https://github.com/gostaticanalysis/forcetypeassert", - "internal": false, - "isSlow": true, - "since": "v1.38.0" - }, - { - "name": "funcorder", - "desc": "checks the order of functions, methods, and constructors", - "loadMode": 8199, - "originalURL": "https://github.com/manuelarte/funcorder", - "internal": false, - "isSlow": false, - "since": "v2.1.0" - }, - { - "name": "fatcontext", - "desc": "detects nested contexts in loops and function literals", - "loadMode": 8767, - "originalURL": "https://github.com/Crocmagnon/fatcontext", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.58.0" - }, - { - "name": "funlen", - "desc": "Checks for long functions.", - "loadMode": 8199, - "originalURL": "https://github.com/ultraware/funlen", - "internal": false, - "isSlow": false, - "since": "v1.18.0" - }, - { - "name": "ginkgolinter", - "desc": "enforces standards of using ginkgo and gomega", - "loadMode": 8767, - "originalURL": "https://github.com/nunnatsa/ginkgolinter", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.51.0" - }, - { - "name": "gocheckcompilerdirectives", - "desc": "Checks that go compiler directive comments (//go:) are valid.", - "loadMode": 8199, - "originalURL": "https://github.com/leighmcculloch/gocheckcompilerdirectives", - "internal": false, - "isSlow": false, - "since": "v1.51.0" - }, - { - "name": "gochecknoglobals", - "desc": "Check that no global variables exist.", - "loadMode": 8767, - "originalURL": "https://github.com/leighmcculloch/gochecknoglobals", - "internal": false, - "isSlow": true, - "since": "v1.12.0" - }, - { - "name": "gochecknoinits", - "desc": "Checks that no init functions are present in Go code", - "loadMode": 8199, - "internal": false, - "isSlow": false, - "since": "v1.12.0" - }, - { - "name": "gochecksumtype", - "desc": "Run exhaustiveness checks on Go \"sum types\"", - "loadMode": 8767, - "originalURL": "https://github.com/alecthomas/go-check-sumtype", - "internal": false, - "isSlow": true, - "since": "v1.55.0" - }, - { - "name": "gocognit", - "desc": "Computes and checks the cognitive complexity of functions", - "loadMode": 8199, - "originalURL": "https://github.com/uudashr/gocognit", - "internal": false, - "isSlow": false, - "since": "v1.20.0" - }, - { - "name": "goconst", - "desc": "Finds repeated strings that could be replaced by a constant", - "loadMode": 8767, - "originalURL": "https://github.com/jgautheron/goconst", - "internal": false, - "isSlow": true, - "since": "v1.0.0" - }, - { - "name": "gocritic", - "desc": "Provides diagnostics that check for bugs, performance and style issues.\nExtensible without recompilation through dynamic rules.\nDynamic rules are written declaratively with AST patterns, filters, report message and optional suggestion.", - "loadMode": 8767, - "originalURL": "https://github.com/go-critic/go-critic", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.12.0" - }, - { - "name": "gocyclo", - "desc": "Computes and checks the cyclomatic complexity of functions", - "loadMode": 8199, - "originalURL": "https://github.com/fzipp/gocyclo", - "internal": false, - "isSlow": false, - "since": "v1.0.0" - }, - { - "name": "godoclint", - "desc": "Checks Golang's documentation practice (godoc)", - "loadMode": 8199, - "originalURL": "https://github.com/godoc-lint/godoc-lint", - "internal": false, - "isSlow": false, - "since": "v2.5.0" - }, - { - "name": "godot", - "desc": "Check if comments end in a period", - "loadMode": 8199, - "originalURL": "https://github.com/tetafro/godot", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.25.0" - }, - { - "name": "godox", - "desc": "Detects usage of FIXME, TODO and other keywords inside comments", - "loadMode": 8199, - "originalURL": "https://github.com/matoous/godox", - "internal": false, - "isSlow": false, - "since": "v1.19.0" - }, - { - "name": "err113", - "desc": "Check errors handling expressions", - "loadMode": 8767, - "originalURL": "https://github.com/Djarvur/go-err113", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.26.0" - }, - { - "name": "goheader", - "desc": "Check if file header matches to pattern", - "loadMode": 8199, - "originalURL": "https://github.com/denis-tingaikin/go-header", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.28.0" - }, - { - "name": "mnd", - "desc": "An analyzer to detect magic numbers.", - "loadMode": 8199, - "originalURL": "https://github.com/tommy-muehle/go-mnd", - "internal": false, - "isSlow": false, - "since": "v1.22.0" - }, - { - "name": "gomoddirectives", - "desc": "Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.", - "loadMode": 8199, - "originalURL": "https://github.com/ldez/gomoddirectives", - "internal": false, - "isSlow": false, - "since": "v1.39.0" - }, - { - "name": "gomodguard", - "desc": "Allow and blocklist linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.", - "loadMode": 8199, - "originalURL": "https://github.com/ryancurrah/gomodguard", - "internal": false, - "isSlow": false, - "since": "v1.25.0" - }, - { - "name": "goprintffuncname", - "desc": "Checks that printf-like functions are named with `f` at the end.", - "loadMode": 8199, - "originalURL": "https://github.com/golangci/go-printf-func-name", - "internal": false, - "isSlow": false, - "since": "v1.23.0" - }, - { - "name": "gosec", - "desc": "Inspects source code for security problems", - "loadMode": 8767, - "originalURL": "https://github.com/securego/gosec", - "internal": false, - "isSlow": true, - "since": "v1.0.0" - }, - { - "name": "gosmopolitan", - "desc": "Report certain i18n/l10n anti-patterns in your Go codebase", - "loadMode": 8767, - "originalURL": "https://github.com/xen0n/gosmopolitan", - "internal": false, - "isSlow": true, - "since": "v1.53.0" - }, - { - "name": "govet", - "desc": "Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes.", - "groups": [ - "standard" - ], - "loadMode": 8767, - "originalURL": "https://pkg.go.dev/cmd/vet", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.0.0" - }, - { - "name": "grouper", - "desc": "Analyze expression groups.", - "loadMode": 8199, - "originalURL": "https://github.com/leonklingele/grouper", - "internal": false, - "isSlow": false, - "since": "v1.44.0" - }, - { - "name": "iface", - "desc": "Detect the incorrect use of interfaces, helping developers avoid interface pollution.", - "loadMode": 8767, - "originalURL": "https://github.com/uudashr/iface", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.62.0" - }, - { - "name": "importas", - "desc": "Enforces consistent import aliases", - "loadMode": 8767, - "originalURL": "https://github.com/julz/importas", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.38.0" - }, - { - "name": "inamedparam", - "desc": "reports interfaces with unnamed method parameters", - "loadMode": 8199, - "originalURL": "https://github.com/macabu/inamedparam", - "internal": false, - "isSlow": false, - "since": "v1.55.0" - }, - { - "name": "ineffassign", - "desc": "detects when assignments to existing variables are not used", - "groups": [ - "standard" - ], - "loadMode": 8199, - "originalURL": "https://github.com/gordonklaus/ineffassign", - "internal": false, - "isSlow": false, - "since": "v1.0.0" - }, - { - "name": "interfacebloat", - "desc": "A linter that checks the number of methods inside an interface.", - "loadMode": 8199, - "originalURL": "https://github.com/sashamelentyev/interfacebloat", - "internal": false, - "isSlow": false, - "since": "v1.49.0" - }, - { - "name": "intrange", - "desc": "intrange is a linter to find places where for loops could make use of an integer range.", - "loadMode": 8199, - "originalURL": "https://github.com/ckaznocha/intrange", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.57.0" - }, - { - "name": "iotamixing", - "desc": "checks if iotas are being used in const blocks with other non-iota declarations.", - "loadMode": 8199, - "originalURL": "https://github.com/AdminBenni/iota-mixing", - "internal": false, - "isSlow": false, - "since": "v2.5.0" - }, - { - "name": "ireturn", - "desc": "Accept Interfaces, Return Concrete Types", - "loadMode": 8767, - "originalURL": "https://github.com/butuzov/ireturn", - "internal": false, - "isSlow": true, - "since": "v1.43.0" - }, - { - "name": "lll", - "desc": "Reports long lines", - "loadMode": 8199, - "internal": false, - "isSlow": false, - "since": "v1.8.0" - }, - { - "name": "loggercheck", - "desc": "Checks key value pairs for common logger libraries (kitlog,klog,logr,slog,zap).", - "loadMode": 8767, - "originalURL": "https://github.com/timonwong/loggercheck", - "internal": false, - "isSlow": true, - "since": "v1.49.0" - }, - { - "name": "maintidx", - "desc": "maintidx measures the maintainability index of each function.", - "loadMode": 8199, - "originalURL": "https://github.com/yagipy/maintidx", - "internal": false, - "isSlow": false, - "since": "v1.44.0" - }, - { - "name": "makezero", - "desc": "Find slice declarations with non-zero initial length", - "loadMode": 8767, - "originalURL": "https://github.com/ashanbrown/makezero", - "internal": false, - "isSlow": true, - "since": "v1.34.0" - }, - { - "name": "mirror", - "desc": "reports wrong mirror patterns of bytes/strings usage", - "loadMode": 8767, - "originalURL": "https://github.com/butuzov/mirror", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.53.0" - }, - { - "name": "misspell", - "desc": "Finds commonly misspelled English words", - "loadMode": 8199, - "originalURL": "https://github.com/golangci/misspell", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.8.0" - }, - { - "name": "musttag", - "desc": "enforce field tags in (un)marshaled structs", - "loadMode": 8767, - "originalURL": "https://github.com/go-simpler/musttag", - "internal": false, - "isSlow": true, - "since": "v1.51.0" - }, - { - "name": "nakedret", - "desc": "Checks that functions with naked returns are not longer than a maximum size (can be zero).", - "loadMode": 8199, - "originalURL": "https://github.com/alexkohler/nakedret", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.19.0" - }, - { - "name": "nestif", - "desc": "Reports deeply nested if statements", - "loadMode": 8199, - "originalURL": "https://github.com/nakabonne/nestif", - "internal": false, - "isSlow": false, - "since": "v1.25.0" - }, - { - "name": "nilerr", - "desc": "Find the code that returns nil even if it checks that the error is not nil.", - "loadMode": 8767, - "originalURL": "https://github.com/gostaticanalysis/nilerr", - "internal": false, - "isSlow": true, - "since": "v1.38.0" - }, - { - "name": "nilnesserr", - "desc": "Reports constructs that checks for err != nil, but returns a different nil value error.\nPowered by nilness and nilerr.", - "loadMode": 8767, - "originalURL": "https://github.com/alingse/nilnesserr", - "internal": false, - "isSlow": true, - "since": "v1.63.0" - }, - { - "name": "nilnil", - "desc": "Checks that there is no simultaneous return of `nil` error and an invalid value.", - "loadMode": 8767, - "originalURL": "https://github.com/Antonboom/nilnil", - "internal": false, - "isSlow": true, - "since": "v1.43.0" - }, - { - "name": "nlreturn", - "desc": "Checks for a new line before return and branch statements to increase code clarity", - "loadMode": 8199, - "originalURL": "https://github.com/ssgreg/nlreturn", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.30.0" - }, - { - "name": "noctx", - "desc": "Detects function and method with missing usage of context.Context", - "loadMode": 8767, - "originalURL": "https://github.com/sonatard/noctx", - "internal": false, - "isSlow": true, - "since": "v1.28.0" - }, - { - "name": "noinlineerr", - "desc": "Disallows inline error handling (`if err := ...; err != nil {`)", - "loadMode": 8767, - "originalURL": "https://github.com/AlwxSin/noinlineerr", - "internal": false, - "isSlow": true, - "since": "v2.2.0" - }, - { - "name": "nonamedreturns", - "desc": "Reports all named returns", - "loadMode": 8767, - "originalURL": "https://github.com/firefart/nonamedreturns", - "internal": false, - "isSlow": true, - "since": "v1.46.0" - }, - { - "name": "nosprintfhostport", - "desc": "Checks for misuse of Sprintf to construct a host with port in a URL.", - "loadMode": 8199, - "originalURL": "https://github.com/stbenjam/no-sprintf-host-port", - "internal": false, - "isSlow": false, - "since": "v1.46.0" - }, - { - "name": "paralleltest", - "desc": "Detects missing usage of t.Parallel() method in your Go test", - "loadMode": 8767, - "originalURL": "https://github.com/kunwardeep/paralleltest", - "internal": false, - "isSlow": true, - "since": "v1.33.0" - }, - { - "name": "perfsprint", - "desc": "Checks that fmt.Sprintf can be replaced with a faster alternative.", - "loadMode": 8767, - "originalURL": "https://github.com/catenacyber/perfsprint", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.55.0" - }, - { - "name": "prealloc", - "desc": "Find slice declarations that could potentially be pre-allocated", - "loadMode": 8199, - "originalURL": "https://github.com/alexkohler/prealloc", - "internal": false, - "isSlow": false, - "since": "v1.19.0" - }, - { - "name": "predeclared", - "desc": "find code that shadows one of Go's predeclared identifiers", - "loadMode": 8199, - "originalURL": "https://github.com/nishanths/predeclared", - "internal": false, - "isSlow": false, - "since": "v1.35.0" - }, - { - "name": "promlinter", - "desc": "Check Prometheus metrics naming via promlint", - "loadMode": 8199, - "originalURL": "https://github.com/yeya24/promlinter", - "internal": false, - "isSlow": false, - "since": "v1.40.0" - }, - { - "name": "protogetter", - "desc": "Reports direct reads from proto message fields when getters should be used", - "loadMode": 8767, - "originalURL": "https://github.com/ghostiam/protogetter", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.55.0" - }, - { - "name": "reassign", - "desc": "Checks that package variables are not reassigned", - "loadMode": 8767, - "originalURL": "https://github.com/curioswitch/go-reassign", - "internal": false, - "isSlow": true, - "since": "v1.49.0" - }, - { - "name": "recvcheck", - "desc": "checks for receiver type consistency", - "loadMode": 8767, - "originalURL": "https://github.com/raeperd/recvcheck", - "internal": false, - "isSlow": true, - "since": "v1.62.0" - }, - { - "name": "revive", - "desc": "Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.", - "loadMode": 8199, - "originalURL": "https://github.com/mgechev/revive", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.37.0" - }, - { - "name": "rowserrcheck", - "desc": "checks whether Rows.Err of rows is checked successfully", - "loadMode": 8767, - "originalURL": "https://github.com/jingyugao/rowserrcheck", - "internal": false, - "isSlow": true, - "since": "v1.23.0" - }, - { - "name": "sloglint", - "desc": "ensure consistent code style when using log/slog", - "loadMode": 8767, - "originalURL": "https://github.com/go-simpler/sloglint", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.55.0" - }, - { - "name": "sqlclosecheck", - "desc": "Checks that sql.Rows, sql.Stmt, sqlx.NamedStmt, pgx.Query are closed.", - "loadMode": 8767, - "originalURL": "https://github.com/ryanrolds/sqlclosecheck", - "internal": false, - "isSlow": true, - "since": "v1.28.0" - }, - { - "name": "spancheck", - "desc": "Checks for mistakes with OpenTelemetry/Census spans.", - "loadMode": 8767, - "originalURL": "https://github.com/jjti/go-spancheck", - "internal": false, - "isSlow": true, - "since": "v1.56.0" - }, - { - "name": "staticcheck", - "desc": "It's the set of rules from staticcheck.", - "groups": [ - "standard" - ], - "loadMode": 8767, - "originalURL": "https://github.com/dominikh/go-tools", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.0.0" - }, - { - "name": "tagalign", - "desc": "check that struct tags are well aligned", - "loadMode": 8199, - "originalURL": "https://github.com/4meepo/tagalign", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.53.0" - }, - { - "name": "tagliatelle", - "desc": "Checks the struct tags.", - "loadMode": 8767, - "originalURL": "https://github.com/ldez/tagliatelle", - "internal": false, - "isSlow": true, - "since": "v1.40.0" - }, - { - "name": "testableexamples", - "desc": "linter checks if examples are testable (have an expected output)", - "loadMode": 8199, - "originalURL": "https://github.com/maratori/testableexamples", - "internal": false, - "isSlow": false, - "since": "v1.50.0" - }, - { - "name": "testifylint", - "desc": "Checks usage of github.com/stretchr/testify.", - "loadMode": 8767, - "originalURL": "https://github.com/Antonboom/testifylint", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.55.0" - }, - { - "name": "testpackage", - "desc": "linter that makes you use a separate _test package", - "loadMode": 8199, - "originalURL": "https://github.com/maratori/testpackage", - "internal": false, - "isSlow": false, - "since": "v1.25.0" - }, - { - "name": "thelper", - "desc": "thelper detects tests helpers which do not start with the t.Helper() method.", - "loadMode": 8767, - "originalURL": "https://github.com/kulti/thelper", - "internal": false, - "isSlow": true, - "since": "v1.34.0" - }, - { - "name": "tparallel", - "desc": "tparallel detects inappropriate usage of t.Parallel() method in your Go test codes.", - "loadMode": 8767, - "originalURL": "https://github.com/moricho/tparallel", - "internal": false, - "isSlow": true, - "since": "v1.32.0" - }, - { - "name": "typecheck", - "desc": "Like the front-end of a Go compiler, parses and type-checks Go code", - "loadMode": 8199, - "internal": true, - "isSlow": false, - "since": "v1.3.0" - }, - { - "name": "unconvert", - "desc": "Remove unnecessary type conversions", - "loadMode": 8767, - "originalURL": "https://github.com/mdempsky/unconvert", - "internal": false, - "isSlow": true, - "since": "v1.0.0" - }, - { - "name": "unparam", - "desc": "Reports unused function parameters", - "loadMode": 8767, - "originalURL": "https://github.com/mvdan/unparam", - "internal": false, - "isSlow": true, - "since": "v1.9.0" - }, - { - "name": "unqueryvet", - "desc": "detects SELECT * in SQL queries and SQL builders, preventing performance issues and encouraging explicit column selection", - "loadMode": 8199, - "originalURL": "https://github.com/MirrexOne/unqueryvet", - "internal": false, - "isSlow": false, - "since": "v2.5.0" - }, - { - "name": "unused", - "desc": "Checks Go code for unused constants, variables, functions and types", - "groups": [ - "standard" - ], - "loadMode": 8767, - "originalURL": "https://github.com/dominikh/go-tools/tree/HEAD/unused", - "internal": false, - "isSlow": true, - "doesChangeTypes": true, - "since": "v1.20.0" - }, - { - "name": "usestdlibvars", - "desc": "A linter that detect the possibility to use variables/constants from the Go standard library.", - "loadMode": 8199, - "originalURL": "https://github.com/sashamelentyev/usestdlibvars", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.48.0" - }, - { - "name": "usetesting", - "desc": "Reports uses of functions with replacement inside the testing package.", - "loadMode": 8767, - "originalURL": "https://github.com/ldez/usetesting", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v1.63.0" - }, - { - "name": "varnamelen", - "desc": "checks that the length of a variable's name matches its scope", - "loadMode": 8767, - "originalURL": "https://github.com/blizzy78/varnamelen", - "internal": false, - "isSlow": true, - "since": "v1.43.0" - }, - { - "name": "wastedassign", - "desc": "Finds wasted assignment statements", - "loadMode": 8767, - "originalURL": "https://github.com/sanposhiho/wastedassign", - "internal": false, - "isSlow": true, - "since": "v1.38.0" - }, - { - "name": "whitespace", - "desc": "Whitespace is a linter that checks for unnecessary newlines at the start and end of functions, if, for, etc.", - "loadMode": 8199, - "originalURL": "https://github.com/ultraware/whitespace", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.19.0" - }, - { - "name": "wrapcheck", - "desc": "Checks that errors returned from external packages are wrapped", - "loadMode": 8767, - "originalURL": "https://github.com/tomarrell/wrapcheck", - "internal": false, - "isSlow": true, - "since": "v1.32.0" - }, - { - "name": "wsl", - "desc": "add or remove empty lines", - "loadMode": 8199, - "originalURL": "https://github.com/bombsimon/wsl", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.20.0", - "deprecation": { - "since": "v2.2.0", - "message": "new major version.", - "replacement": "wsl_v5" - } - }, - { - "name": "wsl_v5", - "desc": "add or remove empty lines", - "loadMode": 8767, - "originalURL": "https://github.com/bombsimon/wsl", - "internal": false, - "canAutoFix": true, - "isSlow": true, - "since": "v2.2.0" - }, - { - "name": "zerologlint", - "desc": "Detects the wrong usage of `zerolog` that a user forgets to dispatch with `Send` or `Msg`", - "loadMode": 8767, - "originalURL": "https://github.com/ykadowak/zerologlint", - "internal": false, - "isSlow": true, - "since": "v1.53.0" - }, - { - "name": "nolintlint", - "desc": "Reports ill-formed or insufficient nolint directives", - "loadMode": 8199, - "originalURL": "https://github.com/golangci/golangci-lint/tree/HEAD/pkg/golinters/nolintlint/internal", - "internal": false, - "canAutoFix": true, - "isSlow": false, - "since": "v1.26.0" - } -] diff --git a/docs/data/thanks.json b/docs/data/thanks.json deleted file mode 100644 index fc7d34dc2d92..000000000000 --- a/docs/data/thanks.json +++ /dev/null @@ -1,716 +0,0 @@ -[ - { - "name": "4meepo", - "linters": [ - "tagalign" - ], - "profile": "https://github.com/sponsors/4meepo", - "avatar": "https://github.com/4meepo.png" - }, - { - "name": "Abirdcfly", - "linters": [ - "dupword" - ], - "profile": "https://github.com/sponsors/Abirdcfly", - "avatar": "https://github.com/Abirdcfly.png" - }, - { - "name": "AdminBenni", - "linters": [ - "iotamixing" - ], - "profile": "https://github.com/sponsors/AdminBenni", - "avatar": "https://github.com/AdminBenni.png" - }, - { - "name": "alecthomas", - "linters": [ - "gochecksumtype" - ], - "profile": "https://github.com/sponsors/alecthomas", - "avatar": "https://github.com/alecthomas.png" - }, - { - "name": "alexkohler", - "linters": [ - "dogsled", - "nakedret", - "prealloc" - ], - "profile": "https://github.com/sponsors/alexkohler", - "avatar": "https://github.com/alexkohler.png" - }, - { - "name": "alingse", - "linters": [ - "asasalint", - "nilnesserr" - ], - "profile": "https://github.com/sponsors/alingse", - "avatar": "https://github.com/alingse.png" - }, - { - "name": "AlwxSin", - "linters": [ - "noinlineerr" - ], - "profile": "https://github.com/sponsors/AlwxSin", - "avatar": "https://github.com/AlwxSin.png" - }, - { - "name": "Antonboom", - "linters": [ - "errname", - "nilnil", - "testifylint" - ], - "profile": "https://github.com/sponsors/Antonboom", - "avatar": "https://github.com/Antonboom.png" - }, - { - "name": "ashanbrown", - "linters": [ - "forbidigo", - "makezero" - ], - "profile": "https://github.com/sponsors/ashanbrown", - "avatar": "https://github.com/ashanbrown.png" - }, - { - "name": "babakks", - "linters": [ - "godoclint" - ], - "profile": "https://github.com/sponsors/babakks", - "avatar": "https://github.com/babakks.png" - }, - { - "name": "bkielbasa", - "linters": [ - "cyclop" - ], - "profile": "https://github.com/sponsors/bkielbasa", - "avatar": "https://github.com/bkielbasa.png" - }, - { - "name": "blizzy78", - "linters": [ - "varnamelen" - ], - "profile": "https://github.com/sponsors/blizzy78", - "avatar": "https://github.com/blizzy78.png" - }, - { - "name": "bombsimon", - "linters": [ - "wsl", - "wsl_v5" - ], - "profile": "https://github.com/sponsors/bombsimon", - "avatar": "https://github.com/bombsimon.png" - }, - { - "name": "bosi", - "linters": [ - "decorder" - ], - "profile": "https://gitlab.com/bosi", - "avatar": "https://github.com/bosix.png" - }, - { - "name": "breml", - "linters": [ - "bidichk", - "errchkjson" - ], - "profile": "https://github.com/sponsors/breml", - "avatar": "https://github.com/breml.png" - }, - { - "name": "butuzov", - "linters": [ - "ireturn", - "mirror" - ], - "profile": "https://github.com/sponsors/butuzov", - "avatar": "https://github.com/butuzov.png" - }, - { - "name": "catenacyber", - "linters": [ - "perfsprint" - ], - "profile": "https://github.com/sponsors/catenacyber", - "avatar": "https://github.com/catenacyber.png" - }, - { - "name": "charithe", - "linters": [ - "durationcheck" - ], - "profile": "https://github.com/sponsors/charithe", - "avatar": "https://github.com/charithe.png" - }, - { - "name": "chokoswitch", - "linters": [ - "reassign" - ], - "profile": "https://github.com/sponsors/chokoswitch", - "avatar": "https://github.com/chokoswitch.png" - }, - { - "name": "ckaznocha", - "linters": [ - "intrange" - ], - "profile": "https://github.com/sponsors/ckaznocha", - "avatar": "https://github.com/ckaznocha.png" - }, - { - "name": "client9", - "linters": [ - "misspell" - ], - "profile": "https://github.com/sponsors/client9", - "avatar": "https://github.com/client9.png" - }, - { - "name": "Crocmagnon", - "linters": [ - "arangolint", - "fatcontext" - ], - "profile": "https://github.com/sponsors/Crocmagnon", - "avatar": "https://github.com/Crocmagnon.png" - }, - { - "name": "daixiang0", - "linters": [ - "gci" - ], - "profile": "https://github.com/sponsors/daixiang0", - "avatar": "https://github.com/daixiang0.png" - }, - { - "name": "denis-tingaikin", - "linters": [ - "goheader" - ], - "profile": "https://github.com/sponsors/denis-tingaikin", - "avatar": "https://github.com/denis-tingaikin.png" - }, - { - "name": "dixonwille", - "linters": [ - "depguard" - ], - "profile": "https://github.com/sponsors/dixonwille", - "avatar": "https://github.com/dixonwille.png" - }, - { - "name": "Djarvur", - "linters": [ - "err113" - ], - "profile": "https://github.com/sponsors/Djarvur", - "avatar": "https://github.com/Djarvur.png" - }, - { - "name": "dominikh", - "linters": [ - "staticcheck", - "unused" - ], - "profile": "https://github.com/sponsors/dominikh", - "avatar": "https://github.com/dominikh.png" - }, - { - "name": "firefart", - "linters": [ - "nonamedreturns" - ], - "profile": "https://github.com/sponsors/firefart", - "avatar": "https://github.com/firefart.png" - }, - { - "name": "fzipp", - "linters": [ - "gocyclo" - ], - "profile": "https://github.com/sponsors/fzipp", - "avatar": "https://github.com/fzipp.png" - }, - { - "name": "ghostiam", - "linters": [ - "protogetter" - ], - "profile": "https://github.com/sponsors/ghostiam", - "avatar": "https://github.com/ghostiam.png" - }, - { - "name": "go-critic", - "linters": [ - "gocritic" - ], - "profile": "https://github.com/sponsors/go-critic", - "avatar": "https://github.com/go-critic.png" - }, - { - "name": "golang", - "linters": [ - "gofmt", - "goimports", - "govet" - ], - "profile": "https://github.com/sponsors/golang", - "avatar": "https://github.com/golang.png" - }, - { - "name": "gordonklaus", - "linters": [ - "ineffassign" - ], - "profile": "https://github.com/sponsors/gordonklaus", - "avatar": "https://github.com/gordonklaus.png" - }, - { - "name": "jgautheron", - "linters": [ - "goconst" - ], - "profile": "https://github.com/sponsors/jgautheron", - "avatar": "https://github.com/jgautheron.png" - }, - { - "name": "jingyugao", - "linters": [ - "rowserrcheck" - ], - "profile": "https://github.com/sponsors/jingyugao", - "avatar": "https://github.com/jingyugao.png" - }, - { - "name": "jjti", - "linters": [ - "spancheck" - ], - "profile": "https://github.com/sponsors/jjti", - "avatar": "https://github.com/jjti.png" - }, - { - "name": "julz", - "linters": [ - "importas" - ], - "profile": "https://github.com/sponsors/julz", - "avatar": "https://github.com/julz.png" - }, - { - "name": "karamaru-alpha", - "linters": [ - "copyloopvar" - ], - "profile": "https://github.com/sponsors/karamaru-alpha", - "avatar": "https://github.com/karamaru-alpha.png" - }, - { - "name": "kisielk", - "linters": [ - "errcheck" - ], - "profile": "https://github.com/sponsors/kisielk", - "avatar": "https://github.com/kisielk.png" - }, - { - "name": "kkHAIKE", - "linters": [ - "contextcheck" - ], - "profile": "https://github.com/sponsors/kkHAIKE", - "avatar": "https://github.com/kkHAIKE.png" - }, - { - "name": "kulti", - "linters": [ - "thelper" - ], - "profile": "https://github.com/sponsors/kulti", - "avatar": "https://github.com/kulti.png" - }, - { - "name": "kunwardeep", - "linters": [ - "paralleltest" - ], - "profile": "https://github.com/sponsors/kunwardeep", - "avatar": "https://github.com/kunwardeep.png" - }, - { - "name": "lasiar", - "linters": [ - "canonicalheader" - ], - "profile": "https://github.com/sponsors/lasiar", - "avatar": "https://github.com/lasiar.png" - }, - { - "name": "ldez", - "linters": [ - "exptostd", - "gomoddirectives", - "tagliatelle", - "usetesting" - ], - "profile": "https://github.com/sponsors/ldez", - "avatar": "https://github.com/ldez.png" - }, - { - "name": "leighmcculloch", - "linters": [ - "gocheckcompilerdirectives", - "gochecknoglobals" - ], - "profile": "https://github.com/sponsors/leighmcculloch", - "avatar": "https://github.com/leighmcculloch.png" - }, - { - "name": "leonklingele", - "linters": [ - "grouper" - ], - "profile": "https://github.com/sponsors/leonklingele", - "avatar": "https://github.com/leonklingele.png" - }, - { - "name": "macabu", - "linters": [ - "inamedparam" - ], - "profile": "https://github.com/sponsors/macabu", - "avatar": "https://github.com/macabu.png" - }, - { - "name": "manuelarte", - "linters": [ - "embeddedstructfieldcheck", - "funcorder" - ], - "profile": "https://github.com/sponsors/manuelarte", - "avatar": "https://github.com/manuelarte.png" - }, - { - "name": "maratori", - "linters": [ - "testableexamples", - "testpackage" - ], - "profile": "https://github.com/sponsors/maratori", - "avatar": "https://github.com/maratori.png" - }, - { - "name": "matoous", - "linters": [ - "godox" - ], - "profile": "https://github.com/sponsors/matoous", - "avatar": "https://github.com/matoous.png" - }, - { - "name": "mdempsky", - "linters": [ - "unconvert" - ], - "profile": "https://github.com/sponsors/mdempsky", - "avatar": "https://github.com/mdempsky.png" - }, - { - "name": "mgechev", - "linters": [ - "revive" - ], - "profile": "https://github.com/sponsors/mgechev", - "avatar": "https://github.com/mgechev.png" - }, - { - "name": "mibk", - "linters": [ - "dupl" - ], - "profile": "https://github.com/sponsors/mibk", - "avatar": "https://github.com/mibk.png" - }, - { - "name": "MirrexOne", - "linters": [ - "unqueryvet" - ], - "profile": "https://github.com/sponsors/MirrexOne", - "avatar": "https://github.com/MirrexOne.png" - }, - { - "name": "moricho", - "linters": [ - "tparallel" - ], - "profile": "https://github.com/sponsors/moricho", - "avatar": "https://github.com/moricho.png" - }, - { - "name": "mvdan", - "linters": [ - "gofumpt", - "unparam" - ], - "profile": "https://github.com/sponsors/mvdan", - "avatar": "https://github.com/mvdan.png" - }, - { - "name": "nakabonne", - "linters": [ - "nestif" - ], - "profile": "https://github.com/sponsors/nakabonne", - "avatar": "https://github.com/nakabonne.png" - }, - { - "name": "nishanths", - "linters": [ - "exhaustive", - "predeclared" - ], - "profile": "https://github.com/sponsors/nishanths", - "avatar": "https://github.com/nishanths.png" - }, - { - "name": "nunnatsa", - "linters": [ - "ginkgolinter" - ], - "profile": "https://github.com/sponsors/nunnatsa", - "avatar": "https://github.com/nunnatsa.png" - }, - { - "name": "polyfloyd", - "linters": [ - "errorlint" - ], - "profile": "https://github.com/sponsors/polyfloyd", - "avatar": "https://github.com/polyfloyd.png" - }, - { - "name": "raeperd", - "linters": [ - "recvcheck" - ], - "profile": "https://github.com/sponsors/raeperd", - "avatar": "https://github.com/raeperd.png" - }, - { - "name": "ryancurrah", - "linters": [ - "gomodguard" - ], - "profile": "https://github.com/sponsors/ryancurrah", - "avatar": "https://github.com/ryancurrah.png" - }, - { - "name": "ryanrolds", - "linters": [ - "sqlclosecheck" - ], - "profile": "https://github.com/sponsors/ryanrolds", - "avatar": "https://github.com/ryanrolds.png" - }, - { - "name": "sanposhiho", - "linters": [ - "wastedassign" - ], - "profile": "https://github.com/sponsors/sanposhiho", - "avatar": "https://github.com/sanposhiho.png" - }, - { - "name": "sashamelentyev", - "linters": [ - "interfacebloat", - "usestdlibvars" - ], - "profile": "https://github.com/sponsors/sashamelentyev", - "avatar": "https://github.com/sashamelentyev.png" - }, - { - "name": "securego", - "linters": [ - "gosec" - ], - "profile": "https://github.com/sponsors/securego", - "avatar": "https://github.com/securego.png" - }, - { - "name": "segmentio", - "linters": [ - "golines" - ], - "profile": "https://github.com/sponsors/segmentio", - "avatar": "https://github.com/segmentio.png" - }, - { - "name": "sivchari", - "linters": [ - "containedctx" - ], - "profile": "https://github.com/sponsors/sivchari", - "avatar": "https://github.com/sivchari.png" - }, - { - "name": "sonatard", - "linters": [ - "noctx" - ], - "profile": "https://github.com/sponsors/sonatard", - "avatar": "https://github.com/sonatard.png" - }, - { - "name": "ssgreg", - "linters": [ - "nlreturn" - ], - "profile": "https://github.com/sponsors/ssgreg", - "avatar": "https://github.com/ssgreg.png" - }, - { - "name": "stbenjam", - "linters": [ - "nosprintfhostport" - ], - "profile": "https://github.com/sponsors/stbenjam", - "avatar": "https://github.com/stbenjam.png" - }, - { - "name": "swaggo", - "linters": [ - "swaggo" - ], - "profile": "https://github.com/sponsors/swaggo", - "avatar": "https://github.com/swaggo.png" - }, - { - "name": "tenntenn", - "linters": [ - "forcetypeassert", - "nilerr" - ], - "profile": "https://github.com/sponsors/tenntenn", - "avatar": "https://github.com/tenntenn.png" - }, - { - "name": "tetafro", - "linters": [ - "godot" - ], - "profile": "https://github.com/sponsors/tetafro", - "avatar": "https://github.com/tetafro.png" - }, - { - "name": "timakin", - "linters": [ - "bodyclose" - ], - "profile": "https://github.com/sponsors/timakin", - "avatar": "https://github.com/timakin.png" - }, - { - "name": "timonwong", - "linters": [ - "loggercheck" - ], - "profile": "https://github.com/sponsors/timonwong", - "avatar": "https://github.com/timonwong.png" - }, - { - "name": "tmzane", - "linters": [ - "musttag", - "sloglint" - ], - "profile": "https://github.com/sponsors/tmzane", - "avatar": "https://github.com/tmzane.png" - }, - { - "name": "tomarrell", - "linters": [ - "wrapcheck" - ], - "profile": "https://github.com/sponsors/tomarrell", - "avatar": "https://github.com/tomarrell.png" - }, - { - "name": "tommy-muehle", - "linters": [ - "mnd" - ], - "profile": "https://github.com/sponsors/tommy-muehle", - "avatar": "https://github.com/tommy-muehle.png" - }, - { - "name": "ultraware", - "linters": [ - "funlen", - "whitespace" - ], - "profile": "https://github.com/sponsors/ultraware", - "avatar": "https://github.com/ultraware.png" - }, - { - "name": "uudashr", - "linters": [ - "gocognit", - "iface" - ], - "profile": "https://github.com/sponsors/uudashr", - "avatar": "https://github.com/uudashr.png" - }, - { - "name": "xen0n", - "linters": [ - "gosmopolitan" - ], - "profile": "https://github.com/sponsors/xen0n", - "avatar": "https://github.com/xen0n.png" - }, - { - "name": "xobotyi", - "linters": [ - "exhaustruct" - ], - "profile": "https://github.com/sponsors/xobotyi", - "avatar": "https://github.com/xobotyi.png" - }, - { - "name": "yagipy", - "linters": [ - "maintidx" - ], - "profile": "https://github.com/sponsors/yagipy", - "avatar": "https://github.com/yagipy.png" - }, - { - "name": "yeya24", - "linters": [ - "promlinter" - ], - "profile": "https://github.com/sponsors/yeya24", - "avatar": "https://github.com/yeya24.png" - }, - { - "name": "ykadowak", - "linters": [ - "zerologlint" - ], - "profile": "https://github.com/sponsors/ykadowak", - "avatar": "https://github.com/ykadowak.png" - } -] diff --git a/docs/donate/index.html b/docs/donate/index.html new file mode 100644 index 000000000000..2feef16fbdb3 --- /dev/null +++ b/docs/donate/index.html @@ -0,0 +1,110 @@ +Support Us – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
    \ No newline at end of file diff --git a/docs/donate/index.xml b/docs/donate/index.xml new file mode 100644 index 000000000000..c4f36537b372 --- /dev/null +++ b/docs/donate/index.xml @@ -0,0 +1 @@ +Golangci-lint – Support Ushttps://golangci-lint.run/docs/donate/Recent content in Support Us on Golangci-lintHugo -- gohugo.ioen-us \ No newline at end of file diff --git a/docs/formatters/configuration/index.html b/docs/formatters/configuration/index.html new file mode 100644 index 000000000000..6d60774a5167 --- /dev/null +++ b/docs/formatters/configuration/index.html @@ -0,0 +1,204 @@ +Settings – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!

    Settings

    gci +

    Check if code and import statements are formatted, with additional rules.

    Since golangci-lint v1.30.0
    Autofix
    +Repository

    formatters:
    +  settings:
    +    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`.
    +      # If `custom-order` is `true`, it follows the order of `sections` option.
    +      # Default: ["standard", "default"]
    +      sections:
    +        - standard # Standard section: captures all standard packages.
    +        - default # Default section: contains all imports that could not be matched to another section type.
    +        - prefix(github.com/org/project) # Custom section: groups all imports with the specified Prefix.
    +        - 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.
    +      # Checks that no inline comments are present.
    +      # Default: false
    +      no-inline-comments: true
    +      # Checks that no prefix comments (comment lines above an import) are present.
    +      # Default: false
    +      no-prefix-comments: true
    +      # Enable custom order of sections.
    +      # If `true`, make the section order the same as the order of `sections`.
    +      # Default: false
    +      custom-order: true
    +      # Drops lexical ordering for custom sections.
    +      # Default: false
    +      no-lex-order: true

    gofmt +

    Check if the code is formatted according to 'gofmt' command.

    Since golangci-lint v1.0.0
    Autofix
    +Repository

    formatters:
    +  settings:
    +    gofmt:
    +      # Simplify code: gofmt with `-s` option.
    +      # Default: true
    +      simplify: false
    +      # Apply the rewrite rules to the source before reformatting.
    +      # https://pkg.go.dev/cmd/gofmt
    +      # Default: []
    +      rewrite-rules:
    +        - pattern: 'interface{}'
    +          replacement: 'any'
    +        - pattern: 'a[b:len(a)]'
    +          replacement: 'a[b:]'

    gofumpt +

    Check if code and import statements are formatted, with additional rules.

    Since golangci-lint v1.28.0
    Autofix
    +Repository

    formatters:
    +  settings:
    +    gofumpt:
    +      # Module path which contains the source code being formatted.
    +      # Default: ""
    +      module-path: github.com/org/project
    +      # Choose whether to use the extra rules.
    +      # Default: false
    +      extra-rules: true

    goimports +

    Checks if the code and import statements are formatted according to the 'goimports' command.

    Since golangci-lint v1.20.0
    Autofix
    +Repository

    formatters:
    +  settings:
    +    goimports:
    +      # A list of prefixes, which, if set, checks import paths
    +      # with the given prefixes are grouped after 3rd-party packages.
    +      # Default: []
    +      local-prefixes:
    +        - github.com/org/project

    golines +

    Checks if code is formatted, and fixes long lines.

    Since golangci-lint v2.0.0
    Autofix
    +Repository

    formatters:
    +  settings:
    +    golines:
    +      # Target maximum line length.
    +      # Default: 100
    +      max-len: 200
    +      # Length of a tabulation.
    +      # Default: 4
    +      tab-len: 8
    +      # Shorten single-line comments.
    +      # Default: false
    +      shorten-comments: true
    +      # Default: true
    +      reformat-tags: false
    +      # Split chained methods on the dots as opposed to the arguments.
    +      # Default: true
    +      chain-split-dots: false

    swaggo +

    Check if swaggo comments are formatted.

    Since golangci-lint v2.2.0
    Autofix
    +Repository

    No settings available.

    Last updated on
    \ No newline at end of file diff --git a/docs/formatters/index.html b/docs/formatters/index.html new file mode 100644 index 000000000000..8738761bc394 --- /dev/null +++ b/docs/formatters/index.html @@ -0,0 +1,111 @@ +Formatters – Golangci-lint
    New golangci-lint release (v2.4) with support of Go 1.25 🎉🎉🎉 It’s time to support us to keep golangci-lint always up to date!
    Last updated on
    \ No newline at end of file diff --git a/docs/formatters/index.xml b/docs/formatters/index.xml new file mode 100644 index 000000000000..c322cfc04b7e --- /dev/null +++ b/docs/formatters/index.xml @@ -0,0 +1,231 @@ +Golangci-lint – Formattershttps://golangci-lint.run/docs/formatters/Recent content in Formatters on Golangci-lintHugo -- gohugo.ioen-usSettingshttps://golangci-lint.run/docs/formatters/configuration/Mon, 01 Jan 0001 00:00:00 +0000https://golangci-lint.run/docs/formatters/configuration/ +<h2>gci<span class="hx:absolute hx:-mt-20" id="gci"></span> +<a href="#gci" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Check if code and import statements are formatted, with additional rules.</p> +<p> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Since golangci-lint v1.30.0</div> +</div> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg>Autofix</div> +</div> +<a href="https://github.com/daixiang0/gci" title="Repository" target="_blank"> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 fill="currentColor" viewBox="3 3 18 18"> +<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> +</svg> +Repository</div> +</div> +</a></p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">gci</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Section configuration to compare against.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Section names are case-insensitive and may contain parameters in ().</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># The default order of sections is `standard &gt; default &gt; custom &gt; blank &gt; dot &gt; alias &gt; localmodule`.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If `custom-order` is `true`, it follows the order of `sections` option.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: [&#34;standard&#34;, &#34;default&#34;]</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">sections</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">standard # Standard section</span><span class="p">:</span><span class="w"> </span><span class="l">captures all standard packages.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">default # Default section</span><span class="p">:</span><span class="w"> </span><span class="l">contains all imports that could not be matched to another section type.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">prefix(github.com/org/project) # Custom section</span><span class="p">:</span><span class="w"> </span><span class="l">groups all imports with the specified Prefix.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">blank # Blank section</span><span class="p">:</span><span class="w"> </span><span class="l">contains all blank imports. This section is not present unless explicitly enabled.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">dot # Dot section</span><span class="p">:</span><span class="w"> </span><span class="l">contains all dot imports. This section is not present unless explicitly enabled.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">alias # Alias section</span><span class="p">:</span><span class="w"> </span><span class="l">contains all alias imports. This section is not present unless explicitly enabled.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">localmodule # Local module section</span><span class="p">:</span><span class="w"> </span><span class="l">contains all local packages. This section is not present unless explicitly enabled.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Checks that no inline comments are present.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">no-inline-comments</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Checks that no prefix comments (comment lines above an import) are present.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">no-prefix-comments</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Enable custom order of sections.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># If `true`, make the section order the same as the order of `sections`.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">custom-order</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Drops lexical ordering for custom sections.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">no-lex-order</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>gofmt<span class="hx:absolute hx:-mt-20" id="gofmt"></span> +<a href="#gofmt" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Check if the code is formatted according to 'gofmt' command.</p> +<p> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Since golangci-lint v1.0.0</div> +</div> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg>Autofix</div> +</div> +<a href="https://pkg.go.dev/cmd/gofmt" title="Repository" target="_blank"> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 fill="currentColor" viewBox="3 3 18 18"> +<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> +</svg> +Repository</div> +</div> +</a></p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">gofmt</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Simplify code: gofmt with `-s` option.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">simplify</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Apply the rewrite rules to the source before reformatting.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># https://pkg.go.dev/cmd/gofmt</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">rewrite-rules</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">pattern</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;interface{}&#39;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">replacement</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;any&#39;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">pattern</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;a[b:len(a)]&#39;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">replacement</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;a[b:]&#39;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>gofumpt<span class="hx:absolute hx:-mt-20" id="gofumpt"></span> +<a href="#gofumpt" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Check if code and import statements are formatted, with additional rules.</p> +<p> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Since golangci-lint v1.28.0</div> +</div> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg>Autofix</div> +</div> +<a href="https://github.com/mvdan/gofumpt" title="Repository" target="_blank"> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 fill="currentColor" viewBox="3 3 18 18"> +<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> +</svg> +Repository</div> +</div> +</a></p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">gofumpt</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Module path which contains the source code being formatted.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: &#34;&#34;</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">module-path</span><span class="p">:</span><span class="w"> </span><span class="l">github.com/org/project</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Choose whether to use the extra rules.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">extra-rules</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>goimports<span class="hx:absolute hx:-mt-20" id="goimports"></span> +<a href="#goimports" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Checks if the code and import statements are formatted according to the 'goimports' command.</p> +<p> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Since golangci-lint v1.20.0</div> +</div> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg>Autofix</div> +</div> +<a href="https://pkg.go.dev/golang.org/x/tools/cmd/goimports" title="Repository" target="_blank"> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 fill="currentColor" viewBox="3 3 18 18"> +<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> +</svg> +Repository</div> +</div> +</a></p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">goimports</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># A list of prefixes, which, if set, checks import paths</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># with the given prefixes are grouped after 3rd-party packages.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: []</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">local-prefixes</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">github.com/org/project</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>golines<span class="hx:absolute hx:-mt-20" id="golines"></span> +<a href="#golines" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Checks if code is formatted, and fixes long lines.</p> +<p> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Since golangci-lint v2.0.0</div> +</div> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg>Autofix</div> +</div> +<a href="https://github.com/segmentio/golines" title="Repository" target="_blank"> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 fill="currentColor" viewBox="3 3 18 18"> +<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> +</svg> +Repository</div> +</div> +</a></p> +<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"> +<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">formatters</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">settings</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">golines</span><span class="p">:</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Target maximum line length.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 100</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">max-len</span><span class="p">:</span><span class="w"> </span><span class="m">200</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Length of a tabulation.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: 4</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">tab-len</span><span class="p">:</span><span class="w"> </span><span class="m">8</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Shorten single-line comments.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">shorten-comments</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">reformat-tags</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Split chained methods on the dots as opposed to the arguments.</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="c"># Default: true</span><span class="w"> +</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">chain-split-dots</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"> +<button +class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50" +title="Copy code" +> +<div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div> +<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div> +</button> +</div> +</div> +<h2>swaggo<span class="hx:absolute hx:-mt-20" id="swaggo"></span> +<a href="#swaggo" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Check if swaggo comments are formatted.</p> +<p> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Since golangci-lint v2.2.0</div> +</div> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border-blue-200 hx:bg-blue-100 hx:text-blue-900 hx:dark:border-blue-200/30 hx:dark:bg-blue-900/30 hx:dark:text-blue-200"><svg height=12 xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/></svg>Autofix</div> +</div> +<a href="https://github.com/swaggo/swaggo" title="Repository" target="_blank"> +<div class="hextra-badge hx:mx-1" > +<div class="hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2.5 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700"><svg height=12 fill="currentColor" viewBox="3 3 18 18"> +<path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path> +</svg> +Repository</div> +</div> +</a></p> +<p><em>No settings available.</em></p> \ No newline at end of file diff --git a/docs/go.mod b/docs/go.mod deleted file mode 100644 index 3c6d365fef03..000000000000 --- a/docs/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/golangci/docs - -go 1.24.0 - -require github.com/imfing/hextra v0.11.0 // indirect diff --git a/docs/go.sum b/docs/go.sum deleted file mode 100644 index 33a9e6bc5556..000000000000 --- a/docs/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/imfing/hextra v0.11.0 h1:2HswtfKD/TFg2VWp0hvsH5F3/WoEugiz8s3n2JFouqY= -github.com/imfing/hextra v0.11.0/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= diff --git a/docs/golangci-lint.tape b/docs/golangci-lint.tape deleted file mode 100644 index 4cb823eb14fc..000000000000 --- a/docs/golangci-lint.tape +++ /dev/null @@ -1,86 +0,0 @@ -Output docs/static/images/demo.gif - -# NOTE: it should be run at the root of the repository. -# vhs docs/golangci-lint.tape - -Require golangci-lint - -Set Shell zsh - -Set Theme Dracula -Set FontSize 25 -Set Width 2000 -Set Height 900 - -Set WindowBar Colorful -Set WindowBarSize 50 - -Set Padding 20 - -Set MarginFill "#17afc2" -Set Margin 20 - -Set BorderRadius 30 - -Type "golangci-lint run" Sleep 500ms Enter -Sleep 2s -Sleep 1s - - -# VHS documentation -# https://github.com/charmbracelet/vhs -# -# Output: -# Output .gif Create a GIF output at the given -# Output .mp4 Create an MP4 output at the given -# Output .webm Create a WebM output at the given -# -# Require: -# Require Ensure a program is on the $PATH to proceed -# -# Settings: -# Set FontSize Set the font size of the terminal -# Set FontFamily Set the font family of the terminal -# Set Height Set the height of the terminal -# Set Width Set the width of the terminal -# Set LetterSpacing Set the font letter spacing (tracking) -# Set LineHeight Set the font line height -# Set LoopOffset % Set the starting frame offset for the GIF loop -# Set Theme Set the theme of the terminal -# Set Padding Set the padding of the terminal -# Set Framerate Set the framerate of the recording -# Set PlaybackSpeed Set the playback speed of the recording -# Set MarginFill Set the file or color the margin will be filled with. -# Set Margin Set the size of the margin. Has no effect if MarginFill isn't set. -# Set BorderRadius Set terminal border radius, in pixels. -# Set WindowBar Set window bar type. (one of: Rings, RingsRight, Colorful, ColorfulRight) -# Set WindowBarSize Set window bar size, in pixels. Default is 40. -# Set TypingSpeed