summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ale-c.txt2
-rw-r--r--doc/ale-cpp.txt2
-rw-r--r--doc/ale-cs.txt4
-rw-r--r--doc/ale-dockerfile.txt23
-rw-r--r--doc/ale-prolog.txt56
-rw-r--r--doc/ale.txt120
6 files changed, 202 insertions, 5 deletions
diff --git a/doc/ale-c.txt b/doc/ale-c.txt
index 2a2a879e..be0a3d77 100644
--- a/doc/ale-c.txt
+++ b/doc/ale-c.txt
@@ -130,7 +130,7 @@ overrides |g:ale_c_build_dir_names|.
g:ale_c_clangtidy_checks *g:ale_c_clangtidy_checks*
*b:ale_c_clangtidy_checks*
Type: |List|
- Default: `['*']`
+ Default: `[]`
The checks to enable for clang-tidy with the `-checks` argument.
diff --git a/doc/ale-cpp.txt b/doc/ale-cpp.txt
index 47ba2c70..e1f64ab5 100644
--- a/doc/ale-cpp.txt
+++ b/doc/ale-cpp.txt
@@ -103,7 +103,7 @@ overrides |g:ale_c_build_dir_names|.
g:ale_cpp_clangtidy_checks *g:ale_cpp_clangtidy_checks*
*b:ale_cpp_clangtidy_checks*
Type: |List|
- Default: `['*']`
+ Default: `[]`
The checks to enable for clang-tidy with the `-checks` argument.
diff --git a/doc/ale-cs.txt b/doc/ale-cs.txt
index b4cd295c..01e6348f 100644
--- a/doc/ale-cs.txt
+++ b/doc/ale-cs.txt
@@ -2,6 +2,10 @@
ALE C# Integration *ale-cs-options*
+In addition to the linters that are provided with ALE, C# code can be checked
+with the OmniSharp plugin. See here: https://github.com/OmniSharp/omnisharp-vim
+
+
===============================================================================
mcs *ale-cs-mcs*
diff --git a/doc/ale-dockerfile.txt b/doc/ale-dockerfile.txt
index 805cc478..284c6a10 100644
--- a/doc/ale-dockerfile.txt
+++ b/doc/ale-dockerfile.txt
@@ -3,6 +3,29 @@ ALE Dockerfile Integration *ale-dockerfile-options*
===============================================================================
+dockerfile_lint *ale-dockerfile-dockerfile_lint*
+
+g:ale_dockerfile_dockerfile_lint_executable
+ *g:ale_dockerfile_dockerfile_lint_executable*
+ *b:ale_dockerfile_dockerfile_lint_executable*
+ Type: |String|
+ Default: `'dockerfile_lint'`
+
+ This variable can be changed to specify the executable used to run
+ dockerfile_lint.
+
+
+g:ale_dockerfile_dockerfile_lint_options
+ *g:ale_dockerfile_dockerfile_lint_options*
+ *b:ale_dockerfile_dockerfile_lint_options*
+ Type: |String|
+ Default: `''`
+
+ This variable can be changed to add additional command-line arguments to
+ the dockerfile lint invocation - like custom rule file definitions.
+
+
+===============================================================================
hadolint *ale-dockerfile-hadolint*
hadolint can be found at: https://github.com/hadolint/hadolint
diff --git a/doc/ale-prolog.txt b/doc/ale-prolog.txt
new file mode 100644
index 00000000..14062a5a
--- /dev/null
+++ b/doc/ale-prolog.txt
@@ -0,0 +1,56 @@
+===============================================================================
+ALE Prolog Integration *ale-prolog-options*
+
+
+===============================================================================
+swipl *ale-prolog-swipl*
+
+g:ale_prolog_swipl_executable *g:ale_prolog_swipl_executable*
+ *b:ale_prolog_swipl_executable*
+ Type: |String|
+ Default: `'swipl'`
+
+ The executable that will be run for the `swipl` linter.
+
+g:ale_prolog_swipl_load *g:ale_prolog_swipl_load*
+ *b:ale_prolog_swipl_load*
+ Type: |String|
+ Default: `'current_prolog_flag(argv, [File]), load_files(File, [sandboxed(true)]), halt.'`
+
+ The prolog goals that will be passed to |g:ale_prolog_swipl_executable| with `-g` option.
+
+ It does:
+ 1. Takes the first command argument (current file path)
+ 2. Checks (syntactic / semantic) problems and output to stderr
+
+ NOTE: `sandboxed(true)` prohibits executing some directives such as 'initialization main'.
+
+g:ale_prolog_swipl_timeout *g:ale_prolog_swipl_timeout*
+ *b:ale_prolog_swipl_timeout*
+ Type: |Number|
+ Default: `3`
+
+ Timeout seconds to detect long-running linter.
+ It is done by setting SIGALRM.
+ See |g:ale_prolog_swipl_alarm| and |g:ale_prolog_swipl_alarm_handler|.
+
+g:ale_prolog_swipl_alarm *g:ale_prolog_swipl_alarm*
+ *b:ale_prolog_swipl_alarm*
+ Type: |String|
+ Default: `'alarm(%t, (%h), _, [])'`
+
+ The prolog goals to be expected to set SIGALRM.
+ `%t` is replaced by |g:ale_prolog_swipl_timeout|.
+ `%h` is replaced by |g:ale_prolog_swipl_alarm_handler|.
+
+g:ale_prolog_swipl_alarm_handler *g:ale_prolog_swipl_alarm_handler*
+ *b:ale_prolog_swipl_alarm_handler*
+ Type: |String|
+ Default: `'writeln(user_error, "ERROR: Exceeded %t seconds, Please change g:prolog_swipl_timeout to modify the limit."), halt(1)'`
+
+ The prolog goals to be expected that will be run on SIGALRM.
+ `%t` is replaced by |g:ale_prolog_swipl_timeout|.
+
+
+===============================================================================
+ vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
diff --git a/doc/ale.txt b/doc/ale.txt
index 66ce8ab1..21fab16c 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -9,6 +9,7 @@ CONTENTS *ale-contents*
1. Introduction.........................|ale-introduction|
2. Supported Languages & Tools..........|ale-support|
3. Linting..............................|ale-lint|
+ 3.1 Other Sources.....................|ale-lint-other-sources|
4. Fixing Problems......................|ale-fix|
5. Language Server Protocol Support.....|ale-lsp|
5.1 Completion........................|ale-completion|
@@ -75,6 +76,7 @@ CONTENTS *ale-contents*
dartanalyzer........................|ale-dart-dartanalyzer|
dartfmt.............................|ale-dart-dartfmt|
dockerfile............................|ale-dockerfile-options|
+ dockerfile_lint.....................|ale-dockerfile-dockerfile_lint|
hadolint............................|ale-dockerfile-hadolint|
elixir................................|ale-elixir-options|
mix.................................|ale-elixir-mix|
@@ -226,6 +228,8 @@ CONTENTS *ale-contents*
write-good..........................|ale-pod-write-good|
pony..................................|ale-pony-options|
ponyc...............................|ale-pony-ponyc|
+ prolog................................|ale-prolog-options|
+ swipl...............................|ale-prolog-swipl|
proto.................................|ale-proto-options|
protoc-gen-lint.....................|ale-proto-protoc-gen-lint|
pug...................................|ale-pug-options|
@@ -405,7 +409,7 @@ Notes:
* D: `dls`, `dmd`, `uncrustify`
* Dafny: `dafny`!!
* Dart: `dartanalyzer`!!, `language_server`, dartfmt!!
-* Dockerfile: `hadolint`
+* Dockerfile: `dockerfile_lint`, `hadolint`
* Elixir: `credo`, `dialyxir`, `dogma`, `mix`!!, `elixir-ls`
* Elm: `elm-format, elm-make`
* Erb: `erb`, `erubi`, `erubis`
@@ -453,6 +457,7 @@ Notes:
* PO: `alex`!!, `msgfmt`, `proselint`, `write-good`
* Pod: `alex`!!, `proselint`, `write-good`
* Pony: `ponyc`
+* Prolog: `swipl`
* proto: `protoc-gen-lint`
* Pug: `pug-lint`
* Puppet: `languageserver`, `puppet`, `puppet-lint`
@@ -570,6 +575,68 @@ ALE offers several options for controlling which linters are run.
* Only running linters you asked for. - |g:ale_linters_explicit|
+-------------------------------------------------------------------------------
+3.1 Other Sources *ale-lint-other-sources*
+
+Problems for a buffer can be taken from other sources and rendered by ALE.
+This allows ALE to be used in combination with other plugins which also want
+to display any problems they might find with a buffer. ALE's API includes the
+following components for making this possible.
+
+* |ale#other_source#StartChecking()| - Tell ALE that a buffer is being checked.
+* |ale#other_source#ShowResults()| - Show results from another source.
+* |ALEWantResults| - A signal for when ALE wants results.
+
+Other resources can provide results for ALE to display at any time, following
+ALE's loclist format. (See |ale-loclist-format|) For example: >
+
+ " Tell ALE to show some results.
+ " This function can be called at any time.
+ call ale#other_source#ShowResults(bufnr(''), 'some-linter-name', [
+ \ {'text': 'Something went wrong', 'lnum': 13},
+ \])
+<
+
+Other sources should use a unique name for identifying themselves. A single
+linter name can be used for all problems from another source, or a series of
+unique linter names can be used. Results can be cleared for that source by
+providing an empty List.
+
+|ale#other_source#StartChecking()| should be called whenever another source
+starts checking a buffer, so other tools can know that a buffer is being
+checked by some plugin. The |ALEWantResults| autocmd event can be used to
+start checking a buffer for problems every time that ALE does. When
+|ALEWantResults| is signaled, |g:ale_want_results_buffer| will be set to the
+number of the buffer that ALE wants to check.
+|ale#other_source#StartChecking()| should be called synchronously, and other
+sources should perform their checks on a buffer in the background
+asynchronously, so they don't interrupt editing.
+
+A plugin might integrate its own checks with ALE like so: >
+
+ augroup SomeGroupName
+ autocmd!
+ autocmd User ALEWantResults call Hook(g:ale_want_results_buffer)
+ augroup END
+
+ function! DoBackgroundWork(buffer) abort
+ " Start some work in the background here.
+ " ...
+ " Then call WorkDone(a:buffer, results)
+ endfunction
+
+ function! Hook(buffer) abort
+ " Tell ALE we're going to check this buffer.
+ call ale#other_source#StartChecking(a:buffer, 'some-name')
+ call DoBackgroundWork(a:buffer)
+ endfunction
+
+ function! WorkDone(buffer, results) abort
+ " Send results to ALE after they have been collected.
+ call ale#other_source#ShowResults(buffer, 'some-name', a:results)
+ endfunction
+<
+
===============================================================================
4. Fixing Problems *ale-fix*
@@ -2759,6 +2826,25 @@ ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()*
|runtimepath| for that filetype. This function can be called from vimrc or
similar to prevent ALE from loading linters.
+ale#other_source#ShowResults(buffer, linter_name, loclist)
+ *ale#other_source#ShowResults()*
+
+ Show results from another source of information.
+
+ `buffer` must be a valid buffer number, and `linter_name` must be a unique
+ name for identifying another source of information. The `loclist` given
+ where the problems in a buffer are, and should be provided in the format ALE
+ uses for regular linter results. See |ale-loclist-format|.
+
+
+ale#other_source#StartChecking(buffer, linter_name)
+ *ale#other_source#StartChecking()*
+
+ Tell ALE that another source of information has started checking a buffer.
+
+ `buffer` must be a valid buffer number, and `linter_name` must be a unique
+ name for identifying another source of information.
+
ale#statusline#Count(buffer) *ale#statusline#Count()*
@@ -2787,10 +2873,21 @@ b:ale_linted *b:ale_linted*
echo getbufvar(bufnr(''), 'ale_linted', 0) > 0 ? 'checked' : 'not checked'
<
+g:ale_want_results_buffer *g:ale_want_results_buffer*
+
+ `g:ale_want_results_buffer` is set to the number of the buffer being checked
+ when the |ALEWantResults| event is signaled. This variable should be read to
+ figure out which buffer other sources should lint.
+
+
ALELintPre *ALELintPre-autocmd*
+ *ALELintPre*
ALELintPost *ALELintPost-autocmd*
+ *ALELintPost*
ALEFixPre *ALEFixPre-autocmd*
+ *ALEFixPre*
ALEFixPost *ALEFixPost-autocmd*
+ *ALEFixPost*
These |User| autocommands are triggered before and after every lint or fix
cycle. They can be used to update statuslines, send notifications, etc.
@@ -2804,7 +2901,7 @@ ALEFixPost *ALEFixPost-autocmd*
autocmd!
autocmd User ALELintPre hi Statusline ctermfg=darkgrey
autocmd User ALELintPost hi Statusline ctermfg=NONE
- augroup end
+ augroup END
<
Or to display the progress in the statusline:
>
@@ -2814,10 +2911,11 @@ ALEFixPost *ALEFixPost-autocmd*
autocmd!
autocmd User ALELintPre let s:ale_running = 1 | redrawstatus
autocmd User ALELintPost let s:ale_running = 0 | redrawstatus
- augroup end
+ augroup END
<
ALEJobStarted *ALEJobStarted-autocmd*
+ *ALEJobStarted*
This |User| autocommand is triggered immediately after a job is successfully
run. This provides better accuracy for checking linter status with
@@ -2825,6 +2923,22 @@ ALEJobStarted *ALEJobStarted-autocmd*
triggered before any linters are executed.
+ALEWantResults *ALEWantResults-autocmd*
+ *ALEWantResults*
+
+ This |User| autocommand is triggered before ALE begins a lint cycle. Another
+ source can respond by calling |ale#other_source#StartChecking()|, and
+ |ALELintPre| will be signaled thereafter, to allow other plugins to know
+ that another source is checking the buffer.
+
+ |g:ale_want_results_buffer| will be set to the number for a buffer being
+ checked when the event is signaled, and deleted after the event is done.
+ This variable should be read to know which buffer to check.
+
+ Other plugins can use this event to start checking buffers when ALE events
+ for checking buffers are triggered.
+
+
===============================================================================
10. Special Thanks *ale-special-thanks*