From 0c691295193854523240b609c0c3cc06f9202b41 Mon Sep 17 00:00:00 2001 From: Ziqi Zhao Date: Wed, 1 Jun 2022 23:39:22 +0800 Subject: [PATCH] =?UTF-8?q?first=20enable=20gocritic=20and=20exclude=20all?= =?UTF-8?q?=20components=20that=20are=20not=20passing=E2=80=A6=20(#10422)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * first enable gocritic and exclude all components that are not passing right now. Signed-off-by: Ziqi Zhao * gofmt error Signed-off-by: Ziqi Zhao --- .golangci.yml | 1 + exporter/awsemfexporter/emf_exporter.go | 2 +- exporter/awsemfexporter/grouped_metric.go | 1 + .../awsemfexporter/grouped_metric_test.go | 2 +- exporter/awsemfexporter/metric_translator.go | 1 + .../awsemfexporter/metric_translator_test.go | 2 +- exporter/awsemfexporter/util.go | 1 + exporter/awsemfexporter/util_test.go | 1 + .../factory_test.go | 1 + .../azuremonitorexporter/trace_to_envelope.go | 1 + exporter/carbonexporter/exporter.go | 1 + .../internal/metadata/metadata.go | 1 + .../internal/metadata/valid/valid.go | 1 + .../internal/model/attributes/hostname.go | 1 + .../internal/model/attributes/process.go | 1 + .../model/translator/metrics_translator.go | 1 + .../translator/metrics_translator_test.go | 1 + .../datadogexporter/internal/utils/api.go | 1 + exporter/datadogexporter/metrics_exporter.go | 1 + exporter/datadogexporter/translate_traces.go | 1 + .../internal/serialization/sum.go | 1 + .../internal/translator/elastic/exceptions.go | 1 + .../internal/translator/elastic/metrics.go | 1 + .../googlecloudpubsubexporter/exporter.go | 1 + exporter/humioexporter/config.go | 1 + exporter/humioexporter/config_test.go | 1 + .../internal/awsmsk/iam_scram_client.go | 2 ++ .../log_exporter_test.go | 2 +- exporter/observiqexporter/client_test.go | 1 + exporter/observiqexporter/converter.go | 1 + exporter/prometheusexporter/sanitize.go | 1 + exporter/prometheusexporter/sanitize_test.go | 1 + .../exporter_test.go | 1 + exporter/sentryexporter/sentry_exporter.go | 1 + .../internal/translation/converter.go | 1 + .../internal/translation/delta_translator.go | 1 + .../internal/translation/translator.go | 1 + .../logrecord_to_logdata_test.go | 1 + .../metricrecord_to_metricdata_test.go | 1 + .../skywalkingexporter/skywalking_test.go | 1 + exporter/splunkhecexporter/client_test.go | 2 +- .../metricdata_to_splunk_test.go | 1 + .../sumologicexporter/graphite_formatter.go | 1 + .../sumologicexporter/prometheus_formatter.go | 1 + exporter/sumologicexporter/source_format.go | 1 + .../sumologicexporter/source_format_test.go | 1 + .../tanzuobservabilityexporter/transformer.go | 1 + extension/httpforwarder/extension_test.go | 2 +- .../observer/dockerobserver/extension.go | 1 + extension/observer/endpointswatcher.go | 1 + extension/observer/k8sobserver/config_test.go | 1 + extension/observer/k8sobserver/mocks_test.go | 1 + internal/aws/awsutil/conn.go | 2 +- internal/aws/containerinsight/const.go | 1 + internal/aws/containerinsight/ecsconst.go | 1 + internal/aws/containerinsight/k8sconst.go | 1 + internal/aws/containerinsight/utils_test.go | 1 + internal/aws/cwlogs/cwlog_client.go | 1 + internal/aws/cwlogs/cwlog_client_test.go | 1 + internal/aws/cwlogs/pusher.go | 1 + internal/aws/cwlogs/pusher_test.go | 2 +- internal/aws/k8s/k8sclient/clientset.go | 1 + internal/aws/k8s/k8sclient/endpoint.go | 1 + internal/aws/k8s/k8sclient/endpoint_info.go | 1 + internal/aws/k8s/k8sclient/helpers_test.go | 1 + internal/aws/k8s/k8sclient/node_test.go | 2 +- internal/aws/proxy/conn.go | 1 + internal/common/sanitize/url.go | 1 + .../filtermatcher/attributematcher.go | 1 + pkg/stanza/adapter/converter.go | 2 +- .../cumulativetodeltaprocessor/processor.go | 1 + processor/k8sattributesprocessor/doc.go | 1 + .../k8sattributesprocessor/pod_association.go | 1 + .../k8sattributesprocessor/processor_test.go | 1 + processor/metricstransformprocessor/config.go | 1 + .../datapoint_aggregation.go | 1 + .../metrics_testcase_builder_test.go | 1 + .../internal/aws/eks/detector.go | 1 + processor/routingprocessor/extract_test.go | 1 + processor/routingprocessor/router.go | 1 + processor/spanmetricsprocessor/processor.go | 1 + .../spanmetricsprocessor/processor_test.go | 2 +- processor/spanprocessor/span.go | 1 + processor/tailsamplingprocessor/processor.go | 1 + .../transformprocessor/internal/logs/logs.go | 1 + .../internal/metrics/metrics.go | 1 + .../internal/traces/traces.go | 1 + .../config_test.go | 1 + .../internal/cadvisor/cadvisor_linux.go | 2 +- .../cadvisor/container_info_processor.go | 1 + .../cadvisor/extractors/cpu_extractor_test.go | 1 + .../extractors/diskio_extractor_test.go | 1 + .../internal/cadvisor/extractors/extractor.go | 1 + .../extractors/extractor_helpers_test.go | 1 + .../cadvisor/extractors/fs_extractor.go | 1 + .../cadvisor/extractors/fs_extractor_test.go | 2 +- .../cadvisor/extractors/net_extractor.go | 1 + .../internal/ecsInfo/cgroup.go | 1 + .../internal/ecsInfo/ecs_instance_info.go | 1 + .../ecsInfo/ecs_instance_info_test.go | 1 + .../internal/ecsInfo/ecs_task_info.go | 1 + .../internal/ecsInfo/ecsinfo.go | 20 +++++++++---------- .../internal/ecsInfo/ecsinfo_test.go | 20 +++++++++---------- .../internal/ecsInfo/utils.go | 1 + .../internal/host/ebsvolume.go | 1 + .../internal/host/ebsvolume_test.go | 1 + .../internal/host/ec2metadata.go | 1 + .../internal/host/ec2tags.go | 1 + .../internal/host/hostinfo.go | 1 + .../internal/k8sapiserver/k8sapiserver.go | 1 + .../k8sapiserver/k8sapiserver_test.go | 1 + .../internal/stores/nodeinfo_test.go | 1 + .../internal/stores/podstore.go | 1 + .../awscontainerinsightreceiver/receiver.go | 2 +- .../receiver_test.go | 2 +- .../awsecscontainermetrics/docker_stats.go | 1 + .../awsecscontainermetrics/metrics_helper.go | 1 + .../awsecscontainermetrics/resource.go | 1 + .../internal/translator/http.go | 1 + receiver/bigipreceiver/integration_test.go | 1 + receiver/bigipreceiver/scraper.go | 1 + .../carbonreceiver/transport/server_test.go | 1 + receiver/couchdbreceiver/metrics.go | 1 + receiver/couchdbreceiver/scraper_test.go | 1 + .../metrics/converter.go | 1 + .../network/reader.go | 1 + .../googlecloudpubsubreceiver/receiver.go | 1 + receiver/googlecloudspannerreceiver/config.go | 1 + .../internal/statsreader/statements.go | 1 + .../statsreader/timestampsgenerator.go | 1 + .../scraper/cpuscraper/cpu_scraper_test.go | 1 + .../scraper/loadscraper/load_scraper.go | 1 + .../internal/subprocess/subprocess.go | 2 +- .../internal/collection/pods.go | 1 + receiver/mongodbreceiver/client_test.go | 1 + receiver/nsxtreceiver/client_mock_test.go | 1 + receiver/nsxtreceiver/client_test.go | 1 + .../metrics_receiver_honor_timestamp_test.go | 1 + .../metrics_receiver_labels_test.go | 1 + .../metrics_receiver_non_numerical_test.go | 1 + .../metrics_receiver_open_metrics_test.go | 1 + receiver/riakreceiver/scraper.go | 1 + receiver/saphanareceiver/client_test.go | 1 + .../signalfxv2_event_to_logdata.go | 1 + .../sw_dummy_response_service.go | 1 + .../skywalkingreceiver/trace_receiver_test.go | 1 + .../splunkhec_to_metricdata_test.go | 1 + .../protocol/metric_translator.go | 1 + .../statsdreceiver/protocol/statsd_parser.go | 1 + .../statsdreceiver/transport/server_test.go | 1 + .../wavefrontreceiver/wavefront_parser.go | 1 + .../datareceivers/mockawsxraydatareceiver.go | 1 + testbed/testbed/child_process_collector.go | 1 + 153 files changed, 172 insertions(+), 36 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 1b6570a392a70..19522c1019b19 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -116,6 +116,7 @@ linters: - unconvert - unparam - errcheck + - gocritic issues: # Excluding configuration per-path, per-linter, per-text and per-source diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index 019de83f9947a..790d92c95e35c 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" import ( diff --git a/exporter/awsemfexporter/grouped_metric.go b/exporter/awsemfexporter/grouped_metric.go index 775739595c748..47ddc25867662 100644 --- a/exporter/awsemfexporter/grouped_metric.go +++ b/exporter/awsemfexporter/grouped_metric.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" import ( diff --git a/exporter/awsemfexporter/grouped_metric_test.go b/exporter/awsemfexporter/grouped_metric_test.go index aac15ef23c8cd..503bee9373ffe 100644 --- a/exporter/awsemfexporter/grouped_metric_test.go +++ b/exporter/awsemfexporter/grouped_metric_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package awsemfexporter import ( diff --git a/exporter/awsemfexporter/metric_translator.go b/exporter/awsemfexporter/metric_translator.go index d8009e8dbf9c1..ddbb19ff92e71 100644 --- a/exporter/awsemfexporter/metric_translator.go +++ b/exporter/awsemfexporter/metric_translator.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" import ( diff --git a/exporter/awsemfexporter/metric_translator_test.go b/exporter/awsemfexporter/metric_translator_test.go index d3b7fbfb3c5d3..0be3a924cbd30 100644 --- a/exporter/awsemfexporter/metric_translator_test.go +++ b/exporter/awsemfexporter/metric_translator_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package awsemfexporter import ( diff --git a/exporter/awsemfexporter/util.go b/exporter/awsemfexporter/util.go index 8a75028235168..6f7f2b8a315a6 100644 --- a/exporter/awsemfexporter/util.go +++ b/exporter/awsemfexporter/util.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" import ( diff --git a/exporter/awsemfexporter/util_test.go b/exporter/awsemfexporter/util_test.go index 9e44ebc327216..afd7d9f8669b4 100644 --- a/exporter/awsemfexporter/util_test.go +++ b/exporter/awsemfexporter/util_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsemfexporter import ( diff --git a/exporter/awsprometheusremotewriteexporter/factory_test.go b/exporter/awsprometheusremotewriteexporter/factory_test.go index 5924ecd1b4840..9c822a4321a3e 100644 --- a/exporter/awsprometheusremotewriteexporter/factory_test.go +++ b/exporter/awsprometheusremotewriteexporter/factory_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsprometheusremotewriteexporter import ( diff --git a/exporter/azuremonitorexporter/trace_to_envelope.go b/exporter/azuremonitorexporter/trace_to_envelope.go index 1c08ed610025a..cde680f3a6c8d 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope.go +++ b/exporter/azuremonitorexporter/trace_to_envelope.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package azuremonitorexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter" // Contains code common to both trace and metrics exporters diff --git a/exporter/carbonexporter/exporter.go b/exporter/carbonexporter/exporter.go index 133bcbfbbbdd6..1af55391befc7 100644 --- a/exporter/carbonexporter/exporter.go +++ b/exporter/carbonexporter/exporter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package carbonexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter" import ( diff --git a/exporter/datadogexporter/internal/metadata/metadata.go b/exporter/datadogexporter/internal/metadata/metadata.go index 549b72fe5c5bb..7cacd4c98af06 100644 --- a/exporter/datadogexporter/internal/metadata/metadata.go +++ b/exporter/datadogexporter/internal/metadata/metadata.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package metadata // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata" import ( diff --git a/exporter/datadogexporter/internal/metadata/valid/valid.go b/exporter/datadogexporter/internal/metadata/valid/valid.go index a03642bc01caf..3f2bc5246cca1 100644 --- a/exporter/datadogexporter/internal/metadata/valid/valid.go +++ b/exporter/datadogexporter/internal/metadata/valid/valid.go @@ -15,6 +15,7 @@ // This file includes software developed at Datadog (https://www.datadoghq.com/) // for the Datadog Agent (https://github.com/DataDog/datadog-agent) +// nolint:gocritic package valid // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/valid" import ( diff --git a/exporter/datadogexporter/internal/model/attributes/hostname.go b/exporter/datadogexporter/internal/model/attributes/hostname.go index 5e0ed4ac82d23..0b84d9edbba5b 100644 --- a/exporter/datadogexporter/internal/model/attributes/hostname.go +++ b/exporter/datadogexporter/internal/model/attributes/hostname.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package attributes // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/attributes" import ( diff --git a/exporter/datadogexporter/internal/model/attributes/process.go b/exporter/datadogexporter/internal/model/attributes/process.go index 969feb24d290f..1ddfe97bee96e 100644 --- a/exporter/datadogexporter/internal/model/attributes/process.go +++ b/exporter/datadogexporter/internal/model/attributes/process.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package attributes // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/attributes" import ( diff --git a/exporter/datadogexporter/internal/model/translator/metrics_translator.go b/exporter/datadogexporter/internal/model/translator/metrics_translator.go index 2863165115a92..d09f0a2608d50 100644 --- a/exporter/datadogexporter/internal/model/translator/metrics_translator.go +++ b/exporter/datadogexporter/internal/model/translator/metrics_translator.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package translator // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/translator" import ( diff --git a/exporter/datadogexporter/internal/model/translator/metrics_translator_test.go b/exporter/datadogexporter/internal/model/translator/metrics_translator_test.go index 787ba578edf5d..80fbbfc2bb86e 100644 --- a/exporter/datadogexporter/internal/model/translator/metrics_translator_test.go +++ b/exporter/datadogexporter/internal/model/translator/metrics_translator_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package translator import ( diff --git a/exporter/datadogexporter/internal/utils/api.go b/exporter/datadogexporter/internal/utils/api.go index 05791d7b61fb8..14d61bec01b18 100644 --- a/exporter/datadogexporter/internal/utils/api.go +++ b/exporter/datadogexporter/internal/utils/api.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package utils // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/utils" import ( diff --git a/exporter/datadogexporter/metrics_exporter.go b/exporter/datadogexporter/metrics_exporter.go index 90a3a0d6d510c..74a718e66fd0a 100644 --- a/exporter/datadogexporter/metrics_exporter.go +++ b/exporter/datadogexporter/metrics_exporter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package datadogexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter" import ( diff --git a/exporter/datadogexporter/translate_traces.go b/exporter/datadogexporter/translate_traces.go index 9cb716721ce01..3d47211d24cf6 100644 --- a/exporter/datadogexporter/translate_traces.go +++ b/exporter/datadogexporter/translate_traces.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package datadogexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter" import ( diff --git a/exporter/dynatraceexporter/internal/serialization/sum.go b/exporter/dynatraceexporter/internal/serialization/sum.go index 62ec5c6f52f95..e8a045dcf1593 100644 --- a/exporter/dynatraceexporter/internal/serialization/sum.go +++ b/exporter/dynatraceexporter/internal/serialization/sum.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package serialization // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/internal/serialization" import ( diff --git a/exporter/elasticexporter/internal/translator/elastic/exceptions.go b/exporter/elasticexporter/internal/translator/elastic/exceptions.go index a969c1f36fb97..ce3273da988b3 100644 --- a/exporter/elasticexporter/internal/translator/elastic/exceptions.go +++ b/exporter/elasticexporter/internal/translator/elastic/exceptions.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package elastic // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticexporter/internal/translator/elastic" import ( diff --git a/exporter/elasticexporter/internal/translator/elastic/metrics.go b/exporter/elasticexporter/internal/translator/elastic/metrics.go index 4f6a51d7866ef..5b456c6d2860f 100644 --- a/exporter/elasticexporter/internal/translator/elastic/metrics.go +++ b/exporter/elasticexporter/internal/translator/elastic/metrics.go @@ -14,6 +14,7 @@ // Package elastic contains an opentelemetry-collector exporter // for Elastic APM. +// nolint:gocritic package elastic // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticexporter/internal/translator/elastic" import ( diff --git a/exporter/googlecloudpubsubexporter/exporter.go b/exporter/googlecloudpubsubexporter/exporter.go index 439ec385d7ea5..adf03090bddf1 100644 --- a/exporter/googlecloudpubsubexporter/exporter.go +++ b/exporter/googlecloudpubsubexporter/exporter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package googlecloudpubsubexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter" import ( diff --git a/exporter/humioexporter/config.go b/exporter/humioexporter/config.go index 51502f73fca23..d3f0c9d774616 100644 --- a/exporter/humioexporter/config.go +++ b/exporter/humioexporter/config.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package humioexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/humioexporter" import ( diff --git a/exporter/humioexporter/config_test.go b/exporter/humioexporter/config_test.go index c3435b9145cc2..58c267e38f640 100644 --- a/exporter/humioexporter/config_test.go +++ b/exporter/humioexporter/config_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package humioexporter import ( diff --git a/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go b/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go index 1b224bc2f4278..0086f15aefc34 100644 --- a/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go +++ b/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go @@ -11,6 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + +// nolint:gocritic package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/internal/awsmsk" import ( diff --git a/exporter/loadbalancingexporter/log_exporter_test.go b/exporter/loadbalancingexporter/log_exporter_test.go index 2e1d7ce540b78..c7ba5dea6b8a0 100644 --- a/exporter/loadbalancingexporter/log_exporter_test.go +++ b/exporter/loadbalancingexporter/log_exporter_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package loadbalancingexporter import ( diff --git a/exporter/observiqexporter/client_test.go b/exporter/observiqexporter/client_test.go index e715e36796c88..f9bc8647bd4e4 100644 --- a/exporter/observiqexporter/client_test.go +++ b/exporter/observiqexporter/client_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package observiqexporter import ( diff --git a/exporter/observiqexporter/converter.go b/exporter/observiqexporter/converter.go index 27dfed193eb6f..e8f16c6f68868 100644 --- a/exporter/observiqexporter/converter.go +++ b/exporter/observiqexporter/converter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package observiqexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/observiqexporter" import ( diff --git a/exporter/prometheusexporter/sanitize.go b/exporter/prometheusexporter/sanitize.go index 915ea578c3af0..f7af62c2246d5 100644 --- a/exporter/prometheusexporter/sanitize.go +++ b/exporter/prometheusexporter/sanitize.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" import ( diff --git a/exporter/prometheusexporter/sanitize_test.go b/exporter/prometheusexporter/sanitize_test.go index ae7c39040065d..6132c078c20c8 100644 --- a/exporter/prometheusexporter/sanitize_test.go +++ b/exporter/prometheusexporter/sanitize_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusexporter import ( diff --git a/exporter/prometheusremotewriteexporter/exporter_test.go b/exporter/prometheusremotewriteexporter/exporter_test.go index 9341c204045eb..04cedc89937ce 100644 --- a/exporter/prometheusremotewriteexporter/exporter_test.go +++ b/exporter/prometheusremotewriteexporter/exporter_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusremotewriteexporter import ( diff --git a/exporter/sentryexporter/sentry_exporter.go b/exporter/sentryexporter/sentry_exporter.go index fde872997d7c9..c84969e3206d0 100644 --- a/exporter/sentryexporter/sentry_exporter.go +++ b/exporter/sentryexporter/sentry_exporter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package sentryexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter" import ( diff --git a/exporter/signalfxexporter/internal/translation/converter.go b/exporter/signalfxexporter/internal/translation/converter.go index 95f279a398ba8..4f9e4201f8d48 100644 --- a/exporter/signalfxexporter/internal/translation/converter.go +++ b/exporter/signalfxexporter/internal/translation/converter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package translation // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation" import ( diff --git a/exporter/signalfxexporter/internal/translation/delta_translator.go b/exporter/signalfxexporter/internal/translation/delta_translator.go index 2f4dc1075e8ba..363771ba7c3ed 100644 --- a/exporter/signalfxexporter/internal/translation/delta_translator.go +++ b/exporter/signalfxexporter/internal/translation/delta_translator.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package translation // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation" import ( diff --git a/exporter/signalfxexporter/internal/translation/translator.go b/exporter/signalfxexporter/internal/translation/translator.go index 5e0aa71c451cd..e0ab7cca62270 100644 --- a/exporter/signalfxexporter/internal/translation/translator.go +++ b/exporter/signalfxexporter/internal/translation/translator.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package translation // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation" import ( diff --git a/exporter/skywalkingexporter/logrecord_to_logdata_test.go b/exporter/skywalkingexporter/logrecord_to_logdata_test.go index e28adcca8ae49..205ea62ebc2e3 100644 --- a/exporter/skywalkingexporter/logrecord_to_logdata_test.go +++ b/exporter/skywalkingexporter/logrecord_to_logdata_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package skywalkingexporter import ( diff --git a/exporter/skywalkingexporter/metricrecord_to_metricdata_test.go b/exporter/skywalkingexporter/metricrecord_to_metricdata_test.go index dc9f0f749947a..4fd2ae594b1ec 100644 --- a/exporter/skywalkingexporter/metricrecord_to_metricdata_test.go +++ b/exporter/skywalkingexporter/metricrecord_to_metricdata_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package skywalkingexporter import ( diff --git a/exporter/skywalkingexporter/skywalking_test.go b/exporter/skywalkingexporter/skywalking_test.go index b994b7831f413..a7a668eb1d807 100644 --- a/exporter/skywalkingexporter/skywalking_test.go +++ b/exporter/skywalkingexporter/skywalking_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package skywalkingexporter import ( diff --git a/exporter/splunkhecexporter/client_test.go b/exporter/splunkhecexporter/client_test.go index cde05f49c5666..90a42732685dd 100644 --- a/exporter/splunkhecexporter/client_test.go +++ b/exporter/splunkhecexporter/client_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package splunkhecexporter import ( diff --git a/exporter/splunkhecexporter/metricdata_to_splunk_test.go b/exporter/splunkhecexporter/metricdata_to_splunk_test.go index 16cb5ebdc031b..37aaa36981d87 100644 --- a/exporter/splunkhecexporter/metricdata_to_splunk_test.go +++ b/exporter/splunkhecexporter/metricdata_to_splunk_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package splunkhecexporter import ( diff --git a/exporter/sumologicexporter/graphite_formatter.go b/exporter/sumologicexporter/graphite_formatter.go index f88b61b503fd2..aa1d87635c580 100644 --- a/exporter/sumologicexporter/graphite_formatter.go +++ b/exporter/sumologicexporter/graphite_formatter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package sumologicexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" import ( diff --git a/exporter/sumologicexporter/prometheus_formatter.go b/exporter/sumologicexporter/prometheus_formatter.go index f84865f536659..a52618670018c 100644 --- a/exporter/sumologicexporter/prometheus_formatter.go +++ b/exporter/sumologicexporter/prometheus_formatter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package sumologicexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" import ( diff --git a/exporter/sumologicexporter/source_format.go b/exporter/sumologicexporter/source_format.go index 16ee544ef5dbc..50dfc934bca33 100644 --- a/exporter/sumologicexporter/source_format.go +++ b/exporter/sumologicexporter/source_format.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package sumologicexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" import ( diff --git a/exporter/sumologicexporter/source_format_test.go b/exporter/sumologicexporter/source_format_test.go index 8e826cb79bec3..b1ed5ef126331 100644 --- a/exporter/sumologicexporter/source_format_test.go +++ b/exporter/sumologicexporter/source_format_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package sumologicexporter import ( diff --git a/exporter/tanzuobservabilityexporter/transformer.go b/exporter/tanzuobservabilityexporter/transformer.go index 41d1ead833ea4..2998f69760ac8 100644 --- a/exporter/tanzuobservabilityexporter/transformer.go +++ b/exporter/tanzuobservabilityexporter/transformer.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package tanzuobservabilityexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tanzuobservabilityexporter" import ( diff --git a/extension/httpforwarder/extension_test.go b/extension/httpforwarder/extension_test.go index eb0142dba4b25..19b5b327138e5 100644 --- a/extension/httpforwarder/extension_test.go +++ b/extension/httpforwarder/extension_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package httpforwarder import ( diff --git a/extension/observer/dockerobserver/extension.go b/extension/observer/dockerobserver/extension.go index 827ffc4372f53..67e26081678a4 100644 --- a/extension/observer/dockerobserver/extension.go +++ b/extension/observer/dockerobserver/extension.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package dockerobserver // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver" import ( diff --git a/extension/observer/endpointswatcher.go b/extension/observer/endpointswatcher.go index adfb5a8f3a5fe..90160fd7aeefb 100644 --- a/extension/observer/endpointswatcher.go +++ b/extension/observer/endpointswatcher.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package observer // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" import ( diff --git a/extension/observer/k8sobserver/config_test.go b/extension/observer/k8sobserver/config_test.go index 851e7defe3788..42bbacb2808b2 100644 --- a/extension/observer/k8sobserver/config_test.go +++ b/extension/observer/k8sobserver/config_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sobserver import ( diff --git a/extension/observer/k8sobserver/mocks_test.go b/extension/observer/k8sobserver/mocks_test.go index 401a93fe33ec3..c8593ab2d99b2 100644 --- a/extension/observer/k8sobserver/mocks_test.go +++ b/extension/observer/k8sobserver/mocks_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sobserver import ( diff --git a/internal/aws/awsutil/conn.go b/internal/aws/awsutil/conn.go index 51d45336e62d3..3ea6f1bcfbd4c 100644 --- a/internal/aws/awsutil/conn.go +++ b/internal/aws/awsutil/conn.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package awsutil // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil" import ( diff --git a/internal/aws/containerinsight/const.go b/internal/aws/containerinsight/const.go index 77b565b17493c..21409a340b91f 100644 --- a/internal/aws/containerinsight/const.go +++ b/internal/aws/containerinsight/const.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package containerinsight // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight" import ( diff --git a/internal/aws/containerinsight/ecsconst.go b/internal/aws/containerinsight/ecsconst.go index 8625440b79075..b940c6b035361 100644 --- a/internal/aws/containerinsight/ecsconst.go +++ b/internal/aws/containerinsight/ecsconst.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package containerinsight // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight" //define constants that are used for ECS Container Insights only diff --git a/internal/aws/containerinsight/k8sconst.go b/internal/aws/containerinsight/k8sconst.go index 39e0f84daca21..2ac4b472bbb8e 100644 --- a/internal/aws/containerinsight/k8sconst.go +++ b/internal/aws/containerinsight/k8sconst.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package containerinsight // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight" //define constants that are used for EKS Container Insights only diff --git a/internal/aws/containerinsight/utils_test.go b/internal/aws/containerinsight/utils_test.go index ffe5e03f6bce3..ab37b1baba0df 100644 --- a/internal/aws/containerinsight/utils_test.go +++ b/internal/aws/containerinsight/utils_test.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package containerinsight import ( diff --git a/internal/aws/cwlogs/cwlog_client.go b/internal/aws/cwlogs/cwlog_client.go index c4f595cedfa75..8226b52ff131a 100644 --- a/internal/aws/cwlogs/cwlog_client.go +++ b/internal/aws/cwlogs/cwlog_client.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package cwlogs // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs" import ( diff --git a/internal/aws/cwlogs/cwlog_client_test.go b/internal/aws/cwlogs/cwlog_client_test.go index 303c7150f62b1..8b034ed386962 100644 --- a/internal/aws/cwlogs/cwlog_client_test.go +++ b/internal/aws/cwlogs/cwlog_client_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package cwlogs import ( diff --git a/internal/aws/cwlogs/pusher.go b/internal/aws/cwlogs/pusher.go index 2c343462d3a6b..e519cf50ad099 100644 --- a/internal/aws/cwlogs/pusher.go +++ b/internal/aws/cwlogs/pusher.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package cwlogs // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs" import ( diff --git a/internal/aws/cwlogs/pusher_test.go b/internal/aws/cwlogs/pusher_test.go index 969f7c50500c2..e14eb6269d163 100644 --- a/internal/aws/cwlogs/pusher_test.go +++ b/internal/aws/cwlogs/pusher_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package cwlogs import ( diff --git a/internal/aws/k8s/k8sclient/clientset.go b/internal/aws/k8s/k8sclient/clientset.go index af11e2ffc96f1..8bcfbd3b86c8d 100644 --- a/internal/aws/k8s/k8sclient/clientset.go +++ b/internal/aws/k8s/k8sclient/clientset.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sclient // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient" import ( diff --git a/internal/aws/k8s/k8sclient/endpoint.go b/internal/aws/k8s/k8sclient/endpoint.go index 9a51720a91a3e..ee6f4bce98cc4 100644 --- a/internal/aws/k8s/k8sclient/endpoint.go +++ b/internal/aws/k8s/k8sclient/endpoint.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sclient // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient" import ( diff --git a/internal/aws/k8s/k8sclient/endpoint_info.go b/internal/aws/k8s/k8sclient/endpoint_info.go index ce62f5157caef..b56d1c67167a9 100644 --- a/internal/aws/k8s/k8sclient/endpoint_info.go +++ b/internal/aws/k8s/k8sclient/endpoint_info.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sclient // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient" type endpointInfo struct { diff --git a/internal/aws/k8s/k8sclient/helpers_test.go b/internal/aws/k8s/k8sclient/helpers_test.go index f4ee60f328ab1..84a3d90a4a44c 100644 --- a/internal/aws/k8s/k8sclient/helpers_test.go +++ b/internal/aws/k8s/k8sclient/helpers_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sclient import ( diff --git a/internal/aws/k8s/k8sclient/node_test.go b/internal/aws/k8s/k8sclient/node_test.go index 2e6781c5c4e15..b6524f0826116 100644 --- a/internal/aws/k8s/k8sclient/node_test.go +++ b/internal/aws/k8s/k8sclient/node_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package k8sclient import ( diff --git a/internal/aws/proxy/conn.go b/internal/aws/proxy/conn.go index 407ca86bb471b..7008235bed5f2 100644 --- a/internal/aws/proxy/conn.go +++ b/internal/aws/proxy/conn.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package proxy // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy" import ( diff --git a/internal/common/sanitize/url.go b/internal/common/sanitize/url.go index 6920224dd75ec..b2312116a7806 100644 --- a/internal/common/sanitize/url.go +++ b/internal/common/sanitize/url.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package sanitize // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/sanitize" import ( diff --git a/internal/coreinternal/processor/filtermatcher/attributematcher.go b/internal/coreinternal/processor/filtermatcher/attributematcher.go index af0c5a81910b8..bada2de53739f 100644 --- a/internal/coreinternal/processor/filtermatcher/attributematcher.go +++ b/internal/coreinternal/processor/filtermatcher/attributematcher.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package filtermatcher // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/processor/filtermatcher" import ( diff --git a/pkg/stanza/adapter/converter.go b/pkg/stanza/adapter/converter.go index 3cf2d6868d20d..f7959d25b3ce0 100644 --- a/pkg/stanza/adapter/converter.go +++ b/pkg/stanza/adapter/converter.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package adapter // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter" import ( diff --git a/processor/cumulativetodeltaprocessor/processor.go b/processor/cumulativetodeltaprocessor/processor.go index b3b1ea8bcee18..59a1a787f1d9b 100644 --- a/processor/cumulativetodeltaprocessor/processor.go +++ b/processor/cumulativetodeltaprocessor/processor.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package cumulativetodeltaprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor" import ( diff --git a/processor/k8sattributesprocessor/doc.go b/processor/k8sattributesprocessor/doc.go index 2a4522e779182..8a4a987961b76 100644 --- a/processor/k8sattributesprocessor/doc.go +++ b/processor/k8sattributesprocessor/doc.go @@ -230,4 +230,5 @@ // as a sidecar. While this can be done, we think it is simpler to just use the kubernetes // downward API to inject environment variables into the pods and directly use their values // as tags. +// nolint:gocritic package k8sattributesprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" diff --git a/processor/k8sattributesprocessor/pod_association.go b/processor/k8sattributesprocessor/pod_association.go index 91fa06c8393bc..db0cc618c444b 100644 --- a/processor/k8sattributesprocessor/pod_association.go +++ b/processor/k8sattributesprocessor/pod_association.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sattributesprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" import ( diff --git a/processor/k8sattributesprocessor/processor_test.go b/processor/k8sattributesprocessor/processor_test.go index 603a3c8ccb17f..d92acec9ef5d6 100644 --- a/processor/k8sattributesprocessor/processor_test.go +++ b/processor/k8sattributesprocessor/processor_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sattributesprocessor import ( diff --git a/processor/metricstransformprocessor/config.go b/processor/metricstransformprocessor/config.go index 17a4afc006817..bde7794b45b63 100644 --- a/processor/metricstransformprocessor/config.go +++ b/processor/metricstransformprocessor/config.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" import ( diff --git a/processor/metricstransformprocessor/datapoint_aggregation.go b/processor/metricstransformprocessor/datapoint_aggregation.go index ec3b70ef10719..7f2295b6b0d7d 100644 --- a/processor/metricstransformprocessor/datapoint_aggregation.go +++ b/processor/metricstransformprocessor/datapoint_aggregation.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" import ( diff --git a/processor/metricstransformprocessor/metrics_testcase_builder_test.go b/processor/metricstransformprocessor/metrics_testcase_builder_test.go index 6e2df1af669c1..a94eaac4bc322 100644 --- a/processor/metricstransformprocessor/metrics_testcase_builder_test.go +++ b/processor/metricstransformprocessor/metrics_testcase_builder_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package metricstransformprocessor import ( diff --git a/processor/resourcedetectionprocessor/internal/aws/eks/detector.go b/processor/resourcedetectionprocessor/internal/aws/eks/detector.go index 4e5509ea488f2..e46081dd582e3 100644 --- a/processor/resourcedetectionprocessor/internal/aws/eks/detector.go +++ b/processor/resourcedetectionprocessor/internal/aws/eks/detector.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package eks // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks" import ( diff --git a/processor/routingprocessor/extract_test.go b/processor/routingprocessor/extract_test.go index 18680c53f30f0..ba0779d37f3ee 100644 --- a/processor/routingprocessor/extract_test.go +++ b/processor/routingprocessor/extract_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package routingprocessor import ( diff --git a/processor/routingprocessor/router.go b/processor/routingprocessor/router.go index 1077c8889216f..f6d55b4035ef1 100644 --- a/processor/routingprocessor/router.go +++ b/processor/routingprocessor/router.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package routingprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor" import ( diff --git a/processor/spanmetricsprocessor/processor.go b/processor/spanmetricsprocessor/processor.go index 9286d0b8a0e4a..b16a18c3a5180 100644 --- a/processor/spanmetricsprocessor/processor.go +++ b/processor/spanmetricsprocessor/processor.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package spanmetricsprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor" import ( diff --git a/processor/spanmetricsprocessor/processor_test.go b/processor/spanmetricsprocessor/processor_test.go index 00c3c88291cd6..9e6b9aaa5f0e9 100644 --- a/processor/spanmetricsprocessor/processor_test.go +++ b/processor/spanmetricsprocessor/processor_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package spanmetricsprocessor import ( diff --git a/processor/spanprocessor/span.go b/processor/spanprocessor/span.go index c583535d359dc..8a811ba4d7b81 100644 --- a/processor/spanprocessor/span.go +++ b/processor/spanprocessor/span.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package spanprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" import ( diff --git a/processor/tailsamplingprocessor/processor.go b/processor/tailsamplingprocessor/processor.go index 9b77c6c755fd8..afaef96f65473 100644 --- a/processor/tailsamplingprocessor/processor.go +++ b/processor/tailsamplingprocessor/processor.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package tailsamplingprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" import ( diff --git a/processor/transformprocessor/internal/logs/logs.go b/processor/transformprocessor/internal/logs/logs.go index dfaf443402bb1..6733c849f7a0a 100644 --- a/processor/transformprocessor/internal/logs/logs.go +++ b/processor/transformprocessor/internal/logs/logs.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package logs // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/logs" import ( diff --git a/processor/transformprocessor/internal/metrics/metrics.go b/processor/transformprocessor/internal/metrics/metrics.go index 91ccf2c5d5c3c..ba663df87c1b3 100644 --- a/processor/transformprocessor/internal/metrics/metrics.go +++ b/processor/transformprocessor/internal/metrics/metrics.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/metrics" import ( "fmt" diff --git a/processor/transformprocessor/internal/traces/traces.go b/processor/transformprocessor/internal/traces/traces.go index 77aa859cdb523..b1d2ae3b30000 100644 --- a/processor/transformprocessor/internal/traces/traces.go +++ b/processor/transformprocessor/internal/traces/traces.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package traces // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/traces" import ( diff --git a/receiver/awscontainerinsightreceiver/config_test.go b/receiver/awscontainerinsightreceiver/config_test.go index 792e8e2746f66..ba5d2e6c106cf 100644 --- a/receiver/awscontainerinsightreceiver/config_test.go +++ b/receiver/awscontainerinsightreceiver/config_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awscontainerinsightreceiver import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux.go index 0442103e10842..b470c8ec49407 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux.go @@ -15,7 +15,7 @@ //go:build linux // +build linux -// nolint:errcheck +// nolint:errcheck,gocritic package cadvisor // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/cadvisor" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/container_info_processor.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/container_info_processor.go index 050247ca6dd74..0b7c9f3cdf8e5 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/container_info_processor.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/container_info_processor.go @@ -15,6 +15,7 @@ //go:build linux // +build linux +// nolint:gocritic package cadvisor // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/cadvisor" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/cpu_extractor_test.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/cpu_extractor_test.go index d462c3d2836f4..a8aa65489cf74 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/cpu_extractor_test.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/cpu_extractor_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package extractors import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/diskio_extractor_test.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/diskio_extractor_test.go index 179bcb4e88b32..474951cdb483b 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/diskio_extractor_test.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/diskio_extractor_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package extractors import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor.go index c3ed3113c344f..b583373f812ea 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package extractors // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor_helpers_test.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor_helpers_test.go index 3132fe97fc027..9d6e87b752f39 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor_helpers_test.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/extractor_helpers_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package extractors import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor.go index 749bf10180f12..c51d445a071df 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package extractors // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor_test.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor_test.go index b7aeb3a27c75b..9fbdbfe0971ca 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor_test.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/fs_extractor_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package extractors import ( diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/net_extractor.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/net_extractor.go index a3e5aa4e36ca0..3ef70132ba9a9 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/net_extractor.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors/net_extractor.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package extractors // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/cadvisor/extractors" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/cgroup.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/cgroup.go index 0b697e8b9eb43..ce33aac3fd435 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/cgroup.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/cgroup.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package ecsinfo // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/ecsInfo" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info.go index d5b30939ff814..d415c83efb97e 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package ecsinfo // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/ecsInfo" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info_test.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info_test.go index e94d508ea6c15..62a2c23b11380 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info_test.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_instance_info_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package ecsinfo import ( diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_task_info.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_task_info.go index 38ab245c3bceb..f962d27f4365b 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_task_info.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecs_task_info.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package ecsinfo // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/ecsInfo" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo.go index d6aa556b4cd01..40173c8c67f20 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo.go @@ -1,16 +1,16 @@ -//Copyright OpenTelemetry Authors +// Copyright OpenTelemetry Authors // -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package ecsinfo // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/ecsInfo" diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo_test.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo_test.go index 622f9b0b9dda6..1af5dd589088e 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo_test.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/ecsinfo_test.go @@ -1,16 +1,16 @@ -//Copyright OpenTelemetry Authors +// Copyright OpenTelemetry Authors // -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package ecsinfo diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go index bb06245d781e1..cd946034340d1 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package ecsinfo // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/ecsInfo" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/host/ebsvolume.go b/receiver/awscontainerinsightreceiver/internal/host/ebsvolume.go index 8bdf893ad936d..7e7fdadd6a560 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/ebsvolume.go +++ b/receiver/awscontainerinsightreceiver/internal/host/ebsvolume.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package host // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/host/ebsvolume_test.go b/receiver/awscontainerinsightreceiver/internal/host/ebsvolume_test.go index 246b7aa06fbc2..7924c55037e9d 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/ebsvolume_test.go +++ b/receiver/awscontainerinsightreceiver/internal/host/ebsvolume_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package host import ( diff --git a/receiver/awscontainerinsightreceiver/internal/host/ec2metadata.go b/receiver/awscontainerinsightreceiver/internal/host/ec2metadata.go index 0f8dae25001d3..71b684c1600e1 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/ec2metadata.go +++ b/receiver/awscontainerinsightreceiver/internal/host/ec2metadata.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package host // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/host/ec2tags.go b/receiver/awscontainerinsightreceiver/internal/host/ec2tags.go index db447cb478db5..df53d2eecef7d 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/ec2tags.go +++ b/receiver/awscontainerinsightreceiver/internal/host/ec2tags.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package host // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go b/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go index efe28e0ebc39c..0a8905e491d5b 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go +++ b/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package host // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go index 70b091ba43710..4c280bca16fd2 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go +++ b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sapiserver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/k8sapiserver" import ( diff --git a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go index 2548cd904fa21..3fd8aee056182 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go +++ b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package k8sapiserver import ( diff --git a/receiver/awscontainerinsightreceiver/internal/stores/nodeinfo_test.go b/receiver/awscontainerinsightreceiver/internal/stores/nodeinfo_test.go index 1a159562f64c2..a4bf209656b15 100644 --- a/receiver/awscontainerinsightreceiver/internal/stores/nodeinfo_test.go +++ b/receiver/awscontainerinsightreceiver/internal/stores/nodeinfo_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package stores import ( diff --git a/receiver/awscontainerinsightreceiver/internal/stores/podstore.go b/receiver/awscontainerinsightreceiver/internal/stores/podstore.go index f6f57a5827564..cb0ac8eb6730f 100644 --- a/receiver/awscontainerinsightreceiver/internal/stores/podstore.go +++ b/receiver/awscontainerinsightreceiver/internal/stores/podstore.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package stores // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/stores" import ( diff --git a/receiver/awscontainerinsightreceiver/receiver.go b/receiver/awscontainerinsightreceiver/receiver.go index 43aece6e71cc5..e417efea92a42 100644 --- a/receiver/awscontainerinsightreceiver/receiver.go +++ b/receiver/awscontainerinsightreceiver/receiver.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package awscontainerinsightreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver" import ( diff --git a/receiver/awscontainerinsightreceiver/receiver_test.go b/receiver/awscontainerinsightreceiver/receiver_test.go index 827f4d00acef4..cd55d1835dbef 100644 --- a/receiver/awscontainerinsightreceiver/receiver_test.go +++ b/receiver/awscontainerinsightreceiver/receiver_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package awscontainerinsightreceiver import ( diff --git a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/docker_stats.go b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/docker_stats.go index a2d8735528614..15d2a46393102 100644 --- a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/docker_stats.go +++ b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/docker_stats.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsecscontainermetrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics" import "time" diff --git a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/metrics_helper.go b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/metrics_helper.go index 28c61df6651cb..f6937a59fc672 100644 --- a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/metrics_helper.go +++ b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/metrics_helper.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsecscontainermetrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics" import ( diff --git a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/resource.go b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/resource.go index a1127de26c693..b897f56d0ab48 100644 --- a/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/resource.go +++ b/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics/resource.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package awsecscontainermetrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver/internal/awsecscontainermetrics" import ( diff --git a/receiver/awsxrayreceiver/internal/translator/http.go b/receiver/awsxrayreceiver/internal/translator/http.go index ebb98892456f0..6e150e24dbe32 100644 --- a/receiver/awsxrayreceiver/internal/translator/http.go +++ b/receiver/awsxrayreceiver/internal/translator/http.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package translator // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver/internal/translator" import ( diff --git a/receiver/bigipreceiver/integration_test.go b/receiver/bigipreceiver/integration_test.go index 01a5069a53270..376119f343c94 100644 --- a/receiver/bigipreceiver/integration_test.go +++ b/receiver/bigipreceiver/integration_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package bigipreceiver import ( diff --git a/receiver/bigipreceiver/scraper.go b/receiver/bigipreceiver/scraper.go index dec36b6fe3835..e6826b61c2e89 100644 --- a/receiver/bigipreceiver/scraper.go +++ b/receiver/bigipreceiver/scraper.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" import ( diff --git a/receiver/carbonreceiver/transport/server_test.go b/receiver/carbonreceiver/transport/server_test.go index 6c08d67a01bcd..1dfae8f517cd9 100644 --- a/receiver/carbonreceiver/transport/server_test.go +++ b/receiver/carbonreceiver/transport/server_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package transport import ( diff --git a/receiver/couchdbreceiver/metrics.go b/receiver/couchdbreceiver/metrics.go index e3b0cd2fcbea8..578ad13bd40da 100644 --- a/receiver/couchdbreceiver/metrics.go +++ b/receiver/couchdbreceiver/metrics.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package couchdbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver" import ( diff --git a/receiver/couchdbreceiver/scraper_test.go b/receiver/couchdbreceiver/scraper_test.go index ebaaa6ebb5a59..23c5d3176da39 100644 --- a/receiver/couchdbreceiver/scraper_test.go +++ b/receiver/couchdbreceiver/scraper_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package couchdbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver" import ( diff --git a/receiver/dotnetdiagnosticsreceiver/metrics/converter.go b/receiver/dotnetdiagnosticsreceiver/metrics/converter.go index 8fb249945eda8..5d835783ad063 100644 --- a/receiver/dotnetdiagnosticsreceiver/metrics/converter.go +++ b/receiver/dotnetdiagnosticsreceiver/metrics/converter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dotnetdiagnosticsreceiver/metrics" import ( diff --git a/receiver/dotnetdiagnosticsreceiver/network/reader.go b/receiver/dotnetdiagnosticsreceiver/network/reader.go index 44dd3e14b3098..fc06f1b99d98d 100644 --- a/receiver/dotnetdiagnosticsreceiver/network/reader.go +++ b/receiver/dotnetdiagnosticsreceiver/network/reader.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package network // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dotnetdiagnosticsreceiver/network" import ( diff --git a/receiver/googlecloudpubsubreceiver/receiver.go b/receiver/googlecloudpubsubreceiver/receiver.go index b2be439a10577..55b24a0c20c52 100644 --- a/receiver/googlecloudpubsubreceiver/receiver.go +++ b/receiver/googlecloudpubsubreceiver/receiver.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package googlecloudpubsubreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver" import ( diff --git a/receiver/googlecloudspannerreceiver/config.go b/receiver/googlecloudspannerreceiver/config.go index 78c1a6a04c022..3f7d111dd71e7 100644 --- a/receiver/googlecloudspannerreceiver/config.go +++ b/receiver/googlecloudspannerreceiver/config.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package googlecloudspannerreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver" import ( diff --git a/receiver/googlecloudspannerreceiver/internal/statsreader/statements.go b/receiver/googlecloudspannerreceiver/internal/statsreader/statements.go index 70fe8252c5797..9055d6e9d8229 100644 --- a/receiver/googlecloudspannerreceiver/internal/statsreader/statements.go +++ b/receiver/googlecloudspannerreceiver/internal/statsreader/statements.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package statsreader // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver/internal/statsreader" import ( diff --git a/receiver/googlecloudspannerreceiver/internal/statsreader/timestampsgenerator.go b/receiver/googlecloudspannerreceiver/internal/statsreader/timestampsgenerator.go index cc9c085fc4290..779aa2eada94f 100644 --- a/receiver/googlecloudspannerreceiver/internal/statsreader/timestampsgenerator.go +++ b/receiver/googlecloudspannerreceiver/internal/statsreader/timestampsgenerator.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package statsreader // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver/internal/statsreader" import "time" diff --git a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go index 88fd451da6a4c..902e4a232929a 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package cpuscraper import ( diff --git a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper.go b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper.go index ebb02e00043b0..ede49c9b053d9 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper.go +++ b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package loadscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/loadscraper" import ( diff --git a/receiver/jmxreceiver/internal/subprocess/subprocess.go b/receiver/jmxreceiver/internal/subprocess/subprocess.go index d554cfa961c79..7418c98fe80ac 100644 --- a/receiver/jmxreceiver/internal/subprocess/subprocess.go +++ b/receiver/jmxreceiver/internal/subprocess/subprocess.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck +// nolint:errcheck,gocritic package subprocess // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver/internal/subprocess" import ( diff --git a/receiver/k8sclusterreceiver/internal/collection/pods.go b/receiver/k8sclusterreceiver/internal/collection/pods.go index d4ce72a3e4197..0f1481d5507fa 100644 --- a/receiver/k8sclusterreceiver/internal/collection/pods.go +++ b/receiver/k8sclusterreceiver/internal/collection/pods.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package collection // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/internal/collection" import ( diff --git a/receiver/mongodbreceiver/client_test.go b/receiver/mongodbreceiver/client_test.go index 3eccf764eb4e0..61f0a52948692 100644 --- a/receiver/mongodbreceiver/client_test.go +++ b/receiver/mongodbreceiver/client_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package mongodbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbreceiver" import ( diff --git a/receiver/nsxtreceiver/client_mock_test.go b/receiver/nsxtreceiver/client_mock_test.go index 30a02fe9ee527..3b4653295e042 100644 --- a/receiver/nsxtreceiver/client_mock_test.go +++ b/receiver/nsxtreceiver/client_mock_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package nsxtreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver" import ( context "context" diff --git a/receiver/nsxtreceiver/client_test.go b/receiver/nsxtreceiver/client_test.go index fec3d0404517e..5586e6af2dd89 100644 --- a/receiver/nsxtreceiver/client_test.go +++ b/receiver/nsxtreceiver/client_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package nsxtreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver" import ( "context" diff --git a/receiver/prometheusreceiver/metrics_receiver_honor_timestamp_test.go b/receiver/prometheusreceiver/metrics_receiver_honor_timestamp_test.go index 10fa84906b749..9dd00ac81eca1 100644 --- a/receiver/prometheusreceiver/metrics_receiver_honor_timestamp_test.go +++ b/receiver/prometheusreceiver/metrics_receiver_honor_timestamp_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusreceiver import ( diff --git a/receiver/prometheusreceiver/metrics_receiver_labels_test.go b/receiver/prometheusreceiver/metrics_receiver_labels_test.go index 8e90fdb724048..18ccd4abe7a5b 100644 --- a/receiver/prometheusreceiver/metrics_receiver_labels_test.go +++ b/receiver/prometheusreceiver/metrics_receiver_labels_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusreceiver import ( diff --git a/receiver/prometheusreceiver/metrics_receiver_non_numerical_test.go b/receiver/prometheusreceiver/metrics_receiver_non_numerical_test.go index f3e5d4b251332..1009a5f86efb6 100644 --- a/receiver/prometheusreceiver/metrics_receiver_non_numerical_test.go +++ b/receiver/prometheusreceiver/metrics_receiver_non_numerical_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusreceiver import ( diff --git a/receiver/prometheusreceiver/metrics_receiver_open_metrics_test.go b/receiver/prometheusreceiver/metrics_receiver_open_metrics_test.go index 42da3d8b1954b..64ae685412726 100644 --- a/receiver/prometheusreceiver/metrics_receiver_open_metrics_test.go +++ b/receiver/prometheusreceiver/metrics_receiver_open_metrics_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package prometheusreceiver import ( diff --git a/receiver/riakreceiver/scraper.go b/receiver/riakreceiver/scraper.go index cd8ba1ab0deab..f439e82eb7c7a 100644 --- a/receiver/riakreceiver/scraper.go +++ b/receiver/riakreceiver/scraper.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package riakreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver" import ( diff --git a/receiver/saphanareceiver/client_test.go b/receiver/saphanareceiver/client_test.go index a1b279a4ef8f4..f5c790ba16f99 100644 --- a/receiver/saphanareceiver/client_test.go +++ b/receiver/saphanareceiver/client_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package saphanareceiver import ( diff --git a/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go b/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go index e8522ccfcacfe..6da761d7d06f4 100644 --- a/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go +++ b/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package signalfxreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver" import ( diff --git a/receiver/skywalkingreceiver/sw_dummy_response_service.go b/receiver/skywalkingreceiver/sw_dummy_response_service.go index 87f1e326fcd79..41371b64274e3 100644 --- a/receiver/skywalkingreceiver/sw_dummy_response_service.go +++ b/receiver/skywalkingreceiver/sw_dummy_response_service.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package skywalkingreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver" import ( diff --git a/receiver/skywalkingreceiver/trace_receiver_test.go b/receiver/skywalkingreceiver/trace_receiver_test.go index a86752552c083..33d424c261922 100644 --- a/receiver/skywalkingreceiver/trace_receiver_test.go +++ b/receiver/skywalkingreceiver/trace_receiver_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package skywalkingreceiver import ( diff --git a/receiver/splunkhecreceiver/splunkhec_to_metricdata_test.go b/receiver/splunkhecreceiver/splunkhec_to_metricdata_test.go index 2efdac0c483ce..30766fc21c48e 100644 --- a/receiver/splunkhecreceiver/splunkhec_to_metricdata_test.go +++ b/receiver/splunkhecreceiver/splunkhec_to_metricdata_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package splunkhecreceiver import ( diff --git a/receiver/statsdreceiver/protocol/metric_translator.go b/receiver/statsdreceiver/protocol/metric_translator.go index e6eb7bc125e99..1013036ac3aa7 100644 --- a/receiver/statsdreceiver/protocol/metric_translator.go +++ b/receiver/statsdreceiver/protocol/metric_translator.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package protocol // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver/protocol" import ( diff --git a/receiver/statsdreceiver/protocol/statsd_parser.go b/receiver/statsdreceiver/protocol/statsd_parser.go index b9b11f73c0f6a..994c085a68a68 100644 --- a/receiver/statsdreceiver/protocol/statsd_parser.go +++ b/receiver/statsdreceiver/protocol/statsd_parser.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package protocol // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver/protocol" import ( diff --git a/receiver/statsdreceiver/transport/server_test.go b/receiver/statsdreceiver/transport/server_test.go index eccb2b61bb230..d0349bc463772 100644 --- a/receiver/statsdreceiver/transport/server_test.go +++ b/receiver/statsdreceiver/transport/server_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package transport import ( diff --git a/receiver/wavefrontreceiver/wavefront_parser.go b/receiver/wavefrontreceiver/wavefront_parser.go index f3af55eb58efa..39df7281df53c 100644 --- a/receiver/wavefrontreceiver/wavefront_parser.go +++ b/receiver/wavefrontreceiver/wavefront_parser.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package wavefrontreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver" import ( diff --git a/testbed/datareceivers/mockawsxraydatareceiver.go b/testbed/datareceivers/mockawsxraydatareceiver.go index cfc2bac374e07..27c3d75a33eb5 100644 --- a/testbed/datareceivers/mockawsxraydatareceiver.go +++ b/testbed/datareceivers/mockawsxraydatareceiver.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package datareceivers // import "github.com/open-telemetry/opentelemetry-collector-contrib/testbed/datareceivers" import ( diff --git a/testbed/testbed/child_process_collector.go b/testbed/testbed/child_process_collector.go index b2ed7b0f3d417..1e1cdc0f1c1a3 100644 --- a/testbed/testbed/child_process_collector.go +++ b/testbed/testbed/child_process_collector.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// nolint:gocritic package testbed // import "github.com/open-telemetry/opentelemetry-collector-contrib/testbed/testbed" import (