diff --git a/Pylinter.sublime-settings b/Pylinter.sublime-settings index 52c3c05..809b580 100755 --- a/Pylinter.sublime-settings +++ b/Pylinter.sublime-settings @@ -31,5 +31,7 @@ "ignore": [], // a list of strings of individual errors to disable, ex: ["C0301"] "disable": [], - "plugins": [] + "plugins": [], + // extra arguments to pass pylint, ex: ["--extension-pkg-whitelist=lxml"] + "pylint_extra": [] } diff --git a/pylinter.py b/pylinter.py index 6f3f23e..ca8fe20 100755 --- a/pylinter.py +++ b/pylinter.py @@ -143,7 +143,7 @@ def read_settings(cls): plugins = cls.get_or('plugins', None) # Add custom runtime settings - pylint_extra = PylSet.get_or('pylint_extra', None) + pylint_extra = cls.get_or('pylint_extra', None) disable = cls.get_or('disable', []) # Added ignore for trailing whitespace (false positives bug in @@ -478,6 +478,10 @@ def run(self): if self.disable_msgs: options.append('--disable=%s' % self.disable_msgs) + if self.extra_pylint_args: + for extra_arg in self.extra_pylint_args: + options.append(extra_arg) + options.append(self.file_name) command.extend(options)