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] [all] Enable exhaustive linter on golangci-lint #23242

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
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
218 changes: 218 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ linters:
- errcheck
- errorlint
- exportloopref
- exhaustive
- gci
- gocritic
- gofmt
Expand All @@ -153,3 +154,220 @@ issues:
- text: "G402:"
linters:
- gosec
# Following exclude-rules are used to exclude the existing components which do not pass exhaustive lint,
# in order to enable the exhaustive lint check.
# We should not add more exclude-rules.
# The progress of solving existing exclude-rules will be tracked in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23266
- path: awscontainerinsightreceiver
linters:
- exhaustive
- path: azureeventhubreceiver
linters:
- exhaustive
- path: filereceiver
linters:
- exhaustive
- path: fluentforwardreceiver
linters:
- exhaustive
- path: googlecloudpubsubreceiver
linters:
- exhaustive
- path: googlecloudspannerreceiver
linters:
- exhaustive
- path: k8sclusterreceiver
linters:
- exhaustive
- path: kubeletstatsreceiver
linters:
- exhaustive
- path: nsxtreceiver
linters:
- exhaustive
- path: podmanreceiver
linters:
- exhaustive
- path: prometheusreceiver
linters:
- exhaustive
- path: receivercreator
linters:
- exhaustive
- path: snmpreceiver
linters:
- exhaustive
- path: statsdreceiver
linters:
- exhaustive
- path: attributesprocessor
linters:
- exhaustive
- path: cumulativetodeltaprocessor
linters:
- exhaustive
- path: deltatorateprocessor
linters:
- exhaustive
- path: groupbyattrsprocessor
linters:
- exhaustive
- path: filterprocessor
linters:
- exhaustive
- path: metricsgenerationprocessor
linters:
- exhaustive
- path: metricstransformprocessor
linters:
- exhaustive
- path: probabilisticsamplerprocessor
linters:
- exhaustive
- path: servicegraphprocessor
linters:
- exhaustive
- path: spanprocessor
linters:
- exhaustive
- path: resourcedetectionprocessor
linters:
- exhaustive
- path: tailsamplingprocessor
linters:
- exhaustive
- path: transformprocessor
linters:
- exhaustive
- path: alibabacloudlogserviceexporter
linters:
- exhaustive
- path: awsemfexporter
linters:
- exhaustive
- path: awsxrayexporter
linters:
- exhaustive
- path: azuremonitorexporter
linters:
- exhaustive
- path: azuredataexplorerexporter
linters:
- exhaustive
- path: carbonexporter
linters:
- exhaustive
- path: coralogixexporter
linters:
- exhaustive
- path: clickhouseexporter
linters:
- exhaustive
- path: datasetexporter
linters:
- exhaustive
- path: dynatraceexporter
linters:
- exhaustive
- path: elasticsearchexporter
linters:
- exhaustive
- path: datadogexporter
linters:
- exhaustive
- path: googlecloudpubsubexporter
linters:
- exhaustive
- path: instanaexporter
linters:
- exhaustive
- path: jaegerthrifthttpexporter
linters:
- exhaustive
- path: logzioexporter
linters:
- exhaustive
- path: sentryexporter
linters:
- exhaustive
- path: prometheusexporter
linters:
- exhaustive
- path: prometheusremotewriteexporter
linters:
- exhaustive
- path: sumologicexporter
linters:
- exhaustive
- path: skywalkingexporter
linters:
- exhaustive
- path: splunkhecexporter
linters:
- exhaustive
- path: signalfxexporter
linters:
- exhaustive
- path: tanzuobservabilityexporter
linters:
- exhaustive
- path: k8sobserver
linters:
- exhaustive
- path: countconnector
linters:
- exhaustive
- path: storage
linters:
- exhaustive
- path: containerinsight
linters:
- exhaustive
- path: filter
linters:
- exhaustive
- path: coreinternal
linters:
- exhaustive
- path: k8sconfig
linters:
- exhaustive
- path: pdatatest
linters:
- exhaustive
- path: ottl
linters:
- exhaustive
- path: stanza
linters:
- exhaustive
- path: resourcetotelemetry
linters:
- exhaustive
- path: jaeger
linters:
- exhaustive
- path: prometheus
linters:
- exhaustive
- path: loki
linters:
- exhaustive
- path: opencensus
linters:
- exhaustive
- path: signalfx
linters:
- exhaustive
- path: zipkin
linters:
- exhaustive
- path: mdatagen
linters:
- exhaustive
- path: configschema
linters:
- exhaustive
- path: testbed
linters:
- exhaustive
2 changes: 1 addition & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fmt: $(GOIMPORTS)

.PHONY: lint
lint: $(LINT) checklicense misspell
$(LINT) run --allow-parallel-runners --build-tags integration
$(LINT) run --allow-parallel-runners --build-tags integration --path-prefix $(shell basename "$(CURDIR)")
mx-psi marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: govulncheck
govulncheck: $(GOVULNCHECK)
Expand Down