[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: static analysis and other tools for checking Python code



On Fri, Mar 04, 2016 at 09:33:17PM +0800, Paul Wise wrote:
> Do you know if pylint can recursively scan for Python files rather
> than being passed the names of Python files?

It does recursively scan for Python files:

$ tree bar/
bar/
├── baz
│   ├── gloo.py
│   └── __init__.py
├── foo.py
└── __init__.py
$ cat bar/**/*py
b = a-1
a = b+1
$ pylint -E bar/
No config file found, using default configuration
************* Module bar.foo
E:  1, 4: Undefined variable 'b' (undefined-variable)
************* Module bar.baz.gloo
E:  1, 4: Undefined variable 'a' (undefined-variable)

> Incidentally, I got a patch for c-a-t-t to support pylint from the
> author of yamllint:
> 
> https://anonscm.debian.org/cgit/collab-maint/check-all-the-things.git/patch/?id=4dc0a9ca929fa3488ab93cb4e997101d52bbe8a8

Nice!

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  


Reply to: