jonkeane commented on a change in pull request #10879:
URL: https://github.com/apache/arrow/pull/10879#discussion_r682934907
##########
File path: r/Makefile
##########
@@ -19,7 +19,13 @@ VERSION=$(shell grep ^Version DESCRIPTION | sed s/Version:\
//)
ARROW_R_DEV="TRUE"
ARROW_LARGE_MEMORY_TESTS=$(ARROW_R_DEV)
-doc:
+style:
+ R -s -e 'setwd(".."); if (requireNamespace("styler"))
styler::style_file(setdiff(system("git diff --name-only | grep r/.*R$$", intern
= TRUE), c("r/tests/testthat/latin1.R", "r/data-raw/codegen.R")))'
+
+style-all:
+ R -s -e 'styler::style_file(setdiff(dir(pattern = "R$$", recursive =
TRUE), c("tests/testthat/latin1.R", "data-raw/codegen.R")))'
Review comment:
We don't have to do this here, but given all where we are putting them,
I wonder if we want to make (or investigate if this exists in styler
already...) a file in r/arrow that specifies which files are no-style so we
only have one place we need it
##########
File path: r/Makefile
##########
@@ -19,7 +19,13 @@ VERSION=$(shell grep ^Version DESCRIPTION | sed s/Version:\
//)
ARROW_R_DEV="TRUE"
ARROW_LARGE_MEMORY_TESTS=$(ARROW_R_DEV)
-doc:
+style:
+ R -s -e 'setwd(".."); if (requireNamespace("styler"))
styler::style_file(setdiff(system("git diff --name-only | grep r/.*R$$", intern
= TRUE), c("r/tests/testthat/latin1.R", "r/data-raw/codegen.R")))'
+
+style-all:
+ R -s -e 'styler::style_file(setdiff(dir(pattern = "R$$", recursive =
TRUE), c("tests/testthat/latin1.R", "data-raw/codegen.R")))'
Review comment:
Turns out styler doesn't have this, though they are considering ways to
do it. https://github.com/r-lib/styler/issues/319
We could add our own and "just" source that file that lists the files we
want to skip so that we only have to list them once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]