Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[chore] enable gci on generated code #30453

Conversation

codeboten
Copy link
Contributor

This prevents us from having a bunch of code in the repo that isn't compliant w/ the import rules we have enabled.

Fixes #30439

This prevents us from having a bunch of code in the repo that isn't compliant w/ the import rules we have enabled.

Fixes open-telemetry#30439

Signed-off-by: Alex Boten <aboten@lightstep.com>
@dmitryax
Copy link
Member

Looks like it doesn't work :(

@codeboten
Copy link
Contributor Author

@dmitryax yeah... funny enough, if i install gci and run it like this:

gci diff -s standard -s default -s 'prefix(github.com/open-telemetry/opentelemetry-collector-contrib)' *

--- generated_component_test.go
+++ generated_component_test.go
@@ -10,13 +10,11 @@
        "github.com/stretchr/testify/require"
        "go.opentelemetry.io/collector/component"
        "go.opentelemetry.io/collector/component/componenttest"
-
+       "go.opentelemetry.io/collector/confmap/confmaptest"
        "go.opentelemetry.io/collector/consumer/consumertest"
        "go.opentelemetry.io/collector/processor"
        "go.opentelemetry.io/collector/processor/processortest"
 
-       "go.opentelemetry.io/collector/confmap/confmaptest"
-
        "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata"
 )

but through golangci-lint i get a different result 🤔

@codeboten codeboten marked this pull request as draft January 11, 2024 21:47
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 26, 2024
Copy link
Contributor

github-actions bot commented Feb 9, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CDCD] Investigate why goimports liter isn't firing for lifecycle generated tests
3 participants