Skip to content

Commit

Permalink
HVG always / never + CI update (#322)
Browse files Browse the repository at this point in the history
* HVG always / never

(cherry picked from commit 7f37aee)

* Make never / always optional

(cherry picked from commit 11bbc9a)

* Try updated CI

(cherry picked from commit e39572e)

* Fix scrubblet link

(cherry picked from commit 88feff8)

* Adds styler

(cherry picked from commit 6cee614)

* Make styler executable

(cherry picked from commit c8da52b)

* Use main instead of development

(cherry picked from commit 4494e90)

* Delete large test files
  • Loading branch information
pcm32 authored May 15, 2024
1 parent 8350493 commit 1161fdc
Show file tree
Hide file tree
Showing 7 changed files with 357 additions and 233 deletions.
36 changes: 36 additions & 0 deletions .github/styler.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env Rscript

library("argparse")
library("styler")

parser <- ArgumentParser(description = "Call styler")
parser$add_argument("dir",
metavar = "DIR", type = "character",
help = "File to parse"
)
parser$add_argument("--dry",
choices = c("off", "on"), default = "on"
)
args <- parser$parse_args()

file_info <- file.info(args$dir)
is_directory <- file_info$isdir

if (is_directory) {
captured_output <- capture.output({
result <- style_dir(args$dir, indent_by = 4, dry = args$dry, recursive = TRUE)
})
} else {
captured_output <- capture.output({
result <- style_file(args$dir, indent_by = 4, dry = args$dry)
})
}

n <- nrow(subset(result, changed == TRUE))
if (n > 0) {
if (args$dry == "off") {
print(paste("Changed", n, "files"))
} else {
stop(paste("Linting failed for", n, "files"))
}
}
185 changes: 0 additions & 185 deletions .github/workflows/deploy.yaml

This file was deleted.

Loading

0 comments on commit 1161fdc

Please sign in to comment.