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 delta view to taplo-cli #301

Merged
merged 10 commits into from
Aug 19, 2022
Merged

add delta view to taplo-cli #301

merged 10 commits into from
Aug 19, 2022

Conversation

drahnr
Copy link
Contributor

@drahnr drahnr commented Aug 15, 2022

It's not uncommon to use a formatter in CI where a subset of contributors do not have the tool installed. That set of contributors is usually very appreciative of direct cues what to fix.

The changes:

Adds a dependency to prettydiff and ansi_term for creating the diff and coloring, there is currently (almost) no clustering of diff lines, this is to be improved.

crates/taplo-cli/src/commands/format.rs Outdated Show resolved Hide resolved
@tamasfe
Copy link
Owner

tamasfe commented Aug 16, 2022

I think this could be gated behind a flag like --diff as this can get very verbose, looks good otherwise, thanks!

@drahnr
Copy link
Contributor Author

drahnr commented Aug 18, 2022

Added --diff flag, both for --check and non-check. Introduced a scope macro echo! that utilizes self.env. I think it's ready for another review pass :)

@tamasfe
Copy link
Owner

tamasfe commented Aug 19, 2022

Looks great, thank you!

@tamasfe tamasfe merged commit c3fa44b into tamasfe:master Aug 19, 2022
@tamasfe tamasfe mentioned this pull request Aug 27, 2022
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