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

Update compare_branches not to fail when one branch errors in some cases #1962

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MichaelChirico
Copy link
Collaborator

Erroring on main is a good way to suss out new logic errors, but erroring on the old branch is mostly an annoyance.

lints <- as.data.frame(lint_dir(package, linters = linters, parse_settings = FALSE)),
{
# Don't fail out if one branch exhibits errors (e.g. if the new version fixes a known error)
lints <- tryCatch(lint_dir(package, linters = linters, parse_settings = FALSE), error = identity)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are already within a withCallingHandlers() block so you could just add an error handler?

@MichaelChirico MichaelChirico added internals Issues related to inner workings of lintr, i.e., not user-visible testing labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Issues related to inner workings of lintr, i.e., not user-visible testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants