queengooborg / pylint_web2py3

A web2py pylint plugin
GNU General Public License v2.0
0 stars 0 forks source link

Plugin usage instructions #2

Open borisaguilar opened 4 years ago

borisaguilar commented 4 years ago

I have an specific application within a repo that I want to pylint, my folder structure is as follows:

controllers/
models/
modules/
static/
views/

When I run pylint --load-plugins=pylint_web2py3 models/db.py I get lots of Undefined variable 'Field' (undefined-variable) so it seems I'm not running it correctly

queengooborg commented 4 years ago

This may be a result of a somehow outdated release on Pip. I'll be deploying a new version shortly!

queengooborg commented 4 years ago

Alright, new version's been deployed! Still having issues with this recent release?

borisaguilar commented 4 years ago

I installed from source (latest version 0.9.1), when I run my db.py model from the linter I get the following output:

models/db.py:21:15: E0602: Undefined variable 'Field' (undefined-variable)
models/db.py:22:15: E0602: Undefined variable 'Field' (undefined-variable)
models/db.py:23:15: E0602: Undefined variable 'Field' (undefined-variable)
models/db.py:24:15: E0602: Undefined variable 'Field' (undefined-variable)

It makes me think if it is ignoring my folder structure or similar; or am I running it incorrectly?

pylint --load-plugins=pylint_web2py3 models/db.py

queengooborg commented 4 years ago

Hmm...it sounds like it’s not injecting the dummy code properly, however I’m not having any issues with it on my end. The difference is that I’m running PyLint on the entire folder instead of just the file. I’ll see what’s going on when I have some more time on my hands!