Ale: Error marker in sign column not disapearing after correction

Created on 2 Oct 2019  路  10Comments  路  Source: dense-analysis/ale

Information

Vim 8.1.2100

Operating System: macOS 10.14.6

What went wrong

The error marker in the sign column does not disappear anymore after I have corrected the cause of the error. I am using eslint(i.e. target language is Javascript) .

Currently I am not using any settings for ale.

When I exit vim and start it again, the error marker is not shown anymore.

Reproducing the bug

To make sure this is not caused by an interferance problem with some other plugin, I've removed (even uninstalled) all other plugins and ale is the only plugin which remains running.

Something went wrong in specifically this place, and I also searched through both open and closed issues for the same problem before reporting a bug here.

Are you having trouble configuring ALE? Try asking for help on Stack Exchange or perhaps on Reddit instead. The GitHub issue tracker should be used for reporting bugs or asking for new features.

:ALEInfo

Current Filetype: javascript
Available Linters: ['eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
Enabled Linters: ['eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
Suggested Fixers:
'eslint' - Apply eslint --fix to a file.
'fecs' - Apply fecs format to a file.
'importjs' - automatic imports for javascript
'prettier' - Apply prettier to a file.
'prettier_eslint', 'prettier-eslint' - Apply prettier-eslint to a file.
'prettier_standard', 'prettier-standard' - Apply prettier-standard to a file.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'standard' - Fix JavaScript files using standard --fix
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
'xo' - Fix JavaScript/TypeScript files using xo --fix.
Linter Variables:

let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_suppress_eslintignore = 0
let g:ale_javascript_eslint_suppress_missing_config = 0
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_fecs_executable = 'fecs'
let g:ale_javascript_fecs_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_ls_executable = 'flow'
let g:ale_javascript_flow_ls_use_global = 0
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_flow_use_home_config = 0
let g:ale_javascript_flow_use_respect_pragma = 1
let g:ale_javascript_jscs_executable = 'jscs'
let g:ale_javascript_jscs_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_tsserver_config_path = ''
let g:ale_javascript_tsserver_executable = 'tsserver'
let g:ale_javascript_tsserver_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_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_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 = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_lsp_root = {}
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_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) fecs
(executable check - failure) jscs
(executable check - failure) jshint
(executable check - failure) standard
(executable check - failure) tsserver
(executable check - failure) xo
(finished - exit code 0) ['/bin/bash', '-c', '''eslint'' -f json --stdin --stdin-filename ''/Users/kastner/Documents/node.js/mk-base-adapter/lib/base-adapter.js'' < ''/var/folders/wx/cpnx02510pb53ztjbpckqlxr0000gn/T/vcSjgCt/9/base-adapter.js''']

<<>>
[{"filePath":"/Users/kastner/Documents/node.js/mk-base-adapter/lib/base-adapter.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0}]
<<>>

(executable check - failure) fecs
(executable check - failure) jscs
(executable check - failure) jshint
(executable check - failure) standard
(executable check - failure) tsserver
(executable check - failure) xo
(finished - exit code 0) ['/bin/bash', '-c', '''eslint'' -f json --stdin --stdin-filename ''/Users/kastner/Documents/node.js/mk-base-adapter/lib/base-adapter.js'' < ''/var/folders/wx/cpnx02510pb53ztjbpckqlxr0000gn/T/vcSjgCt/10/base-adapter.js''']

<<>>
[{"filePath":"/Users/kastner/Documents/node.js/mk-base-adapter/lib/base-adapter.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0}]
<<>>

(executable check - failure) fecs
(executable check - failure) jscs
(executable check - failure) jshint
(executable check - failure) standard
(executable check - failure) tsserver
(executable check - failure) xo

Most helpful comment

Thanks to @kg8m and @hsanson for fixing this. :+1:

All 10 comments

@mkastner I suspect this may be caused by the recent support for vim-group added to ALE. Is it possible you can provide a sample file that presents the issue so I can test this on my machine?

@hsanson I've attached a copy of my .vimrc

vimrc.txt

I bisec the problem (that I also have) and it is introduced with commit 41ff80dc9ec2cc834cc8c4aaa753e308223d48b8.

@mkastner @mowgli I am having trouble replicating this issue. I have installed vim 8.1.2100:

/vim-build/bin/vim-v8.1.2100  --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct  4 2019 10:15:37)
Included patches: 1-2100

And ESLint v4.13.1.

I open this javascript file with eslint only enabled in ALE:

import Vue from 'vue';
import Vuex from 'vuex';
import User from './modules/user';

Vue.use(Vuex);

export default new Vuex.Store({
    modules: {
      User,
    },
    state: {
    },
    mutations: {
    },
    actions: {
    },
 })

And I can see the signs appear/disappear as I edit the file in different ways.

I would like to get some more information to see if I can find what is going on.

  1. Open a JS file with signs showing up and run these commands within vim:
:echo ale#sign#ReadSigns(bufnr("%"))
:echo ale#sign#FindCurrentSigns(bufnr("%"))
  1. Copy the output of both commands and paste them as comment in this issues.

  2. Fix some of the signs and run the same commands again.Copy the output of both commands and paste them too.

I usually do not do javascipts. I seen that problem with yaml, shell or perl files.

However, with al yaml file where I provocate an error ('>>' mark), I get the following:

First command:

['--- Zeichen ---', 'Zeichen f眉r xxx.yaml:', '    Zeile=235  id=1000001 Gruppe=ale  Name=ALEErrorSign Priorit盲t=30', '    Zeile=235  id=1000001 Gruppe=ale  Name=ALEErrorSign Priorit盲t=30', '    Zeile=240  id=1000001 Gruppe=ale  Name=ALEErrorSign Priorit盲t=30']

Second command:

[0, []]

This problem is caused by Vim's language. Adding :language C into vimrc solves it. I think it is difficult to fix the parse pattern because the keyword group=ale varies depending on Vim's language, e.g., Gruppe=ale, 銈般儷銉笺儣=ale, and so on.

Use '\v^.*\=(\d+).*\=(\d+).*\=ale>.*\=(ALE[a-zA-Z]+Sign)' instead of '\v^.*\=(\d+).*\=(\d+).*group\=ale.*\=(ALE[a-zA-Z]+Sign)'?

@mowgli thanks for the feedback, it was critical to understand the cause of this issue.

@kg8m thanks for the regexp fix, it works great.

I have submitted a PR #2809 that should fix this problem.

Thanks to @kg8m and @hsanson for fixing this. :+1:

Thank you all a lot. This was really fast.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sodiumjoe picture sodiumjoe  路  4Comments

trevordmiller picture trevordmiller  路  4Comments

lervag picture lervag  路  3Comments

garand picture garand  路  4Comments

kronos29296 picture kronos29296  路  4Comments