-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from albersonmiranda/dev
docs: Empty URL in README
- Loading branch information
Showing
5 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# CRAN requires that URLs in the documentation are valid and not empty, including badges | ||
test_that("No empty URLs in markdown files", { | ||
# Specify the path to the package directory | ||
package_path <- file.path(c(".", "man")) # Adjust this if your tests directory is nested | ||
|
||
# Find all documentation files in the package directory | ||
files <- list.files(package_path, pattern = "\\.Rmd$|\\.md$|\\.Rd$", recursive = TRUE, full.names = TRUE) | ||
|
||
# Check each markdown file for empty URLs | ||
for (file in files) { | ||
empty_urls <- check_empty_urls(file) | ||
|
||
# Expect no empty URLs in the file | ||
expect_length(empty_urls, 0) | ||
} | ||
}) |