Skip to content

Support cases of stop(sprintf( in condition_call_linter - #2890

Merged
Bisaloo merged 4 commits into
mainfrom
condition_call_linter_sprintf
Jul 26, 2025
Merged

Bisaloo merged 4 commits into
mainfrom
condition_call_linter_sprintf

Conversation

@Bisaloo

@Bisaloo Bisaloo commented Jul 24, 2025 •

Copy link
Copy Markdown
Collaborator

Follow up from #2888

@codecov

codecov Bot commented Jul 24, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.27%. Comparing base (175065c) to head (811dae0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2890   +/-   ##
=======================================
  Coverage   99.27%   99.27%           
=======================================
  Files         128      128           
  Lines        7188     7193    +5     
=======================================
+ Hits         7136     7141    +5     
  Misses         52       52           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Bisaloo
Bisaloo force-pushed the condition_call_linter_sprintf branch from 5c9f6bf to 6164db7 Compare July 24, 2025 15:18
Comment thread R/condition_call_linter.R Outdated
following-sibling::expr/STR_CONST
following-sibling::expr[
STR_CONST
or expr/SYMBOL_FUNCTION_CALL[text() = 'sprintf' or text() = 'gettextf']

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may as well put paste() and paste0() here? Maybe even format()?

Comment thread R/condition_call_linter.R Outdated
following-sibling::expr/STR_CONST
following-sibling::expr[
STR_CONST
or expr/SYMBOL_FUNCTION_CALL[text() = 'sprintf' or text() = 'gettextf']

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it's getting more complicated with the above suggestion, let's factor this out into something we can glue() in & share the logic

@MichaelChirico MichaelChirico left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to merge after addressing my small feedback. Thanks!

@Bisaloo
Bisaloo merged commit d3b0e34 into main Jul 26, 2025
@Bisaloo
Bisaloo deleted the condition_call_linter_sprintf branch December 1, 2025 14:59
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