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

More robust unreachable_code_linter #2129

Merged
merged 11 commits into from
Sep 9, 2023

Conversation

MEO265
Copy link
Contributor

@MEO265 MEO265 commented Sep 9, 2023

Fixes #2127

In my opinion, statement (position() != last() - 1 or not(following-sibling::OP-RIGHT-BRACE))
is not necessary (At least with the new addition) and made no difference to the tests. If I miss something, let me know.

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2023

Codecov Report

Merging #2129 (2532211) into main (2a94dab) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 2532211 differs from pull request most recent head 8d670bd. Consider uploading reports for the commit 8d670bd to get more accurate results

@@           Coverage Diff           @@
##             main    #2129   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files         121      121           
  Lines        5232     5232           
=======================================
  Hits         5214     5214           
  Misses         18       18           
Files Changed Coverage Δ
R/unreachable_code_linter.R 100.00% <100.00%> (ø)

@MEO265 MEO265 changed the title More robust unreachable code linter More robust unreachable_code_linter Sep 9, 2023
@MichaelChirico
Copy link
Collaborator

Great find & thanks for fixing! Only the small change please.

@MichaelChirico
Copy link
Collaborator

@MEO265 FYI we reserve the "bugs" section if the NEWS for things like "running the linter threw an unexpected error or warning". tightened logic (reduced false positives or false negatives) goes under "new/improved".

@MichaelChirico
Copy link
Collaborator

(re-reading both items currently there don't belong either! sorry)

@IndrajeetPatil IndrajeetPatil merged commit 739b4b6 into r-lib:main Sep 9, 2023
@MEO265 MEO265 deleted the more_robust_unreachable_code_linter branch September 9, 2023 15:03
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.

More robust unreachable_code_linter
4 participants