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

add autofix comments + diagnostic on discards #1665

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

Techatrix
Copy link
Member

This idea has been brought up in #1623.

Here is what I've changed:

  • add a // autofix comment after every discard that is added by autofix
  • only removed unnecessary discard if they have the autofix comment
  • show a diagnostic on every discard that has the autofix comment

Suggestions on a better better diagnostic message or autofix comment are welcome.

Here is what I get shown when autofix adds a discard to my code:
Screenshot from 2023-12-11 20-25-30
Note that I am using the usernamehw.errorlens extension that shows diagnostics messages inside the document.

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d1ad449) 75.55% compared to head (f144116) 75.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1665      +/-   ##
==========================================
+ Coverage   75.55%   75.64%   +0.08%     
==========================================
  Files          33       33              
  Lines        9067     9074       +7     
==========================================
+ Hits         6851     6864      +13     
+ Misses       2216     2210       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@llogick llogick merged commit 091ad12 into master Dec 18, 2023
10 checks passed
@llogick llogick deleted the techatrix/autofix-comment branch December 18, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants