Replies: 1 comment 1 reply
-
|
As I already said, I don't plan to support that. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think linters and formatters being distinct makes a lot of sense, the problem is we do have autofix linters that blur this boundary.
There exist internal tooling in the world for huge code bases such as Phabricator's Arcanist that depends on the underlying linters and formatters having the ability to dry run, fmt --diff has this ability and it's excellent. The problem is run --fix doesn't have anything equivalent. The closest thing to this is the SuggestedFixes in the JSON printer, but that doesn't seem to be a supported usage either. It would be nice if there was a run --diff so internal tools can use it to apply suggested fixes one by one before submitting the change for review.
I appreciate it might be non-trivial to serially 3-way merge many changes to generate the diff, but looking at the code base, it appears to have some of this capability already. It's just a matter of introducing a flag and reporting the patch and any other conflicting changes that require manual intervention. Would @ldez consider this as a legitimate use case?
Beta Was this translation helpful? Give feedback.
All reactions