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

Linting fails with ansible-lint version >= 6.0.0 #4188

Closed
mperry2 opened this issue May 8, 2022 · 1 comment · Fixed by #4189
Closed

Linting fails with ansible-lint version >= 6.0.0 #4188

mperry2 opened this issue May 8, 2022 · 1 comment · Fixed by #4189
Labels

Comments

@mperry2
Copy link
Contributor

mperry2 commented May 8, 2022

Information

VIM version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 01 2021 01:51:08)
Included patches: 1-2434

Operating System: Debian 11

What went wrong

ansible-lint removed the --parseable-severity option in version 6.0.0 (ansible/ansible-lint#1898) which is causing the ALE linter for ansible-lint to fail.

Reproducing the bug

  1. Install ansible-lint
  2. Edit the file
  3. Run :ALELint

:ALEInfo

 Current Filetype: yaml.ansible
Available Linters: ['actionlint', 'circleci', 'yaml-language-server', 'spectral', 'swaglint', 'yamllint', 'ansible_lint']
   Linter Aliases:
'ansible_lint' -> ['ansible', 'ansible-lint']
  Enabled Linters: ['yaml-language-server', 'spectral', 'yamllint', '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_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 = ''
let b:ale_yaml_yamllint_options = '-c /home/mperry/.config/yamllint/config.ansible.yml'
 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 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_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:
(executable check - failure) yaml-language-server
(executable check - failure) spectral
(executable check - success) yamllint
(finished - exit code 0) ['/bin/bash', '-c', '''yamllint'' -c /home/mperry/.config/yamllint/config.ansible.yml -f parsable ''/tmp/vXsDAOc/2/main.yml''']
<<<NO OUTPUT RETURNED>>>
(executable check - success) ansible-lint
(finished - exit code 0) ['/bin/bash', '-c', '''ansible-lint'' --version']
<<<OUTPUT STARTS>>>
WARNING: PATH altered to include /home/mperry/.local/pipx/venvs/ansible-lint/bin
ansible-lint 6.0.2 using ansible 2.12.5
<<<OUTPUT ENDS>>>
(finished - exit code 2) ['/bin/bash', '-c', '''ansible-lint'' --nocolor --parseable-severity -x yaml ''/home/mperry/ansible/plays/testing/main.yml''']
<<<NO OUTPUT RETURNED>>>
@mperry2 mperry2 added the bug label May 8, 2022
@mperry2
Copy link
Contributor Author

mperry2 commented May 8, 2022

It appears that the only way to view the severity is by using ansible-lint's -f json option.

mperry2 added a commit to mperry2/ale that referenced this issue May 8, 2022
ansible-lint 6.0.0 removed the `--parseable-severity`. Use the JSON
output in its place.

Fixes dense-analysis#4188
mperry2 added a commit to mperry2/ale that referenced this issue May 8, 2022
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes dense-analysis#4188
hsanson pushed a commit that referenced this issue May 9, 2022
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes #4188
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 11, 2022
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes dense-analysis#4188
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 11, 2022
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes dense-analysis#4188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant