from
Sylvain Thénault <sylvain.thenault at logilab dot fr>
to
Scorpio <scorpios666 at gmail dot com>
cc
Sylvain Thénault <sylvain.thenault at logilab dot fr>
subject
Re: [Python-projects] New PyLint checker suggestion - doctest_checker
date
On Friday 21 October à 15:01, scorpio wrote:2005/10/21 15:20
> Sylvain Thénault wrote:
>
> >On Tuesday 18 October à 19:20, Scorpio wrote:
> >
> >
> >>Hey,
> >>
> >>I am relatively new to PyLint, but so far I am very pleased with it and I
> >>try to deploy this tool in my team.
> >>
> >>While deploying PyLint, I've developed this doctest checker (attached) to
> >>help my team testing it's products.
> >>
> >>I would like you to give me an opinion about this checker, and tell me if
> >>it's up to PyLint standards and philosophy.
> >>
> >>If you find this checker helpful, feel free to use it and distribute it
> >>further, under GPL as described in the file.
> >>
> >>
> >
> >Nice indeed ! And yes, it's up to PyLint standards and philosophy. I
> >think I will include it in the distribution, but disabled by default for
> >two reasons :
> >* as Nicolas said, checking and testing are semantically differents, so
> > I don't think the default behaviour of pylint should include testing
> >* running doctest implies to import the module, and I've worked hard to
> > avoid this ;)
> >
> >Two side notes:
> >* I'm afraid that pylint will crash if the module isn't importable
> >* You can use logilab.common.modutils.load_module_from_name instead of
> > your _get_module function
> >
> >That's all about it... Nice job, thank you for your contribution :)
> >
> Thanks for all the good replies. I'm happy to know this module can
> assist you.
>
> About the notes, Sylvain, I will appreciate if you would fix those
> glitches before
> including the module in the next distribution.
I'll if you don't. Another thing I forgot to mention is the test
requirement. PyLint test suite is testing for each message
independently, and I don't want to include new checker without proper
testing. Notice also that I may defer the inclusion of your checker to
the next next release, since I'll try to make a release this afternoon
before going on vacation, and so I won't have the time to include it
properly with corrections and test included. But 'include the doctest
checker' is in our feature tracker :)
> As I see, the import thing is the primary issue, and maybe this can be
> solved in a more general way:
> Instead of handling doctest_checker as different checker we can split
> PyLint checkers into behavioral categories (such as static checkers and
> runtime checkers). Splitting the checkers will provide us the ability to
> enable/disable checkers in a category level, while allowing us to add
> more runtime checkers without adding private cases to PyLint.
> What do you think?
Hum, sounds like a nice enhancement for a future version, but I'm not
sure it's really useful now since the doctest checker would be alone in
the runtime category, with all others in the static category... Maybe we
could find some more categories by looking thinking more deeply about
this and by having a look at already existant checkers (I'm actually
thinking about messages'category such as convention, warning, refactor,
but most checkers mixes messages with different categories).
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
