On Mon, Jan 07, 2013 at 03:31:47PM -0800, Vadim Bendebury wrote:
> utils/run_pylint.py: Prevent use of ~/.pylintrc by pylint
>
> By default the pylint module seems to be picking up the user's
> ~/.pylintrc file, which could be configured to something very
> different from autotest standards.
>
> This change makes sure no local rc file is used.
>
> TEST=manual
>
> With a conflicting ~/.pylintrc present, before this change executing
> utils/run_pylint on any autotest Python source file was causing tons
> of errors, with the change the false positives are gone.
>
> Signed-off-by: Vadim Bendebury <[email protected]>
>
> diff --git a/utils/run_pylint.py b/utils/run_pylint.py
> index 9d5ae84..16f0715 100755
> --- a/utils/run_pylint.py
> +++ b/utils/run_pylint.py
> @@ -83,7 +83,7 @@ def get_pylint_opts():
> else:
> opts = disable_old
>
> - opts += ['--reports=no', '--include-ids=y']
> + return opts + ['--reports=no', '--include-ids=y', '--rcfile=/dev/null']
>
The idea sounds right, but the patch is broken.
Current code:
| if LINT_VERBOSE:
| opts = []
| else:
| if pylint_version >= 0.21:
| opts = disable_new
| else:
| opts = disable_old
|
| opts += ['--reports=no', '--include-ids=y']
| return opts
^^^ this line is lost in the patch
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel