-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[chore] enable modernize linter #44199
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
codeboten
merged 49 commits into
open-telemetry:main
from
paulojmdias:chore/enable_modernize_lint
Dec 18, 2025
Merged
[chore] enable modernize linter #44199
codeboten
merged 49 commits into
open-telemetry:main
from
paulojmdias:chore/enable_modernize_lint
Dec 18, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Paulo Dias <[email protected]>
This was referenced Nov 12, 2025
songy23
pushed a commit
that referenced
this pull request
Nov 12, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
bogdandrutu
pushed a commit
that referenced
this pull request
Nov 12, 2025
…44213) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
bogdandrutu
pushed a commit
that referenced
this pull request
Nov 12, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
bogdandrutu
pushed a commit
that referenced
this pull request
Nov 12, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
songy23
pushed a commit
that referenced
this pull request
Nov 12, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
songy23
pushed a commit
that referenced
this pull request
Nov 12, 2025
…44211) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
songy23
pushed a commit
that referenced
this pull request
Nov 12, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
This was referenced Nov 12, 2025
songy23
pushed a commit
that referenced
this pull request
Nov 13, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This is part of the process to enable the [modernize](#44199) linter in CI and upgrade `golanglint` to the latest version. There are no changes in the component behaviour. ```sh WARN [runner/exclusion_paths] The pattern "third_party" match no issues WARN [runner/exclusion_rules] Skipped 0 issues by rules: [Text: "cachedBytes", Path: "pagefile.go", Linters: "unused"] WARN [runner/exclusion_rules] Skipped 0 issues by rules: [Path: "third_party", Linters: "gci, gofumpt"] receiver/windowseventlogreceiver/factory_test.go:45:3: error-is-as: use assert.ErrorIs or assert.ErrorAs depending on the case (testifylint) assert.IsType(t, pipeline.ErrSignalNotSupported, err) ^ make: *** [lint] Error 1 ``` --------- Signed-off-by: Paulo Dias <[email protected]>
songy23
pushed a commit
that referenced
this pull request
Nov 13, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
codeboten
pushed a commit
that referenced
this pull request
Nov 13, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This is part of the process to enable the [modernize](#44199) linter in CI and upgrade `golanglint` to the latest version. There are no changes in the component behaviour. ```sh WARN [runner/exclusion_paths] The pattern "third_party" match no issues WARN [runner/exclusion_rules] Skipped 0 issues by rules: [Text: "cachedBytes", Path: "pagefile.go", Linters: "unused"] WARN [runner/exclusion_rules] Skipped 0 issues by rules: [Path: "third_party", Linters: "gci, gofumpt"] processor/resourcedetectionprocessor/config.go:50:2: deprecatedComment: `Deprecated: ` notices should be in a dedicated paragraph, separated from the rest (gocritic) // Deprecated: Please use detector's resource_attributes config instead ^ make: *** [lint] Error 1 ``` Signed-off-by: Paulo Dias <[email protected]>
codeboten
pushed a commit
that referenced
this pull request
Nov 13, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI which needs upgrade the `golanglint` to `v2.6.1`. There are no changes in the component behaviour. Signed-off-by: Paulo Dias <[email protected]>
codeboten
pushed a commit
that referenced
this pull request
Nov 13, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Run the `make modernize` tool. https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. --------- Signed-off-by: Paulo Dias <[email protected]>
This was referenced Nov 13, 2025
…-contrib into chore/enable_modernize_lint Signed-off-by: Paulo Dias <[email protected]>
…opentelemetry-collector-contrib into chore/enable_modernize_lint Signed-off-by: Paulo Dias <[email protected]>
codeboten
reviewed
Dec 16, 2025
Contributor
codeboten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the exceptions here have issues associate with them make sure they're eventually removed?
Co-authored-by: Alex Boten <[email protected]>
This was referenced Dec 16, 2025
Open
Member
Author
Agree. Issues created:
|
codeboten
reviewed
Dec 18, 2025
codeboten
reviewed
Dec 18, 2025
codeboten
approved these changes
Dec 18, 2025
Member
Author
|
Thank you @codeboten 🙏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR enables the modernize linter.
Should only be merged when the following PRs are merged:
Example of a linter error:
Fixes #44364