Skip to content

Commit

Permalink
do not restrict apps that contain shinycoreci in their apps
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Sep 10, 2024
1 parent 4d6c928 commit ef06e52
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions inst/gha/validate-test-files.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ for (app_path in list.dirs("inst/apps", recursive = FALSE)) {
}
}

# Make sure shinycoreci is not used within an app
for (file in dir(app_path, recursive = TRUE, full.names = TRUE, pattern = "\\.(R|Rmd)$")) {
# Ignore first 000 apps
if (grepl("^inst/apps/000-", file)) next
# # Make sure shinycoreci is not used within an app
# for (file in dir(app_path, recursive = TRUE, full.names = TRUE, pattern = "\\.(R|Rmd)$")) {
# # Ignore first 000 apps
# if (grepl("^inst/apps/000-", file)) next

file_lines <- readLines(file)
if (any(grepl("shinycoreci)", file_lines, fixed = TRUE))) {
stop("File `", file, "` contains library() or require() call to {shinycoreci}. Remove usage of {shinycoreci}.")
}
file_lines <- gsub("shinycoreci::::", "shinycoreci____", file_lines)
if (any(grepl("shinycoreci::", file_lines, fixed = TRUE))) {
stop("File `", file, "` contains usage of {shinycoreci}. Replace this code.")
}
}
# file_lines <- readLines(file)
# if (any(grepl("shinycoreci)", file_lines, fixed = TRUE))) {
# stop("File `", file, "` contains library() or require() call to {shinycoreci}. Remove usage of {shinycoreci}.")
# }
# file_lines <- gsub("shinycoreci::::", "shinycoreci____", file_lines)
# if (any(grepl("shinycoreci::", file_lines, fixed = TRUE))) {
# stop("File `", file, "` contains usage of {shinycoreci}. Replace this code.")
# }
# }
}, error = function(e) {
errors_found[[length(errors_found) + 1]] <<- e
})
Expand Down

0 comments on commit ef06e52

Please sign in to comment.