Skip to content

Gather all failures in roxygen_test.R#3012

Open
MichaelChirico wants to merge 4 commits intomainfrom
ci-roxy-test
Open

Gather all failures in roxygen_test.R#3012
MichaelChirico wants to merge 4 commits intomainfrom
ci-roxy-test

Conversation

@MichaelChirico
Copy link
Collaborator

Closes #2931. Co-written with Gemini.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (e6b2834) to head (0a0da18).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3012   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files         128      128           
  Lines        7288     7288           
=======================================
  Hits         7232     7232           
  Misses         56       56           

☔ 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.

Copy link
Collaborator

@Bisaloo Bisaloo left a comment

Choose a reason for hiding this comment

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

Thanks, I think it's a helpful change! I left two minor comments.

Would it be worth testing it in another PR before merging?

Comment on lines 82 to 85
all_locales_passed <- TRUE
for (LOCALE in c("C", "en_US.utf8", "hu_HU.utf8", "ja_JP.utf8")) {
check_roxygenize_idempotent(LOCALE)
all_locales_passed <- check_roxygenize_idempotent(LOCALE) && all_locales_passed
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The switch between looking at "what failed" in check_roxygenize_idempotent() vs "what passed" here is not the most straightforward to resonate about IMO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea I think that's me being too cute to save 2 lines.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, sorry, I wasn't clear. I think what you changed was perfectly reasonable.

I highlighted the fact we use any_failed inside check_roxygenize_idempotent() to all_locales_passed outside. It requires some mental gymnastics when thinking about the code, to make the boolean negation.

I would use all_passed (rather than any_failed) inside check_roxygenize_idempotent() or any_locale_failed in the for loop here.

Does this make sense?

(More generally, and slightly off-topic, I would likely generally consider that using ! in an return() is likely a code smell for readability. Maybe a linter could make sense.)

@MichaelChirico
Copy link
Collaborator Author

Would it be worth testing it in another PR before merging?

Good idea! I'd tested locally, but it's good for transparency to have it in the public logs. #3013

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.

roxygen_test should gather all failures and report them as a block

2 participants