diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2014-04-18 21:55:56 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2014-04-18 21:55:56 -0700 |
commit | 06637c4215d55c57517739214c6e0fd6f8f53914 (patch) | |
tree | 4830b91d101d2b53efd0e0d4ebda97844cdfe199 /bin | |
parent | Update RELEASE-NOTES (diff) | |
download | portage-06637c4215d55c57517739214c6e0fd6f8f53914.tar.gz portage-06637c4215d55c57517739214c6e0fd6f8f53914.tar.bz2 portage-06637c4215d55c57517739214c6e0fd6f8f53914.zip |
repoman: Add DESCRIPTION.puntuation check (bug #438976)
Basic patch supplied by Michael Orlitzky.
Modified to be easier to add/remove puntuation to the check.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/repoman | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman index 888892b30..17a4ef0cc 100755 --- a/bin/repoman +++ b/bin/repoman @@ -318,6 +318,7 @@ qahelp = { "LICENSE.missing": "Ebuilds that have a missing or empty LICENSE variable", "LICENSE.virtual": "Virtuals that have a non-empty LICENSE variable", "DESCRIPTION.missing": "Ebuilds that have a missing or empty DESCRIPTION variable", + "DESCRIPTION.punctuation": "DESCRIPTION ends with a period character", "DESCRIPTION.toolong": "DESCRIPTION is over %d characters" % max_desc_len, "EAPI.definition": "EAPI definition does not conform to PMS section 7.3.1 (first non-comment, non-blank line)", "EAPI.deprecated": "Ebuilds that use features that are deprecated in the current EAPI", @@ -385,6 +386,7 @@ qawarnings = set(( "dependency.badindev", "dependency.badmaskedindev", "dependency.badtilde", +"DESCRIPTION.punctuation", "DESCRIPTION.toolong", "EAPI.deprecated", "HOMEPAGE.virtual", @@ -1890,6 +1892,12 @@ for x in effective_scanlist: stats[myqakey] += 1 fails[myqakey].append(relative_path) + if myaux['DESCRIPTION'][-1:] in ['.']: + stats['DESCRIPTION.punctuation'] += 1 + fails['DESCRIPTION.punctuation'].append( + "%s: DESCRIPTION ends with a '%s' character" + % (relative_path, myaux['DESCRIPTION'][-1:]) + # 14 is the length of DESCRIPTION="" if len(myaux['DESCRIPTION']) > max_desc_len: stats['DESCRIPTION.toolong'] += 1 |