] > RE: [ANN] pylint-0.2 (Logilab.org)

Email RE: [ANN] pylint-0.2

from
to
Sylvain Thenault <syt at logilab dot fr>
subject
RE: [ANN] pylint-0.2
date
2003/10/03 06:08
Looking better :-) As you can see, I definitely got some output this time
before the code dumped. If this counts as "running" but with bugs then I'll
submit a bug report :-)

Thanks
Peter

roebourne#1(~/swimming)$ python
c:/Python22/Lib/site-packages/logilab/pylint/lint.py roll.py
No config file found, using default configuration
************* Module roll
E: 18: column 0 should not be [ ]
E: 27: column 0 should not be [ ]
E: 39: column 0 should not be [ ]
E: 45: column 0 should not be [ ]
E: 52: column 0 should not be [ ]
E: 57: column 0 should not be [ ]
E: 62: column 0 should not be [ ]
E: 70: column 4 should not be [ ]
E: 72: column 8 should not be [ ]
E: 74: Indent not equal
E: 76: column 4 should not be [ ]
E: 80: column 8 should not be [ ]
E: 81: Indent not equal
E: 83: column 8 should not be [ ]
E: 85: Indent not equal
E: 87: column 4 should not be [ ]
E: 89: Indent not equal
E: 91: column 4 should not be [ ]
E: 93: Indent not equal
E: 95: Indent not equal
E: 97: column 0 should not be [ ]
E:106: column 0 should not be [ ]
E:115: column 0 should not be [ ]
E:118: column 0 should not be [ ]
E:124: column 4 should not be [ ]
E:133: column 0 should not be [ ]
E:134: column 0 should not be [ ]
E:136: column 0 should not be [ ]
W:  0: Missing docstring
W:  0: Missing required attribute "__revision__"
W: 13: relative import (config)
W: 13: relative import (cc_exceptions)
W: 17:RollFailure: Missing docstring
W: 26:Roll: Missing docstring
W: 39:Roll.add_child: Missing docstring
W: 62:Roll: Missing docstring
W: 76:Roll.read_roll.arrange_by_surname: Missing docstring
Traceback (most recent call last):
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 529, in
?
    Run(*sys.argv[1:])
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 497, in
__init__
    linter.check(modname)
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 247, in
check
    self.check_astng_module(astng, checkers, rev_checkers)
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 302, in
check_astng_module
    self.astng_events(astng, [c for c in checkers
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 322, in
astng_events
    self.astng_events(child, checkers)
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 322, in
astng_events
    self.astng_events(child, checkers)
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 322, in
astng_events
    self.astng_events(child, checkers)
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 322, in
astng_events
    self.astng_events(child, checkers)
  File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 319, in
astng_events
    astng.accept(checker)
  File
"c:\Python22\Lib\site-packages\logilab\common\astng\astng_objects.py", line
211, in accept
    return func(self, *args, **kwargs)
  File "c:\Python22\Lib\site-packages\logilab\pylint\checkers\base.py", line
222, in visit_funcdef
    if (var not in node.args and not isinstance(stmt, ImportStmt)
AttributeError: IfStmt instance has no attribute '__name__'
[exited with 1]


-----Original Message-----
From: Sylvain Thénault [mailto:Sylvain.Thenault@logilab.fr]
Sent: Thursday, October 02, 2003 9:41 PM
To: Peter Milliken
Cc: Myles; python-projects@logilab.org
Subject: Re: [ANN] pylint-0.2


On Thursday 02 October à 06:39, Peter Milliken wrote:
> Getting closer but still no prizes :-)

damned...
 
> Installed the supplied common and re-ran with the following result:

> roebourne#1(~/swimming)$ python
> c:/Python22/Lib/site-packages/logilab/pylint/lint.py roll.py
> No config file found, using default configuration
> An error occured while parsing roll
> Traceback (most recent call last):
>   File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 529,
in
> ?
>     Run(*sys.argv[1:])
>   File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 497,
in
> __init__
>     linter.check(modname)
>   File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 230,
in
> check
>     astng = self.manager.astng_from_module_name(mod_name)
>   File "c:\Python22\Lib\site-packages\logilab\common\astng\manager.py",
line
> 85, in astng_from_module_name
>     return self.astng_from_module(module, norm_mod_name)
>   File "c:\Python22\Lib\site-packages\logilab\common\astng\manager.py",
line
> 62, in astng_from_module
>     astng = self._builder.build_from_module(module, mod_name)
>   File "c:\Python22\Lib\site-packages\logilab\common\astng\astng.py", line
> 179, in build_from_module
>     astng = self._string_build(data)
>   File "c:\Python22\Lib\site-packages\logilab\common\astng\astng.py", line
> 234, in _string_build
>     ast = parser.suite(data + linesep)
> parser.ParserError: could not parse string
> [exited with 1]
 
it seems that the parser.suite function doesn't like windows new lines :(
Could you try to replace the files common/fileutils.py and
common/astng/astng.py with those attached to this message, and see if
that fix the problem ?
 
> I assume that we are getting closer? :-)

of course we are ;)

-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org