You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Armand Grillet (JIRA)" <ji...@apache.org> on 2018/07/31 18:02:00 UTC

[jira] [Commented] (MESOS-9112) mesos-style reports violations on a clean checkout

    [ https://issues.apache.org/jira/browse/MESOS-9112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16564080#comment-16564080 ] 

Armand Grillet commented on MESOS-9112:
---------------------------------------

I have used the script with an environment and got 8 errors instead of 9 (using the branch master as well):
{code}
$ apache-mesos (master) $ ./support/mesos-style.py
...
Checking 46 Python files
Using config file /Users/Armand/Code/apache-mesos/support/pylint.config
************* Module cli.plugins.base
E:119, 0: Bad option value 'R0204' (bad-option-value)
************* Module cli.plugins.task.main
W: 62,12: Unused variable 'master' (unused-variable)
************* Module settings
E: 32, 4: No name 'VERSION' in module 'version' (no-name-in-module)
Using config file /Users/Armand/Code/apache-mesos/support/pylint.config
************* Module apply-reviews
R: 99, 0: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
C:124, 9: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
R:302, 4: Unnecessary "else" after "return" (no-else-return)
************* Module generate-endpoint-help
R:215, 4: Unnecessary "else" after "return" (no-else-return)
************* Module verify-reviews
C:261, 7: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
Total errors found: 8
{code}

My environment:
{code}
(linters) ~ $ pylint --version
No config file found, using default configuration
pylint 1.9.2,
astroid 1.6.5
Python 2.7.15 (default, Jun 17 2018, 12:46:58)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
{code}

Can you please give me what returns {code}pylint --version{code} after doing {code}source path/to/apache-mesos/support/.virtualenv/bin/activate{code}?

This does not change the issue you reported, I just want to make sure there is not another one before fixing the errors reported by the linter.

> mesos-style reports violations on a clean checkout
> --------------------------------------------------
>
>                 Key: MESOS-9112
>                 URL: https://issues.apache.org/jira/browse/MESOS-9112
>             Project: Mesos
>          Issue Type: Bug
>          Components: build, cli, python api
>            Reporter: Benjamin Bannier
>            Assignee: Armand Grillet
>            Priority: Major
>              Labels: lint, python, style
>
> When running {{support/mesos-style.py}} on a clean checkout of e.g., {{e879e920c35}} Python style violations are reported,
> {noformat}
> Checking 46 Python files
> Using config file /home/bbannier/src/mesos/support/pylint.config
> ************* Module cli.plugins.base
> E:119, 0: Bad option value 'R0204' (bad-option-value)
> ************* Module settings
> E: 32, 4: No name 'VERSION' in module 'version' (no-name-in-module)
> Using config file /home/bbannier/src/mesos/support/pylint.config
> ************* Module mesos.http
> E: 25, 0: Unable to import 'urlparse' (import-error)
> E: 87,30: Undefined variable 'xrange' (undefined-variable)
> Using config file /home/bbannier/src/mesos/support/pylint.config
> ************* Module apply-reviews
> R: 99, 0: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
> C:124, 9: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
> R:302, 4: Unnecessary "else" after "return" (no-else-return)
> ************* Module generate-endpoint-help
> R:215, 4: Unnecessary "else" after "return" (no-else-return)
> ************* Module verify-reviews
> C:261, 7: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)
> Total errors found: 9
> {noformat}
> I would expect a clean checkout to not report any violations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)