Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(compiler-cli): make the unused imports diagnostic easier to read #58468

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

Closed
wants to merge 2 commits into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 1, 2024

The unused imports diagnostic reports once on the entire initializer and then again once per unused imports. This ends up being a bit hard to follow, because in a lot of cases the code snippet looks identical.

These changes switch to highlighting the imports: part of the property declaration and only highlighting the unused imports without a message.

For reference, this is what the diagnostic looks like at the moment:
image

And here's what it looks like after the changes:
image

The unused imports diagnostic reports once on the entire initializer and then again once per unused imports. This ends up being a bit hard to follow, because in a lot of cases the code snippet looks identical.

These changes switch to highlighting the `imports:` part of the property declaration and only highlighting the unused imports without a message.
Since the unused imports diagnostic setup has changed, we need to update the code fix to account for it.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Nov 1, 2024
@angular-robot angular-robot bot added the area: language-service Issues related to Angular's VS Code language service label Nov 1, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 1, 2024
@crisbeto crisbeto marked this pull request as ready for review November 1, 2024 13:45
@pullapprove pullapprove bot requested a review from clydin November 1, 2024 13:45
@crisbeto crisbeto requested a review from JoostK November 1, 2024 13:45
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 1, 2024
thePunderWoman pushed a commit that referenced this pull request Nov 1, 2024
…58468)

The unused imports diagnostic reports once on the entire initializer and then again once per unused imports. This ends up being a bit hard to follow, because in a lot of cases the code snippet looks identical.

These changes switch to highlighting the `imports:` part of the property declaration and only highlighting the unused imports without a message.

PR Close #58468
thePunderWoman pushed a commit that referenced this pull request Nov 1, 2024
Since the unused imports diagnostic setup has changed, we need to update the code fix to account for it.

PR Close #58468
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 3061c67.

The changes were merged into the following branches: main, 19.0.x

thePunderWoman pushed a commit that referenced this pull request Nov 1, 2024
Since the unused imports diagnostic setup has changed, we need to update the code fix to account for it.

PR Close #58468
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: language-service Issues related to Angular's VS Code language service target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants