Hi,
Where can i find a bare minimum pylint checker that will successfully be
registered and called?
I've tried to write a checker like so:
$ cat mychecker.py
from pylint import checkers
import pdb
class Foo(checkers.BaseChecker):
name = "FooBar"
def visit_module(self, node):
self.add_message('blaha-name', node=node)
pdb.set_trace()
def visit_importfrom(self, node):
self.add_message('foo-name', node=node)
pdb.set_trace()
def visit_import(self, node):
self.add_message('bar-name', node=node)
pdb.set_trace()
def register(linter):
linter.register_checker(Foo(linter))
print "Mychecker registered successfully it seems"
I get the print from register but neither of my visit_* methods seems to
get called, i cannot see why.
I run it like so:
PYTHONPATH=. pylint --load-plugins=mychecker -rn main.py testmodule
What am i missing?
Regards,
Patrik Iselind