Closed jonkeane closed 3 years ago
@jonkeane can you try #830 and tell me if it works for you?
Yup, that works! Thanks for the quick turn around on this
@jonkeane I am glad {styler} can help you guys out in {arrow}. Let me know if you have further questions or find more bugs 😊. You can also see the third-party integrations that {styler} has, e.g. with pre-commit that your repo is already using. These can also be enforced with https://pre-commit.ci, but R {precommit} is not there yet, so a manual GitHub actions workflow would be needed (like 10 lines of config, can assist here also) . There are also hooks for lintr etc.
Thanks for those pointers. The Arrow project has a comment-based system for auto-formatting like this, which we setup styler to be a part of to match that style/workflow that Arrow developers are used to.
I will definitely look in to pre-commits for other projects though!
In some circumstances, styler will delete the line
# nolint end
afterexamplesIf
. The two critical bits I needed to trigger it are: a%>%
in the example and a function definition below. Without either of those I get behavior where the line is either kept as is or transformed into#' # nolint end
.author: jkeane date: 2021-08-03 output: "reprex::reprex\_document" title: drear-kitty_reprex.R
Created on 2021-08-03 by the reprex package (v2.0.0)