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

Add {lintr} precommit hook and remove existing lints #1064

Merged
merged 14 commits into from
Nov 23, 2022

Conversation

IndrajeetPatil
Copy link
Collaborator

Closes #1055

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2022

Codecov Report

Merging #1064 (81d100e) into main (8a63d95) will increase coverage by 0.01%.
The diff coverage is 90.74%.

@@           Coverage Diff           @@
##             main    #1064   +/-   ##
=======================================
  Coverage   91.05%   91.06%           
=======================================
  Files          46       46           
  Lines        2682     2685    +3     
=======================================
+ Hits         2442     2445    +3     
  Misses        240      240           
Impacted Files Coverage Δ
R/io.R 88.67% <0.00%> (ø)
R/testing.R 66.66% <33.33%> (ø)
R/relevel.R 49.29% <75.00%> (ø)
R/utils-navigate-nest.R 81.48% <83.33%> (ø)
R/communicate.R 94.44% <100.00%> (ø)
R/detect-alignment-utils.R 97.18% <100.00%> (ø)
R/detect-alignment.R 97.80% <100.00%> (ø)
R/environments.R 100.00% <100.00%> (ø)
R/indent.R 100.00% <100.00%> (ø)
R/nest.R 100.00% <100.00%> (ø)
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@IndrajeetPatil IndrajeetPatil changed the title Add {lintr} precommit hook Add {lintr} precommit hook and remove existing lints Nov 21, 2022
@github-actions
Copy link
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 8a63d95 is merged into main:

  •   :ballot_box_with_check:cache_applying: 26.7ms -> 26.8ms [-0.25%, +1.17%]
  •   :ballot_box_with_check:cache_recording: 824ms -> 826ms [-0.49%, +0.79%]
  •   :ballot_box_with_check:without_cache: 2.07s -> 2.08s [-0.41%, +0.85%]

Further explanation regarding interpretation and methodology can be found in the documentation.

@github-actions
Copy link
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 8a63d95 is merged into main:

  •   :ballot_box_with_check:cache_applying: 36.5ms -> 36.9ms [-1.77%, +4.08%]
  •   :ballot_box_with_check:cache_recording: 1.18s -> 1.18s [-0.93%, +1.08%]
  •   :ballot_box_with_check:without_cache: 2.96s -> 2.96s [-0.89%, +0.62%]

Further explanation regarding interpretation and methodology can be found in the documentation.

@lorenzwalthert
Copy link
Collaborator

if you don't want to keep pushing and waiting, just run pre-commit run lintr locally as explained in the CI vignette and the pre-commit docs.

@IndrajeetPatil
Copy link
Collaborator Author

Thanks. This PR needs to wait until #1065 is resolved.

@IndrajeetPatil
Copy link
Collaborator Author

@lorenzwalthert Any ideas what this error is about?

Error in `precommit::roxygenize_with_cache()`:
! invalid 'expand' argument
Backtrace:1. └─precommit::roxygenize_with_cache(key = wd, dirs = path_relative_cache)
 2.   └─rlang::abort(conditionMessage(out))

@lorenzwalthert
Copy link
Collaborator

ugh... No, I don't know.

@IndrajeetPatil
Copy link
Collaborator Author

I think I figured out what was causing the issue. Let's see if the builds pass now.

@github-actions
Copy link
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 8a63d95 is merged into main:

  •   :ballot_box_with_check:cache_applying: 23.7ms -> 23.7ms [-0.74%, +0.49%]
  •   :ballot_box_with_check:cache_recording: 720ms -> 718ms [-0.57%, +0.04%]
  •   :ballot_box_with_check:without_cache: 1.81s -> 1.81s [-0.8%, +0.99%]

Further explanation regarding interpretation and methodology can be found in the documentation.

@lorenzwalthert
Copy link
Collaborator

Glad you found the issue. Is that relevant for the CRAN version in any way? Ie could the user get the same an error?

@IndrajeetPatil
Copy link
Collaborator Author

No, no, I had messed up some code while working on the PR, and that's why it was failing. All good now.

@IndrajeetPatil IndrajeetPatil merged commit be75da3 into main Nov 23, 2022
@IndrajeetPatil IndrajeetPatil deleted the 1055_lintr_precommit branch November 23, 2022 07:38
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.

Add {lintr} pre-commit hook
3 participants