mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 06:06:27 +08:00
8611c9f6f7
These combined should correspond to the checks performed by the stand-alone staticcheck tool, which is by default used for linting in Visual Studio Code with the Go extension. One exception is the unused checks, which staticcheck tool performs, but chose to not enabled here in rclone due to many reported occurrences. See #6387 for more information.
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
# golangci-lint configuration options
|
|
|
|
linters:
|
|
enable:
|
|
- deadcode
|
|
- errcheck
|
|
- goimports
|
|
- revive
|
|
- ineffassign
|
|
- structcheck
|
|
- varcheck
|
|
- govet
|
|
- unconvert
|
|
- staticcheck
|
|
- gosimple
|
|
- stylecheck
|
|
#- unused
|
|
#- prealloc
|
|
#- maligned
|
|
disable-all: true
|
|
|
|
issues:
|
|
# Enable some lints excluded by default
|
|
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
|
|
|
|
run:
|
|
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
timeout: 10m
|
|
|
|
linters-settings:
|
|
revive:
|
|
rules:
|
|
- name: unreachable-code
|
|
disabled: true
|
|
- name: unused-parameter
|
|
disabled: true
|
|
- name: empty-block
|
|
disabled: true
|
|
- name: redefines-builtin-id
|
|
disabled: true
|
|
- name: superfluous-else
|
|
disabled: true
|
|
stylecheck:
|
|
# Only enable the checks performed by the staticcheck stand-alone tool,
|
|
# as documented here: https://staticcheck.io/docs/configuration/options/#checks
|
|
checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1023"]
|