dense-analysis / dense-analysis/ale
Error when closing an ansible playbook from NeoVim when ansible-lint is loaded.
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
## Information
**VIM version**
NVIM v0.8.3
Build type: RelWithDebInfo
Operating System: Fedora 37
## What went wrong
When you close an ansible playbook when Ale has ansible-lint loaded as a linter, the following error message apprears:
```
Error detected while processing function 66_NeoVimCallback[35]..function 66_NeoVimCallback[29]..16[1]..44_ExitCallback[28]..43_HandleExit[30]..ale#engine#HandleLoclist[15]..ale#engine#FixLocList:
line 16:
E1098: String, List or Blob required
```
This does not happen when ansible-lint is not installed.
## Reproducing the bug
I have written scripts to reproduce this issue in a container: https://github.com/SkrrtBacharach/ale_issue_4498
* Optional: Install podman and change common.sh if you want to use podman
to build and run the container.
* Build and run the image with: `./build.sh && ./run.sh`
* This should drop you into a neovim process which installs
the necessary language servers to reproduce this issue.
* Wait for Mason to update it's package list and then for ansible-lint to finish installing.
* This takes about 15-20 seconds on my machine, so patience is a virtue.
* Press 'q' to close the Mason menu.
* Run `:AleInfo` or any other diagnostic commands necessary.
* Exit out of the editor with `:wq`
* You should see the error in your terminal, similar to:
### :ALEInfo
Expand
Current Filetype: yaml.ansible
Available Linters: ['actionlint', 'circleci', 'gitlablint', 'yaml-language-server', 'spectral', 'swaglint', 'yamllint', 'ansible-language-server', 'ansible_lint']
Linter Aliases:
'ansible_lint' -> ['ansible', 'ansible-lint']
Enabled Linters: ['yaml-language-server', 'spectral', 'yamllint', 'ansible-language-server', 'ansible_lint']
Ignored Linters: []
Suggested Fixers:
'prettier' - Apply prettier to a file.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
'yamlfix' - Fix yaml files with yamlfix.
Linter Variables:let g:ale_ansible_ansible_lint_executable = 'ansible-lint'
let g:ale_ansible_language_server_config = {}
let g:ale_ansible_language_server_executable = 'ansible-language-server'
let g:ale_yaml_ls_config = {}
let g:ale_yaml_ls_executable = 'yaml-language-server'
let g:ale_yaml_ls_use_global = 0
let g:ale_yaml_spectral_executable = 'spectral'
let g:ale_yaml_spectral_use_global = 0
let g:ale_yaml_yamllint_executable = 'yamllint'
let g:ale_yaml_yamllint_options = ''
Global Variables:let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = v:null
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 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 = 0
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_neovim_diagnostics_api = 0
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 'all'
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
LSP Error Messages:(Errors for ansible-language-server)
Failed to find project root, language server won't start.
Command History:(executable check - failure) yaml-language-server
(executable check - failure) spectral
(executable check - failure) yamllint
(executable check - failure) ansible-lint
Contributor guide
Assessment
This issue has not been assessed yet.