Skip to content

Return early if there's nothing to lint #2202

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

Merged
merged 3 commits into from
Sep 21, 2023
Merged

Return early if there's nothing to lint #2202

merged 3 commits into from
Sep 21, 2023

Conversation

MichaelChirico
Copy link
Collaborator

Accidentally linted a directory where everything was excluded, leading to an error from txtProgressBar():

Error in txtProgressBar(max = length(files), style = 3L) : 
  must have 'max' > 'min'

Better to just skip running anything if there's nothing to lint.

@codecov-commenter
Copy link

Codecov Report

Merging #2202 (ff9080c) into main (f8fab18) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head ff9080c differs from pull request most recent head 2b6f59a. Consider uploading reports for the commit 2b6f59a to get more accurate results

@@           Coverage Diff           @@
##             main    #2202   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files         113      113           
  Lines        5155     5159    +4     
=======================================
+ Hits         5137     5141    +4     
  Misses         18       18           
Files Changed Coverage Δ
R/lint.R 98.90% <100.00%> (+0.01%) ⬆️

@IndrajeetPatil
Copy link
Collaborator

Just need to update NEWS here. Othewise, LGTM.

@MichaelChirico
Copy link
Collaborator Author

Nothing to update. This is really a regression after #2133. So it's a dev-only improvement.

@AshesITR AshesITR merged commit 945c2a2 into main Sep 21, 2023
@MichaelChirico MichaelChirico deleted the empty-lint branch September 21, 2023 04:40
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.

4 participants