prometheus/discovery/kubernetes
beorn7 c3c7d44d84 lint: Adjust to the lint warnings raised by current versions of golint-ci
We haven't updated golint-ci in our CI yet, but this commit prepares
for that.

There are a lot of new warnings, and it is mostly because the "revive"
linter got updated. I agree with most of the new warnings, mostly
around not naming unused function parameters (although it is justified
in some cases for documentation purposes – while things like mocks are
a good example where not naming the parameter is clearer).

I'm pretty upset about the "empty block" warning to include `for`
loops. It's such a common pattern to do something in the head of the
`for` loop and then have an empty block. There is still an open issue
about this: https://github.com/mgechev/revive/issues/810 I have
disabled "revive" altogether in files where empty blocks are used
excessively, and I have made the effort to add individual
`// nolint:revive` where empty blocks are used just once or twice.
It's borderline noisy, though, but let's go with it for now.

I should mention that none of the "empty block" warnings for `for`
loop bodies were legitimate.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-04-19 17:10:10 +02:00
..
client_metrics.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
endpoints.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
endpoints_test.go discovery/kubernetes: fix broken tests 2022-07-18 09:10:12 -04:00
endpointslice.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
endpointslice_adaptor.go Add support for EndpointSlice conditions 2023-01-19 18:56:02 +01:00
endpointslice_adaptor_test.go Add support for EndpointSlice conditions 2023-01-19 18:56:02 +01:00
endpointslice_test.go Add support for EndpointSlice conditions 2023-01-19 18:56:02 +01:00
ingress.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
ingress_adaptor.go Kubernetes SD: Fix golint issue 2021-08-24 17:30:33 +09:00
ingress_test.go Implement target discovery in own k8s namespace 2021-12-14 13:41:38 +01:00
kubernetes.go Kubernetes SD: disable resync timer 2022-12-22 13:26:03 +01:00
kubernetes_test.go Improve reliability of Kubernetes SD tests (#10761) 2022-06-07 16:19:40 +01:00
node.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
node_test.go Kubernetes service discovery: add provider ID label (#9603) 2021-12-06 22:27:11 +01:00
pod.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
pod_test.go Add container ID as a meta label for pod targets 2023-01-11 11:44:36 -05:00
service.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
service_test.go add loadbalancerip to service labels 2022-08-10 12:40:11 +02:00