This repository was archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Linting: add unused lint
#55647
Merged
Merged
Linting: add unused lint
#55647
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
burmudar
approved these changes
Aug 8, 2023
Contributor
burmudar
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.
Awesome stuff! Thanks for adding this! ❤️
mrnugget
added a commit
that referenced
this pull request
Aug 9, 2023
The linter in #55647 flagged these. They are unused and are a left-over after the migration to the "Variant" types in this file.
mrnugget
added a commit
that referenced
this pull request
Aug 9, 2023
The linter in #55647 flagged these. They are unused and are a left-over after the migration to the "Variant" types in this file. ## Test plan - Existing CI
camdencheek
referenced
this pull request
Aug 9, 2023
This removes some unused code as reported by the new [unused linter](https://github.com/sourcegraph/sourcegraph/pull/55647). The linter incorrectly reports that some things are unused if they are only used by tests. It's unclear to me if there is a general solution to this issue, but for now I'm either ignoring them or moving test-only stuff to test files.
davejrt
pushed a commit
that referenced
this pull request
Aug 9, 2023
davejrt
pushed a commit
that referenced
this pull request
Aug 9, 2023
The linter in #55647 flagged these. They are unused and are a left-over after the migration to the "Variant" types in this file. ## Test plan - Existing CI
davejrt
referenced
this pull request
Aug 9, 2023
This removes some unused code as reported by the new [unused linter](https://github.com/sourcegraph/sourcegraph/pull/55647). The linter incorrectly reports that some things are unused if they are only used by tests. It's unclear to me if there is a general solution to this issue, but for now I'm either ignoring them or moving test-only stuff to test files.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This adds the
unusedlint to the set of linters supported bynogo. This PR leaves it disabled because we currently have a lot of dead code lying around.For anyone who wants to work on sniping some unused code, just uncomment the line in
BUILD.bazelTest plan