Skip to content

chore: migrate to v2 golangci-lint #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2025
Merged

Conversation

csatib02
Copy link
Member

@csatib02 csatib02 commented Apr 2, 2025

  • Migrates golangci-lint to v2.
  • Adds sensible default linters.
  • Fixes linter errors.

@csatib02 csatib02 requested review from pepov, OverOrion and Copilot April 2, 2025 12:46
@csatib02 csatib02 self-assigned this Apr 2, 2025
@csatib02 csatib02 added the enhancement New feature or request label Apr 2, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates golangci-lint to version 2 by updating the configuration file and making corresponding code changes to address linter complaints.

  • Migrates the linter configuration from the old format to the new v2 format in .golangci.yml.
  • Updates variable names and receiver references for consistency with linter recommendations.
  • Adds nolint comments to test imports to satisfy new linting rules.

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/resources/otel_conf_gen/pipeline/components/exporter/otlphttp_exporter.go Renamed variables for consistent HTTP casing.
pkg/resources/manager/tenant_resource_manager.go Updated receiver variable from r to t for consistency.
controllers/telemetry/suite_test.go Added nolint annotations to imported packages.
controllers/telemetry/route_controller.go Updated lambda callbacks to ignore unused parameters with _.
controllers/telemetry/controller_integration_test.go Similar nolint adjustments for test imports.
.golangci.yml Reconfigured linters and formatters to support golangci-lint v2 structure.
Files not reviewed (1)
  • Makefile: Language not supported

Signed-off-by: Bence Csati <bence.csati@axoflow.com>
@csatib02 csatib02 force-pushed the chore/migrate-to-v2-golangci branch 3 times, most recently from cedd4fb to a05284d Compare April 3, 2025 08:02
Signed-off-by: Bence Csati <bence.csati@axoflow.com>
@csatib02 csatib02 force-pushed the chore/migrate-to-v2-golangci branch from a05284d to e814251 Compare April 3, 2025 08:08
@csatib02 csatib02 merged commit 38ce043 into main Apr 3, 2025
11 checks passed
@csatib02 csatib02 deleted the chore/migrate-to-v2-golangci branch April 3, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants