From 15b20f88daa0af8e007eee7779183d0d43a8fe3c Mon Sep 17 00:00:00 2001 From: Serene-Arc <33189705+Serene-Arc@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:58:29 +1000 Subject: [PATCH] Add section to README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 14bcc1d..a68a196 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,20 @@ to [![R source code after reformatting](https://db.yihui.org/imgur/TBZm0B8.png)](https://yihui.shinyapps.io/formatR/) + +## Pre-commit Hook + +formatR is available as a pre-commit hook. The following arguments are available: + +``` +Options: + --no-comments Remove comments. + --no-blanks Remove blank lines. + --arrow If given, arrows will not be substituted for = signs. + --pipe If given, pipes will not be changed. + --brace-newline If given, braces will not be put on new lines. + --indent=INDENT Number of indents. [default: 4] + --no-wrap Skip wrapping the text. + --width-cutoff=WIDTH Text width cutoff. [default: 80] + --args-newline If TRUE, arguments are started on a new line after a function call. [default: FALSE] +```