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

fix nested tidy function call indentation #1948

Merged
merged 4 commits into from
Apr 4, 2023

Conversation

AshesITR
Copy link
Collaborator

@AshesITR AshesITR commented Apr 3, 2023

Fixes #1898

Works by adding a new indent_type "suppress", which allows XPaths to detect indentation changes that should be suppressed for the specified style.

In the particular case we suppress indent changes from parentheses that start on the same line as their enclosed expr and where the enclosed expr has only one child on the final line (namely its closing parenthesis).

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2023

Codecov Report

Merging #1948 (2ef0746) into main (c6099d5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

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

@@           Coverage Diff           @@
##             main    #1948   +/-   ##
=======================================
  Coverage   98.95%   98.95%           
=======================================
  Files         113      113           
  Lines        4953     4965   +12     
=======================================
+ Hits         4901     4913   +12     
  Misses         52       52           
Impacted Files Coverage Δ
R/indentation_linter.R 100.00% <100.00%> (ø)

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

@AshesITR
Copy link
Collaborator Author

AshesITR commented Apr 3, 2023

@IndrajeetPatil PTAL if this is an acceptable solution.

Copy link
Collaborator

@IndrajeetPatil IndrajeetPatil left a comment

Choose a reason for hiding this comment

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

Thanks! 🙌

@IndrajeetPatil IndrajeetPatil merged commit c9b3408 into main Apr 4, 2023
@AshesITR AshesITR deleted the fix/1898-multiline-hanging branch April 4, 2023 09:11
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.

indentation_linter() conflicts with {styler}
3 participants