[ENH] Add --diff option to show diff when running with --check#381
[ENH] Add --diff option to show diff when running with --check#381tdgroot wants to merge 5 commits intohukkin:masterfrom
Conversation
|
Thanks for submitting your first pull request! You are awesome! 🤗 |
|
Would be great to have this feature! 🚀 |
|
@hukkin any chance to get a review for this PR? :) |
|
Hi @tdgroot, thanks for contributing and sorry for the long wait!
I think you may find setting mdformat up with https://pre-commit.ci/ and pre-commit even more useful than this feature. The fixes would be automatically applied to PRs -> the contributor doesn't have to care about failures or bad formatting at all. Regardless, I've decided to accept this feature. Do you still want to work on this or should I continue from where you left? We should make |
|
Closes #268 |
|
Hi @hukkin, That's amazing! I'm not available to work on it this week, but I can update this PR next week I think. If that's taking too long for you, feel free to take my work and finish it :). |
|
@hukkin @Kristinita I finally updated the PR 😅 What do you think? |
We use
mdformatto validate Markdown formatting in a documentation project we're running. Most users are contributing to the documentation by creating changes, commits and pull requests from the Github UI, so they won't be running any linting/validation on commit. In this case, it would be very useful for those users to see whatmdformatis marking as "unformatted" and knowing what should be done to fix that.This was highly inspired by the implementation that Black uses, as it seems to doing just what we need.
Looking forward to your thoughts and review :).