| # Copyright 2023 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # https://golangci-lint.run/usage/configuration/#linters-configuration |
| linters: |
| enable: |
| - errorlint |
| - gci |
| - stylecheck |
| |
| linters-settings: |
| # https://golangci-lint.run/usage/linters/#gci |
| 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`, |
| # 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(go.chromium.org) # Custom section: groups all imports with the specified Prefix. |
| - prefix(infra) # Custom section: groups all imports with the specified Prefix. |
| # Enable custom order of sections. |
| # If `true`, make the section order the same as the order of `sections`. |
| # Default: false |
| custom-order: true |
| |
| # https://golangci-lint.run/usage/configuration/#issues-configuration |
| issues: |
| # Independently from option `exclude` we use default exclude patterns, |
| # it can be disabled by this option. To list all |
| # excluded by default patterns execute `golangci-lint run --help`. |
| # Default value for this option is true. |
| exclude-use-default: false |
| |
| # Maximum issues count per one linter. Set to 0 to disable. Default is 50. |
| max-issues-per-linter: 0 |
| |
| # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. |
| max-same-issues: 0 |