Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flycheck doesn't return casing errors for Python #1544

Closed
treymerkley opened this issue Feb 23, 2019 · 6 comments
Closed

Flycheck doesn't return casing errors for Python #1544

treymerkley opened this issue Feb 23, 2019 · 6 comments

Comments

@treymerkley
Copy link

treymerkley commented Feb 23, 2019

  • What you did, and what you expected to happen instead
    I have pycheckers set up with pylint, pep8, flake8, pyflakes, mypy2, and mypy3. When I run either pylint or flake8 independently, it will return all of the casing issues I have. However, Flycheck doesn't output any of these issues.

  • Whether and how you were able to [reproduce the issue in emacs -Q][emacsQ]
    I couldn't get flycheck to run at all in Q, but that's most likely user error.

  • Your Flycheck setup from M-x flycheck-verify-setup

Syntax checkers for buffer npc.py in python-mode:

  python-pycheckers
    - may enable:         yes
    - executable:         Found at /home/trey/.emacs.d/elpa/flycheck-pycheckers-20190218.1953/bin/pycheckers.py
    - configuration file: Found at "/home/trey/.pylintrc"

  python-flake8
    - may enable:         yes
    - executable:         Found at /usr/bin/python
    - configuration file: Not found
    - `flake8' module:    Found at "/usr/lib/python3.7/site-packages/flake8/__init__.py"

  python-pylint
    - may enable:         yes
    - executable:         Found at /usr/bin/python
    - configuration file: Found at "/home/trey/.pylintrc"
    - `pylint' module:    Found at "/usr/lib/python3.7/site-packages/pylint/__init__.py"

  python-pycompile
    - may enable: yes
    - executable: Found at /usr/bin/python

  python-mypy
    - may enable:         yes
    - predicate:          t
    - executable:         Found at /usr/bin/mypy
    - configuration file: Not found


The following syntax checkers are not registered:

  - csharp-omnisharp-codecheck

Try adding these syntax checkers to `flycheck-checkers'.  Flycheck
Mode is enabled.  Use C-u C-c ! x to enable disabled checkers.

--------------------

Flycheck version: 32snapshot (package: 20190213.1525)
Emacs version:    26.1
System:           x86_64-pc-linux-gnu
Window system:    x
  • Your operating system
    Manjaro Linux, 64-bit, recently updated.

  • Your Emacs version from M-x emacs-version
    GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05

  • Your Flycheck version from M-x flycheck-version
    Flycheck version: 32snapshot (package: 20190213.1525)

Thanks!

@cpitclaudel
Copy link
Member

Thanks for the report. Can you show an input file, and the command line output of the tools?

@treymerkley
Copy link
Author

Sure!

File: https://github.com/billywade/yendor/blob/master/yendor/gui/npc.py

Output:

************* Module yendor.gui.npc
npc.py:1:0: C0111: Missing module docstring (missing-docstring)
npc.py:22:8: C0103: Attribute name "speciesComboBox" doesn't conform to snake_case naming style (invalid-name)
npc.py:32:8: C0103: Attribute name "levelComboBox" doesn't conform to snake_case naming style (invalid-name)
npc.py:42:8: C0103: Attribute name "classesComboBox" doesn't conform to snake_case naming style (invalid-name)
npc.py:49:8: C0103: Attribute name "elementsComboBox" doesn't conform to snake_case naming style (invalid-name)
npc.py:59:8: C0103: Attribute name "bossCheckBox" doesn't conform to snake_case naming style (invalid-name)
npc.py:63:8: C0103: Attribute name "generateButton" doesn't conform to snake_case naming style (invalid-name)
npc.py:65:8: C0103: Attribute name "saveButton" doesn't conform to snake_case naming style (invalid-name)
npc.py:74:8: C0103: Attribute name "mainTextBox" doesn't conform to snake_case naming style (invalid-name)
npc.py:104:8: C0103: Attribute name "localLevelString" doesn't conform to snake_case naming style (invalid-name)
npc.py:105:8: C0103: Attribute name "speciesString" doesn't conform to snake_case naming style (invalid-name)
npc.py:106:8: C0103: Attribute name "classesString" doesn't conform to snake_case naming style (invalid-name)
npc.py:107:8: C0103: Attribute name "elementsString" doesn't conform to snake_case naming style (invalid-name)
npc.py:109:12: C0103: Attribute name "bossString" doesn't conform to snake_case naming style (invalid-name)
npc.py:10:0: C0111: Missing class docstring (missing-docstring)
npc.py:10:0: R0902: Too many instance attributes (14/7) (too-many-instance-attributes)
npc.py:15:4: C0111: Missing method docstring (missing-docstring)
npc.py:21:8: C0103: Variable name "speciesComboBoxLabel" doesn't conform to snake_case naming style (invalid-name)
npc.py:23:8: C0103: Variable name "listOfSpecies" doesn't conform to snake_case naming style (invalid-name)
npc.py:31:8: C0103: Variable name "levelComboBoxLabel" doesn't conform to snake_case naming style (invalid-name)
npc.py:41:8: C0103: Variable name "classesComboBoxLabel" doesn't conform to snake_case naming style (invalid-name)
npc.py:43:8: C0103: Variable name "listOfClasses" doesn't conform to snake_case naming style (invalid-name)
npc.py:48:8: C0103: Variable name "elementsComboBoxLabel" doesn't conform to snake_case naming style (invalid-name)
npc.py:50:8: C0103: Variable name "listOfElements" doesn't conform to snake_case naming style (invalid-name)
npc.py:58:8: C0103: Variable name "bossCheckBoxLabel" doesn't conform to snake_case naming style (invalid-name)
npc.py:67:8: C0103: Variable name "bottomButtonsLayout" doesn't conform to snake_case naming style (invalid-name)
npc.py:75:8: C0103: Variable name "textBoxLayout" doesn't conform to snake_case naming style (invalid-name)
npc.py:83:8: C0103: Variable name "controlsLayout" doesn't conform to snake_case naming style (invalid-name)
npc.py:103:4: C0103: Method name "GenerateButtonPressed" doesn't conform to snake_case naming style (invalid-name)
npc.py:103:4: C0111: Missing method docstring (missing-docstring)
npc.py:112:8: C0103: Variable name "resultString" doesn't conform to snake_case naming style (invalid-name)
npc.py:104:8: W0201: Attribute 'localLevelString' defined outside __init__ (attribute-defined-outside-init)
npc.py:105:8: W0201: Attribute 'speciesString' defined outside __init__ (attribute-defined-outside-init)
npc.py:106:8: W0201: Attribute 'classesString' defined outside __init__ (attribute-defined-outside-init)
npc.py:107:8: W0201: Attribute 'elementsString' defined outside __init__ (attribute-defined-outside-init)
npc.py:109:12: W0201: Attribute 'bossString' defined outside __init__ (attribute-defined-outside-init)
npc.py:111:12: W0201: Attribute 'bossString' defined outside __init__ (attribute-defined-outside-init)

------------------------------------------------------------------
Your code has been rated at 4.31/10 (previous run: 4.31/10, +0.00)

@cpitclaudel
Copy link
Member

Thanks, this is helpful. Can you see what happens if you select just the python-pylint checker (with M-x flycheck-select-checker)?

@treymerkley
Copy link
Author

treymerkley commented Feb 23, 2019

Okay, so doing that returns the appropriate response. Thanks! It looks like all of the casing errors are all referred to as info-level errors. Is this something I should take up with pycheckers?

@cpitclaudel
Copy link
Member

Possibly :)

@treymerkley
Copy link
Author

Alright! I'ma call this a Marc thing until I'm told otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants