Skip to content

show-code option is not working #35

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

Closed
sanyer opened this issue Feb 22, 2016 · 5 comments · Fixed by #38
Closed

show-code option is not working #35

sanyer opened this issue Feb 22, 2016 · 5 comments · Fixed by #38

Comments

@sanyer
Copy link

sanyer commented Feb 22, 2016

Setting show-code option doesn't work, breaking also the whole linting.
Here is the error from console:

SublimeLinter: flake8: vminfo_quick.py ['/usr/bin/python2.7', '/usr/local/bin/flake8', '--ignore=F403,E111,E113', '--max-line-length=100', '--jobs=1', '--max-complexity=-1', '--show-code=True', '-']
SublimeLinter: flake8 output:
Usage: flake8 [options] input ...

flake8: error: no such option: --show-code

@groteworld
Copy link
Member

How are you adding the show-code option? User.sublime-setting? inline? So this issue is that it is trying to make it a CLI arg, which it isn't, it's a SublimeLinter arg.

@isezen
Copy link

isezen commented Mar 4, 2016

I confirm the error. When the SublimeLinter-flake8 installed, it automatically adds its settings to SublimeLinter.sublime-settings file as shown below. As seen, flake8 has a show-code option and pylint has show-codes option. When I add an extra s at the end of flake8 show-code option, it worked but still didn't show Warning Codes in the status bar.

...
        "linters": {
            "flake8": {
                "@disable": false,
                "args": [],
                "builtins": "",
                "excludes": [],
                "ignore": "",
                "jobs": "2",
                "max-complexity": 10,
                "max-line-length": null,
                "select": "",
                "show-code": true
            },
            "pylint": {
                "@disable": true,
                "args": [],
                "disable": "",
                "enable": "",
                "excludes": [],
                "paths": [],
                "rcfile": "",
                "show-codes": true
            }
        },
...

@blackwind
Copy link

Confirmed here as well.

@sanyer
Copy link
Author

sanyer commented Apr 1, 2016

@groteworld

SublimeLinter.sublime-settings:

{
    "user": {
        "@python": 2.7,
        "debug": true,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Circle/Circle.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "annotations": {
                "@disable": false,
                "args": [],
                "errors": [
                    "FIXME"
                ],
                "excludes": [],
                "warnings": [
                    "NOTE",
                    "README",
                    "TODO",
                    "XXX",
                    "@todo"
                ]
            },
            "flake8": {
                "@disable": false,
                "args": [],
                "builtins": "",
                "excludes": [],
                "ignore": "F403,E111,E113,D100,D102,D101",
                "jobs": "1",
                "max-complexity": 10,
                "max-line-length": 120,
                "select": "",
                "show-code": true
            }
        },
        "mark_style": "outline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [
                "/usr/local/bin/"
            ],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "magicpython": "python",
            "php": "html",
            "python django": "python"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

Console output:

SublimeLinter: debug mode: on 
SublimeLinter: temp directory: /var/folders/b6/q82k504x00l9gwzzztpw904h0000gp/T/SublimeLinter3-rzhuzha 
SublimeLinter: find_python(version='3', script=None, module=None) 
SublimeLinter: find_python: requested version = {'major': 3, 'minor': None} 
SublimeLinter: user shell: /usr/local/bin/fish 
SublimeLinter: computed PATH using /usr/local/bin/fish:
/Users/rzhuzha/.rbenv/shims
/Users/rzhuzha/.rbenv/bin
/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin

SublimeLinter: find_posix_python: python3 => /usr/local/bin/python3 
SublimeLinter: find_python: system python = /usr/local/bin/python3 
SublimeLinter: find_python: available version = {'major': 3, 'minor': 5} 
SublimeLinter: find_python: <= ('/usr/local/bin/python3', None, 3, 5) 
SublimeLinter: sys.path for /usr/local/bin/python3:
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-20.1.1-py3.5.egg
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python35.zip
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plat-darwin
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages

