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 an option to disable automatic code formatting #125

Open
tchung1118 opened this issue Jul 11, 2023 · 1 comment
Open

Add an option to disable automatic code formatting #125

tchung1118 opened this issue Jul 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@tchung1118
Copy link

Currently when you use the following patch:

@@
var x expression
@@
-x.Enabled(true)
+x.Enabled()

This automatically reformats the expression matched to x, and that could make a lot of unwanted changes. For example, if the original code looks like this:

a.Foo().Bar(bar)
    .Baz(baz)
    .Enabled(true)

The resulting code after applying the patch becomes a one-liner:

a.Foo().Bar(bar).Baz(baz).Enabled()

Adding an option to disable the automatic formatting of code when applying patches could be nice for cases like this. For example, with that option, the resulting code would look like this:

a.Foo().Bar(bar)
    .Baz(baz)
    .Enabled()
@sywhang sywhang added the enhancement New feature or request label Jul 11, 2023
@lhanjian
Copy link

It is necessary to reduce unnecessary diff generation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants