Skip to content

Commit

Permalink
[chore][golangci-lint] Remove gosec excludes (#33574)
Browse files Browse the repository at this point in the history
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
The upstream issue was fixed by
golangci/golangci-lint#4748, which was included
in release
[`v1.59.0`](https://github.com/golangci/golangci-lint/releases/tag/v1.59.0)
of `golangci-lint`. From local testing, we're pulling version `v1.59.1`
of `golangci-lint`, so the issue should be resolved.

Local runtime with excludes:
```
$ .tools/golangci-lint run -v --enable-only gosec
...
INFO Execution took 10.927544867s
INFO Execution took 8.011302204s
INFO Execution took 7.716441258s
INFO Execution took 7.441336833s
```
Local runtime without excludes:
```
$ .tools/golangci-lint run -v --enable-only gosec
...
INFO Execution took 9.780250262s
INFO Execution took 8.175492516s
INFO Execution took 7.550060974s
INFO Execution took 7.526585686s
```

Note: I ran `.tools/golangci-lint cache clean` between each test to
clean the cache and keep results as consistent as possible. I admit that
I don't know why the values keep going down with every run, the cache
cleaning command may not entirely be working.

**Link to tracking Issue:** <Issue number if applicable>
These excludes were introduced in
#33192
I've opened a PR in core for this issue as well:
open-telemetry/opentelemetry-collector#10411
  • Loading branch information
crobert-1 authored Jun 14, 2024
1 parent 8522b4e commit d15830d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,6 @@ 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

0 comments on commit d15830d

Please sign in to comment.