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

If function declarations are double indented, leave it #1083

Merged
merged 8 commits into from
Dec 30, 2022
Merged

Conversation

lorenzwalthert
Copy link
Collaborator

Closes #845.

@github-actions
Copy link
Contributor

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

  •   :ballot_box_with_check:cache_applying: 64.6ms -> 64.9ms [-1.9%, +2.68%]
  •   :ballot_box_with_check:cache_recording: 1.12s -> 1.12s [-2.68%, +1.53%]
  •   :ballot_box_with_check:without_cache: 2.66s -> 2.66s [-1.25%, +1.36%]

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2022

Codecov Report

Merging #1083 (5b252a0) into main (0b34e99) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 5b252a0 differs from pull request most recent head 4487728. Consider uploading reports for the commit 4487728 to get more accurate results

@@            Coverage Diff             @@
##             main    #1083      +/-   ##
==========================================
- Coverage   91.10%   91.07%   -0.04%     
==========================================
  Files          46       46              
  Lines        2699     2711      +12     
==========================================
+ Hits         2459     2469      +10     
- Misses        240      242       +2     
Impacted Files Coverage Δ
R/rules-indention.R 100.00% <100.00%> (ø)
R/rules-line-breaks.R 100.00% <100.00%> (ø)
R/roxygen-examples-find.R 93.33% <0.00%> (-6.67%) ⬇️

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

@github-actions
Copy link
Contributor

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

  •   :ballot_box_with_check:cache_applying: 43.4ms -> 43.5ms [-0.19%, +0.87%]
  •   :ballot_box_with_check:cache_recording: 748ms -> 750ms [-0.31%, +0.97%]
  •   :ballot_box_with_check:without_cache: 1.77s -> 1.78s [-0.09%, +0.91%]

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 cb09801 is merged into main:

  •   :ballot_box_with_check:cache_applying: 46.9ms -> 46.4ms [-3.25%, +1.22%]
  •   :ballot_box_with_check:cache_recording: 793ms -> 793ms [-1.28%, +1.26%]
  •   :ballot_box_with_check:without_cache: 1.9s -> 1.9s [-0.46%, +1.18%]

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 0b34e99 is merged into main:

  •   :ballot_box_with_check:cache_applying: 44ms -> 43.9ms [-0.82%, +0.33%]
  •   :ballot_box_with_check:cache_recording: 763ms -> 762ms [-0.5%, +0.34%]
  •   :ballot_box_with_check:without_cache: 1.82s -> 1.83s [-0.46%, +0.95%]

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

R/rules-indention.R Outdated Show resolved Hide resolved
lorenzwalthert and others added 2 commits December 30, 2022 19:01
Co-authored-by: Indrajeet Patil <patilindrajeet.science@gmail.com>
@IndrajeetPatil
Copy link
Collaborator

@lorenzwalthert Overall looks good to me.

I just had one comment.

Currently, as seen in one of the test cases, the following code

function(a =
           b,
         f =
           d, c =
           3, d =
           4) {

}

is styled to

function(a =
           b,
         f =
           d, c =
           3, d =
           4) {

}

Shouldn't it instead be styled to?

function(a =
           b,
         f =
           d, 
         c =
           3, 
         d =
           4) {

}

Or is the advice of one argument per line here relevant only when the arguments are long?

@github-actions
Copy link
Contributor

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

  •   :ballot_box_with_check:cache_applying: 45.7ms -> 45.4ms [-1.8%, +0.49%]
  •   :ballot_box_with_check:cache_recording: 788ms -> 787ms [-0.42%, +0.24%]
  • ❗🐌without_cache: 1.87s -> 1.87s [+0.09%, +0.7%]

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

@lorenzwalthert
Copy link
Collaborator Author

Or is the advice of one argument per line here relevant only when the arguments are long?

I don't know. Probably it's meant to be one argument per line or all arguments on one line. But I think this has not really to do with the PR directly, so if you care about it, I suggest to open a new issue.

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.

Decide and implement double indent for function definitions
3 participants