Skip to content

Commit

Permalink
[chore] update lint configuration (open-telemetry#10209)
Browse files Browse the repository at this point in the history
This addresses some of the following warnings:

```
WARN [config_reader] The configuration option `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`.
WARN [config_reader] The configuration option `run.skip-dirs-use-default` is deprecated, please use `issues.exclude-dirs-use-default`.
WARN [config_reader] The configuration option `output.format` is deprecated, please use `output.formats`
WARN [config_reader] The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`.
WARN [config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`.
```

---------

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten authored and andrzej-stencel committed May 27, 2024
1 parent c95da3a commit 0ffa814
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ run:
# which dirs to skip: issues from them won't be reported;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but default dirs are skipped independently
# from this option's value (see skip-dirs-use-default).
skip-dirs:
# from this option's value (see exclude-dirs-use-default).
exclude-dirs:
- third_party

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: false
exclude-dirs-use-default: false

# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
Expand All @@ -46,7 +46,7 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true
Expand All @@ -57,9 +57,6 @@ output:
# all available settings of specific linters
linters-settings:
govet:
# report about shadowed variables
check-shadowing: true

# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
Expand Down

0 comments on commit 0ffa814

Please sign in to comment.