Skip to content

Commit 9092498

Browse files
apply air to in files, then rename them to out and commit
this does not include all files since air failed for some files
1 parent 8b43fe2 commit 9092498

File tree

200 files changed

+2063
-1947
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+2063
-1947
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# List all input files recursively that end with "-in.R"
2+
input_files <- list.files(
3+
path = "tests/testthat",
4+
pattern = "-in\\.R$",
5+
recursive = TRUE,
6+
full.names = TRUE
7+
)
8+
9+
# Function to generate output filename by replacing -in.R with -out.R
10+
get_output_filename <- function(input_file) {
11+
gsub("-in\\.R$", "-out.R", input_file)
12+
}
13+
14+
# Process each file
15+
for (input_file in input_files) {
16+
output_file <- get_output_filename(input_file)
17+
18+
# Create directory for output file if it doesn't exist
19+
output_dir <- dirname(output_file)
20+
if (!dir.exists(output_dir)) {
21+
dir.create(output_dir, recursive = TRUE)
22+
}
23+
24+
# Read input file and write to output file
25+
file.copy(input_file, output_file, overwrite = TRUE)
26+
27+
# Print status
28+
cat(sprintf("Processed: %s -> %s\n", input_file, output_file))
29+
}
30+
31+
cat(sprintf("\nProcessed %d files\n", length(input_files)))
Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
c(
2-
"x", "z",
3-
"cgjhg", "thi", "z"
2+
"x",
3+
"z",
4+
"cgjhg",
5+
"thi",
6+
"z"
47
)
58

6-
79
c(
8-
"x", "z",
9-
"cgjhg", "thi", "z"
10+
"x",
11+
"z",
12+
"cgjhg",
13+
"thi",
14+
"z"
1015
)
1116

12-
1317
c(
14-
"x", "y", "z", "m", "n", "o", "p",
15-
"c", "d"
18+
"x",
19+
"y",
20+
"z",
21+
"m",
22+
"n",
23+
"o",
24+
"p",
25+
"c",
26+
"d"
1627
)
Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,27 @@
11
# aligned
2-
function(x = NULL,
3-
tt = NULL,
4-
ayz = NULL) {}
5-
2+
function(x = NULL, tt = NULL, ayz = NULL) {
3+
}
64

75
# aligned
8-
k <- function(x = NULL,
9-
aq = NULL,
10-
ayz = NULL) {}
11-
6+
k <- function(x = NULL, aq = NULL, ayz = NULL) {
7+
}
128

139
# aligned, eq right
14-
function(x = 2,
15-
tt = 1,
16-
ayz = 99) {}
10+
function(x = 2, tt = 1, ayz = 99) {
11+
}
1712

1813
# aligned, eq left
19-
function(x = 2,
20-
tt = 1,
21-
ayz = 99) {}
22-
14+
function(x = 2, tt = 1, ayz = 99) {
15+
}
2316

2417
# not aligned
25-
k <- function(x = fish,
26-
aq = 21,
27-
ayz = t(322)) {}
18+
k <- function(x = fish, aq = 21, ayz = t(322)) {
19+
}
2820

2921
# aligned
30-
k <- function(x = flus(we),
31-
aq = x - 22, k = 22,
32-
ayz = m(jk5), xfea = 3) {}
33-
22+
k <- function(x = flus(we), aq = x - 22, k = 22, ayz = m(jk5), xfea = 3) {
23+
}
3424

3525
# aligned
36-
k <- function(x = flus(we),
37-
aq = x - 22, k = 22,
38-
ayz = m(jk5), xfea = 3) {}
26+
k <- function(x = flus(we), aq = x - 22, k = 22, ayz = m(jk5), xfea = 3) {
27+
}

0 commit comments

Comments
 (0)