Skip to content

Extend library_call_linter for character.only usage - #2279

Merged
IndrajeetPatil merged 13 commits into
mainfrom
character_only
Nov 18, 2023
Merged

IndrajeetPatil merged 13 commits into
mainfrom
character_only

Conversation

@MichaelChirico

Copy link
Copy Markdown
Collaborator

Part of #884

Here I think the main question is whether this might be subsumed into library_call_linter().

@codecov-commenter

codecov-commenter commented Nov 14, 2023 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0dcd049) 99.64% compared to head (8a172a8) 99.64%.

❗ Current head 8a172a8 differs from pull request most recent head b95004b. Consider uploading reports for the commit b95004b to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2279   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files         115      115           
  Lines        5285     5331   +46     
=======================================
+ Hits         5266     5312   +46     
  Misses         19       19           

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

@MichaelChirico

Copy link
Copy Markdown
Collaborator Author

NB: holding off on adding examples until we decide whether this should be subsumed into library_call_linter().

@AshesITR

Copy link
Copy Markdown
Collaborator

I'm in favor of subsuming - the linter name contains library that way. Someone unfamiliar with character.only will probably wonder what character_only_linter() does.

@MichaelChirico

MichaelChirico commented Nov 16, 2023 •

Copy link
Copy Markdown
Collaborator Author

I'm in favor of subsuming - the linter name contains library that way. Someone unfamiliar with character.only will probably wonder what character_only_linter() does.

OK, done. Follow-up: Should either behavior (existing top-of-script enforcement vs. new character.only rules) be made optional with a parameter?

@MichaelChirico MichaelChirico changed the title New character_only_linter Extend library_call_linter for character.only usage Nov 16, 2023
Comment thread R/library_call_linter.R Resolved
@AshesITR

Copy link
Copy Markdown
Collaborator

For now, I wouldn't create an option unless we get a feature request. The intention of the two lints appears to be the same - getting a clean library() call list at the top of scripts.

Comment thread NEWS.md Resolved
Comment thread R/library_call_linter.R Resolved
Co-authored-by: Indrajeet Patil <[email protected]>
IndrajeetPatil
IndrajeetPatil previously approved these changes Nov 18, 2023
@IndrajeetPatil
IndrajeetPatil merged commit 6db80ee into main Nov 18, 2023
@IndrajeetPatil
IndrajeetPatil deleted the character_only branch November 18, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants