[Python-projects] PyLint 0.12.0: custom reporter is ignored

Maarten ter Huurne maarten.ter.huurne at philips.com
Thu Sep 21 19:33:24 CEST 2006


I wrote on 2006-09-21 07:25:17 PM:

> For now, I solved it with the following change in the constructor 
ofPyLinter:
> 
> === 
> --- lint.py.org 2006-09-21 19:18:18.000000000 +0200 
> +++ lint.py     2006-09-21 19:17:08.000000000 +0200 
> @@ -244,7 +244,6 @@ 
>          # 
>          # checkers / reporter / astng manager 
>          self.reporter = None 
> -        self.set_reporter(reporter or TextReporter(sys.stdout)) 
>          self.manager = ASTNGManager() 
>          self._checkers = {} 
>          # visit variables 
> @@ -284,6 +283,10 @@ 
>          self.register_checker(self) 
>          self._dynamic_plugins = [] 
>          self.load_provider_defaults() 
> +        # MtH: Custom reporter should override any reporter that is 
selected
> +        #      by default or configuration. 
> +        if reporter is not None: 
> +            self.set_reporter(reporter) 
> 
>      def load_plugin_modules(self, modnames): 
>          """take a list of module names which are pylint plugins and 
load 
> === 

I just found out this is only sufficient if "output-format=" does not 
occur in the "pylintrc" file. Since this option does occur in rcfiles made 
with the "--generate-rcfile" option, my patch is probably not a real 
solution.

Bye, 
                Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20060921/8f45d2fe/attachment.htm


More information about the Python-Projects mailing list