-
Notifications
You must be signed in to change notification settings - Fork 521
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
ENH: Require space and capital letter after colon in commit message first line #7341
base: hooks
Are you sure you want to change the base?
Conversation
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.
It appears that some of these enforcements are slightly different than what is actually being enforced as a GitHub status check prior to integration.
pattern: '^(ENH|PERF|BUG|STYLE|DOC|COMP): ([A-Z])+' |
pattern: '^[^#].{1,78}$' |
For example this file also states printErrorAndExit 'The first line must be at least 8 characters:
, but that is not included in the commit-message.yml.
I wonder if there is a better to way to keep the two areas in sync.
9459dc2
to
76a8484
Compare
76a8484
to
b4ae3a5
Compare
b4ae3a5
to
3e1545e
Compare
The pull-request has been rebased to include change recently integrated through: |
I agree with @jamesobutler that we would benefit from tighter integration between the sets of checks. If it isn't already, perhaps you could add that as an issue. Should we go ahead with this pull request? |
3e1545e
to
e0aea16
Compare
This latest push adds a check that both a space and a capital letter follow the colon. It also simplifies the |
e0aea16
to
23badf1
Compare
Note that the checks that the line length is at least 8 and at most 78 occur earlier in the code, but could be added here with if echo "$line" | egrep -qx '(BUG|COMP|DOC|ENH|PERF|STYLE): [A-Z].*' &&
echo "$line" | egrep -qx '.{8,78}'; then
# first line okay
... |
Enforce that there be (at least) one space after
BUG:
,COMP:
,DOC:
,ENH:
,PERF:
, orSTYLE:
at the start of the first line of a commit message.Current usage shows me the following counts in the
git log
for trailing spaces. In no cases were there 3 or more spaces.