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

detect missing() usage in function_argument_linter #2095

Merged
merged 8 commits into from
Aug 31, 2023
Merged

Conversation

MichaelChirico
Copy link
Collaborator

Closes #1546

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2023

Codecov Report

Merging #2095 (0de3eac) into main (cafc081) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 0de3eac differs from pull request most recent head d6b8372. Consider uploading reports for the commit d6b8372 to get more accurate results

@@           Coverage Diff           @@
##             main    #2095   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files         118      118           
  Lines        5201     5206    +5     
=======================================
+ Hits         5183     5188    +5     
  Misses         18       18           
Files Changed Coverage Δ
R/function_argument_linter.R 100.00% <100.00%> (ø)

@AshesITR
Copy link
Collaborator

Can we add a test case without {} in the function body?

function(x = 2, y) if (missing(y)) x else y

Just to make sure the XPath works everywhere.
The rest looks good.

NEWS.md Outdated Show resolved Hide resolved
AshesITR
AshesITR previously approved these changes Aug 30, 2023
NEWS.md Outdated Show resolved Hide resolved
@AshesITR
Copy link
Collaborator

Wait now this has no diff to main wrt NEWS.md 😅

@MichaelChirico
Copy link
Collaborator Author

Oh, whoops. Should open my eyes wider. I mis-read and thought it was the fixed_regex_linter() bullet back again. Restored.

@MichaelChirico MichaelChirico merged commit 960d863 into main Aug 31, 2023
@MichaelChirico MichaelChirico deleted the missing-1546 branch August 31, 2023 12:58
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.

function_argument_linter() could look for missing() handling and mention it in the lint message
3 participants