Skip to content

docs: improve linters page #2617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .golangci.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,16 +1033,29 @@ linters-settings:

revive:
# Maximum number of open files at the same time.
# https://github.com/mgechev/revive#command-line-flags
# See https://github.com/mgechev/revive#command-line-flags
# Defaults to unlimited.
max-open-files: 2048

# When set to false, ignores files with "GENERATED" header, similar to golint.
# See https://github.com/mgechev/revive#available-rules for details.
# Default: false
ignore-generated-header: true
severity: warning
enable-all-rules: false
# confidence: 0.8
# error-code: 0
# warning-code: 0

# 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

# 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

rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
- name: add-constant
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/usage/linters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ To see a list of supported linters and which linters are enabled/disabled:
golangci-lint help linters
```

## Enabled By Default Linters
## Enabled by Default

{.EnabledByDefaultLinters}

## Disabled By Default Linters (`-E/--enable`)
## Disabled by Default

{.DisabledByDefaultLinters}

Expand Down