Skip to content

Commit

Permalink
Resolve deprecation warnings from golangci-lint (signalfx#5117)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk authored Jul 18, 2024
1 parent cc76004 commit c1770d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
paths:
- '.github/workflows/build-and-test.yml'
- '.golangci.yml'
- 'cmd/**'
- 'internal/**'
- 'pkg/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- '.github/workflows/lint-examples.yml'
- '.golangci.yml'
- 'examples/**/*.go'
- 'examples/**/go.mod'
- 'examples/**/go.sum'
Expand Down
10 changes: 2 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ run:
# from this option's value (see skip-dirs-use-default).
skip-dirs:

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-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
# no need to include all autogenerated files, we confidently recognize
Expand All @@ -41,7 +37,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 @@ -52,9 +48,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 Expand Up @@ -118,3 +111,4 @@ issues:
- text: "SA1019: \"github.com/signalfx/splunk-otel-collector/internal/exporter/httpsinkexporter"
linters:
- staticcheck
exclude-dirs-use-default: false

0 comments on commit c1770d1

Please sign in to comment.