This repository was archived by the owner on Aug 31, 2023. It is now read-only.
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.
feat(rome_js_analyze):
noUnusedVariable
rule #2987feat(rome_js_analyze):
noUnusedVariable
rule #2987Changes from all commits
f707a6d
470f397
5fcdca9
88909bc
7de4a6b
c98fcf7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Considering that the applicability is
Unspecified
, what does it mean for the end user? Can an user apply the change via CLI?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.
I am torn apart between
Unspecified
andMaybeIncorrect
. I assumed that removing unused code is not the "best" solution.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.
The semantics of
Applicability
is something we'll need to review when we rework the diagnostics, the current version of the enum is inherited directly fromrslint
and indirectlyrustc
, but those tools are using text-based suggestions instead of tree-based.In this case I think the
Unspecified
applicability comes fromrustc
, where the concept of "applicability" was added when the compiler already has a bunch of existing suggestions, so all those diagnostics were set toUnspecified
in the refactor to be manually reviewed later on.In our case though we should always document if a suggestion is safe to apply or not, so in practice the only variants of
Applicability
we should be using aMaybeIncorrect
andAlways
(the difference is thatUnspecified
can never be applied automatically, whileMaybeIncorrect
can after the has the user has reviewed it)