Skip to content
Snippets Groups Projects
Commit b9061a05 authored by hippo91's avatar hippo91 Committed by Claudiu Popa
Browse files

Pylint doesn't take anymore the default rcfile if the rcfile specified on the...

Pylint doesn't take anymore the default rcfile if the rcfile specified on the command line doesn't exist (#1768)

parent d42e74bb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -173,6 +173,10 @@ What's New in Pylint 1.8?
of ``line-too-long`` message for long commented lines.
Close #1741
 
* If the rcfile specified on the command line doesn't exist, then an
IOError exception is raised.
Close #1747
What's New in Pylint 1.7.1?
=========================
 
Loading
Loading
Loading
Loading
@@ -364,3 +364,6 @@ Other Changes
* Fix ``line-too-long`` message deactivated by wrong disable directive.
The directive ``disable=fixme`` doesn't deactivate anymore the emission
of ``line-too-long`` message for long commented lines.
* If the rcfile specified on the command line doesn't exist, then an
IOError exception is raised.
Loading
Loading
@@ -626,6 +626,8 @@ class OptionsManagerMixIn(object):
config_file = self.config_file
if config_file is not None:
config_file = os.path.expanduser(config_file)
if not os.path.exists(config_file):
raise IOError("The config file {:s} doesn't exist!".format(config_file))
 
use_config_file = config_file and os.path.exists(config_file)
if use_config_file:
Loading
Loading
Loading
Loading
@@ -169,6 +169,12 @@ class TestRunTC(object):
output = out.getvalue()
assert "profile" not in output
 
def test_inexisting_rcfile(self):
out = six.StringIO()
with pytest.raises(IOError) as excinfo:
self._run_pylint(["--rcfile=/tmp/norcfile.txt"], out=out)
assert "The config file /tmp/norcfile.txt doesn't exist!" == str(excinfo.value)
def test_help_message_option(self):
self._runtest(['--help-msg', 'W0101'], code=0)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment