Commit Graph

15 Commits

Author SHA1 Message Date
Claudiu Popa
932ad153f3 Iterate over the dictionary itself. 2016-03-21 20:03:57 +00:00
Claudiu Popa
bf4c65dedb Use the configparser backport for Python 2
This fixes a problem we were having with comments inside values, which is fixed
in Python 3's configparser.
Close #828
2016-03-18 15:49:03 +00:00
Claudiu Popa
1d6eddf8cf Use an OrderedDict for storing the configuration elements
This fixes an issue related to impredictible order of the disable / enable
elements from a config file. In certain cases, the disable was coming before
the enable which resulted in classes of errors to be enabled, even though the intention
was to disable them. The best example for this was in the context of running multiple
processes, each one of it having different enables / disables that affected the output.

Close #815
2016-03-05 16:20:32 +00:00
Claudiu Popa
b3f6242886 Pass the proper objects to the validation functions from config.py
The problem was that the same validation functions were used both manually,
with a custom option dictionary, as well as used for optparse.TYPE_CHECKER
configuration, where they were expected to receive an optparse.Option object
instead. A common function was created instead, which expects already the choices.

Close #821
2016-02-20 23:19:35 +00:00
Aru Sahni
2ec342e612 Add the ability to ignore files based on regex matching.
This addresses issue #156 by allowing for multiple ignore patterns
to be specified. Rather than clobber the existing ignore option, I've
introduced a new one called ignore-patterns. That way there are as few
surprises as something involving regular expressions can have.

Multiple patterns must be separated by a comma. For example, if I
wanted to ignore all files that started with `test_` and `_`, I'd pass this
in: `--ignore-patterns="test_.*","_.*"`.

Close #156
2016-01-09 22:18:48 +02:00
Claudiu Popa
5416db5a92 Unquote the string before saving it. 2016-01-03 19:10:21 +02:00
Claudiu Popa
0511e0dee8 Empty indent strings are rejected, since they make no sense. Close #764 2016-01-03 18:59:37 +02:00
John Kirkham
0a4a01d1a8 pylint/config.py: Add another check of the current working directory for .pylintrc.
--HG--
branch : issue_538_pt2
2015-12-02 13:30:17 -05:00
Claudiu Popa
56fb4fd5e6 Obsolete options are not present by default in the generated configuration file.
Closes issue #632.
2015-10-20 19:15:40 +03:00
Claudiu Popa
9eb22ab00c Abbreviations of command line options are not supported anymore.
Using abbreviations for CLI options was never considered to be
a feature of pylint, this fact being only a side effect of using optparse.
As this was the case, using --load-plugin or other abbreviation
for --load-plugins never actually worked, while it also didn't raise
an error. Closes issue #424.
2015-09-19 17:53:53 +00:00
Claudiu Popa
c79413de02 Get the sections sorted in options_by_section. This means the generated rcfile always has a consistent order. Closes issue #602. 2015-09-18 23:57:11 +00:00
Claudiu Popa
3deb961d35 Bring parts of logilab.common.configuration and logilab.common.optik_ext into pylint.config
The reason behind this is that we can better control the behaviour
of the underlying configuration modules, such as the case for undefined
options or for quickly fixing other bugs. Another side effect of this
change is that it gets us closer to the moment where we will not
be dependent on logilab.common anymore, which will definitely
make our pytest users happy.

Some parts were copied almost verbatim from logilab.common.configuration
and logilab.common.optik_ext and pylint.config will definitely need
a refactoring and reengineering for abstracting the configuration,
so that we won't use optparse anymore, but that's subject for another
patch.
2015-09-01 21:41:10 +03:00
Claudiu Popa
728271b602 --comment flag was obsoleted and it will be removed in Pylint 1.6. 2015-08-20 17:22:13 +03:00
John Kirkham
a9d2933d9e pylint/config.py: Check for .pylintrc, as well. 2015-05-27 14:08:41 -04:00
Ionel Cristian Maries
26eb7f9a2e Move all package files to a pylint package. 2015-02-14 18:13:20 +02:00