dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.51k stars 1.43k forks source link

Stylelint 16.0.0+ not outputting inline errors with ale #4708

Closed oddtO closed 8 months ago

oddtO commented 8 months ago

Information

Vim version: NVIM v0.9.5 Build type: Release

Operating System: Arch Linux

What went wrong

Stylelint does not print any inline error messages in the buffer. Using stylelint in the terminal works as expected. It turns out that the issue lies in the major stylelint update because stylelint@15.10.3 and stylelint-config-standard@34.0.0 output inline messages when viewing a buffer but stylelint@16.1.0 with stylelint-config-standard@36.0.0 does not work with ale and neovim.

I tried looking for similar issues closed and open. I tried disabling all other plugins except ale but the issue still persisted.

Reproducing the bug

  1. Init npm package
  2. Run npm install --save-dev stylelint stylelint-config-standard
  3. Create .stylelint.js file in the project root directory and extend stylelint-config-standard there
  4. Create .css file
  5. Open .css file in neovim

:ALEInfo (of the not working version)

Expand Current Filetype: css Available Linters: ['cspell', 'csslint', 'fecs', 'stylelint', 'vscodecss'] Enabled Linters: ['cspell', 'csslint', 'fecs', 'stylelint', 'vscodecss'] Ignored Linters: [] Suggested Fixers: 'css-beautify' - Format CSS using css-beautify from js-beautify. 'fecs' - Apply fecs format to a file. 'prettier' - Apply prettier to a file. 'remove_trailing_lines' - Remove all blank lines at the end of a file. 'stylelint' - Fix stylesheet files using stylelint --fix. 'trim_whitespace' - Remove all trailing whitespace characters at the end of every line. Linter Variables: let g:ale_css_stylelint_executable = 'stylelint' let g:ale_css_stylelint_options = '' let g:ale_css_stylelint_use_global = 0 Global Variables: let g:ale_cache_executable_check_failures = v:null let g:ale_change_sign_column_color = v:null 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 = 'auto' 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 = 1 let g:ale_fixers = {'html': ['prettier', 'eslint'], 'javascript': ['prettier', 'eslint'], 'css': ['prettier', 'stylelint']} let g:ale_history_enabled = 1 let g:ale_info_default_mode = 'preview' 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 = v:null 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 = v:null let g:ale_sign_error = v:null let g:ale_sign_info = v:null let g:ale_sign_offset = v:null let g:ale_sign_style_error = v:null let g:ale_sign_style_warning = v:null let g:ale_sign_warning = v:null let g:ale_sign_highlight_linenrs = v:null let g:ale_type_map = {} let g:ale_use_neovim_diagnostics_api = 1 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 Command History: (executable check - failure) cspell (executable check - failure) csslint (executable check - failure) fecs (executable check - success) /home/doUknowme/odin/projects/weather-app/node_modules/.bin/stylelint (finished - exit code 0) ['/usr/bin/zsh', '-c', '''/home/doUknowme/odin/projects/weather-app/node_modules/.bin/stylelint'' --stdin-filename ''/home/doUknowme/odin/projects/weather-app/src/css/body.css'' < ''/tmp/nvim.89lUGE/1/body.css'''] <<>> (executable check - success) vscode-css-language-server (started) ['/usr/bin/zsh', '-c', '''vscode-css-language-server'' --stdio'] (executable check - failure) cspell (executable check - failure) csslint (executable check - failure) fecs (finished - exit code 2) ['/usr/bin/zsh', '-c', '''/home/doUknowme/odin/projects/weather-app/node_modules/.bin/stylelint'' --stdin-filename ''/home/doUknowme/odin/projects/weather-app/src/css/body.css'' < ''/tmp/nvim.89lUGE/2/body.css'''] <<>> (executable check - failure) cspell (executable check - failure) csslint (executable check - failure) fecs (finished - exit code 0) ['/usr/bin/zsh', '-c', '''/home/doUknowme/odin/projects/weather-app/node_modules/.bin/stylelint'' --stdin-filename ''/home/doUknowme/odin/projects/weather-app/src/css/body.css'' < ''/tmp/nvim.89lUGE/3/body.css'''] <<>>
oddtO commented 8 months ago

it was quickly fixed in #4702, closing the issue.