Fixes#48
now with logic to detect GITHUB_SHA env variable, let's do a run without
the `-range` flag so that path lights up.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
For now, we'll leave travis, since we have logic for it. Once Travis
stops working, then we'll remove the logic and the ./.travis.yml
Fixes#50
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
When using `git log`, if some/all commits are gpg-signed, git will
automatically try to validate the signatures by default. This results
in printing additional text. This additional gpg-validation text is
then incorrectly interpreted by `git-validate` as if they were commit
IDs. Fix the problem by using the `rev-list` sub-command which will
ONLY list the IDs.
Signed-off-by: Chris Evich <cevich@redhat.com>
Ref: https://github.com/vbatts/git-validation/pull/43#issuecomment-530467954
golang.org/x/sys as of fde4db37ae7ad8191b03d30d27f258b5291ae4e3 uses
`math/bits`, so it does not support go1.7 and go1.8
I could set that in the go.mod, but those old versions do not support
that. I could ./vendor/ but perhaps no one is even using this tool on
these old golang versions. Choices. choices.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This is useful when you want to append additional elements to the env
var in the fasion of `PATH=$PATH:/things`.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Since golint has changed url, and older go can't even install it, it
requires some silliness to install and only check when it's the newer
go1.11
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Fixes: #30
now you can add a regular expression to the rules to be run
i.e. `git-validation -run "dco,message_regexp='^JIRA-[0-9]+ [A-Z].*$'"`
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Avoid golint's:
rules/danglingwhitespace/rule.go:22:1: exported function ValidateDanglingWhitespace should have comment or be unexported
Signed-off-by: W. Trevor King <wking@tremily.us>
Before this commit:
$ ./git-validation -run DCO -range HEAD^^..foo
2017/03/21 13:00:30 exit status 128
With this commit:
$ ./git-validation -run DCO -range HEAD^^..foo
ERRO[0000] [git] cmd: "git --no-pager log --no-merges --pretty=format:%H HEAD^^..foo"
2017/03/21 13:16:43 exit status 128
You can get similar output with -D, but folks are unlikely to set that
in production. With the new error logs, Travis output and similar is
more likely to contain some useful information.
Signed-off-by: W. Trevor King <wking@tremily.us>