Commit Graph

24 Commits

Author SHA1 Message Date
Augie Fackler
cde5195cd5 contrib: fix check-commit to not reject commits from hg sign and hg tag
I'm tired of having a spurious red build every time we do a
release. Fix it once and for all.
2017-01-18 23:34:35 -05:00
Mathias De Maré
ffcbeb8c14 check-commit: allow underscore as commit topic
It's currently not possible to commit with a changeset topic
like 'bash_completion'. This change fixes that.
2016-10-05 15:28:34 +02:00
Augie Fackler
127114bb19 check-commit: allow underbars in cffi_-prefix function names
It seems reasonable to give cffi functions slightly more verbose names
in some circumstances, given the way they interface with C.
2016-08-05 17:27:51 -04:00
Pulkit Goyal
549af99ee9 py3: make contrib/check-commit use print_function 2016-05-13 02:13:14 +05:30
Pulkit Goyal
83f98391f1 py3: make contrib/check-commit use absolute_import 2016-05-13 02:11:57 +05:30
FUJIWARA Katsunori
ae585f8a5f check-commit: omit whitespace
This is fixing for 'no whitespace around = for named parameters'
check-code rule.

check-code has overlooked this, because a file isn't recognized as one
to be checked (this problem is fixed by subsequent patch).
2016-02-10 22:44:28 +09:00
FUJIWARA Katsunori
41a375be1e check-commit: wrap too long line
This is fixing for 'line too long' check-code rule.

check-code has overlooked this, because a file isn't recognized as one
to be checked (this problem is fixed by subsequent patch).
2016-02-10 22:44:28 +09:00
Matt Mackall
9b78d1a779 check-commit: check for double-addition of blank lines
Previously, we were only checking for a blank line being added next to
an existing one. Now we also check for two being added at the same time.
2016-02-05 16:54:01 -06:00
Matt Mackall
925e4d9b93 check-commit: scan for multiple instances of error patterns 2016-02-05 16:52:02 -06:00
timeless
6128260f9d check-commit: sort errors by line number 2016-01-12 08:34:38 +00:00
timeless
f4c0ab7d00 check-commit: try to fix multiline handling
The old code did not understand the difference between the first line of the summary,
and a random line in the summary that happened to include a #, or a
random line in the changes that happened to include it.

7c3798ffdc0c is an example where it fails
2016-01-12 08:50:15 +00:00
timeless
c4f6fb8fc2 check-commit: support REVs as commandline arguments
usage:
* HG_NODE=REV check-commit
* hg export REV | check-commit
* check-commit REV ...
2016-01-07 01:28:59 +00:00
timeless
971508cd4e check-commit: modularize 2016-01-07 00:55:45 +00:00
timeless
149f294053 check-commit: fix summary length regexp 2016-01-07 03:58:40 +00:00
Matt Mackall
9b87c36795 check-commit: try to curb bad commit summary keywords
The goal of commit summary keywords is to help us sort, categorize,
and filter our voluminous commits for our release notes in a way
that's helpful and meaningful to end users. Lately, there have been a
huge number of "keywords" that are neither words nor particularly key.

This patch tries to discourage that by narrowing the allowed
characters to alphanumeric. In particular, it doesn't allow "."
(method, function names, and file extensions) and "/" (filenames). It
also gives a short reminder of what a keyword ought to be.
2015-12-10 12:56:23 -06:00
Pierre-Yves David
f954beb8e9 check-commit: remove confusion between summary line and other headers
The pull url header can easily grow over 80 chars. The check-commit script was
confusing this with a too long summary line. We update the regular expression to
not match other header.
2015-11-06 17:27:42 -05:00
Matt Mackall
5e1b4ad958 urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Yuya Nishihara
a0be3c41c2 check-commit: catch both patterns of double empty lines 2015-06-21 15:18:49 +09:00
Gregory Szorc
61c827dff1 check-commit: make foo_bar naming regexp less greedy
\s is equivalent to the character class [ \t\n\r\f\v]. Using \s+ in
a regular expression against input with multiple lines may match across
multiple lines.

For the regexp in question, "\+\s+" would match "+\n " and similar
sequences, leading to false positives for functions that were included
in diff context, after a modified hunk.
2015-05-31 17:41:35 -07:00
Augie Fackler
6d36eeacda check-commit: print limit when user has a too-long summary 2015-05-18 11:36:33 -04:00
Pierre-Yves David
812e82cf4f check-commit: be more picky about detection of wrong bug tag
The check-commit script search for "bug" withing bracket and ask people to use
(issueXXXX) instead. The test was too wide and matching any "(+b+u+g"sequence.
2015-04-12 14:54:53 -04:00
Eric Sumner
13daa0c8fd check-commit: check capitalization in summary lines
At the moment, check-commit will complain about the topic being capitalized,
but not the summary that comes after it.  This diff corrects that deficiency.
2015-02-05 14:09:08 -08:00
Matt Mackall
c16790ef08 check-commit: spot growing whitespace
We discourage PEP-8-style double blank lines, spot them creeping in.
2014-08-07 14:57:20 -05:00
Matt Mackall
aeec96d347 contrib: add check-commit hook script to sanity-check commits 2014-08-06 02:45:55 -05:00