1 |
commit: efb151d9cb4e37fd0ee4233055f792f7f115bc79 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 15 01:05:56 2017 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 30 03:51:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=efb151d9 |
7 |
|
8 |
repoman: New linechecks module, use |
9 |
|
10 |
.../pym/repoman/modules/linechecks/use/__init__.py | 21 +++++++++++++++++++++ |
11 |
.../pym/repoman/modules/linechecks/use/builtwith.py | 10 ++++++++++ |
12 |
2 files changed, 31 insertions(+) |
13 |
|
14 |
diff --git a/repoman/pym/repoman/modules/linechecks/use/__init__.py b/repoman/pym/repoman/modules/linechecks/use/__init__.py |
15 |
new file mode 100644 |
16 |
index 000000000..e5665d2d8 |
17 |
--- /dev/null |
18 |
+++ b/repoman/pym/repoman/modules/linechecks/use/__init__.py |
19 |
@@ -0,0 +1,21 @@ |
20 |
+# Copyright 2015-2016 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+ |
23 |
+doc = """Use plug-in module for repoman LineChecks. |
24 |
+Performs Built-With-Use checks on ebuilds.""" |
25 |
+__doc__ = doc[:] |
26 |
+ |
27 |
+ |
28 |
+module_spec = { |
29 |
+ 'name': 'do', |
30 |
+ 'description': doc, |
31 |
+ 'provides':{ |
32 |
+ 'builtwith-check': { |
33 |
+ 'name': "builtwith", |
34 |
+ 'sourcefile': "builtwith", |
35 |
+ 'class': "BuiltWithUse", |
36 |
+ 'description': doc, |
37 |
+ }, |
38 |
+ } |
39 |
+} |
40 |
+ |
41 |
|
42 |
diff --git a/repoman/pym/repoman/modules/linechecks/use/builtwith.py b/repoman/pym/repoman/modules/linechecks/use/builtwith.py |
43 |
new file mode 100644 |
44 |
index 000000000..0ec4fae21 |
45 |
--- /dev/null |
46 |
+++ b/repoman/pym/repoman/modules/linechecks/use/builtwith.py |
47 |
@@ -0,0 +1,10 @@ |
48 |
+ |
49 |
+import re |
50 |
+ |
51 |
+from repoman.modules.linechecks.base import LineCheck |
52 |
+ |
53 |
+ |
54 |
+class BuiltWithUse(LineCheck): |
55 |
+ repoman_check_name = 'ebuild.minorsyn' |
56 |
+ re = re.compile(r'(^|.*\b)built_with_use\b') |
57 |
+ error = 'BUILT_WITH_USE' |