ale
ale copied to clipboard
Vulture linter should only lint current file
Information
VIM version
NVIM v0.7.0-dev+906-gde6f9233e
Build type: RelWithDebInfo
Operating System: Debian 11
What went wrong
When I open a file in the project, I only expect to get errors from the current file, like with flake8. But the vulture linter always lints the whole project. I would like to hide the errors irrelevant to the current file.
Reproducing the bug
- Create a Python project with vulture errors (unused code) in two different files.
- Open one of the files in nvim with ALE installed.
:ALEInfo
Current Filetype: python
Available Linters: ['bandit', 'flake8', 'jedils', 'mypy', 'prospector', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylama', 'pylint', 'pyls', 'pyre', 'pyright', 'v
ulture']
Enabled Linters: ['flake8', 'mypy', 'pylint', 'pyright', 'vulture']
Ignored Linters: [] Suggested Fixers:
'add_blank_lines_for_python_control_statements' - Add blank lines before control statements.
'autoimport' - Fix import issues with autoimport.
'autopep8' - Fix PEP8 issues with autopep8. 'black' - Fix PEP8 issues with black.
'isort' - Sort Python imports with isort. 'remove_trailing_lines' - Remove all blank lines at the end of a file.
'reorder-python-imports' - Sort Python imports with reorder-python-imports.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
'yapf' - Fix Python files with yapf.
Linter Variables:
let g:ale_python_auto_pipenv = 0
let g:ale_python_flake8_auto_pipenv = 0
let g:ale_python_flake8_change_directory = 'project'
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_mypy_auto_pipenv = 0
let g:ale_python_mypy_executable = 'mypy'
let g:ale_python_mypy_ignore_invalid_syntax = 0
let g:ale_python_mypy_options = '--show-error-codes --follow-imports=silent'
let g:ale_python_mypy_show_notes = 1
let g:ale_python_mypy_use_global = 0
let g:ale_python_pylint_auto_pipenv = 0
let g:ale_python_pylint_change_directory = 1
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
let g:ale_python_pylint_use_msg_id = 0
let g:ale_python_pyright_config = {}
let g:ale_python_pyright_executable = 'pyright-langserver'
let g:ale_python_vulture_change_directory = 1
let g:ale_python_vulture_executable = 'vulture'
let g:ale_python_vulture_options = ''
let g:ale_python_vulture_use_global = 0
Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let b:ale_linters = {'python': ['flake8', 'mypy', 'pylint', 'pyright', 'vulture']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 1
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_sign_highlight_linenrs = 0
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/bin/zsh', '-c', '''pylint'' --version']
<<<OUTPUT STARTS>>>
pylint 2.12.2
astroid 2.9.0
Python 3.10.1 (main, Dec 18 2021, 14:29:06) [GCC 10.2.1 20210110]
<<<OUTPUT ENDS>>>
(executable check - success) /home/nyuszika7h/[projectname]/.venv/bin/flake8
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/home/nyuszika7h/[projectname]'' && ''/home/nyuszika7h/[projectname]/.venv/bin/flake8'' --version']
<<<OUTPUT STARTS>>>
4.0.1 (flake8-broken-line: 0.4.0, flake8-bugbear: 22.1.11,
flake8-comprehensions: 3.7.0, flake8-executable: 2.1.1, flake8-pie: 0.15.0,
flake8-requirements: 1.5.2, flake8_builtins: 1.5.2, flake8_commas: 2.1.0,
flake8_implicit_str_concat: 0.2.0, flake8_isort: 4.1.1, flake8_quotes: 3.3.1,
flake8_simplify: 0.18.1, mccabe: 0.6.1, naming: 0.12.1, pycodestyle: 2.8.0,
pyflakes: 2.4.0, use-fstring-format: 1.3, use-fstring-percent: 1.3, use-
fstring-prefix: 1.3) CPython 3.10.1 on Linux
<<<OUTPUT ENDS>>>
(executable check - failure) mypy
(executable check - success) pylint
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/home/nyuszika7h/[projectname]'' && ''pylint'' --output-format text --msg-template="{path}:{line}:{column}: {ms
g_id} ({symbol}) {msg}" --reports n --from-stdin ''/home/nyuszika7h/[projectname]/[projectname]/objects/tracks.py'' < ''/tmp/nvim03TJEf/2/tracks.py''']
<<<OUTPUT STARTS>>>
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
<<<OUTPUT ENDS>>>
(executable check - failure) pyright-langserver
(executable check - success) /home/nyuszika7h/[projectname]/.venv/bin/vulture
(finished - exit code 1) ['/bin/zsh', '-c', 'cd ''/home/nyuszika7h/[projectname]'' && ''/home/nyuszika7h/[projectname]/.venv/bin/vulture'' .']
<<<OUTPUT STARTS>>>
/home/nyuszika7h/[projectname]/[projectname]/objects/tracks.py:619: unused variable 'original' (100% confidence)
/home/nyuszika7h/[projectname]/[projectname]/services/[name].py:78: unreachable code after 'return' (100% confidence)
<<<OUTPUT ENDS>>>
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/home/nyuszika7h/[projectname]'' && ''/home/nyuszika7h/[projectname]/.venv/bin/flake8'' --format=default --std
in-display-name ''/home/nyuszika7h/[projectname]/[projectname]/objects/tracks.py'' - < ''/tmp/nvim03TJEf/3/tracks.py''']
<<<NO OUTPUT RETURNED>>>