dangling-whitespace: rule for trailing spaces#7
Merged
Conversation
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
6aaeab1 to
36f7998
Compare
| } | ||
|
|
||
| func ValidateDanglingWhitespace(c git.CommitEntry) (vr validate.Result) { | ||
| diff, err := git.Show(c["commit"]) |
Contributor
There was a problem hiding this comment.
If you don't save the diff for reuse between multiple validators, I think it would be faster (no need to serialize the whole diff) and less work in this repo (no need to parse the diff or formulate an error message) to use git show --check {commit} (like opencontainers/runtime-spec@bdaf4467e, .tools: Run git show --check ... on each commit, 2015-09-12, opencontainers/runtime-spec#182).
Owner
Author
There was a problem hiding this comment.
good idea. I'll add a method for check and switch to that instead.
wking
added a commit
to wking/opencontainer-runtime-spec
that referenced
this pull request
Apr 12, 2016
With: $ sed -i 's/[[:space:]]*$//' README.md fixing some trailing whitespace that snuck in with ca0803d (Additional language for conformance statement, 2016-04-06, opencontainers#374). Future occurrences should be caught by git-validation, which checks for whitespace issues since [1,2]. [1]: vbatts/git-validation#7 [2]: vbatts/git-validation#9 Signed-off-by: W. Trevor King <wking@tremily.us>
This was referenced Apr 12, 2016
Mashimiao
pushed a commit
to Mashimiao/specs
that referenced
this pull request
Aug 19, 2016
With: $ sed -i 's/[[:space:]]*$//' README.md fixing some trailing whitespace that snuck in with ca0803d (Additional language for conformance statement, 2016-04-06, opencontainers#374). Future occurrences should be caught by git-validation, which checks for whitespace issues since [1,2]. [1]: vbatts/git-validation#7 [2]: vbatts/git-validation#9 Signed-off-by: W. Trevor King <wking@tremily.us>
This file contains hidden or 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
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.
Signed-off-by: Vincent Batts vbatts@hashbangbash.com