2017-10-11 09:04:55 +02:00
|
|
|
From ceebc0de2c3a9bb1663418d75a4b0de1d15740b2 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Dirk Mueller <dirk@dmllr.de>
|
|
|
|
Date: Sun, 1 Oct 2017 14:06:31 +0200
|
|
|
|
Subject: [PATCH] Lower false-positives on summary-not-capitalized
|
2015-04-10 16:35:46 +02:00
|
|
|
|
2017-10-11 09:04:55 +02:00
|
|
|
Allow some 'names' at the beginning of the summary to be
|
|
|
|
non-capitalized.
|
2015-04-10 16:35:46 +02:00
|
|
|
---
|
2017-10-11 09:04:55 +02:00
|
|
|
TagsCheck.py | 6 +++++-
|
|
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
2015-04-10 16:35:46 +02:00
|
|
|
|
2017-10-11 09:04:55 +02:00
|
|
|
diff --git a/TagsCheck.py b/TagsCheck.py
|
|
|
|
index ea131e3..d3da24c 100644
|
|
|
|
--- a/TagsCheck.py
|
|
|
|
+++ b/TagsCheck.py
|
|
|
|
@@ -397,6 +397,9 @@ BAD_WORDS = {
|
|
|
|
'xwindows': 'X'
|
|
|
|
}
|
|
|
|
|
|
|
|
+CAPITALIZED_IGNORE_LIST = (
|
|
|
|
+ 'jQuery', 'openSUSE', 'wxWidgets', 'a', 'an', 'uWSGI')
|
|
|
|
+
|
|
|
|
DEFAULT_INVALID_REQUIRES = ('^is$', '^not$', '^owned$', '^by$', '^any$',
|
|
|
|
'^package$', r'^libsafe\.so\.')
|
|
|
|
|
|
|
|
@@ -911,7 +914,8 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
2015-11-26 11:24:13 +01:00
|
|
|
spell_check(pkg, summary, 'Summary(%s)', lang, ignored_words)
|
2010-11-16 01:16:49 +01:00
|
|
|
if '\n' in summary:
|
|
|
|
printError(pkg, 'summary-on-multiple-lines', lang)
|
|
|
|
- if summary[0] != summary[0].upper():
|
2017-10-24 14:49:55 +02:00
|
|
|
+ if (summary[0] != summary[0].upper() and
|
2017-10-11 09:04:55 +02:00
|
|
|
+ summary.partition(' ')[0] not in CAPITALIZED_IGNORE_LIST):
|
2010-11-16 01:16:49 +01:00
|
|
|
printWarning(pkg, 'summary-not-capitalized', lang, summary)
|
|
|
|
if summary[-1] == '.':
|
|
|
|
printWarning(pkg, 'summary-ended-with-dot', lang, summary)
|
2017-10-11 09:04:55 +02:00
|
|
|
--
|
|
|
|
2.14.1
|
|
|
|
|