Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test to check that all linters are covered by tags #2660

Merged
merged 4 commits into from
Sep 7, 2024

Conversation

IndrajeetPatil
Copy link
Collaborator

No description provided.


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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output length is going to be different across tags, so not sure how to use vapply() instead of lapply().

@AshesITR
Copy link
Collaborator

AshesITR commented Sep 7, 2024

This test could work by just looking at the tags column of available_linters().
INM this is equivalent to all(lengths(available_linters()$tags) > 0L).

@IndrajeetPatil
Copy link
Collaborator Author

all(lengths(available_linters()$tags) > 0L)

That's much cleaner! Thanks.

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.95%. Comparing base (f0d9407) to head (03986c2).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2660      +/-   ##
==========================================
- Coverage   97.96%   97.95%   -0.02%     
==========================================
  Files         126      126              
  Lines        5760     5766       +6     
==========================================
+ Hits         5643     5648       +5     
- Misses        117      118       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IndrajeetPatil IndrajeetPatil merged commit 6fe75dc into main Sep 7, 2024
21 checks passed
@IndrajeetPatil IndrajeetPatil deleted the test-linters-tags branch September 7, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants