-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move all golangci-lint options from GHA to config file
- Loading branch information
1 parent
323a919
commit 8837f3d
Showing
2 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,75 @@ | ||
linters: | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- errcheck | ||
- gocritic | ||
- gofmt | ||
- goimports | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- revive | ||
- staticcheck | ||
- typecheck | ||
- unused | ||
- bodyclose | ||
issues: | ||
exclude-rules: | ||
- path: api/v1alpha1/groupversion_info.go | ||
linters: | ||
- gofmt | ||
- goimports | ||
# Fix found issues (if it's supported by the linter). | ||
# Default: false | ||
# fix: true | ||
|
||
# Maximum count of issues with the same text. | ||
# Set to 0 to disable. | ||
# Default: 3 | ||
max-same-issues: 20 | ||
|
||
output: | ||
# The formats used to render issues. | ||
# Formats: | ||
# - `colored-line-number` | ||
# - `line-number` | ||
# - `json` | ||
# - `colored-tab` | ||
# - `tab` | ||
# - `html` | ||
# - `checkstyle` | ||
# - `code-climate` | ||
# - `junit-xml` | ||
# - `github-actions` | ||
# - `teamcity` | ||
# - `sarif` | ||
# Output path can be either `stdout`, `stderr` or path to the file to write to. | ||
# | ||
# For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma. | ||
# The output can be specified for each of them by separating format name and path by colon symbol. | ||
# Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number" | ||
# The CLI flag (`--out-format`) override the configuration file. | ||
# | ||
# Default: | ||
# formats: | ||
# - format: colored-line-number | ||
# path: stdout | ||
# Print lines of code with issue. | ||
# Default: true | ||
# print-issued-lines: false | ||
# Print linter name in the end of issue text. | ||
# Default: true | ||
# print-linter-name: false | ||
# Sort results by the order defined in `sort-order`. | ||
# Default: false | ||
sort-results: true | ||
# Make issues output unique by line. | ||
# Default: true | ||
uniq-by-line: false | ||
|
||
run: | ||
# Timeout for analysis, e.g. 30s, 5m. | ||
# Default: 1m | ||
timeout: 5m |