4 Commits

Author SHA1 Message Date
Goutham Pacha Ravi
f2a0410ebd [pylint] Use filenames in coding-checks
When using the argument "all" in our pylint
script, we invoke tests against the whole tree.
This doesn't really work well with module names
since it ignores some submodules that are not
traversable from the main manila module.

By using filenames, we allow pylint to cover
all modules.

Change-Id: I37ea7f72e71ae93f8f654e0aa99744b2ecc1cea9
2019-03-05 22:08:53 +00:00
Goutham Pacha Ravi
10bd807423 [pylint] Run pylint separately for code and tests
We use the mock library in our
unit tests which assigns mocked objects with
members at run time. This causes pylint to flag
"no-member" errors. We also test return values
on methods which return None explicitly, or
implicitly, this upsets pylint.

pylint is quite inflexible in the way it handles
ignores in code. We can add ignore statements all
over the test code, but that is quite infeasible.

So, this change lets us run pylint separately
for code and test modules. When running tests,
it adjusts the disabled pylint checks.

Change-Id: I85d3fe896ee95c52c3da55aedba8f4d72d0c299e
2019-03-05 21:23:55 +00:00
Tom Barron
1838d51925 Fix spurious pylint import errors for ddt and mock
Set dependencies correctly for pylint job in tox.ini so
it does not report spurious E041 import errors on mock
and ddt modules.  Also fix a reference to Cinder instead
of Manila in the pylint script.

Closes-Bug: #1813156
Change-Id: Ib160caae57e41a4d45483ff4faa599143e694abc
2019-01-24 07:38:59 -05:00
Chuck Short
4d0abb4a14 Simplify running pylint
This commit does several things:

- Setup and run pylint directly rather than running through a script.
  This allows the user to see what is happening while the user is running
  through pylint.
- Allow the user to either run pylint on a particular changeset,
  or the entire manila tree.
- Allow the user to run on a particular changeset. Using like HEAD~1,
  etc.
- I disabled the tests that were reported by pylint.
  The thought here would be go through the failures
  and correct them.
- Update pylint to 2.1.1.

Change-Id: I398d1ba01a3fd7f1c86ad4065a7984d276f33383
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-10-11 15:13:49 -04:00