styler icon indicating copy to clipboard operation
styler copied to clipboard

Default to styling all supported file types in `style_dir()` and `style_pkg()`?

Open IndrajeetPatil opened this issue 3 years ago • 3 comments
trafficstars

I am wondering if style_dir() and style_pkg() shouldn't style all supported file formats in the directory/package by default.

Is there any reason why the users may wish to format only code in .R files, but not in (e.g.) .Rmd files?

Current default:

filetype = c("R", "Rprofile")

Proposed default:

filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw")

IndrajeetPatil avatar Jul 18 '22 16:07 IndrajeetPatil

Yes. Also thought about it. Did not want to do that in the very beginning though, when formatting of non-R was experimental.

lorenzwalthert avatar Jul 18 '22 21:07 lorenzwalthert

Thanks; good to hear that you also feel the same way about this.

Should I make a PR then?

IndrajeetPatil avatar Jul 18 '22 21:07 IndrajeetPatil

This issue is also included in #769, although questionable if breaking or not. PR welcome yes.

lorenzwalthert avatar Jul 19 '22 10:07 lorenzwalthert