Skip to content

length_test_linter() for length(x == 0) #2124

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

Merged
merged 8 commits into from
Sep 10, 2023
Merged

length_test_linter() for length(x == 0) #2124

merged 8 commits into from
Sep 10, 2023

Conversation

MichaelChirico
Copy link
Collaborator

Closes #1991.

length_equals_linter() generalized to length_test_linter() to incorporate other cases where length() is applied to a logical vector, e.g. length(x > 0).

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2023

Codecov Report

Merging #2124 (5d6502e) into main (02f7db8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 5d6502e differs from pull request most recent head ba6ef99. Consider uploading reports for the commit ba6ef99 to get more accurate results

@@           Coverage Diff           @@
##             main    #2124   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files         111      112    +1     
  Lines        5097     5116   +19     
=======================================
+ Hits         5079     5098   +19     
  Misses         18       18           
Files Changed Coverage Δ
R/length_test_linter.R 100.00% <100.00%> (ø)

@AshesITR AshesITR merged commit 9bd015d into main Sep 10, 2023
@AshesITR AshesITR deleted the length_test_linter branch September 10, 2023 08:53
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.

Linter for length(x == y) where almost certainly length(which(x == y)) or length(x) == y was intended
4 participants