aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2017-07-15 01:05:56 +0000
committerZac Medico <zmedico@gentoo.org>2018-03-29 20:51:19 -0700
commitefb151d9cb4e37fd0ee4233055f792f7f115bc79 (patch)
treec245e27bf4fda361ec833f9133d1918219898abc
parentrepoman: New linechecks module, uri (diff)
downloadportage-efb151d9cb4e37fd0ee4233055f792f7f115bc79.tar.gz
portage-efb151d9cb4e37fd0ee4233055f792f7f115bc79.tar.bz2
portage-efb151d9cb4e37fd0ee4233055f792f7f115bc79.zip
repoman: New linechecks module, use
-rw-r--r--repoman/pym/repoman/modules/linechecks/use/__init__.py21
-rw-r--r--repoman/pym/repoman/modules/linechecks/use/builtwith.py10
2 files changed, 31 insertions, 0 deletions
diff --git a/repoman/pym/repoman/modules/linechecks/use/__init__.py b/repoman/pym/repoman/modules/linechecks/use/__init__.py
new file mode 100644
index 000000000..e5665d2d8
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/use/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Use plug-in module for repoman LineChecks.
+Performs Built-With-Use checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+ 'name': 'do',
+ 'description': doc,
+ 'provides':{
+ 'builtwith-check': {
+ 'name': "builtwith",
+ 'sourcefile': "builtwith",
+ 'class': "BuiltWithUse",
+ 'description': doc,
+ },
+ }
+}
+
diff --git a/repoman/pym/repoman/modules/linechecks/use/builtwith.py b/repoman/pym/repoman/modules/linechecks/use/builtwith.py
new file mode 100644
index 000000000..0ec4fae21
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/use/builtwith.py
@@ -0,0 +1,10 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class BuiltWithUse(LineCheck):
+ repoman_check_name = 'ebuild.minorsyn'
+ re = re.compile(r'(^|.*\b)built_with_use\b')
+ error = 'BUILT_WITH_USE'