You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-08-10 22:31:50 +02:00
[chore] clean up revive configuration (#6353)
Following https://github.com/open-telemetry/opentelemetry-go/pull/6273#pullrequestreview-2598385186 This clean up revive configuration Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
103
.golangci.yml
103
.golangci.yml
@@ -175,132 +175,60 @@ linters-settings:
|
|||||||
# This means that linting errors with less than 0.8 confidence will be ignored.
|
# This means that linting errors with less than 0.8 confidence will be ignored.
|
||||||
# Default: 0.8
|
# Default: 0.8
|
||||||
confidence: 0.01
|
confidence: 0.01
|
||||||
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
|
||||||
rules:
|
rules:
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports
|
|
||||||
- name: blank-imports
|
- name: blank-imports
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
|
|
||||||
- name: bool-literal-in-expr
|
- name: bool-literal-in-expr
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
|
|
||||||
- name: constant-logical-expr
|
- name: constant-logical-expr
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
|
|
||||||
# TODO (#3372) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
|
|
||||||
- name: context-as-argument
|
- name: context-as-argument
|
||||||
disabled: true
|
disabled: true
|
||||||
arguments:
|
arguments:
|
||||||
allowTypesBefore: "*testing.T"
|
- allowTypesBefore: "*testing.T"
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
|
|
||||||
- name: context-keys-type
|
- name: context-keys-type
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit
|
|
||||||
- name: deep-exit
|
- name: deep-exit
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer
|
|
||||||
- name: defer
|
- name: defer
|
||||||
disabled: false
|
|
||||||
arguments:
|
arguments:
|
||||||
- ["call-chain", "loop"]
|
- ["call-chain", "loop"]
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports
|
|
||||||
- name: dot-imports
|
- name: dot-imports
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports
|
|
||||||
- name: duplicated-imports
|
- name: duplicated-imports
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
|
|
||||||
- name: early-return
|
- name: early-return
|
||||||
disabled: false
|
arguments:
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
|
- "preserveScope"
|
||||||
- name: empty-block
|
- name: empty-block
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
|
|
||||||
- name: empty-lines
|
- name: empty-lines
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
|
|
||||||
- name: error-naming
|
- name: error-naming
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return
|
|
||||||
- name: error-return
|
- name: error-return
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
|
|
||||||
- name: error-strings
|
- name: error-strings
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf
|
|
||||||
- name: errorf
|
- name: errorf
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
|
|
||||||
- name: exported
|
- name: exported
|
||||||
disabled: false
|
|
||||||
arguments:
|
arguments:
|
||||||
- "sayRepetitiveInsteadOfStutters"
|
- "sayRepetitiveInsteadOfStutters"
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
|
|
||||||
- name: flag-parameter
|
- name: flag-parameter
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches
|
|
||||||
- name: identical-branches
|
- name: identical-branches
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
|
|
||||||
- name: if-return
|
- name: if-return
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement
|
|
||||||
- name: increment-decrement
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow
|
|
||||||
- name: indent-error-flow
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing
|
|
||||||
- name: import-shadowing
|
- name: import-shadowing
|
||||||
disabled: false
|
- name: increment-decrement
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
|
- name: indent-error-flow
|
||||||
|
arguments:
|
||||||
|
- "preserveScope"
|
||||||
- name: package-comments
|
- name: package-comments
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range
|
|
||||||
- name: range
|
- name: range
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure
|
|
||||||
- name: range-val-in-closure
|
- name: range-val-in-closure
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address
|
|
||||||
- name: range-val-address
|
- name: range-val-address
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
|
|
||||||
- name: redefines-builtin-id
|
- name: redefines-builtin-id
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format
|
|
||||||
- name: string-format
|
- name: string-format
|
||||||
disabled: false
|
|
||||||
arguments:
|
arguments:
|
||||||
- - panic
|
- - panic
|
||||||
- '/^[^\n]*$/'
|
- '/^[^\n]*$/'
|
||||||
- must not contain line breaks
|
- must not contain line breaks
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
|
|
||||||
- name: struct-tag
|
- name: struct-tag
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else
|
|
||||||
- name: superfluous-else
|
- name: superfluous-else
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
|
|
||||||
- name: time-equal
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
|
|
||||||
- name: var-naming
|
|
||||||
disabled: false
|
|
||||||
arguments:
|
arguments:
|
||||||
- ["ID"] # AllowList
|
- "preserveScope"
|
||||||
- ["Otel", "Aws", "Gcp"] # DenyList
|
- name: time-equal
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
|
|
||||||
- name: var-declaration
|
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion
|
|
||||||
- name: unconditional-recursion
|
- name: unconditional-recursion
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
|
|
||||||
- name: unexported-return
|
- name: unexported-return
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
|
|
||||||
- name: unhandled-error
|
- name: unhandled-error
|
||||||
disabled: false
|
|
||||||
arguments:
|
arguments:
|
||||||
- "fmt.Fprint"
|
- "fmt.Fprint"
|
||||||
- "fmt.Fprintf"
|
- "fmt.Fprintf"
|
||||||
@@ -308,15 +236,14 @@ linters-settings:
|
|||||||
- "fmt.Print"
|
- "fmt.Print"
|
||||||
- "fmt.Printf"
|
- "fmt.Printf"
|
||||||
- "fmt.Println"
|
- "fmt.Println"
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
|
|
||||||
- name: unnecessary-stmt
|
- name: unnecessary-stmt
|
||||||
disabled: false
|
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
|
|
||||||
- name: useless-break
|
- name: useless-break
|
||||||
disabled: false
|
- name: var-declaration
|
||||||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
|
- name: var-naming
|
||||||
|
arguments:
|
||||||
|
- ["ID"] # AllowList
|
||||||
|
- ["Otel", "Aws", "Gcp"] # DenyList
|
||||||
- name: waitgroup-by-value
|
- name: waitgroup-by-value
|
||||||
disabled: false
|
|
||||||
testifylint:
|
testifylint:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
disable:
|
disable:
|
||||||
|
Reference in New Issue
Block a user