diff options
-rw-r--r-- | CONTRIBUTING.md | 38 | ||||
-rw-r--r-- | ale_linters/javascript/eslint.vim | 3 | ||||
-rw-r--r-- | doc/ale.txt | 6 | ||||
-rw-r--r-- | plugin/ale/zmain.vim | 2 |
4 files changed, 44 insertions, 5 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..238e282a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Contributing to ALE + +1. [Guidelines](#guidelines) +2. [Creating Pull Requests](#pull-requests) + +<a name="guidelines"></a> + +# 1. Guidelines + +Have fun, and work on whatever floats your boat. Take It Easy :tm:. + +<a name="pull-requests"></a> + +# 2. Creating Pull Requests + +For code you write, make sure to credit yourself at the top of files you add, and probably those you modify. You can write +some comments at the top of your VIM files. + +```vim +" Author: John Smith <john.smith@gmail.com> +" Description: This file adds support for awesomelinter to the best language ever. +``` + +If you want to credit multiple authors, you can comma separate them. + +```vim +" Author: John Smith <john.smith@gmail.com>, Jane Doe <https://jane-doe.info> +``` + +# 2.1. Adding a New Linter + +If you add a new linter, look for existing handlers first in the [handlers.vim](plugin/ale/handlers.vim) file. One of the handlers +there may already be able to handle your lines of output. If you find that your new linter replicates an existing error handler, +consider pulling it up into the [handlers.vim](plugin/ale/handlers.vim) file, and use the generic handler in both places. + +When you add a linter, make sure the language for the linter and the linter itself are present in the table in the +[README.md](README.md) file and in the Vim [help file](doc/ale.txt). The programs and linters are sorted alphabetically in the +table and list. diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim index e31a5b15..28e61ea9 100644 --- a/ale_linters/javascript/eslint.vim +++ b/ale_linters/javascript/eslint.vim @@ -23,7 +23,8 @@ function! ale_linters#javascript#eslint#Handle(buffer, lines) endif let text = l:match[3] - let marker_parts = l:match[4] + let marker = l:match[4] + let marker_parts = split(marker, '/') let type = marker_parts[0] if len(marker_parts) == 2 diff --git a/doc/ale.txt b/doc/ale.txt index 7cc9a031..106802cb 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -108,9 +108,9 @@ g:ale_lint_on_enter *g:ale_lint_on_enter* Type: |Number| Default: `1` -When this option is set to `1`, the |BufEnter| event will be used to apply -linters when buffers are first opened. If this is not desired, this variable -can be set to `0` in your vimrc file to disable this behaviour. +When this option is set to `1`, the |BufEnter| and |BufRead| events will be +used to apply linters when buffers are first opened. If this is not desired, +this variable can be set to `0` in your vimrc file to disable this behaviour. g:ale_lint_on_save *g:ale_lint_on_save* diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index e41ff7e6..83bb8109 100644 --- a/plugin/ale/zmain.vim +++ b/plugin/ale/zmain.vim @@ -355,7 +355,7 @@ endif if g:ale_lint_on_enter augroup ALERunOnEnterGroup autocmd! - autocmd BufEnter * call ALELint(20) + autocmd BufEnter,BufRead * call ALELint(0) augroup END endif |