SublimeLinter: flake8 imported <module 'flake8.engine' from '/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/engine.py'> 
SublimeLinter: annotations activated: <builtin> 
SublimeLinter: flake8 version: 2.5.4 
SublimeLinter: flake8: (>= 2.2.2) satisfied by 2.5.4 
SublimeLinter: flake8 activated: <builtin> 
SublimeLinter: annotations activated: <builtin> 
SublimeLinter: find_python(version=2.7, script=None, module=<module 'flake8.engine' from '/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/engine.py'>) 
SublimeLinter: find_python: requested version = {'major': 2, 'minor': 7} 
SublimeLinter: find_python: available version = {'major': 3, 'minor': 3} 
SublimeLinter: find_posix_python: python2.7 => /usr/local/bin/python2.7 
SublimeLinter: find_python: system python = /usr/local/bin/python2.7 
SublimeLinter: find_python: available version = {'major': 2, 'minor': 7} 
SublimeLinter: find_python: <= ('/usr/local/bin/python2.7', None, 2, 7) 
SublimeLinter: find_python(version='2.7', script='flake8', module=<module 'flake8.engine' from '/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/flake8/engine.py'>) 
SublimeLinter: find_python: requested version = {'major': 2, 'minor': 7} 
SublimeLinter: find_python: available version = {'major': 3, 'minor': 3} 
SublimeLinter: find_python: system python = /usr/local/bin/python2.7 
SublimeLinter: find_python: available version = {'major': 2, 'minor': 7} 
SublimeLinter: find_python: 'flake8' path = /usr/local/bin/flake8 
SublimeLinter: find_python: <= ('/usr/local/bin/python2.7', '/usr/local/bin/flake8', 2, 7) 
SublimeLinter: flake8: send_messages_to_sqs.py ['/usr/local/bin/python2.7', '/usr/local/bin/flake8', '--max-complexity=10', '--jobs=1', '--show-code=True', '--ignore=F403,E111,E113,D100,D102,D101', '--max-line-length=120', '-'] 
SublimeLinter: flake8 output:
Usage: flake8 [options] input ...

flake8: error: no such option: --show-code 
Package Control: Skipping automatic upgrade, last run at 2016-04-01 16:32:02, next run at 2016-04-01 17:32:02 or after
SublimeLinter: annotations activated: <builtin> 
reloading Packages/User/SublimeLinter.sublime-settings
SublimeLinter: flake8: send_messages_to_sqs.py ['/usr/local/bin/python2.7', '/usr/local/bin/flake8', '--max-complexity=10', '--jobs=1', '--show-code=True', '--ignore=F403,E111,E113,D100,D102,D101', '--max-line-length=120', '-'] 
SublimeLinter: flake8 output:
Usage: flake8 [options] input ...

flake8: error: no such option: --show-code 

YuppY pushed a commit to YuppY/SublimeLinter-flake8 that referenced this issue Apr 29, 2016
- do not break linting with executable by passing --show-code argument [SublimeLinter#35]
- fix inline flake8-show-code option
YuppY pushed a commit to YuppY/SublimeLinter-flake8 that referenced this issue Apr 29, 2016
- do not break linting with executable by passing --show-code argument [SublimeLinter#35]
- fix inline flake8-show-code option
kaste added a commit to kaste/SublimeLinter-flake8 that referenced this issue May 10, 2016
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33
* Make `show-code` actually work Fixes SublimeLinter#35
* Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
@kaste kaste mentioned this issue May 10, 2016
@kaste
Copy link
Contributor

kaste commented May 10, 2016

Should be fixed by #38.

kaste added a commit to kaste/SublimeLinter-flake8 that referenced this issue May 14, 2016
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33
* Make `show-code` actually work Fixes SublimeLinter#35
* Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
kaste added a commit to kaste/SublimeLinter-flake8 that referenced this issue May 14, 2016
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33
* Make `show-code` actually work Fixes SublimeLinter#35
* Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
kaste added a commit to kaste/SublimeLinter-flake8 that referenced this issue May 25, 2016
* Never use builtin python 3.3 for linting Fixes SublimeLinter#33
* Make `show-code` actually work Fixes SublimeLinter#35
* Add option `executable` so you can point explicitly to a flake8 installation in case SL's which isn't smart enough (which it isn't on Windows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

5 participants