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

with: attempt to simplify #35

Merged
merged 1 commit into from
Feb 11, 2022
Merged

Conversation

tomberek
Copy link
Contributor

@tomberek tomberek commented Feb 3, 2022

Reduces Nixpkgs diff by 10%.
With this and a few pending PRs:
24157 files changed, 1562119 insertions(+), 974518 deletions(-)

@kamadorueda
Copy link
Owner

Not too far from the right implementation

@kamadorueda
Copy link
Owner

The test that this does not pass is:

with xx; 
#comment 
expression

Because it will become:

with xx; 
#comment expression

There are a few examples in other rules on how to deal with this, basically you check if the previous thing was a comment, and if so, newline+pad, otherwise whitespace

@tomberek tomberek marked this pull request as ready for review February 7, 2022 03:44
src/rules/key_value.rs Outdated Show resolved Hide resolved
src/rules/with.rs Show resolved Hide resolved
tests/cases/with/out Show resolved Hide resolved
@kamadorueda kamadorueda merged commit c55a4f0 into kamadorueda:main Feb 11, 2022
@tomberek tomberek deleted the with_simplify branch February 11, 2022 04:10
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.

2 participants