summaryrefslogtreecommitdiffstats
path: root/pylintrc
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2017-02-14 09:58:44 +0100
committerMartin Basti <mbasti@redhat.com>2017-03-10 13:04:59 +0100
commit5d489ac5604ca959cfe439c0594b8739073f3cea (patch)
treec91df525969f3148ce300acb2912756fee385960 /pylintrc
parent6027a8111fa9ed7a058fb222f4f96b12039deb8b (diff)
downloadfreeipa-5d489ac5604ca959cfe439c0594b8739073f3cea.tar.gz
freeipa-5d489ac5604ca959cfe439c0594b8739073f3cea.tar.xz
freeipa-5d489ac5604ca959cfe439c0594b8739073f3cea.zip
pylint_plugins: add forbidden import checker
Add new pylint AST checker plugin which implements a check for imports forbidden in IPA. Which imports are forbidden is configurable in pylintrc. Provide default forbidden import configuration and disable the check for existing forbidden imports in our code base. Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'pylintrc')
-rw-r--r--pylintrc15
1 files changed, 14 insertions, 1 deletions
diff --git a/pylintrc b/pylintrc
index 93075f54b..bff23059d 100644
--- a/pylintrc
+++ b/pylintrc
@@ -4,7 +4,9 @@ persistent=no
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
-load-plugins=pylint_plugins
+# FIXME: has to be specified on the command line otherwise pylint fails with
+# DuplicateSectionError for the IPA section
+#load-plugins=pylint_plugins
# Use multiple processes to speed up Pylint.
jobs=0
@@ -103,3 +105,14 @@ msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg})'
[VARIABLES]
dummy-variables-rgx=_.+
+
+
+[IPA]
+forbidden-imports=
+ client/:ipaserver,
+ ipaclient/:ipaclient.install:ipalib.install:ipaplatform:ipaserver,
+ ipaclient/install/:ipaserver,
+ ipalib/:ipaclient.install:ipalib.install:ipaplatform:ipaserver,
+ ipalib/install/:ipaserver,
+ ipaplatform/:ipaclient:ipalib:ipaserver,
+ ipapython/:ipaclient:ipalib:ipaplatform:ipaserver