summaryrefslogtreecommitdiffstats
path: root/pylintrc
Commit message (Collapse)AuthorAgeFilesLines
* pylint_plugins: add forbidden import checkerJan Cholasta2017-03-101-1/+14
| | | | | | | | | | 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>
* Pylint: whitelist packages with extension modulesChristian Heimes2016-11-221-0/+9
| | | | | | | | | | | | Pylint refuses to load extension modules from unsafe places. This triggers import-error failures for pylint runs inside a tox virtualenv. Any module or package in extension-pkg-whitelist is whitelisted and pylint imports extension modules. https://fedorahosted.org/freeipa/ticket/6468 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* pylint: enable the import-error checkJan Cholasta2016-10-241-2/+0
| | | | | | | | | | Check for import errors with pylint to make sure new python package dependencies are not overlooked. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Pylint: enable check for unused-variablesMartin Basti2016-09-271-1/+4
| | | | | | | | | | | | | | | Unused variables may: * make code less readable * create dead code * potentialy hide issues/errors Enabled check should prevent to leave unused variable in code Check is locally disabled for modules that fix is not clear or easy or have too many occurences of unused variables Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Pylint: enable global-variable-not-assigned checkMartin Basti2016-09-231-1/+0
| | | | | | | the global keyword should be used only when variable from outside is assigned inside, otherwise it has no effect and just confuses developers Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* Pylint: enable cyclic-import checkMartin Basti2016-09-231-1/+0
| | | | | | | It looks that pylint stopped printing false positive errors for cyclic-import check, thus check can be enabled. Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* pylint: fix bad-mcs-method-argumentJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix bad-mcs-classmethod-argumentJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix bad-classmethod-argumentJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix old-style-classJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix redefine-in-handlerJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix pointless-statementJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix unneeded-notJan Barta2016-09-221-1/+0
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: fix simplifiable-if-statement warningsJan Barta2016-09-221-1/+0
| | | | | | | fix inefficient if statements, enable pylint check Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* pylint: replace Refactor category with individual check namesPetr Spacek2016-05-201-1/+18
| | | | | | This eases enabling/disabling individual tests like cyclic-import. Reviewed-By: Martin Basti <mbasti@redhat.com>
* Fix remaining relative import and enable Pylint checkPetr Viktorin2016-05-101-1/+0
| | | | | | | | Relative imports are not supported in Python 3. Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Pylint: enable invalid-name checkMartin Basti2016-03-221-1/+0
| | | | | | | | This check can be enabled, there is no errors in current code, and it should stay in that way. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: remove unnecessary-semicolonMartin Basti2016-03-221-1/+0
| | | | | Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: import max one module per lineMartin Basti2016-03-221-1/+0
| | | | | Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: use list comprehension instead of iterationMartin Basti2016-03-221-1/+0
| | | | | | | | | Iteration over indexes without calling enumeration fuction is not pythonic and should not be used. In this case iteration can be replaced by list comprehension. Fixing this allows to enable pylint consider-using-enumerate check. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: enable reimported checkMartin Basti2016-03-221-1/+0
| | | | | | | Fixes current reimports and enables pylint check for them Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: enable pointless-except checkMartin Basti2016-03-221-1/+0
| | | | | | | | This check can be enabled, there is no errors in current code, and it should stay in that way. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: fix definition of global variablesMartin Basti2016-03-221-1/+0
| | | | | | | | | | Global variables should be defined in the outer space, not just marked as global inside functions. Removes unused global variables Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* pylint: remove bare exceptMartin Basti2016-03-221-1/+0
| | | | | | | Bare except should not be used. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* Pylint: enable parallelismPetr Spacek2016-03-071-1/+1
| | | | | | | The config file specifies 8 cores but Pylint very quickly ends up with 3 cores so do not worry about overwhelming your system. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Remove duplicated exceptMartin Basti2016-02-251-1/+0
| | | | | | Both exceptions have been catched before, so it is bacically dead code Reviewed-By: David Kupka <dkupka@redhat.com>
* Disable new pylint checksMartin Basti2016-02-231-1/+14
| | | | | | | | | | | | | | New checks have been introduced in pylint 1.5 and many of them are not compatible with IPA code or produce false positives. Disable them all. Note: due older versions of pylint, new checks cannot be disabled locally, must be disabled globally. https://fedorahosted.org/freeipa/ticket/5615 Reviewed-By: David Kupka <dkupka@redhat.com>
* make lint: use config file and plugin for pylintMartin Basti2016-02-111-0/+85
Our custom implementation of pylint checker is often broken by incompatible change on pylint side. Using supported solutions (config file, pylint plugins) should avoid this issue. The plugin adds missing (dynamic) member to classes in abstract syntax tree generated for pylint, instead of just ignoring missing members and all sub-members. This should improve pylint detection of typos and missing members in api. env and test config. make-lint python script has been removed, to run pylint execute 'make lint' https://fedorahosted.org/freeipa/ticket/5615 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>