-
Notifications
You must be signed in to change notification settings - Fork 308
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
meta: add cap diff check #950
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leighmcculloch
commented
May 25, 2021
leighmcculloch
commented
May 25, 2021
marcelosalloum
previously approved these changes
May 25, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
MonsieurNicolas
requested changes
May 26, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A few questions and suggestions
This was referenced May 26, 2021
leighmcculloch
added a commit
that referenced
this pull request
May 28, 2021
Replace CRLF line endings with LF line endings. This is the only CAP in the repo that has CRLF line endings. Consistency would make some things easier. Folks on Windows can configure their git to autocrlf as needed for their workflows without introducing CRs upstream. This was discovered in #950.
MonsieurNicolas
approved these changes
May 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Add a GitHub Action that check the diffs in CAPs are valid.
Why
On a few occasions diffs have been committed that are corrupt. This is usually discovered by someone consuming the diff, and not by the person publishing the diff. This consumes that other persons time, as they need to debug the diff. Diffs are fiddly and it's easy for copy paste errors to occur, or stray characters, or missing new lines at the end to result in a corrupt diff. Instructions introduced in 9b0d752 should help us generate good diffs, but this check will catch the corrupt diffs when the author is submitting them, before someone else is consuming them.
Some of the existing CAPs were easy to update to pass the check. Others not, some just don't seem to apply cleanly to any version as far as I could see, which is the type of situation this check will prevent. For those cases I added a parameter to ignore them for the moment until their authors can fix them.
This GitHub Action uses a tool that I wrote,
mddiffcheck
, which lives at https://github.com/stellar/mddiffcheck. It took more effort than I expected or planned to give to it to write the tool, but it is done now.Close #893