r-lib / styler

Non-invasive pretty printing of R code
https://styler.r-lib.org
Other
703 stars 70 forks source link

Improve stack trace styler throws on parse error #1216

Closed olivroy closed 1 month ago

olivroy commented 1 month ago

Progress towards #1116

For style_text() and the addins

Before image

This PR: image

for style_file() and friends

before image

This PR image

for style_dir()

On purpose, I malformed 2 files to have a feel of how many malformed files feel. It may be too verbose as many lines are there, but I would argue it is unlikely someone has multiple malformed files they want to style

image

github-actions[bot] commented 1 month ago

This is how benchmark results would change (along with a 95% confidence interval in relative change) if c6944ab9c4bbb89129965119451f0aba3d6bc379 is merged into main:

Further explanation regarding interpretation and methodology can be found in the documentation.