Skip to content

Commit

Permalink
Test to check that all linters are covered by tags
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Sep 6, 2024
1 parent 427fab3 commit 96ca194
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-linter_tags.R
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,11 @@ test_that("available_linters gives precedence to included tags", {
available_linters(tags = "deprecated", exclude_tags = NULL)
)
})

test_that("all non-deprecated linters are covered across tags", {
tags <- setdiff(available_tags(), "deprecated")
tagged_linters <- lapply(tags, function(tag) names(linters_with_tags(tag))) # nolint: undesirable_function_linter.
tagged_linters <- unique(unlist(tagged_linters))
all_linters <- names(all_linters())
expect_identical(sort(tagged_linters), sort(all_linters))
})

0 comments on commit 96ca194

Please sign in to comment.