Skip to content
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

[chore] exclude certain gosec linters #33192

Merged
Merged
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
[chore] exclude certain gosec linters
This is causing performance issue w/ the linters as discussed in golangci/golangci-lint#4735

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten committed May 22, 2024
commit 9d71673828e70e1a51f2e3f9180f712360eb8473
18 changes: 11 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ 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
- local
- cmd/otelcontribcol
- cmd/oteltestbedcol

# 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 @@ -45,7 +45,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 @@ -62,9 +62,6 @@ linters-settings:
- prefix(github.com/open-telemetry/opentelemetry-collector-contrib)

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 Expand Up @@ -135,6 +132,13 @@ linters-settings:
predeclared:
ignore: copy

gosec:
excludes:
# https://github.com/golangci/golangci-lint/issues/4735
- G601
# https://github.com/golangci/golangci-lint/issues/4735
- G113

linters:
enable:
- decorder
Expand Down