Closed campoy closed 8 years ago
You could make CI run embedmd
on all Markdown files in the repo, and fail if there any diffs generated.
I do something like that in markdownfmt
repo, where the CI will fail if the README has formatting issues.
I'm planning on adding an embedmd -d
function that will help me with this.
Trying to decide if it should call the diff
command as gofmt
does, or if there's a good library for this.
Trying to decide if it should call the
diff
command asgofmt
does, or if there's a good library for this.
Let me know what you find, because I'd love to replace mine with a pure Go alternative as well.
I've looked in the past, and did not find a complete replacement for diff -u file1 file2
. There are Go diffing libraries (e.g., github.com/mb0/diff, github.com/sergi/go-diff/diffmatchpatch, etc.) that could be used as the basic building blocks though.
Change-Id: Iebeed747e92b454542cf222fa58aa4f72b00aa4d