Compare commits

...

3190 Commits

Author SHA1 Message Date
Shaun Duncan 6996d1c14d
Allow callbacks for floating preview popups (#4247)
* Add extra config options for virtualtext

* Undo virtualtext changes and move to floating preview

* revert changes to pass hightlight group to floating preview

* rename var

* Document changes

* Add updates based on feedback

* Check for string type and attempt to call the function

* Fix lint errors

Co-authored-by: Shaun Duncan <shaun@speedscale.com>
2022-08-23 20:22:52 +09:00
Magnus Groß d93bc2baf7
Use native virtual-text for vim9 (#4281)
Our current virtual text implementation for vim emulates it by abusing
the textprop and popupwin feature from vim 8.2 (for more details see
commit 708e810414).
This implementation sometimes is janky, for example the popups may leak
into other vim windows next to the current window.

Luckily, vim just got native virtual-text support as a proper subtype to
the prop_add() function. By using the 'text' option, the text property
automatically becomes virtual text that is appended to the current line
if col is zero.

Note that the prop_add() method now returns negative IDs for virtual
text properties.

This feature was added in vim 9.0.0067, but it got a lot of bugfixes
which is why we only use this new API if vim has at least version
9.0.0214.
However, there are still some minor bugs with vim's native virtual text,
so we might have to bump the version check again in the future.

Also see #3906.

Now with proper virtual text support for both vim and neovim available,
we can tackle #2962 in the future by simply tracking multiple virt-texts
instead of just the last one.

In the future we might also want to disable our virtual text emulation
support for vim, as it is a total hack, but for now we should keep it
for backwards compatibility.
2022-08-23 20:22:14 +09:00
Erik Westrup 992476982a
Put :ALEInfo in collapsible for bug reports (#4286)
To make the bug reports a bit more readable. See an example of usage
here: https://github.com/dense-analysis/ale/issues/4285
2022-08-18 06:51:01 +09:00
Hongbo Liu 7889983f89
fix #4276: honor b:ale_enabled for hover at cursor (#4277)
* fix #4276: honor b:ale_enabled for hover at cursor

* fix indention
2022-08-18 06:34:34 +09:00
Mo Lawson 233b681029
Add support for syntax_tree fixer (#4268)
This is the library that now powers prettier/plugin-ruby but is also
stands on its own: https://github.com/ruby-syntax-tree/syntax_tree
2022-08-09 21:11:20 +09:00
Nathan Henrie 5063804d44
Add openscad and sca2d support (#4205) 2022-08-07 16:27:17 +09:00
Tomáš Janoušek e10fcf22dc
Prevent buffering of job output and excessive polling (#4259)
When 'close_cb' is set for job_start(), but out_cb or err_cb isn't, vim
buffers data instead of dropping it (in case someone wanted to read and
process it in close_cb), and additionally polls for new data every 10
milliseconds, causing excessive wakeups and CPU usage. Since we don't
read the data anywhere outside of out_cb/err_cb, any LSP that prints an
error to stderr triggers this and vim keeps spinning until :ALEStopAllLSPs.

Fix this by always setting both callbacks, thus dropping any data we're
not interested in.

See https://github.com/vim/vim/issues/10758 for an upstream report of
the excessive polling. It's possible this is intentional, I dunno.

Fixes: b42153eb17 ("Fix #4098 - Clear LSP data when servers crash")
2022-07-26 17:56:12 +09:00
Albert Peschar 854d606333
Add support for Dune (#4263)
* Add support for dune

* Add test

* Undo reformatting of Markdown file

* Refer to ale-ocaml-dune from ale.txt
2022-07-26 17:55:22 +09:00
0xHyoga 0ea53870b6
cairo support (#4256)
* cairo support

* supported languages txt

* add cairo to ale.txt
2022-07-22 13:05:08 +09:00
Horacio Sanson 5ef26c32da
Fix 4249 - Revert change to stop compl menu. (#4250)
In #4231 some code was added to stop the completion menu if any when
opening a new one. This resulted in an issue in Vim that fills the
buffer with Ctrl-Z characters when deleting to the end of a line in a
position that triggers auto-completion.

Since auto-completion seems to work fine on all my tests I am reverting
this specific change.
2022-07-14 07:25:42 +09:00
Michael Dyrynda ad2f75e4b2
Add support for Laravel Pint (#4238)
* add support, docs, tests for Laravel Pint

* fix php-cs-fixer link

* add missing project-without-pint

* fix indentation

* fix pint executable in pint fixer test

* fix variables, docs related to pint support
2022-07-07 21:42:21 +09:00
Marios S a918f8c7bc
Improve struct and pointer autocompletion in C (#4231)
* Add explicit trigger characters for C (#4226)

* Stop completion before issuing subsequent requests (#4226)

Co-authored-by: Marios Sioutis <26476573+s-marios@users.noreply.github.com>
2022-07-04 22:00:29 +09:00
Henrique Barcelos d6f3d4976d
Allow `shfmt` fixer to use `.editorconfig` (#4244)
* fix: added support for local solhint executable

* feat: added support for matching parse errors

* test: added test for solhint command callback and handler

* chore: removed command callback test

* refactor: made solhint handler structure closer to eslint

* refactor(shfmt-fixer): remove derivation of default CLI arguments
2022-07-02 22:05:03 +09:00
Horacio Sanson 16cca1413f
Update tests to use latest neovim 0.7 (#4180)
* Update tests to use latest neovim 0.7

* Update CI to use neovim 0.7

* Fix conflict
2022-06-29 13:17:00 +09:00
Steven Leiva 39d1a10589
Update ale-haskell.txt (#4241)
Change `b:ale_haskell_his_executable` to `b:ale_haskell_hls_executable`.
2022-06-26 16:04:59 +09:00
Gabriel Remus 4a0d669c0a
Show warnings for `dart_analyze` linter (#4237) 2022-06-25 00:18:08 +09:00
D. Ben Knoble 0e99519500
racket: start completion in a full keyword (#4186)
The default `omni_start_map` is too restrictive for Lisps and Schemes
like Racket, which permit hyphens (among other special characters).

As recorded in #3870, trying to complete `file-name-from-path` when
typing `file-name<C-x><C-o>` would give completions like `namespace`
because the hyphen is ignored to find the start of the word for
completion.

Now the racket filetype searches for the start using the keyword class
`\k`, which is more precise.
2022-06-23 09:13:28 +09:00
infokiller 91e8422d6d
Add pyflyby fixer (using its tidy-imports script) (#4219)
* add pyflyby fixer

updates

* pyflyby: add docs

updates

* add tests to pyflyby fixer
2022-06-16 22:41:57 +09:00
w0rp f10349b48b
Replace gitter badge with Discord 2022-06-08 15:26:25 +01:00
w0rp 9e1089c38d
Recommend Discord instead of IRC, actually 2022-06-08 15:22:21 +01:00
Danny (he/him) f6d7aa4f0f
Fix README typo (#4225) 2022-06-06 22:58:11 +09:00
Paul Thompson 9bdc923624
re-worded confusing grammar (#4223) 2022-06-04 15:58:36 +09:00
Isman Firmansyah 876140832c
Add support for actionlint options (#4216)
* Add support for actionlint options

* fix misaligned doc tags
2022-05-29 22:23:47 +09:00
Devin J. Pohly ae44f05600
Allow customization of all floating window borders (#4215)
* Allow customization of all floating window borders

Users may not necessarily want the same border character for top+bottom
or left+right, so allow all eight border characters to be configured in
g:ale_floating_window_border.

For backwards compatibility, the old rules are still applied if only six
elements are given.

* Reorder popup border array for compatibility
2022-05-27 13:41:06 +09:00
Arash Mousavi 3d7b3a6541
Add zig fmt support (#4198)
* Add zig fmt support

* Review changes

* Fix linter errors
2022-05-17 07:38:54 +09:00
Michał Padula e343148e80
Fallback to summary field if detail exists but is empty in terraform linter (#4157)
* Fallback to summary field if detail exists but is empty in terraform linter

* Add test

* Update terraform.vim

* remove whitespaces
2022-05-17 00:00:34 +09:00
Zhuoyun Wei 429f5a1447
Add support for Packer (#4192)
* Add support for HashiCorp Packer

* Add test for packer fmt

* Add doc for HCL/Packer

* Add link to Packer doc

* Also suggest packer fix for packer ft

* Add more links to TOC
2022-05-16 21:15:52 +09:00
Krishnakumar Gopalakrishnan, PhD b611fde718
fixes cpplint url in supported-tools.md (#4204) 2022-05-16 21:15:09 +09:00
Reza J. Bavaghoush 75d2413425
add rego support (#4199)
* add opa fmt fixer for rego files

* add opa linter

* add basic tests for linter and fixer

* add cspell to the docs
2022-05-16 21:14:11 +09:00
James C. Davis 5479b58660
support ember-template-lint 4.x (#4200)
* support ember-template-lint 4.x

* update ember-template-lint linter test
2022-05-15 12:44:23 +09:00
Fionn Fitzmaurice e6ca599e87
Look for .mypy.ini when finding project root (#4202)
We already check for mypy.ini, but the fallback .mypy.ini was ignored.
2022-05-15 12:20:16 +09:00
w0rp 044a6c956b
Close #4201 - Run vimls from Vader by default 2022-05-13 18:00:19 +01:00
w0rp e3e940a7fe
Update Vim versions mentioned in ale-development.txt 2022-05-13 17:47:15 +01:00
Matt Perry 14265e464a
Add support for ansible-lint 6.0.0 (#4189)
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes #4188
2022-05-09 20:27:21 +09:00
Richard Jonas 9e1351499c
Handle golangci_lint warning and error messages correctly (#4182)
* Handle golangci_lint warning and error messages correctly

* Fix linter warning

Co-authored-by: Richard Jonas <richard.jonas@derivco.se>
2022-05-04 20:05:32 +09:00
zandr 4e6a7debb4
Use stdin for Selene Lua linter (#4183)
When I added Selene as a linter, I wasn't aware it had the option to
process stdin using `-`.
2022-05-04 10:55:13 +09:00
bretello 323e2c0b6f
fix docs for actionlint (#4181)
Co-authored-by: bretello <bretello@distruzione.org>
2022-05-04 10:53:59 +09:00
Horacio Sanson 204e6294cf
Fix 4177 set default yaml linters (#4178)
* Fix 4177 set default yaml linters

* Fix 4177 set default yaml linters
2022-05-03 10:34:52 +09:00
bretello c694a24188
add yaml actionlint support (github actions) (#4173)
Co-authored-by: bretello <bretello@distruzione.org>
2022-05-03 10:03:05 +09:00
Dalius Dobravolskas 56399106fc
VSCode LSPs for CSS, HTML and JSON (#4175)
Switched to `vscode-langservers-extracted` as it is the one most
up-to-date.
2022-05-02 19:42:24 +09:00
Dalius Dobravolskas 34892186e4
vscode-json-languageserver support (#4164)
* vscode-json-languageserver-bin support

VSCode JSON languageserver has schema support for linting and
completions.

I have enabled snippets support (`snippetSupport`) even if it is not
fully supported. `label` that comes with completions response can be
used as well.

* Test fix.

* vscode-json-languageserver instead of vscode-json-languageserver-bin

vscode-json-languageserver is more up-to-date (about 1 year old),
vscode-json-languageserver-bin is 4 years old.

* Use git root.

* Documentation update.

* Trying to sort ordering issue.

* One more attempt

* One more attempt

* Uppercase seems to win.

* Clean-up

* Clean-up 2

* Test removed.
2022-04-30 12:33:48 +09:00
godbless d484347fb5
Add ALEGoToImplementation (#4160)
* Add go to implementation

* Add test cases for GoToImplementation

* Add documentation for GoToImplementation
2022-04-30 12:28:26 +09:00
zandr 57e16957e0
Add support for selene Lua linter (#4169) 2022-04-30 11:11:12 +09:00
godbless 3348222abc
Add CodeAction codeActionLiteralSupport Feature (#4163)
* Advertise codeActionLiteralSupport to LSP server

Without this, rust-analyzer doesn't return any code actions.  With it,
everything works properly.

* linter fixes

* test cases fixes

* Fix underflow of column in position.

Special values like for example -1 to denote the end of a line are not supported.
[reference](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position)

Co-authored-by: Brian Gernhardt <brian@gernhardtsoftware.com>
2022-04-29 22:17:29 +09:00
Diep Pham 6c51bb1573
Improve pylama linter output handling (#4106)
* Use JSON format for newer pylama version

https://github.com/klen/pylama/blob/develop/Changelog

The --format json option is added in pylama version 8.1.4.

* Fix linting warnings for pylama
2022-04-24 08:28:33 +09:00
Horacio Sanson e2ef4d91ee
Fix 3837 - update test to use latest vim 8.2 (#4147) 2022-04-20 22:07:25 +09:00
Alex McKinney 607f33a1b0
Add buf linter and fixer (#4128)
* Add buf lint to linters

* Add buf format to fixers

* Fix test/linter/test_buf_lint.vader

* Fix test/fixers/test_buf_format_fixer_callback.vader

* Simplify test/test-files/proto/testfile.proto

* Add buf-lint alias and rename linter
2022-04-06 17:00:59 +09:00
lykmast 1e997580fd
Handle ghc panic in haskell (#4145)
* Add primitive handling of ghc panic.

* PascalCase in function.

* Add simple test.
2022-04-06 16:59:50 +09:00
James Cherti 6c1f616c59
Add the buffer-local options 'b:ale_shell' and 'b:ale_shell_arguments'. (#4146) 2022-04-06 14:32:11 +09:00
Horacio Sanson c984daa0ec
Fix 4141 - Stop press enter prompt on long diagnostic messages (#4144)
* Fix 4141 - Stop press enter prompt on long diagnostic messages

* Fix 4139 - Check for array before join truncated_echo
2022-04-06 10:51:07 +09:00
Satoshi Matsubara cae550f07b
Update help for ale_go_staticcheck_lint_package (#4122) 2022-04-05 21:25:42 +09:00
w0rp d3df00b898
Fix test for echoing messages
The previous linter rule about stray echo lines has been restored, and
now all problems for custom linting rules can be ignored by adding a
comment above problem lines.
2022-04-01 14:35:07 +01:00
Amadeus Demarzi b3d1d6eecf
Use echon over echom for cursor echo (#3888)
* Problem messages no longer clutter `:messages`
* Messages are truncated better
2022-04-01 13:54:23 +01:00
João Costa bc406a846e
Set default value for insertTextFormat (#4124)
Co-authored-by: w0rp <devw0rp@gmail.com>
2022-04-01 12:41:05 +00:00
Horacio Sanson 0f55d371e9
Add neovim 0.6 to run-tests (#3998)
* Update test scripts
* Remove neovim 0.3 and 0.4
* Add neovim 0.6.1

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: w0rp <devw0rp@gmail.com>
2022-04-01 13:17:15 +01:00
Felix Maurer e81f005c78
Fix end line number when it exceeds the file (#4130)
If the end of the error exceeds the file, set it to the last line,
similarly as it is done with the beginning of the error.
2022-04-01 17:13:27 +09:00
Felix Maurer 80dcd648d3
rust-analyzer for non-Cargo projects (#4118)
* rust-analyzer in non-cargo projects

rust-analyzer can also be used in non-cargo projects. This requires a
rust-project.json file in the project root [1].

Make the rust-analyzer linter search for a rust-project.json file if no
Cargo.toml file could be found.

[1]: https://rust-analyzer.github.io/manual.html#non-cargo-based-projects

* Document rust-analyzer without cargo

* Test rust-analyzer with non-cargo projects

Change the other rust tests to match the new directory structure of the
test files.
2022-03-23 10:56:29 +09:00
Barnabás Ágoston 5c7019f394
Make it possible to override awk --lint option (#4114)
Currently, it's not possible to override the awk `--lint` option with

```viml
let g:ale_awk_gawk_options = '--lint=no-ext'
```

although this could be useful for those who only use gawk and don't want to get these lint errors:
> FEATURE X is a gawk extension

The idea is to move the default `--lint` option before the `awk_gawk_options` in the gawk.vim code to give the custom `--lint=...` option a higher precedence.

Co-authored-by: Barnabás Ágoston <barna@agoston.dev>
2022-03-20 13:52:22 +00:00
yoshi1123 c42fee3da5
Fix :ALEImport column position
Fix :ALEImport column position so it works with more language servers.

Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-20 13:20:33 +00:00
w0rp 560e6340ce
Bump ALE to v3.2.0 2022-03-05 01:24:43 +00:00
w0rp e5492e124d
Document default linter selections again 2022-03-05 00:43:56 +00:00
w0rp 87ade74b4d
Fix an argument name 2022-03-04 19:51:24 +00:00
Horacio Sanson c173b6243d
Enable autoimport by default (#4102) 2022-03-04 19:05:41 +00:00
yoshi1123 e490e87a60
Add eclipselsp jdt:// support for textDocument/definition (#4030)
This patch adds support for opening jdt:// links on "go to definition" requests returned by Java language servers.

Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-04 19:03:27 +00:00
w0rp b42153eb17
Fix #4098 - Clear LSP data when servers crash 2022-03-02 16:51:50 +00:00
nospam2998 66b2d994a1
Document the use of author rewriting tools (#4088)
Co-authored-by: cos <cos>
2022-03-01 16:04:09 +00:00
w0rp 3e1a98ff67
#3495 Mention that ShowResults() must not be called synchronously 2022-03-01 13:48:16 +00:00
w0rp 7ac0f633cc
Update README to mention Libera instead of Freenode 2022-02-26 20:24:48 +00:00
Horacio Sanson 5b1044e2ad
Fix 4086 - use stable command options for rustc (#4087) 2022-02-20 00:01:06 +09:00
Horacio Sanson 47470eddc2
Sometimes end_lnum and end_col are not present (#4062) 2022-02-09 23:25:52 +09:00
Sébastien NOBILI 82a3e444b2
fix: duplicate tags in doc (#4059)
* fix: duplicate tag in doc

* fix: duplicate tags in doc

Co-authored-by: Sébastien NOBILI <code@pipoprods.org>
2022-02-08 11:12:26 +00:00
Jerko Steiner 4a4516e3bf
Dispatch textDocument/didChange after rename (2) (#4049)
* Dispatch textDocument/didChange after rename

Previously whenever we renamed a symbol that was referenced from other
files we'd just edit those files in the background, and the LSP wouldn't
know about these changes. If we tried to rename the same symbol again,
the renaming would fail. In some scenarios, the operation would just be
wrong. Here is an attempt to fix this issue.

I also noticed another bug when using Go with `gopls` LSP and the `gofmt`
fixer. Whenever the file was saved, the `gofmt` would run and reformat
the file. But it seems there was some kind of a race condition so I
disabled saving for now, and all of the modified files will be unsaved,
so the user should call `:wa` to save them. I personally like this even
better because I can inspect exactly what changes happened, and I
instantly see them in the other opened buffers, which was previously not
the case.

Fixes #3343, #3642, #3781.

* Address PR comments

* Remove mode tests in corner case tests

* Address PR comments

* Save after ALERename and ALEOrganizeImports

Also provide options to disable automatic saving, as well as instructions to
enable `set hidden` before doing that.

* Fix broken test

* Save only when !&hidden

* Update doc

* Update doc

* Add silent
2022-02-08 20:07:39 +09:00
Jon Parise 8b1ea33cc0
Add a unimport linter for Python files (#4058)
Unimport (https://github.com/hakancelik96/unimport/) is a linter,
formatter for finding and removing unused import statements.

This introduces linting support, although fixer support could come
later.
2022-02-08 15:54:25 +09:00
Jon Parise 2428d4d81d
Update the Black URL (#4057)
The Black project moved to the PSF organization some time ago. Update
its URL accordingly.
2022-02-08 09:04:14 +09:00
Horacio Sanson 6d9399d863
Update cmake-lint linter url (#4056) 2022-02-06 22:07:08 +09:00
Carl Smedstad c9938bc293
Add CMake linter cmake-lint (#4036)
* Add CMake linter cmake-lint

Add support for the CMake linter provided by
https://github.com/cheshirekow/cmake_format.

* Escape cmake-lint executable and add linter tests
2022-02-06 21:09:38 +09:00
offa 7cbb68da6c
Add oelint-adv support (#4043) 2022-02-06 14:08:10 +09:00
Dalius Dobravolskas 0c276aac90
Allows to use quickfix for references. (#4033)
* Allows to use quickfix for references.

E.g. following mapping could be used to find references for item under
cursor and put result into quickfix list:

```
nnoremap <leader>af :ALEFindReferences -quickfix<CR>
```

Fixes #1759

* Documentation update.
2022-02-05 21:54:26 +09:00
nospam2998 a58b7b5efb
Treat ale_open_list integer values as thresholds (#4050)
Only open list window if the number of warnings or errors equals to or
exceeds the value of ale_open_list. No change when set to `1`.

Co-authored-by: cos <cos>
2022-02-04 17:56:48 +00:00
David Briscoe 5856c06775
Add ALEPopulateQuickfix and ALEPopulateLocList (#3761)
Closes #1810

Add ALEPopulateQuickfix and ALEPopulateLocList. They're not very useful
with ale's default auto-populate behaviour, so their useful configuration
is described in help.
2022-02-04 17:42:26 +00:00
David Briscoe 6d20b6c162
doc: Clarify the types of process_with (#4039) 2022-02-04 20:22:40 +09:00
Linda_pp 0d529d9b94
Add `naga` linter for WGSL support (#4047)
* Add WGSL support using `naga` command

* Add documents for wgsl

* Add test for `naga` linter

* Separate naga handler callback to hanlder/naga.vim
2022-02-04 16:29:28 +09:00
Justin Huang d1e2aaf85d
enable using cpplint for c (#3008)
* enable using cpplint for c

* fix tag alignment

* fix tag alignment trial #2

Co-authored-by: Justin Huang <justin.huang@perceive.io>
2022-02-03 22:32:42 +09:00
Jeffrey Lau a81512cfd2
Fix unhandled nix versions for linter 'nix' (#4045)
Previously, it would not generate any lint messages for nix 2.5.

Moreover, it would cause this error whenever the nix command is
invoked, when paired with a custom `g:ale_command_wrapper`:

    Error detected while processing function <SNR>92_NeoVimCallback[29]..<lambda>27[
    1]..<SNR>90_ExitCallback[28]..ale_linters#nix#nix#Command:
    line    1:
    E684: list index out of range: 0
2022-02-02 10:54:07 +09:00
Tomáš Janoušek da1e4dcd1e
Allow to configure haskell-language-server LSP config (#4038) 2022-02-02 10:28:52 +09:00
Jeffrey Lau 5087246c82
Add yaml-language-server support for YAML (#2874) (#4029) 2022-01-07 23:57:29 +09:00
Horacio Sanson 76bd059371
Fix 3838 - deprecate datanalyzer (#3839)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2022-01-05 22:34:47 +09:00
Horacio Sanson 5a5029b73d
Fix 4004 - Disable eslint by default for json. (#4023)
* Fix 4004 - Disable eslint by default for json.

This PR disables, or more correctly, excludes eslint from the list of
default linters for json files.

Also fixes elixir, go, json5, and jsonc files documentation and default
linters to make them consistent.

* Fix and improve tests
2022-01-05 22:33:00 +09:00
Horacio Sanson 7b8e711877
Fix 4025 - Allow to configure texlab LSP settings (#4027)
* Fix 4025 - Allow to configure texlab LSP settings

* Fix ale_tex_texlab_config type in help
2022-01-05 22:19:32 +09:00
w0rp 11a90ad0ff
Fix execution of the Angular language server for HTML files 2022-01-05 11:34:30 +00:00
Nathan ac0495df6e
Add dprint fixer (#4024)
* Add dprint fixer

* Fix windows tests

* dd dprint documentation
2022-01-04 21:49:03 +09:00
Alex Piechowski 48f68598cb
Add auto-fixer for crystal (#4016) 2021-12-28 20:23:57 +09:00
Horacio Sanson dcec4b3c37
Fix 3998 - add language option to uncrustify fixer (#4007) 2021-12-25 00:25:47 +09:00
Dalius Dobravolskas 5b792c7641
ALEFileRename command added. (#4012)
* ALEFileRename command added.

This command renames file and uses tsserver `getEditsForFileRename` to
fix import paths in Typescript files.

* ale#util#Input fix

* Even more fixes.

* Linting error fix.
2021-12-17 08:09:26 +09:00
Phong Nguyen e4ec2e4dc7
Fix crash for Reek 6.0.4 (#4010)
When `let g:ale_ruby_reek_show_wiki_link = 1`, Reek linter is crashed
 because `wiki_link` attribute does not exist in result.

 It seems that `wiki_link` is now replaced with `documentation_link` in
 recent version of Reek
2021-12-13 22:35:26 +09:00
thyme-87 091592bfb0
add support for checkov for linting terraform files (#4006)
* add support for checkov for terraform

* add tests for checkov handler

* add basic linter config tests for checkov

* update supported tools and languages lists

* simplify ale_linters#terraform#checkov#Handle

* ensure "-o json --quiet" is always set for checkov

* add documentation for checkov including config options

* fix tests after changing handling of default options for checkov

* add checkov to list of tools in doc/ale.txt
2021-12-11 20:51:26 +09:00
Brendan Maginnis b9744076a1
Pass full path to pydocstyle (#3995)
* Pass full path to pydocstyle

* Update pydocstyle tests
2021-12-09 23:24:32 +09:00
Horacio Sanson 9a01836015
Fix check for did_save and includeText capabilities (#4008) 2021-12-09 23:22:07 +09:00
Magnus Groß 9860dadbc9
Initialize hl-groups correctly if virtual text is loaded first (#3960)
If virtualtext.vim is autoloaded first, it will link
ALEVirtualTextWarning to ALEWarning. But ALEWarning is not initialized
yet, so it will create ALEWarning, but with no color definition set.

Shortly after, highlight.vim is autoloaded, which would usually link
ALEWarning to SpellCap, but only if ALEWarning is not already set.
However since ALEWarning is already initialized due to the previous
link, we skip this and never actually come around to properly
initializing it.

We fix this by initializing all highlight groups in highlight.vim, thus
satisfying the dependency of ALEVirtualTextWarning being initialized
after ALEWarning.

Fixes #3585
2021-12-09 23:21:39 +09:00
Arnold Chand de67f4743d
Add volar support for vue (#3992)
* feat-draft: inital volar setup

* feat(volar): add documentation

* feat(volar): include default init opts

* feat(volar): add initial tests

* fix(volar): add possible project roots

* fix(volar): tests - use empty files
2021-11-21 20:02:09 +09:00
Dan George 072750137f
Fix --file-filter option on cppcheck command (#3987)
* Add cppcheck handler match on misra msg

* Fix cppcheck --file-filter setting

This time, the tests and actually usage both work.

Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-20 19:01:32 +09:00
David Houston ea643b97ab
Add cspell Linter (#3981)
* Add cspell linter

Add cspell linter, with the languages it supports.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add cspell Global Variables Documentation

Add documentation to /doc/ale.txt with cspell configuration options.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add cspell to docs, Minor Cleanup

Add cspell for each supported language, adding some spaces and removing
others when caught navigating the file.

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-19 07:41:05 +09:00
Dan George aee0cc45be
Cppcheck buffered file only (#3983)
* Add cppcheck handler match on misra msg

* Use --file-filter cppcheck option

Cppcheck recently added --file-filter so that cppcheck only checks the
filtered files, even when using --project option, which checks all files
in the project, by default. The --ccpcheck-build-dir option didn't help
enough (at all?).

* Added C test cases

Also fixed and assumed typo: foo.c, instead of foo.cpp

* Replace hard-coded full path filenames

Attempt to fix the windows platform test execution.

* Fix typo - foo.c, instead of foo.cpp

* Reset buffer var between tests

* Handle header files in cppcheck

Cppcheck isn't designed to check header files, stand-alone. Daniel
Marjamäki suggested using --suppress options to avoid FPs.

* Fix Vint complaint in cppcheck handler.

* Fix file path in cppcheck handler

Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-18 13:27:23 +09:00
Dan George 3ca66e44bd
Restore checkmake linebreaks (#3986)
* Add cppcheck handler match on misra msg

* Add linebreak to checkmake formatter

Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-18 13:23:38 +09:00
David Houston 2cfeabd1b5
Rewrite Alex Integration to Use stdin (#3982)
Since having been added, the `alex` tool has added support for linting
on stdin. Rewrite this integration to reduce the number of tools
requiring disk-write access.

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-18 13:00:45 +09:00
Arie Oldman 3b8ff6536e
Adds PHPActor Linter (LSP) (#3975)
* Adds phpactor lsp linter

* Fixes missing comma

* Adds tests for phpactor lsp linter

* Adds note that this part is not my own work

* Removes unused variable

* Adds phpactor to supported tools list

* Fixes doc sorting

* Wraps phpactor in code tags
2021-11-18 12:54:10 +09:00
Daisuke Shimamoto 31dc6a61a0
Find composer.json when searching for psalm (#3979)
* Look for nearest composer.json before .git

* Add test for projects with composer.json
2021-11-15 21:17:18 +09:00
Chuan Wei Foo 01fdd8d66b
Show errors and warnings for the 'smlnj' linter (#3957)
* Show errors and warnings for the 'smlnj' linter

Fixes #3953

* Change smlnj stdIn regex
2021-11-15 20:35:45 +09:00
Dan George d72a9d64ff
Add cppcheck handler match on misra msg (#3980)
Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-15 20:34:46 +09:00
Utkarsh Verma 1e0e76bf96
Add support for AVRA linting (#3950)
* Add support for AVRA linting

* Add tests for AVRA linting and improve code

* Fix test

* Fix warning detection

* Fix test

* Fix test

* Add AVRA as a supported language in docs
2021-11-15 19:41:03 +09:00
Dmitri Vereshchagin 76c2293e68
Add sub_type to Elvis output (#3976)
Elvis is Erlang style reviewer, thus all loclist objects should have
sub_type set to style.
2021-11-12 16:50:56 +09:00
Arie Oldman ff26ed7231
Adds --memory-limit support for phpstan (#3973)
* Adds --memmory-limit option for PHPStan linter

* Updates docs for phpstan --memory-limit option.

* Adds Arizard to authors

* Adds test for phpstan memory limit parameter

* Fixes order of parameters in test

* Changes dash to underscore
2021-11-12 14:18:49 +09:00
David Houston a9d7f45924
Implement statix Linter and Fixer (#3969)
* Add Statix for Linting

Add `statix check` as a linter. Provides a simple set of definition
tests additionally. Variable names specify "check" to allow for later
addition of `statix fix` as a formatter once stream support is added.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fixup Supported Tools List

I didn't realise there were two separate lists of tools, so add statix
to the other list. Also, remembered "S" comes after "R", and so
re-ordered it.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix statix Test File

I refactored the variables for statix to allow for writing a fixer
later, and forgot to update them in the test, so update them now. Also
remove a stray "i", add missing space before checks

Signed-off-by: David Houston <houstdav000@gmail.com>

* Update Output Stream for v0.4.0

statix v0.4.0 provides a breaking change of output stream from stderr to
stdout.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add statix fix Fixer

Implement statix fix as a fixer for simple Nix antipatterns.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix statix Fixer Tests

Fix the statix fixer tests by removing the unnecessary
'read_temporary_file' value from the command, since it simply uses the
default value.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add statix Handler Test

Add a test for the statix handler per @hsanson's request.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix to run only on stdin for linting

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-12 07:34:25 +09:00
David Houston 8b3b16d71c
Implement gofumpt Fixer (#3968)
* Implement gofumpt Fixer

Add an implementation with test and documentation for the gofumpt go
code formatter, a stricter formatter than your standard "go fmt".

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add gofumpt to ale.txt TOC

Forgot to add gofumpt to the ALE vim help Table of Contents, so do so.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix Test Setup Method Capitalization

I had put "Setup" instead of "SetUp" for "ale#assert#SetUpFixerTests".
Fix such.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix typos

Add a missing space, remove an extra bracket by actually running tests
locally first. Would've been smart to do that from the beginning...

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-09 16:53:44 +09:00
Magnus Groß f37cd1fd4f
Make run-tests compatible with Podman (#3961)
There is no need to filter for references in such a complicated way.
docker images already works if you just pass the image and tag as
an argument.

This caused problems if one was using podman with its docker-compatible
interface.
Previously podman would return the following error:
Error: cannot specify an image and a filter(s)

With this new method podman does not return an error anymore, causing
the image to not be redownloaded every time and it still works with
normal Docker.
2021-11-04 16:01:46 +09:00
Benjamin Bannier 92f08b5af2
Add support for zeek (#3952) 2021-10-24 21:05:55 +09:00
Magnus Groß da331acc9e
Replace line breaks in virtual text with whitespace (#3949)
Before this patch multiline warnings would appear in a single line with
'^@' as separator.
Now we use whitespace as separator to improve the appearance.

Also strip trailing whitespace, newlines, etc...

Fixes #3939
2021-10-24 11:35:06 +09:00
Andrew Hayworth 95ba7898b4
Re-apply #3538 - remove -T argument from ruby linter (#3951)
The `-T` option (for "taint checking") was deprecated in ruby 2.7
and removed entirely in ruby 3.0. This causes the linter to fail
entirely for users of ruby 3.0.

This was reported in #3537, and then fixed in #3538 - but it seems as
though in 9fe7b1fe6a, it was accidentally
and entirely undone.

This commit is essentially identical to #3538, aside from a path change
for the tests.
2021-10-22 14:20:00 +09:00
Randy Stauner 9b5a3581eb
Parse clj-kondo lines that don't include row/col (#3946)
Some custom linter hooks don't include these numbers.
2021-10-19 16:04:50 +09:00
infokiller cb0f0e1d0b
fix(hadolint): set code field as well (#3943) 2021-10-19 15:30:19 +09:00
Horacio Sanson 16898417e6
Fix 3941 - add version check to isort fixer (#3942) 2021-10-16 14:02:58 +09:00
Horacio Sanson c7e3f1a0dd
Fix 3207 - do not send didSave notification if not supported (#3930) 2021-10-15 08:42:07 +09:00
Roeland 7413dfd3fc
erblint as fixer (#3935)
* fixer erblint

* erblint fixer test
2021-10-11 20:52:46 +09:00
Roeland 1ee7580557
Add support for erblint (#3931)
* support for erblint

* fix tests

* test for handler

* wrong names

* typo

* doc layout

* CI failed?
2021-10-09 14:33:07 +09:00
Wilson E. Alvarez 42a6e039cb
Implement textDocument/didSave includeText optional argument (#3925) 2021-10-07 20:48:54 +09:00
D. Ben Knoble 34a972f85d
sml: use filenames (fix #1084) (#3860) 2021-10-07 11:33:33 +09:00
Tomáš Janoušek efa563826d
codefix: Fix code actions that return Command[] directly instead of CodeAction[] (#3929)
According to
https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_codeAction,
the response to textDocument/codeAction is:

    (Command | CodeAction)[] | null

and the code only handled the case where it was a CodeAction that either
specified an edit or a command, but didn't handle a direct Command.

Note that the specification also says that both can be specified and
then the edit is applied first, then the command. Furthermore, there
seems to be some hacky code handling arguments directly, which I suspect
is non-standard and only works with a specific LSP server that happens
to pass the edits in the arguments unmodified.
2021-10-07 11:29:00 +09:00
a666 f9deee0e41
Add flakehell python linter (#3295) (#3921) 2021-10-02 16:37:57 +09:00
Arnold Chand 19b0f72c23
feat: add deno lsp for javascript (#3924)
* feat(js/deno): add deno lsp

* fix(doc/typescript): typo

* feat(doc/javascript): add deno lsp information

* feat(doc/supported-tools): add deno to js list, sorted

* fix(doc/javascript): update ToC and supported tools w/ deno
2021-10-02 09:51:22 +09:00
Magnus Groß 708e810414
Implement virtual text support for vim (#3915)
This requires the textprop and popupwin feature (vim 8.2).

Fixes #3906
2021-10-02 09:02:49 +09:00
Yuto Ito c9c89a1853
Fix: Failed to execute rubocop fixer on other machine (#3916) 2021-09-23 18:46:16 +09:00
Trevor Whitney f8a4c78b5b
Add support for jsonnetfmt and jsonnet-lint (#3907)
* update to lates

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* fix up docs

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* fix docs

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* get tests passing

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* update regex

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* use ale#Pad and AssertFixer

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
2021-09-21 10:49:15 +09:00
Götz Christ 2f72a3ed19
[YAML] CircleCI: skip checking for new tool version (#3902)
This way the tool runs a bit faster and we don't create unneeded network requests. Don't know if there are other network requests still occurring.
2021-09-17 17:55:28 +09:00
Dalius Dobravolskas dca56dd772
ALECodeAction fix: check linter name when searching for nearest error. (#3901)
It is easier to explain this fix with an example:

* tsserver and LSPs ask for error information when you want to fix
  error. tsserver `ts@getCodeFixes` command needs tsserver error code.

* now let's imagine that user has eslint and tsserver in use. Sometimes
  both can report same error in different way.

* Now there is no guarantee which error will come first and if eslint
  error comes first then tsserver will not return code fixes as we are
  passing wrong error code to it.

This fix will return proper error code based on linter.
2021-09-16 22:05:38 +09:00
Horacio Sanson 31349f208b
Update ALE test docs to mention NVim 0.5 (#3904) 2021-09-16 12:16:08 +09:00
Oliver Albertini f769f64c07
[ale-python-root] add `.pyre_configuration.local` to list of files (#3900)
Without this, we have one `pyre` process running across different pyre
projects. With this change, files in different projects can be linted
with pyre at the same time.

Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
2021-09-15 21:07:45 +09:00
Samuel Branisa 19437e25d0
Robot framework rflint support (#3715)
* Create rflint.vim

support for robot framework by creating ale definition for rflint syntax linter

* robot framework - rflint support
2021-09-11 09:19:17 +09:00
Horacio Sanson bf29f6ea92
Fix 3897 - add poetry to isort (#3898)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-09-10 15:18:41 +09:00
Oliver Albertini b504eeb094
[python/pyre.vim] Fix pyre persistent behavior (#3895)
It's necessary to provide a `-l` option to pyre with the closest parent
directory containing a `.pyre_configuration.local` file, or simply
change directory (cwd) to the root of the pyre project. Thanks to Ken
Verbosky for the code that fixes this.

Error seen when not using such a solution:

```
1031.473923 on 6: Dropping message 'ƛ Background task unexpectedly quited: Invalid configuration: Cannot find any source files to analyze. Either `source_directories` or `targets` must be specified.
```

Issue with this approach is that if you are editing files under
different projects, the `pyre persistent` process is not re-created for
each file. We have to do `:ALEStopAlllsps` in order for the process to
start with the new working directory.

Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
2021-09-10 12:53:54 +09:00
Jon Parise c5c58f5bf8
Improve the thriftcheck handler pattern (#3893)
More recent versions of thriftcheck use a more compliant GCC-style
output format which includes a space before the "severity" group.
This matches similar tools, like shellcheck.

This change adjusts the handler's pattern to parse this format in a
backwards-compatible way (even though backwards compatibility isn't
critical long-term as thriftcheck itself is close to its 1.0 release).
2021-09-08 21:48:48 +09:00
Horacio Sanson 42aadf6a26
Fix 3886 - Don't JSON decode completion user data if already a dict (#3894)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-09-08 21:45:19 +09:00
Amadeus Demarzi 35d0bd1519
Fix truncated echo (#3889)
* Fix truncated echo

In typescript, when putting the cursor on a `>` character of an arrow
function, the displayString body comes back as an empty string, and
means the split operation has 0 items, causing a failure when attempting
to call TruncatedEcho.

Even if there's a better fix, I'd assume this is a good safety since we
are injesting external data.

* Convert to use `empty()`
2021-09-06 11:26:32 +09:00
Jon Parise 8fd23f4b71
Introduce an ALELSPStarted autocommand (#3878)
This User autocommand is trigged immediately after an LSP process is
successfully initialized. This provides a way to perform any additional
initialization work, such as setting up buffer-level mappings.
2021-09-05 10:07:53 +09:00
tsjordan-eng b9fdb91e92
Cppcheck backwards compat 1.34 (#3887)
* Add support for cppcheck 1.34

* Add cppcheck 1.34 tests, correct pattern

Co-authored-by: Tyler S. Jordan <tsjorda@sandia.gov>
2021-09-03 22:31:17 +09:00
Jelte Fennema d53a085096
Add fixer for "dotnet format" (#3879)
The .NET ecosystem has an official tool for formatting its files: `dotnet format`
This adds support for that tool to ALE.
2021-08-25 15:27:04 +09:00
João Pesce f896744fee
Close #3872 - Add eslint-plugin-jsonc as a linter for JSON, JSONC and JSON5 (#3873)
* Add eslint as linter for JSON, JSONC and JSON5

Use the same lint configuration as eslint for javascript.

* Add documentation for JSON* eslint support

* Fix spacing in documentation

* Update docs to be unopinionated about plugins

Remove any preference for eslint plugins, since there are more thant one
that would work

* Reorder languages and tools in alphabetic order

* Fix misalignment

* Change orders to pass the tests
2021-08-21 10:02:56 +09:00
toastal a099fe24b2
Dhall fixes: use stdin, doc errors (#3868)
* purs-tidy

* Dhall fixes: use stdin, docs errors
2021-08-09 20:43:50 +09:00
toastal 9264ffda23
purs-tidy fix (#3867)
* purs-tidy

* Fixup for purs-tidy
2021-08-09 20:42:19 +09:00
pigfrown 836125391a
Adds fixer for golines (#3862)
* Adds fixer for golines

* Repositions golines docs to be in alphabetical order

* Fixes golines doc tag

* Fixes formatting for golines docs
2021-08-09 10:13:43 +09:00
Horacio Sanson d6f5fb69ad
Fix 3853 - Update 💾 icon on supported tools list. (#3854)
Look for all linters that have "lint_file" set to 1 and verify tools
that have it have the :floopy_disk: icon set and those that don't do not
have it.

Correspondingly added/removed !! on
ale-supported-languages-and-tools.txt file.

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-08-08 22:15:36 +09:00
toastal 775d121d46
`purs-tidy` for PureScript (#3863)
* purs-tidy

* update email address for toastal
2021-08-08 22:09:21 +09:00
Horacio Sanson a793db7399
Fix 3865 - Disable scriptencoding vint error. (#3866)
- Add .vintrc.yaml configuration that disables the scriptencoding check
  (ProhibitMissingScriptEncoding) that is raised randomly.
- Upgrade vint to 0.3.21. Project seems to have stopped here and 0.4.0
  was never released.
- Ensure the run-test scripts use the correct docker image (e.g. add tag)
  .

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-08-08 22:06:58 +09:00
Horacio Sanson cc34310a99
Add neovim-05 flag to run-test help output (#3864)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-08-07 20:19:41 +09:00
Horacio Sanson 10f984673c
Fix lint tests failing due to multibyte chars. (#3858)
For some reason CI tests started failing with these errors:

> ale_linters/eruby/erb.vim:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)
> ale_linters/mail/languagetool.vim:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)

Not sure at which point or what changed for this to happen but this MR
fixes it by removing the multibyte chars present on the problem files.

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-08-06 11:36:39 +09:00
Jon Parise 9eb39348e9
Use md5(1) when available (#3855)
md5sum isn't available by default on macOS. Instead, it ships the
BSD-style md5(1) command, which does the same thing but with different
arguments.

With this change, run-tests works out-of-the-box on macOS.
2021-08-05 08:42:59 +09:00
Horacio Sanson 3ba40b4316
Add neovim 0.5 to list of test runtimes. (#3830)
* Add neovim 0.5 to list of test runtimes.

* Update testbed docker image

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-08-05 08:41:34 +09:00
Jon Parise 2dd9790281
Add a thriftcheck linter (#3852)
ThriftCheck (https://github.com/pinterest/thriftcheck) is a linter for
Thrift IDL files.
2021-08-04 09:29:07 +09:00
Tobias Gruetzmacher fa032b1b7f
Fix link to jsonlint (#3850) 2021-08-03 16:42:55 +09:00
Jon Parise 8ecf32f3fe
Add missing space before function reference (#3849) 2021-08-03 08:29:11 +09:00
Henrik Farre 056fbd08f6
Do not use tempfiles for ansible lint (#3846)
* Used %s instead of std in

* Set lint_file to 1 for ansible-lint so it does not use temp files

* Fix test for ansible-lint
2021-07-31 12:35:43 +09:00
Jon Parise dce088a4f0
Correct the spelling of :ALEComplete (#3843) 2021-07-28 20:40:59 +09:00
ghsang 73d32335fe
Add support for `dart analyze` (#3825) 2021-07-25 13:48:12 +09:00
Arnold Chand 8c591996a8
Add importMap option to deno Initialization Options (#3827)
* feat(deno): move init options to handlers

* feat(deno): add deno lsp support for js files

* feat(deno): use default map option

* feat(docs): add deno import map option

* feat(deno): add tests for importMap option

* fix(deno): use full path in importMap

* feat(deno): remove deno as linter for js, separate PR

* fix(deno): test for executable

* fix(deno-test): include filename to simplify function
2021-07-25 13:39:56 +09:00
Daniel Roseman 7d8fb2ba17
Python support poetry (#3834)
* Add poetry support to python linters and black fixer.

* Update python.vim to detect poetry project.

* Update ale.vim, add an option for poetry `g:ale_python_auto_poetry`.

* Update ale-python.txt, add poetry support.

* Add and update poetry related tests.

Co-authored-by: unc0 <unc0@users.noreply.github.com>
2021-07-25 13:39:05 +09:00
D. Ben Knoble 530b38de34
Vim popup (#3817)
* implement vim popups for preview

Details on implementation
-------------------------
- we make use of the |popupwin| api
- we split implementations (Nvim* vs. Vim* prefix) and call the right
  one based on has('nvim')
- we follow a similar structure in each function, using the relevant API
  - popup_list, win_execute, popup_settext in VimShow
  - popup_create in VimCreate
  - popup_close in VimClose

Some differences
----------------
- we DON'T have VimPrepareWindowContent because we use arguments to
  popup_create for borders, padding, etc., and it also takes care of
  buffer creation.
- we follow the protocol of setting and using w:preview for information,
  but we only need the ID
- InsertEnter is the only autocommand required, because of
  popup_create's moved argument. Any cursor movement with 'any' will
  close the popup. This in turns means VimClose is only called from
  InsertMode, so no mode-restoration necessary
- we don't tweak too much in the buffer because vim's popup buffers
  already have most relevant settings and aren't editable without
  calling popup functions.
- I enabled scrollbars, close buttons, dragging, and resizing
- vim popups get as big as they need to by default, so no worrying about
  truncating/hiding/size

Note: we might want to consider changing w:preview to w:ale_preview to
avoid clashes if someone else tries to use the same variable

* floating window: document that vim supports it

* lint: fix indent/cont. lines
2021-07-23 21:59:31 +09:00
Horacio Sanson 5ad4fdd583
Fix 3801 - Add ALEDummySign some width. (#3832)
* Fix 3801 - Add ALEDummySign some width.

Due to changes in NeoVim 0.5 the g:ale_sign_column_always configuration
stopped working.

This PR sets the ALEDummySign to a blank space so when g:
ale_sign_column_always is set we have a sign with 1 width allowing the
configuration to work as before.

https://github.com/neovim/neovim/issues/13635

* Fix visual artifact on dummy sign

* Fix visual artifact on dummy sign (attempt 2)

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-21 18:25:41 +09:00
foobarbyte c1c3873c89
Correct typo in python config filenames (#3826)
* Correct typo in a config file filename.

.tool_versions should be .tool-versions

* Correct typo in config file names.

.tool_versions should be .tool-versions
2021-07-20 18:14:45 +09:00
D. Ben Knoble 651038b601
racket: support racket-langserver lsp (#3808)
* racket: support racket-langserver lsp

* racket-langserver: find highest dir with init.rkt

* autoload/ale/racket: re-indent to 4 spaces

* racket: lint: sort supported tools

* racket: lint: function!

This is _not_ needed anymore, but the lint wants it. See :help E127

* racket-langserver: do not use new dict format

* racket: lint: use snake_case

* add tests for racket-langserver

* racket-langserver tests: correct result values
2021-07-20 10:02:23 +09:00
Horacio Sanson a6719c2d4f
Fix 3673 - Add nocolor option to ansible-lint (#3811)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-20 10:00:49 +09:00
莊喬 f83a1f70d5
Add option to clojure clj-kondo linter (#3812)
Allow define `clojure_clj_kondo_options` to customize command options
for `clj-kondo`.

The `--cache` in original command is now defined as default.
2021-07-17 22:07:02 +09:00
Jose Maria Perez Ramos a6a8131306
Update erlang format for OTP24 (#3823)
Erlang's erlc error format includes the column in OTP24.
See https://blog.erlang.org/My-OTP-24-Highlights/#column-number-in-warnings-and-errors
2021-07-17 21:51:17 +09:00
foobarbyte 1893abdb19
Python .tool versions (#3820)
* Also check for asdf-vm's .tool_versions file

A minimal python project may only be specifying a python version using a version management tool like asdf-vm, without providing other common python project configuration files. asdf-vm creates a single .tool_versions file in the managed directory. By checking for .tool_versions in addition to other common python config files we ensure that python linters (whose behaviour typically depends on a particular python version) will run with the same version of python used by the project. This will also be the same python version used by vim itself when it is run from inside the project's directories.

* add .tool_versions to ale-python-root documentation

This reflects the corresponding change to autoload/ale/python.vim
2021-07-17 21:46:43 +09:00
ghsang d6dbb5398e
Add support for `dart format` fixer (#3764) 2021-07-16 16:20:47 +09:00
Jeff Willette d8f4e8b708
added filename to stdin stream of isort (#3815)
modified tests to run with new format

Co-authored-by: Jeff Willette <jeff@Jeffs-MacBook-Pro.local>
2021-07-14 20:58:25 +09:00
Nikolay Zakirov 82a7e9f588
add autoflake fixer (#3779)
* first attempt

* added autoflake executable

* added Windows executable for appveyor

* delete unused files

* corrected wrong sorting
2021-07-13 21:58:18 +09:00
Horacio Sanson d098124e59
Fix 3373 - do not crash on HandleUserData with invalid json (#3807)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-13 08:37:21 +09:00
Nathan Sharp c8f669249a
Add Yosys linter for Verilog files. (#3713)
* Add yosys for verilog files.

* Add handler test for yosys.

* fix typo in yosys handler test

* fix array order in yosys handler test

* add yosys linter to filetype defaults test

* fix duplicate tag

* add 'yosys' to 'ale-supported-languages-and-tools.txt'
2021-07-12 21:39:53 +09:00
Michael Weimann 9a9fd24b17
add phpstan local executable detection (#3809) 2021-07-10 22:56:26 +09:00
Grégoire Paris 2a5a7baffc
Add support for multiline messages (#3686)
This is achieved by switching to JSON, which makes it much easier to
avoid confusion between an error message and the next one. It also
spares us from having to deal with regular expressions, and eliminates
some edge cases that no longer need to be tested.
2021-07-09 23:59:36 +09:00
Horacio Sanson 774ab4b4f0
Update eclipse JDT LSP documentation (#3743)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-09 23:55:47 +09:00
Mathias Jean Johansen 1e9f40ff8d
Add support for `lua-format` fixer. (#3804) 2021-07-09 23:54:43 +09:00
Gerardo Gómez Rodríguez 8b73d98baf
chore: replace python-language-server to supported pylsp (#3810)
As mentioned in #3722 palantir's python-language-server is no longer maintained.
The alternative is to use the community-driven https://github.com/python-lsp/python-lsp-server.
2021-07-09 22:40:31 +09:00
Matej Fandl e230f07465
updated ale-purescript configuration example in docs according to changes in Spago v0.14 (#3710) 2021-07-07 09:50:44 +09:00
Moritz Röhrich 958f30c163
hadolint: multiple fixes and adapt expected format (#3678)
- Show hadolint rule number in vim gutter in addition to `ALEDetails`
- Capture and show error in case of syntax errors
- Add tests for error capture
- Adapt existing tests

fixes: #2333
fixes: #958
2021-07-05 21:54:03 +09:00
James Cherti af13c350d2
Add stdin ("-") to the command-line arguments of ansible-lint >=5.0.0 (#3786)
* Added an explicit stdin argument to ansible-lint >=5.0.0 (ansible_lint.vim).

This commit fixes the issue "<<NO OUTPUT RETURNED>>":
```
:ALEInfo
(finished - exit code 0) ['/bin/bash', '-c', ''ansible-lint'' --parseable-severity -x yaml < ''/tmp/vVyvn4B/7/test2.yml'']
<<<NO OUTPUT RETURNED>>>'
```

Reason: Ansible-lint ignores stdin when "-" or "/dev/stdin" is not
specified explicitly.

Tested with: ansible-lint 5.0.12 using ansible 2.11.2

* Update ansible-lint tests.
2021-07-05 21:48:32 +09:00
Néstor Coppi 87e079a9b2
Solidity solc linter compatible with 0.6/0.7/0.8 (#3763) 2021-07-04 21:40:12 +09:00
Jesse Hathaway 36fcb01e05
Add pandoc as a markdown fixer (#3641)
Utilize pandoc to fix markdown files, currently set to Github-Flavored
Markdown, but that can be changed by setting,
ale_markdown_pandoc_options.
2021-07-04 21:39:29 +09:00
ourigen e4ddd32c84
Let R_languageserver consider .Renviron (#3744)
* Fix languageserver.vim to consider Renviron

* Update test_r_languageserver.vader

* Update credits
2021-07-04 21:34:35 +09:00
Frederick Zhang afcbd1620e
Change checkstyle's output sub_type to style (#3780) 2021-07-04 21:31:00 +09:00
Michael Jeanson 9efa96eb94
fix: cflags parser: no absolute path for '-include' (#3775)
Both '-include' and '-imacros' take a file as an argument that will then
be searched in the include path like a regular '#include "..."'
statement in a source file. As such, they should not have their path
converted to an absolute path.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2021-07-04 21:27:55 +09:00
Carl Smedstad f9332bae1f
Add support for rpmlint 2.0.0 (#3757)
The -o/--option flag was removed in version 2.0.0 of rpmlint. Providing
this causes rpmlint to fail and provide no output. Only provide this
flag to rpmlint if the version is less than 2.0.0.
2021-07-04 21:19:00 +09:00
D. Ben Knoble d6302d1858
racket/raco: add filename to loc list (#3777)
This allows the location list from one buffer to point to an issue in
another; previously, the error message would be shown but with no way to
jump to it.
2021-07-04 21:17:44 +09:00
Filippo Tessarotto 12d8803015
[PHP] PhpStan also looks for .dist config file (#3765)
* [PHP] PhpStan also looks for .dist config file

* Add tests
2021-07-04 21:16:55 +09:00
Buck Evan 52563f9181
black fixer: --pyi option was appended without a space (#3759) 2021-07-04 21:15:37 +09:00
Linda_pp 45430eb07e
Use filter pattern instead of regex for tags filter in CI workflow (#3802)
since regex is not supported for filtering paths, tags and branches.

- Document: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- Answer by GitHub staff: https://github.community/t/using-regex-for-filtering/16427/2
2021-07-04 21:11:38 +09:00
Robert Liebowitz 0d90cb64c6
Add stylua fixer for lua (#3789) 2021-07-03 18:50:48 +09:00
Yuxuan 'fishy' Wang b749ec702a
Change default of go_staticcheck_lint_package to 1 (#3799)
Fixes https://github.com/dense-analysis/ale/issues/3798.
2021-07-03 18:40:01 +09:00
Gregory Anders 49bdbc3ba5
Deduplicate items in location list (#3792) 2021-07-03 18:38:37 +09:00
w0rp 7862633d9d
When repeating selections, jump to the last selected item 2021-06-29 11:53:11 +01:00
Stefan Braun a4ba421803
Fixes an index error with Java files. (#3706)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2021-06-22 14:07:49 +01:00
Shannon Moeller 397d56f40c
fix(eslint): yarn 2 project cwd (#3684)
* eslint-handler: fix getcwd when there is no node_modules
2021-06-19 12:03:39 +01:00
w0rp a566a5d01b
#3719 - Prevent redir being used again in future 2021-06-19 12:01:33 +01:00
حبيب الامين ad27e921d7
Fix breakage w/ plugins that inadvertently trigger ALE in `execute()` (#3719)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2021-06-19 11:56:43 +01:00
Horacio Sanson 88817b3780
Fix 3167 - add custom fixer example to help docs. (#3541)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-06-19 11:47:35 +01:00
w0rp 2c8a857262
Move a test file to match the newer location 2021-06-19 11:00:26 +01:00
w0rp e78519683e
Close #3433 - Only use noselect if set for automatic completion 2021-06-19 10:57:34 +01:00
w0rp 84a4a76aaf
Close #3770 - Add support for checking circleci configs 2021-06-19 10:34:57 +01:00
w0rp 1b08791228
Make staticcheck configurable with GOPATH detection 2021-05-27 22:03:46 +01:00
Pau Ruiz Safont a02a4f2811
ocaml: prepare for filetype separation (#3732)
The ocaml filetype is currently used for several, different file
formats. This causes problems as not all tools support all formats.
New filetypes are introduced to support this separation, this needs some
changes in ale that are fortunately backwards-compatible.

These change add ocamlinterface file support for ocp-indent, merlin,
ocamlformat and ocaml-lsp. For ocaml-lsp I took the liberty to
add all recognised language ids, even if they are not supported.

ols has not been changed as the project has been abandoned since 2019.
2021-05-27 16:33:43 +09:00
w0rp f53431331e
Enable gopls by default with GOPATH detection 2021-05-26 22:43:33 +01:00
David Hotham 3f386ae5e9
Don't use a temporary file for tflint (#3717)
* Don't use a temporary file for tflint

* set cwd for tflint
2021-05-25 09:41:14 +09:00
awang bf1c30f585
Use stdin/out for cmake-format (#3725)
cmake-format added support for reading from/outputting to stdin/out as
of v0.3.6, released 2018-04-10 (commit 2e2aff2) [0].

Reading from stdin is preferable over reading from a temporary file
because when given a concrete file cmake-format will look for its config
file (.cmake-format.py or similar) in the parent directories of the
provided file. If the temporary file is off in a tmpdir somewhere (e.g.,
/tmp on *nix), cmake-format will almost certainly not come across the
user's intended format configuration file, making it appear that
cmake-format is ignoring the config file.

If cmake-format reads from stdin, though, it'll look for its config file
in its current working directory and its parent directories, in a
similar manner to clang-format. This has a much higher chance of running
across the intended config file.

[0]: https://github.com/cheshirekow/cmake_format/releases/tag/v0.3.6

Co-authored-by: Alex Wang <ts826848@gmail.com>
2021-05-25 09:37:09 +09:00
ourigen 6ef5bf308c
Allow lintr to consider .Renviron settings. Fix #3391 (#3727)
* Fix lintr.vim to consider Renviron

* Update test_lintr.vader to match lintr.vim fix

* Update credits

Co-authored-by: ourigen <ourigen [at] pm.me>
2021-05-25 09:30:42 +09:00
Horacio Sanson 93f80ea767
Fix 3524 - parse buffer signs with getplaced() function (#3648)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-05-23 21:58:13 +09:00
w0rp bee8eccb42
Fix a bug when code actions have no changes 2021-05-04 08:44:33 +01:00
Linda_pp d81986a106
add 'How can I use ALE and vim-lsp together?' in readme (#3711) 2021-04-30 18:33:50 +01:00
Jay Sitter 737c1bf1ac
Fix stylelint not obeying project-specific rules (#3272)
* Fix stylelint not obeying project-specific rules

* Fix tests

* Fix test

* Fix test
2021-04-20 12:50:57 +09:00
Henrique Barcelos 1c90d8c018
Updated `solhint` linter to be able to use a local installation (#3682)
* fix: added support for local solhint executable

* feat: added support for matching parse errors

* test: added test for solhint command callback and handler

* chore: removed command callback test

* refactor: made solhint handler structure closer to eslint
2021-04-15 09:01:18 +09:00
Kevin Clark 1cd0c0c33b
Don't exit visual mode on floating preview close (#3689) 2021-04-12 16:57:14 +09:00
infokiller 686c8c5e0a
hadolint: fix color output and stdin shown as "-" (#3680) 2021-04-10 21:17:55 +09:00
yohei yoshimuta cec9954d01
feat: Add protolint as linter and fixer (#2911) 2021-04-09 22:16:23 +09:00
bosr f0887d3e61
apple-swift-format: linter and fixer with config swiftpm support (#3671) 2021-04-07 19:34:34 +09:00
Remi Thebault 06f57ca973
improve DMD handler (#3647)
* improve DMD handler

 - ignore errors from other files
 - catch 'Deprecation' as warning
 - add tests

* adding filename key instead of filtering

* update dmd test

* fix test dmd windows
2021-03-30 15:47:59 +09:00
fiatjaf 655f0070cd
Add support for V: "v" (compiler) and "vfmt" fixer. (#3622)
* v: add "v fmt" fixer.

* v: add "v" (build) linter.

* v: fix vlint complaints and add documentation.

* v: add tests.

* v: use ale#Pad().
2021-03-26 15:38:57 +09:00
David Houston b1f95dc4fb
Add nixfmt as a Nix fixer. (#3651)
* Add nixfmt fixer.

* Replace manual options pad with ale#Pad()
2021-03-24 09:02:17 +09:00
Jon Parise eb0ebe6221
Switch to using buildifier's -path option (#3640)
Buildifier offers a -path command line option:

> Buildifier's reformatting depends in part on the path to the file
> relative to the workspace directory. Normally buildifier deduces
> that path from the file names given, but the path can be given
> explicitly with the -path argument. This is especially useful when
> reformatting standard input, or in scripts that reformat a temporary
> copy of a file.

This lets us drop our `-type`-guessing logic.

For the moment, we rely on the buffer filename being "relative to the
workspace directory", which it generally is, but in a future change, we
should introduce logic that will locate the WORKSPACE file and adjusts
the filename relative to that directory. This could be complicated based
on the working directory in which `buildifier` is executed, so a little
more research is necessary to implement that logic correctly.
2021-03-23 22:04:51 +09:00
BarrOff cdac7a830e
Add support for `ptop` fixer (#3652)
* Add support for `ptop` fixer

* add test file for ptop tests

* called wrong fixer in assertion test

* use ' %s %t' instead of ' %t %t'
2021-03-23 21:51:14 +09:00
Remi Thebault c6b61950f8
Add more parameters to the DMD linting command (#3639)
* Add more parameters to the DMD linting command

fixes #3637

* adding tests for dmd linter

* adding dmd test for windows
2021-03-23 08:31:52 +09:00
w0rp f7852dbd0a
#3633 - Move linter tests into test/linter 2021-03-21 00:25:33 +00:00
w0rp 35caaecc9f
Allow more time before PRs become stale 2021-03-20 22:35:43 +00:00
Tommy Chiang 3728d9f76c
Add support for clangd with CUDA (#3598)
* add support for clangd with CUDA
* add clangd with CUDA in supported-tools.md
* add doc for clangd with CUDA
2021-03-20 22:26:53 +00:00
fiatjaf 4411b4d751
add support for svelte via svelteserver language server (#3644)
* add support for svelte via svelteserver language server
* svelte: fix Vint error and add a `svelteserver` simple test.

Co-authored-by: Joakim Repomaa <mail@j.repomaa.com>
Co-authored-by: Joakim Repomaa <mail@jreinert.com>
2021-03-20 22:23:27 +00:00
w0rp b1d833417b
#3633 - Put all dummy test files in test/test-files 2021-03-20 22:11:42 +00:00
w0rp 3838ae118d
Add desktop-file-validate 2021-03-19 22:29:06 +00:00
w0rp 8319e0f8c7
Fix a typo in a test filename 2021-03-19 21:55:15 +00:00
Nathan Henrie ed7f4dee53
issue 3033 (#3620)
* Add ale_python_pyls_options

* Add extra explanatory detail

* Fix alignment

* Fix test
2021-03-18 08:55:50 +09:00
w0rp dc40ece3c3
#3632 Add ale#util#MapMatches 2021-03-15 22:30:22 +00:00
w0rp bd808dca30
Fix ale#path#Dirname on Windows 2021-03-15 21:30:13 +00:00
w0rp c00852e809
Disable blank issues and add a link to ask for help 2021-03-15 00:36:45 +00:00
w0rp f43e4abc88
Check user systemd unit files with systemd-analyze 2021-03-14 23:34:38 +00:00
w0rp b45ee8ec6c
Close #2102 - Add support for the Angular language server 2021-03-14 21:10:20 +00:00
ourigen 80a48d01be
Fix texlab#GetProjectRoot (#3610)
* Fix texlab GetProjectRoot

* Fix indents in texlab#GetProjectRoot

* Prevent texlab from starting on every tex file

* Update texlab Vader tests

* Fix GetProjectRoot to return parent of .git

Previously, the function returned `../.git/`. We want the function to return the parent directory above that as the project root. This should help pass Vader tests.
2021-03-12 20:40:40 +09:00
Victor Fernandez c21d6afd2f
Solve #3611 (#3612)
Fix dmd not using dub
2021-03-07 20:20:35 +09:00
Horacio Sanson 8c5081f631
Fix 3605 - set fallback for error detail (#3606)
* Fix 3605 - set fallback for error detail

* Add use case with no detail key

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-03-04 20:45:33 +09:00
w0rp 826878c41e
Update documentation for floating window borders 2021-03-01 21:38:14 +00:00
Yen3 1d76fd55a1
Add borders for floating windows in Neovim (#3603)
* Add borders for floating windows in Neovim
* Add docs for floating window border setting

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2021-03-01 21:36:05 +00:00
w0rp 680ba68d81
#3599 - Use ale_root instead of ale_lsp_root
The `ale_lsp_root` setting is now deprecated, and `ale_root` should be
used instead. The setting will be used for both setting the root easily
for LSP linters, and for running other linters over whole projects.
2021-03-01 20:51:29 +00:00
w0rp 9fe7b1fe6a
Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they
can later be swapped out when running linters over projects is
supported, and also better support filename mapping for running linters
on other machines in future.
2021-03-01 20:11:10 +00:00
Antoine Gagné 48fab99a0a
Add support for `erlfmt` fixer (#3602)
* Add support for `erlfmt`

* Add missing entry to table of contents

* Fix warnings

* Add missing tools to supported tools
2021-02-28 22:31:44 +09:00
serapas 038e4a8c31
Fix ansible-lint linter definition. (#3601)
* Fix ansible-lint linter definition.

Use ansible-lint's feature auto-detection instead of temporary file.
For auto-detection to work, ansible project has to be also a git repository.

Don't use yaml rules. These are checked by yamllint.

Refactor pattern to work with ansible-lint >=5.0 version.

Clean-up obsolete test cases.

* Pull Request changes
2021-02-28 21:43:23 +09:00
Horacio Sanson 7696561555
Fix 3537 - remove -T argument from ruby linter (#3538)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-02-23 16:48:42 +09:00
Jon Parise 90b9597d50
Add a buildifier fixer for Bazel files (#3499)
This fixer enables buildifier's formatting and "lint fix" modes.
Additional options can be provided via `bazel_buildifier_options`.

It also implements some basic logic for guessing the file's type.
buildifier itself usually does this based on the filenames provided on
the command line, but because we're piping our buffer via stdin, we need
to do this manually.
2021-02-21 21:35:26 +09:00
Tomáš Janoušek 2550f5d952
Fixes to code actions (cursor moving, tests, EOL/EOF corner cases) (#3478)
* code_action: Don't move cursor when change covers entire file
* code_action: Refactor/simplify ApplyChanges
* code_action: Fix EOL at EOF corner cases while performing no changes
* code_action: Fix column around EOL corner cases
* code_action: Handle positions out of bounds
* code_action: Add instructions for verifying corner case tests against vscode
2021-02-20 16:16:47 +00:00
Alex LaFroscia d340710fcf
Support going to type definition with tsserver (#3545) 2021-02-20 16:09:28 +00:00
Risto Stevcev 3ea887d2f4
Added ocamllsp (#3595)
* Added ocamllsp

* Update ordering in docs to be alphabetical

* Updated expected result in test
2021-02-18 23:51:11 +09:00
David Buchan-Swanson 1ee7f6c97b
add support for prettier-ruby to prettier fixer (#3593)
it _does_ need an additional plugin, but when it has the plugin, it
works as expected.
2021-02-18 16:33:02 +09:00
David Balatero 0b35c3a5b9
Make markdown vale linter command configurable with options (#3594)
* Make vale command user-configurable

* Add test for vale options

* Typo in test

Co-authored-by: David Balatero <dbalatero@stripe.com>
2021-02-18 10:10:49 +09:00
Jason Axelson 88d052b5a9
Update elixir-ls link in supported tools (#3588)
https://github.com/elixir-lsp/elixir-ls/ is now the canonical repo: 

> It's now being maintained by proactive volunteers from the Elixir community over at elixir-lsp/elixir-ls. Updates will continue to be published from that repo to the original VS Code extension, so no need to switch plugins if you're using VS Code.

from: https://github.com/JakeBecker/elixir-ls#this-project-has-moved
2021-02-14 23:04:12 +09:00
Mukund Mauji b30c5c9b51
Allow clangformat to use a local style file (#3587)
* Allow clangformat to use a local style file.

* Add tests.

* Fix Vint issue.

* Improve explanation of feature in documentation.

* Fix failing test.

The test was checking the wrong directory.
2021-02-14 23:03:04 +09:00
Daniel Leong 8cb9f5ef51
mypy: Pass user options before any others (#3582)
This enables us to use a custom `python` exe as the "mypy" executable
and pass `-m mypy` in `mypy_options`
2021-02-11 20:29:23 +00:00
w0rp 3b184f88d3
Bump the ALE version to v3.1.0 2021-02-11 19:47:29 +00:00
Tarik Graba ea72d66b6d
Verilator current file search path (#3500)
* Simplify verilator linter using ale command format strings
* Verilator Linter: Restructure linter command tests
* Verilator Linter: adds to the handler test the returned filename
* Verilator Linter: add the current file path to the search path
* Verilator Linter: Add the search path to the tests

Co-authored-by: TG <tarik.graba@telecom-paris.fr>
2021-02-11 19:35:25 +00:00
w0rp 1773a496ad
Clean up the hdl_checker test a bit better 2021-02-10 22:10:18 +00:00
w0rp 388cf33743
Fix #3579 - Escape cppcheck arguments for Windows 2021-02-06 20:13:28 +00:00
Hugo Gualandi 77c034884b
Bugfix: ParseCFlagsFromMakeOutput was never being called (#3574)
Previously, the make output was never being parsed, even when the
`c_parse_makefile` option was set.
2021-02-06 19:06:01 +00:00
w0rp 8beb67b4d1
Fix tests for LSP suggestions 2021-02-06 18:55:21 +00:00
w0rp 99eb68e6ca
#3362 Disable LSP/tsserver hints/suggestions by default 2021-02-06 18:49:42 +00:00
Horacio Sanson f9f2ad2765
Merge pull request #3571 from rfwatson/gopls-add-init-options
gopls: add go_gopls_init_options
2021-02-06 21:34:19 +09:00
Horacio Sanson b88d3c4e4b
Merge pull request #3575 from hugomg/gnumakefile
Have c_parse_makefile look for GNUmakefile as well
2021-02-06 21:31:16 +09:00
Horacio Sanson cf53eb3667
Merge pull request #3568 from jD91mZM2/jq
Add jq linter for JSON diagnostics
2021-02-06 21:29:51 +09:00
jD91mZM2 27130efc65
Reuse ale#fixers#jq#GetExecutable for jq 2021-02-06 11:12:04 +01:00
Hugo Musso Gualandi ae916d49fd Add test case for gnumakefile detection 2021-02-05 20:48:52 -03:00
Horacio Sanson 787ab2a366
Merge pull request #3529 from krsch/master
phan: add filename to output
2021-02-05 23:02:47 +09:00
Horacio Sanson f612805801
Merge pull request #3576 from cyyever/fish_indent
Fish indent
2021-02-05 22:58:43 +09:00
Hugo Musso Gualandi 4c7e843fd0 Have c_parse_makefile look for GNUmakefile as well
Makefiles using GNU-make features might be called "GNUmakefile" instead
of "Makefile". This commit teaches the `c_parse_makefile` feature to
look for a GNUmakefile file if a Makefile is not present.
2021-02-03 19:15:03 -03:00
Rob Watson 26b92f73b5 gopls: add go_gopls_init_options 2021-02-03 14:49:27 +01:00
Alexey Kreshchuk cc67bc0541 add filename to output 2021-02-02 17:34:59 +03:00
jD91mZM2 98caa19cc7
Add command callback test 2021-02-02 13:15:46 +01:00
Horacio Sanson 9b5c090473
Merge pull request #3472 from m-ildefons/hadolint
hadolint: Recognize message type
2021-02-02 13:08:18 +09:00
w0rp c747c277c2
#2547 Add a cfn-lint alias for cloudformation 2021-01-31 17:06:56 +00:00
w0rp 1457e54528
#3527 - Clarify that popup menus should only be used in GUI Vim 2021-01-31 16:29:22 +00:00
Jerko Steiner e8080be08b
Allow duplicate LSP completions for autoimport (#3473)
Similarly to TS completions, this allows the user to pick the package to autoimport when both the package and method name are the same.
2021-01-31 16:21:31 +00:00
jD91mZM2 4894c760c2
Add jq linter for JSON diagnostics 2021-01-31 13:01:03 +01:00
Horacio Sanson 7572ec3489
Merge pull request #3474 from yen3/haskell-hls
Add linter for haskell-language-server
2021-01-31 20:19:00 +09:00
yen3 e5e851fadc Add linter for haskell-language-server
The patch adds a new linter for haskell-language-server (hls). hls is
the integration point of haskell-ide-engine (hie) and ghcide.
2021-01-31 11:43:45 +01:00
Horacio Sanson 2d07fa0cc2
Merge pull request #3566 from hsanson/2726-fix-terraform-linter
Fix 2726 - fix terraform linter.
2021-01-30 18:20:49 +09:00
Horacio Sanson dd1c665db2 Fix tests on windows 2021-01-30 18:17:28 +09:00
Horacio Sanson d511d5af11 Fix 2726 - fix terraform linter.
Instead of using `terraform fmt` for linting use `terraform validate`
with json output.
2021-01-30 17:20:44 +09:00
Horacio Sanson 7c44f4e403
Merge pull request #3565 from hsanson/3371-add-terraform-ls-support
Fix 3371 - Add terraform-ls support
2021-01-30 16:19:40 +09:00
Horacio Sanson 64d430438e Fix 3371 - Add terraform-ls support 2021-01-30 16:09:39 +09:00
w0rp 82c8e3a3a3
Remove last traces of Travis CI
* The build status badge is now for GitHub Actions.
* The documentation now mentions GitHub instead.
* Warnings in the YAML file have been fixed or ignored.
2021-01-27 20:11:46 +00:00
Horacio Sanson bafe1c0fd6
3560 add vim 8.2 and nvim 0.4 to ci tests (#3561)
* Add vim82 and neovim04 to CI tests.

* Fix test_sign_column_hightlighting test.

In vim82 with verbose=1 the output of highlight command changes breaking
the ale#sign#SetUpDefaultColumnWithoutErrorsHighlight(). This commit
forces verbose=0 when the method starts and restores the previous value
before exiting.

* No return values in vim82 returns a numeric value instead of a empty string.

* Fix test_reek_handler test

The FuzzyJSONDecode() method catches E474 when it fails to parse the
input as JSON but Vim8.2 throws E491 instead. This commit modifies the
function to catch both E474 or E491.

* Fix perl6 handler test.

Perl6 handler catches json parse errors using the E474 error but in
Vim82 it changed to E491. This commit modifies the handler so both
errors are considered.

* Fix list opening tests.

In Vim 8.2 the call `range(1, bufnr('$'))` always returns quickfix
buffers no matter if they are closed or not. Using `ls` does not show
them but the above range will always include them.

This new behavior breaks the ale#list#IsQuickfixOpen() method that in
turn breaks many other things. This commit fixes this by using the
getqflist() and getloclist() methods instead.

* Fix test updates loclist test.

For some reason in Vim 8.2 the sign offset seems to not reset between
tests causing the sign_id to not match in the Assert. When the test is
run individually it passes but when run as part of the whole suite the
sign_id is off by one.

Forcing the offset in the test setup seems to fix the issue.

* Fix omnifunc completion test.

For unknown reasons the SetCompletionResponse tests fail in Neovim 0.2
and 0.4. Unfortunatelly the only solution I found is to disable them
for neovim.

* Fix linter warnings

* Fix smoker test.

Add vim 8.2 to the list of versions that need some retires due to
randomly failing tests.

* Add docker image build job.

Trying some clever trick to build the docker image if not available
locally or in Docker hub. It uses the Dockerfile md5 checksum as tag so
only when changes on that file occur will the image be downloaded or
build.

* Add labels to Docker image

* Remove tests for middle versions 8.1 and 0.3.5

* Use same vader commit as appveyor

* Implement image push to Docker Hub

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-01-27 19:52:24 +00:00
Horacio Sanson c9f4005820
Merge pull request #3425 from pinicarus/custom-dialyzer-options
Custom erlang/dialyzer options
2021-01-27 20:24:26 +09:00
Kevin Svetlitski cab4280d02
Feature: Add support for named-pipe sockets for LSPs (#3509)
* Add support for using named pipes for lsp 'socket' servers; documentation updated accordingly
* Add tests for connecting to named pipe sockets
2021-01-26 20:43:17 +00:00
Horacio Sanson 3a1728297a
Merge pull request #3227 from Ma27/nixunstable-error-fmt
Update error-parser for `nix-instantiate` on Nix 2.4+
2021-01-25 13:53:09 +09:00
Maximilian Bosch 72dbd7f648
Update error-parser for `nix-instantiate` on Nix 2.4+
In the (unreleased) Nix 2.4 the error-messages have been reformatted[1].
This patch aims to retain proper `.nix`-support in `ale`, for both
stable Nix (2.3 and older) and unstable Nix (2.4 and newer).

[1] https://github.com/NixOS/nix/pull/3590
2021-01-24 22:54:02 +01:00
Horacio Sanson 471e20ed2b
Merge pull request #3559 from nibocn/master
fix(eclipselsp): org.eclipse.equinox.launcher_xxxx.jar file matching
2021-01-24 16:36:34 +09:00
NiBo 65bfb07e43 fix(eclipselsp): org.eclipse.equinox.launcher_xxxx.jar file matching failed 2021-01-24 14:48:54 +08:00
Horacio Sanson 18eb6a0758
Merge pull request #3557 from benknoble/dafny-filename-again
dafny: update filename handling
2021-01-24 14:07:12 +09:00
Horacio Sanson 580271b510
Merge pull request #3377 from benknoble/fix-swipl
prolog/swipl: update error format for new version
2021-01-24 10:40:11 +09:00
Pierre-Nicolas Clauss 105bc55695
refactor(erlang/dialyzer): remove file placeholder from options
Signed-off-by: Pierre-Nicolas Clauss <pinicarus@protonmail.com>
2021-01-23 19:07:26 +01:00
Pierre-Nicolas Clauss 0ac7595fe9
Merge remote-tracking branch 'upstream/master'
Signed-off-by: Pierre-Nicolas Clauss <pinicarus@protonmail.com>
2021-01-23 19:06:59 +01:00
D. Ben Knoble bacb8bb902 dafny: update filename handling
cf. #3475, #3390
2021-01-23 12:34:36 -05:00
D. Ben Knoble 2c1c5b06d9 Merge branch 'master' into fix-swipl
* master: (133 commits)
  Add rnix-lsp for Nix diagnostics and completion
  add spectral support for json
  add spectral handler
  add spectral linter for yaml
  doc: Fix linter issues
  doc: Add documentation for Deno
  feat: Add Deno lsp support
  feat: Add Deno fmt fixer
  Add document for apkbuild filetype
  Add tests for atools handler, basic and dealing with Error and Warning
  Test default linters for apkbuild
  Document new default linters for apkbuild
  Make apkbuild_lint and secfixes_check default for apkbuild filetype
  document support for apkbuild-lint and secfixes-check for apkbuild
  Add linters for apkbuild-lint and secfixes-check from atools
  Add handler for the output of atools
  Fix typos
  Add command callback tests
  Add support for standalone files
  Fix linting errors
  ...
2021-01-23 12:29:05 -05:00
D. Ben Knoble 10d2b8797c swipl: style fix 2021-01-23 12:27:55 -05:00
Horacio Sanson 9fd9435cd5
Merge pull request #3556 from jD91mZM2/rnix
Add rnix-lsp for Nix diagnostics and completion
2021-01-23 21:50:36 +09:00
Horacio Sanson 1101346657
Merge pull request #3547 from hsanson/3546-fix-E928-when-using-javac-linter-on-non-maven-projects
Fix 3546 - check empty executable string.
2021-01-23 21:26:39 +09:00
jD91mZM2 c1b6628425
Add rnix-lsp for Nix diagnostics and completion 2021-01-23 13:23:14 +01:00
Horacio Sanson 3e94c42ec0
Merge pull request #3521 from hsanson/3498-change-standardrb-fixer-to-use-stdin
3498 change standardrb fixer to use stdin
2021-01-23 19:28:41 +09:00
Horacio Sanson a6dfc611f6
Merge pull request #3424 from maxice8/atools
Add support for Alpine Linux APKBUILD
2021-01-23 16:05:26 +09:00
Horacio Sanson 3c3dcd4041
Merge pull request #3489 from t2h5/yaml-spectral-linter
Add Stoplight Spectral linter for yaml
2021-01-23 16:00:45 +09:00
tatsuya 66b3e768db add spectral support for json 2021-01-23 11:56:10 +09:00
tatsuya 997dd7f8fe add spectral handler 2021-01-23 11:56:10 +09:00
tatsuya 5a47d878fb add spectral linter for yaml
ci
2021-01-23 11:56:10 +09:00
Horacio Sanson c374736301
Merge pull request #3533 from motato1/master
Deno support for LSP and fixer
2021-01-23 11:04:52 +09:00
Horacio Sanson 5200e6c734
Merge pull request #2825 from thindil/master
Added support for Ada Language Server
2021-01-23 09:41:02 +09:00
Mohammed Chelouti fe666a7a6c doc: Fix linter issues 2021-01-23 00:43:33 +01:00
Mohammed Chelouti e16c3b09f7 doc: Add documentation for Deno 2021-01-22 19:06:53 +01:00
Mohammed Chelouti 9b362634f7 feat: Add Deno lsp support 2021-01-22 19:06:53 +01:00
Mohammed Chelouti 4f2666265a feat: Add Deno fmt fixer 2021-01-22 19:06:52 +01:00
Leo d7ed80346c Add document for apkbuild filetype 2021-01-22 14:04:26 -03:00
Leo 56951932e0 Add tests for atools handler, basic and dealing with Error and Warning 2021-01-22 14:04:26 -03:00
Leo 4999ae2e85 Test default linters for apkbuild 2021-01-22 14:04:26 -03:00
Leo 4f8f2a4a0c Document new default linters for apkbuild 2021-01-22 14:04:26 -03:00
Leo 542ba5a04a Make apkbuild_lint and secfixes_check default for apkbuild filetype 2021-01-22 14:04:26 -03:00
Leo df91bc9046 document support for apkbuild-lint and secfixes-check for apkbuild 2021-01-22 14:04:26 -03:00
Leo 32c0eb7c42 Add linters for apkbuild-lint and secfixes-check from atools 2021-01-22 14:04:26 -03:00
Leo 99a809c814 Add handler for the output of atools
atools is a collection of tools written in ash shell and Lua that
provide linting for Alpine Linux's APKBUILD.

APKBUILDs are build recipes used by Alpine Linux's build system, abuild,
an equivalent would be Arch Linux's PKGBUILD and Gentoo's ebuild.
2021-01-22 14:04:26 -03:00
Horacio Sanson 33f2f8ddcd
Merge pull request #3551 from fenuks/bugfix-3506
Fix clang-tidy ignoring compile-commands.json
2021-01-23 01:55:40 +09:00
Bartek thindil Jasicki 1ca780a08a Merge remote-tracking branch 'upstream/master' 2021-01-22 17:52:01 +01:00
Horacio Sanson 1b010bbabb
Merge pull request #3069 from nelsyeung/feature/dart-analysis-server
Add dart analysis server to linter
2021-01-23 01:47:38 +09:00
Nelson Yeung 985a5295a9 Fix typos 2021-01-22 16:37:38 +00:00
Nelson Yeung efe65f3477 Add command callback tests 2021-01-22 16:37:38 +00:00
Nelson Yeung a8acac1f4a Add support for standalone files 2021-01-22 16:37:38 +00:00
Nelson Yeung 850c41b2a9 Fix linting errors 2021-01-22 16:37:38 +00:00
Nelson Yeung 847f729cd4 Add dart analysis_server doc 2021-01-22 16:37:38 +00:00
Nelson Yeung 075c3e0ad0 Add dart analysis_server to supported tools 2021-01-22 16:37:38 +00:00
Nelson Yeung 35b8bb8a55 Add dart analysis server linter 2021-01-22 16:37:38 +00:00
Horacio Sanson 53ff5f2d88 Fix 3546 - check empty executable string.
At some point VIM/NVIM started throwing errors if the input string is
empty for some functions such as execute() and fnamemodify(). This
commit checks if the executable string is empty before passing it to the
executable() function.

Resources:
  - https://github.com/vim/vim/issues/7465
  - https://github.com/vim/vim/releases/tag/v8.2.2117
2021-01-23 01:34:13 +09:00
Horacio Sanson 9a1e91e075
Merge pull request #3519 from atsuya/feature/support-vala-lint
Add support for Vala-Lint
2021-01-23 01:24:24 +09:00
Horacio Sanson 64550062dc
Merge pull request #3148 from charlesbjohnson/charlesbjohnson/xo
fixers/xo: enhance `xo` fixer
2021-01-23 01:23:22 +09:00
Charles B Johnson 451e99341e
xo: refactor to function 2021-01-22 09:23:54 -06:00
Charles B Johnson 03bd494fd4
linters/xo: prefer function shorthand 2021-01-22 09:23:54 -06:00
Charles B Johnson 5fd5fa5305
linters/xo: fix tests 2021-01-22 09:23:54 -06:00
Charles B Johnson 4edfac4db6
xo: inline filetype handling 2021-01-22 09:23:54 -06:00
Charles B Johnson 23ff19a162
fixers/xo: remove unnecessary directory crawl 2021-01-22 09:23:54 -06:00
Charles B Johnson 1991313ee7
xo: update docs 2021-01-22 09:23:54 -06:00
Charles B Johnson f17beadb49
fixers/xo: support monorepos 2021-01-22 09:23:54 -06:00
Charles B Johnson 8ffde14039
fixers/xo: support stdin relative to the fixed file 2021-01-22 09:23:53 -06:00
Charles B Johnson e75ac9f497
fixers/xo: support typescript options 2021-01-22 09:23:53 -06:00
Charles B Johnson 289f808ccd
fixers/xo: refactor to handlers 2021-01-22 09:23:53 -06:00
Charles B Johnson 4a6136c27e
fixers/xo: add tests 2021-01-22 09:23:53 -06:00
Charles B Johnson 6bfcb9cdff
linters/xo: consolidate xo linters 2021-01-22 09:23:53 -06:00
Atsuya Takagi 6b0b8cec79
update doc with snake cased linter name 2021-01-23 00:20:36 +09:00
Atsuya Takagi 897f6b2b23
use snake case for linter name 2021-01-23 00:20:11 +09:00
Horacio Sanson db816b5c3f
Merge pull request #2782 from hsanson/2777-add-ibm-openapi-validator
Fix 2777 - Add IBM openapi validator
2021-01-23 00:13:40 +09:00
Atsuya Takagi 33485ffb92 document the variables can be set for the linter 2021-01-23 00:08:01 +09:00
Atsuya Takagi 8d5b3e827d decide whether or not to run with config file based on the presence of config filename value 2021-01-23 00:08:01 +09:00
Atsuya Takagi e3e1ddce95 allow setting vala-lint executable 2021-01-23 00:08:01 +09:00
Atsuya Takagi 4328fe7dca add a blank line before if statement 2021-01-23 00:08:01 +09:00
Atsuya Takagi 04550717bf add Vala-Lint as supported linter 2021-01-23 00:08:01 +09:00
Atsuya Takagi 2dbf4ee271 add test to check if it properly ignores outputs with unknown error types 2021-01-23 00:08:01 +09:00
Atsuya Takagi 67c3fa9001 add documentation for vala-lint 2021-01-23 00:08:01 +09:00
Atsuya Takagi ed2afafd62 use ale#Set for setting default config variable values 2021-01-23 00:08:01 +09:00
Atsuya Takagi 823b094f56 support flags for enable/disable config 2021-01-23 00:08:01 +09:00
Atsuya Takagi 89403b4a06 expect warn or error 2021-01-23 00:08:01 +09:00
Atsuya Takagi 280d2dedae find and use vala-lint config if exists 2021-01-23 00:08:01 +09:00
Atsuya Takagi c15d9538cd use the correct regex to match the escape sequences... 2021-01-23 00:08:01 +09:00
Atsuya Takagi b3010ad793 fix the wrong variable name 2021-01-23 00:08:01 +09:00
Atsuya Takagi 9eb6dace88 escape color sequences 2021-01-23 00:08:01 +09:00
Atsuya Takagi e94d23b1d9 test my hypotethis 2021-01-23 00:08:01 +09:00
Atsuya Takagi 7f1dd5f66a specify a filename of the current buffer 2021-01-23 00:08:01 +09:00
Atsuya Takagi 3e820207e7 be precise about output_stream 2021-01-23 00:08:01 +09:00
Atsuya Takagi 4ed520a219 add initial files 2021-01-23 00:08:01 +09:00
Horacio Sanson 9bc4b468c2 Fix linter error 2021-01-22 23:51:29 +09:00
fenuks 65824feef3 Fix clang-tidy ignoring compile_commands.json 2021-01-22 15:19:38 +01:00
Horacio Sanson 4aa11cbc05 Improve documentation 2021-01-22 23:17:38 +09:00
Horacio Sanson 014b00d4d7 Add yamllint and prettier to openapi.
This commit enables yamllint and prettier on openapi files.
2021-01-22 23:17:38 +09:00
Horacio Sanson 03eae9e085 Fix 2777 - Add IBM openapi validator 2021-01-22 23:17:38 +09:00
Horacio Sanson 27a22e7161 Update tests 2021-01-22 23:17:01 +09:00
Horacio Sanson 7fe61cdf0e Fix 3498 - Change standardrb fixer to read from stdin.
Seems standardrb fails to properly use the --config option when using
temporary files but works fine when reading from stdin. This commit
changes the fixer so it uses stdin instead of temporary files.
2021-01-22 23:17:01 +09:00
Horacio Sanson a1e6df987c
Fix 354 - Migrate CI from travis to Github Actions (#3549)
* Fix 354 - Migrate CI from travis to Github Actions
* Use matrix strategy for parallel tests
* Don't build image on each run
* Add push trigger on tags

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-01-22 09:27:36 +00:00
Bartek thindil Jasicki 42bf5ca911 Merge remote-tracking branch 'upstream/master' 2021-01-22 09:45:52 +01:00
Horacio Sanson 80a0108fcf prolog/swipl: cover new format with complex tests
https://github.com/dense-analysis/ale/pull/3377#issuecomment-763628447
2021-01-20 12:08:05 -05:00
Horacio Sanson 6a3d215571 prolog/swipl: simplify with @hsanson's suggestions
https://github.com/dense-analysis/ale/pull/3377#issuecomment-763628447
2021-01-20 12:07:26 -05:00
Horacio Sanson 7e3d2930d8
Merge pull request #3261 from toastal/dhall
Enhanced Dhall fixer support
2021-01-20 21:06:03 +09:00
Horacio Sanson 7b42dd7387
Merge pull request #3475 from benknoble/dafny-include-timeouts
dafny: add a timeLimit option and message-parsing
2021-01-20 20:48:53 +09:00
Horacio Sanson 16c45b8213
Merge pull request #3453 from blinsay/blinsay/rust-analyzer-lsp
pass lsp intialization_options to rust-analyzer
2021-01-20 20:45:17 +09:00
Horacio Sanson 8de0e7b9ba
Merge pull request #3430 from mbrunnen/mbn/fix-macros-include-c-flag
Add -imacros to C flags
2021-01-20 20:42:18 +09:00
Horacio Sanson 783cf4ab82
Merge pull request #3362 from daliusd/tsserver_hints
Show tsserver hints/suggestions in Ale.
2021-01-20 20:40:44 +09:00
Horacio Sanson bfc412a77b
Merge pull request #3455 from Thau/feat/credo_config_file
feat: Adds variable to use custom config file with Elixir Credo
2021-01-20 08:42:45 +09:00
Horacio Sanson 9387ccfbc5
Merge pull request #3485 from andreaconti/master
Fix Julia Language Server Support
2021-01-16 15:58:21 +09:00
Horacio Sanson bbac230008
Merge pull request #3234 from hsanson/3233-enable-ktlint-fixer-for-kotlin-files
Enable ktlint fixer for kotlin files.
2021-01-15 22:26:56 +09:00
Bartek thindil Jasicki 45a28383a2 Merge remote-tracking branch 'upstream/master' 2021-01-15 09:42:14 +01:00
w0rp 6fbdec8587
Merge pull request #3535 from dense-analysis/revert-3358-master
Revert "Improves fixer performance for large buffers"
2021-01-14 20:41:55 +00:00
w0rp 8dce126a6c
Update the Docker image; fix an error 2021-01-14 20:24:19 +00:00
w0rp f398faa8d3
Merge pull request #3471 from kevinclark/3448-fix-unittests
Make test/scripts/custom-checks portable
2021-01-14 18:08:44 +00:00
Kevin Clark 39f393ef07
Add nvim floating window support (replaces #3314) (#3470)
* Add nvim floating window hover support
* Add configuration for float to replace preview
* preview#ShowFloating: qualify local variables
* Configure floating preview usecases individually

Also:
  * Extract floating preview to its own file.
  * Ignore 'stay_here' option. Moving into the floating preview window
    seems confusing at best.
  * Re-use existing floating preview window if it's still up.
  * Flush out floating preview documentation.

* Watch cursor position changes per window

Floating previews open a new window, so when that window is written to,
it moves briefly there at a different position than the original window.
This makes repeated positions detected when positions are tracked at a
s: level. Instead, we change the variable to window scoped, which only
fires a message if the cursor has changed from the last position in
*that window*.

* g:ale_floating_preview cleanup
* floating_preview: add ALEDetail tests
* Fix fecs test missing runtime call
* Add ALEHover floating preview tests

Co-authored-by: Jan-Grimo Sobez <jan-grimo.sobez@phys.chem.ethz.ch>
2021-01-14 18:06:20 +00:00
Horacio Sanson 97ce2423b0
Merge pull request #3494 from YorickPeterse/master
Add linter for Inko
2021-01-13 23:54:06 +09:00
Horacio Sanson 7b187af10a
Merge pull request #3482 from liskin/lsp-popup-menu-fix
codefix: Fix LSP MenuCallback invocation (E119, not enough args)
2021-01-13 23:41:34 +09:00
Horacio Sanson aabca5b0ac
Merge pull request #3398 from ecly/update-python-find-root
Update `ale#python#FindProjectRootIni` with poetry.lock and pyproject.toml
2021-01-13 22:07:02 +09:00
Horacio Sanson 012348582c
Merge pull request #3531 from pinicarus/custom-erlc-executable
Custom erlc executable
2021-01-13 14:04:58 +09:00
Horacio Sanson 12d28ca34f
Merge pull request #3399 from StephenWithPH/suggest-scalafmt-for-sbt
suggest scalafmt for sbt
2021-01-13 14:00:10 +09:00
Horacio Sanson 49f8aa4703
Revert "Improves fixer performance for large buffers" 2021-01-12 17:49:30 +09:00
Bartek thindil Jasicki 7b1ed2733e Merge remote-tracking branch 'upstream/master' 2021-01-08 09:43:19 +01:00
Horacio Sanson 54dd731cf1
Merge pull request #3386 from ivorpeles/master
Make isort fixer recognize auto_pipenv flag
2021-01-08 10:43:34 +09:00
Horacio Sanson 4c454c96a9
Merge pull request #3390 from benknoble/fix-dafny-filename
dafny: include correct filename in lint results
2021-01-06 11:19:29 +09:00
Horacio Sanson 7e4c125d38
Merge pull request #3491 from Poulpatine/salt-lint
Add salt-lint support
2021-01-05 12:45:36 +09:00
Horacio Sanson 8c34c738ab
Merge pull request #3517 from ttys3/master
fix: proper initialization options call in php intelephense
2021-01-05 10:53:34 +09:00
ttys3 b4d889b682 fix: proper initialization options call in php intelephense 2021-01-04 23:10:39 +08:00
toastal 3229d5aba4 Merge branch 'master' of https://github.com/dense-analysis/ale into dhall 2021-01-04 20:25:48 +07:00
Kevin Clark 6b97af680d Exclude grandfathered-in non-snakecased lints
Prior to #3448, several linters should have been failing the
custom-checks that look for non-snake-cased lint names. They weren't,
but now the bug that hid those is fixed. So to avoid breaking users, we
just exclude those from the check. Linters excluded:

  * clojure/clj_kondo.vim
  * elixir/elixir_ls.vim
  * go/golangci_lint.vim
  * swift/swiftformat.vim
2021-01-01 14:48:10 -08:00
Bartek thindil Jasicki 3fca5e73b6 Merge remote-tracking branch 'upstream/master' 2021-01-01 09:24:50 +01:00
Horacio Sanson 7fca451cf9
Merge pull request #3467 from fwy/bugfix-checkstyleRegexpNvimWin32
Fix checkstyle regexp pattern to work correctly in NVim on Windows
2020-12-28 15:22:25 +09:00
Yorick Peterse 8375ee2766
Add linter for Inko
This adds a linter for Inko (https://inko-lang.org/). The linter makes
use of Inko's own compiler, and a newly introduced --check flag to only
check for errors; instead of also compiling source code.
2020-12-23 16:50:45 +01:00
Manoel Brunnen 02255dd967 Add tests for -imacros C flag 2020-12-21 15:07:11 +01:00
toastal 9c7e1fe4dd
merging master 2020-12-21 10:26:09 +07:00
Bartek thindil Jasicki 8af805cefe Merge remote-tracking branch 'upstream/master' 2020-12-18 10:04:19 +01:00
Benjamin Binier e358afdd9b Add salt-lint support 2020-12-17 09:19:19 +01:00
Horacio Sanson f996ede599
Merge pull request #3403 from will/sorbetwatchman
Add Ruby sorbet option to enable watchman
2020-12-16 09:48:35 +09:00
Andrea Conti 6043eeb25a Fix test space bug 2020-12-12 00:41:05 +01:00
Andrea Conti 1f0cbc7dbd Fix space error in string concat 2020-12-12 00:37:14 +01:00
Andrea Conti fa2186d95e Update Julia language server run command 2020-12-12 00:16:09 +01:00
Tomas Janousek 6d7cff9c00 codefix: Fix LSP MenuCallback invocation (E119, not enough args) 2020-12-05 15:29:25 +00:00
Bartek thindil Jasicki b85207d524 Merge remote-tracking branch 'upstream/master' 2020-12-04 09:45:06 +01:00
D. Ben Knoble 730222bcd8 fix blank line issue (???) 2020-11-30 13:51:15 -05:00
D. Ben Knoble 7e12be0c64 Merge remote-tracking branch 'origin/master' into fix-swipl
* origin/master: (40 commits)
  fix: correct suggested filetype for yamlfix
  feat: add yamlfix fixer
  Use _config for LSP config options
  Add support for R languageserver (#3370)
  Fix 3103 - add shellcheck shell directive detection. (#3216)
  Added the Vundle command in installation instructions (#3400)
  Adds support for Tlint - A Tighten Opinionated PHP Linter (#3291)
  Add php phpcbf options (#3383)
  Use has('gui_running') instead of has('gui')
  Close #2727 - Add a hover-only setting for balloons
  Fix #3332 - Modify everything for rename/actions
  Add a missing blank line in documentation
  Add luafmt fixer (#3289)
  #3442 Fix code fix clangd issue
  Close #1466 - Add GVIM refactor menu support
  Look for node packages in .yarn/sdks as well
  Update documentation for code actions and rename
  cmp forwards, and reverse the code actions
  Support for LSP/tsserver Code Actions (#3437)
  Move the test for buffer-local variables
  ...
2020-11-30 13:42:21 -05:00
D. Ben Knoble 303b89a6b4 add tests 2020-11-30 13:40:57 -05:00
D. Ben Knoble 3f01cc247c dafny: add a timeLimit option and message-parsing 2020-11-30 13:28:04 -05:00
Moritz Röhrich d9b74caf43 hadolint: Recognize message type
Hadolint is in the process of adding the severity of a lint rule to the
commandline output: https://github.com/hadolint/hadolint/pull/501

This change utilizes that to show the severity in vim.
2020-11-29 15:09:47 +01:00
Horacio Sanson 03b6978a27
Merge pull request #3381 from andreypopp/gofmt-stding-stdout
Use stdin/stdout to communicate with gofmt
2020-11-29 18:59:48 +09:00
Kevin Clark 84c95aff9b Restore ls -v flag to check-toc 2020-11-28 09:44:19 -08:00
Kevin Clark 65b09cfa9d Restore use of grep in check-toc 2020-11-28 09:20:50 -08:00
Kevin Clark 6b0250a843 Use akevinclark/ale for the updated docker image 2020-11-28 09:05:06 -08:00
Kevin Clark d52dce2e6f Use docker image for custom-check scripts
NOTE: The custom-linting-rules test fails due to the following (legit)
warnings:

  ale_linters/clojure/clj_kondo.vim:29 Use snake_case names for linters
  ale_linters/elixir/elixir_ls.vim:15 Use snake_case names for linters
  ale_linters/go/golangci_lint.vim:54 Use snake_case names for linters
  ale_linters/swift/swiftformat.vim:56 Use snake_case names for linters

The message wasn't getting printed because docker was explicitly only
being asked to connect stdout (ignoring stderr). Unclear yet why the
error code wasn't getting bubbled up.
2020-11-28 08:26:13 -08:00
Kevin Clark e300a48e13 Fix test/script/check-supported-tools-tables 2020-11-28 08:23:06 -08:00
Kevin Clark 469af2a734 Fix TOC tests
Sort order is slightly different than the headings
2020-11-28 07:55:35 -08:00
Kevin Clark 99f1874e86 Add non-busybox grep/sed to Dockerfile
Tests need extended regexes from sed and --exclude from grep.
2020-11-28 07:51:02 -08:00
Kevin Clark f72e60c12a Fix check-supported-tools-tables check
sed wasn't using -E, so '|' wasn't being handled properly. Seems likely
that's sed-implementation specific, so now it runs through docker's sed
to support portability.
2020-11-27 20:32:51 -08:00
Bartek thindil Jasicki 09b8cc97de Merge remote-tracking branch 'upstream/master' 2020-11-27 13:38:24 +01:00
Horacio Sanson 1365dce921
Merge pull request #3461 from lyz-code/feat/add-yamlfixer
feat: add yamlfix fixer
2020-11-27 16:02:33 +09:00
fwy 0a2ad516d4 Fix regexp pattern to work correctly in nvim and vim on windows and linux 2020-11-26 15:29:23 -06:00
Lyz 12eb8d1523
fix: correct suggested filetype for yamlfix 2020-11-26 12:42:50 +01:00
Ivor Peles ce3d891bed Use better string comparison operators in isort fixer 2020-11-25 17:57:40 -05:00
Ivor Peles 713e53e3f6 Ensure isort / pipenv test conforms to ALE coding standards 2020-11-25 17:51:27 -05:00
Ivor Peles 340e966055 Fix comparison operator 2020-11-25 17:34:03 -05:00
Lyz c69d696e1b
feat: add yamlfix fixer 2020-11-25 01:21:53 +01:00
Gonzalo Quero 7e9d4fbfc8 refactor: Move test to the right file 2020-11-23 10:21:09 +00:00
Gonzalo Quero 491ceacb64 fix: Use proper CdPath function in test 2020-11-23 10:08:00 +00:00
Gonzalo Quero 05d5cc4988 chore: Document config_file variable 2020-11-23 10:08:00 +00:00
Gonzalo Quero 7d8275daf5 chore: Add Elixir Credo tests 2020-11-23 10:08:00 +00:00
Gonzalo Quero 433b23be17 feat: Add optional configuration file for Credo 2020-11-23 10:08:00 +00:00
Ivor Peles d27a3f453c Ignore executable check when executable is pipenv 2020-11-21 19:24:20 -05:00
Ivor Peles 6efca486e8 Add test for isort with auto_pipenv flag(s) 2020-11-21 19:24:20 -05:00
Ivor Peles ae86d10e48 Set default value for python_isort_auto_pipenv 2020-11-21 19:24:20 -05:00
Ivor Peles 64471e6ea8 Document ale_python_isort_auto_pipenv option 2020-11-21 19:24:19 -05:00
Ivor Peles 373ffa0f31 Use pipenv isort executable when python_auto_pipenv = 1 2020-11-21 19:24:19 -05:00
w0rp 681a6e371d
Use _config for LSP config options 2020-11-21 20:58:34 +00:00
Eric Zhao 9692c0c64c
Add support for R languageserver (#3370) 2020-11-21 20:56:38 +00:00
Horacio Sanson 5458a1b291
Fix 3103 - add shellcheck shell directive detection. (#3216)
* Fix 3103 - add shellcheck shell directive detection.

Searches for shellcheck shell directive to detect dialects for scripts
that do not have shebang.

* Change order of detection of shellcheck dialect

In a situation where the filetype can be wrong (example: something.sh
which is written in bash dialect) and has no hash-bang (since it is
meant to be sourced) then the override specified within the script will
be ignored.

It probably is the most right thing to do if the script author has added
a specific directive; it should trump everything else.

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: Dino Korah <dino.korah@redmatter.com>
2020-11-21 20:49:31 +00:00
w0rp b4550f361b
Merge pull request #3409 from lyz-code/feat/add-autoimport-support
feat: add autoimport fixer
2020-11-21 20:45:51 +00:00
Gabriel Petrovay b09ccc12c3
Added the Vundle command in installation instructions (#3400) 2020-11-21 20:32:58 +00:00
Jose Soto e1184e31f6
Adds support for Tlint - A Tighten Opinionated PHP Linter (#3291)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-11-21 20:29:33 +00:00
w0rp 96428425fe
Merge pull request #2903 from davidtwco/ormolu-fixer
Add ormolu fixer.
2020-11-21 20:25:13 +00:00
Dale Jung 2873be2d6a
Add php phpcbf options (#3383)
* Taken from phpcs. add add_php_phpcbf_options #3382
* Updated docs for php_phpcbf_options #3382
* Added tests #3382
2020-11-21 20:19:02 +00:00
w0rp d1246ea8d5
Merge pull request #3380 from rgossiaux/patch-1
Fix typo in ale-python.txt
2020-11-21 20:17:35 +00:00
w0rp 2e91f0e689
Use has('gui_running') instead of has('gui') 2020-11-21 20:16:32 +00:00
w0rp a139599d39
Close #2727 - Add a hover-only setting for balloons 2020-11-21 20:12:09 +00:00
w0rp 06e7f2195e
Fix #3332 - Modify everything for rename/actions
ALE now just modifies every open buffer for rename and actions, and sets
up a one-time use BufEnter event to reload buffers that are changed so
you don't have to think about what to do with changed buffers.
2020-11-21 19:00:53 +00:00
w0rp b8aaff2cf7
Merge pull request #3358 from lukaswozniak/master
Improves fixer performance for large buffers
2020-11-21 16:40:29 +00:00
w0rp 342e5af4e3
Add a missing blank line in documentation 2020-11-21 16:20:02 +00:00
w0rp e4bfcb44b3
Merge pull request #3357 from creativenull/feat-php-intelephense
feat: add intelephense support for php
2020-11-21 16:18:20 +00:00
w0rp edd96f4414
Merge pull request #3354 from rphln/collapse-whitespaces
Collapse spaces and lines in the completion menu.
2020-11-21 16:16:08 +00:00
w0rp d23c9125c5
Merge pull request #3352 from arthrarnld/patch-1
Fix wording in Rust doc
2020-11-21 16:13:24 +00:00
w0rp c10e807492
Fix handling of ranges at file end. (#3344) 2020-11-21 16:03:39 +00:00
zandr e5d16caebe
Add luafmt fixer (#3289) 2020-11-21 15:59:50 +00:00
w0rp 8e28de142a
Merge pull request #3292 from dmitrivereshchagin/add-elvis-handler-for-erlang
Add Elvis handler for Erlang
2020-11-21 15:56:50 +00:00
w0rp df3163223f
Merge pull request #3282 from zanona/master
fix(ale_linters/phpcs): add support for multiline error messages
2020-11-21 15:36:22 +00:00
w0rp 9f2215d69b
Merge pull request #3435 from myobie/yarn-berry
For linters/tserver and handlers/eslint: look for node packages in .yarn/sdks as well
2020-11-21 15:33:55 +00:00
Dalius Dobravolskas 81d16823a7
Settings to control suggestions. 2020-11-21 15:49:42 +02:00
Dalius Dobravolskas 17c0c3c731
Test fix. 2020-11-21 15:49:42 +02:00
Dalius Dobravolskas c098a07d67
Tests added. 2020-11-21 15:49:41 +02:00
Dalius Dobravolskas 2ab46d4b8e
Show tsserver hints/suggestions in Ale. 2020-11-21 15:49:41 +02:00
Dalius Dobravolskas d0b5909fd8
#3442 Fix code fix clangd issue 2020-11-21 01:27:27 +00:00
w0rp 7c04ee5c20
Close #1466 - Add GVIM refactor menu support
Code actions and ALERename now appear in the right click context menu
for GVim by default.
2020-11-21 01:18:27 +00:00
Bartek thindil Jasicki f156548c16 Merge remote-tracking branch 'upstream/master' 2020-11-20 10:11:02 +01:00
Ben Linsay ddfc43e774 pass lsp intialization_options to rust-analyzer
fixes #3350
2020-11-18 22:22:16 -05:00
Nathan Herald b74827de99
Look for node packages in .yarn/sdks as well 2020-11-17 17:12:04 +01:00
w0rp 48fe0dd4f6
Update documentation for code actions and rename 2020-11-14 10:41:51 +00:00
w0rp e9140c740b
cmp forwards, and reverse the code actions 2020-11-14 10:17:02 +00:00
Dalius Dobravolskas 01800a23ad
Support for LSP/tsserver Code Actions (#3437)
* Added tsserver and LSP code action support.
* tsserver refactors support added.
* Handling special case when new text is added after new line symbol.
* ale#code_action#ApplyChanges simplified.
* Initial attempt on LSP Code Actions.
* workspace/executeCommand added.
* Some null checks added.
* Add last column to LSP Code Action message.
* Pass diagnostics to LSP code action.

Previously ApplyChanges code was applied from top-to-bottom that required 
extra parameters to track progress and there was bug. I have changed code
to bottom-to-top approach as that does not require those extra parameters
and solved the bug.

Tested with typescript-language-server and it is working.
2020-11-14 10:15:17 +00:00
toastal 42e4b14861
Merge branch 'master' of github.com:dense-analysis/ale into dhall 2020-11-14 15:03:26 +07:00
Bartek thindil Jasicki 01b661ea25 Merge remote-tracking branch 'upstream/master' 2020-11-06 13:31:59 +01:00
Horacio Sanson 1ec573bf0d
Merge pull request #3427 from lifecrisis/sh-buffer-vars
Check for Vim's shell type buffer variables before falling back to the file type
2020-11-05 08:37:15 +09:00
Manoel Brunnen 96d8415946 Add -imacros to C flags 2020-11-03 23:10:15 +01:00
Jason Franklin 31b7a2de41
Move the test for buffer-local variables
The "ale#handlers#sh#GetShellType()" function currently falls back
to the file type without checking for buffer-local variables first.
This causes the function to return "sh" even when a script is known
by Vim to be a script of a more specific type (e.g., "bash").

The "ale#handlers#shellcheck#GetDialectArgument()" function then
erroneously uses this type even though a more fitting type should be
used instead.  Files without a "#!" line will be of type "sh" even
though they may have a ".bash" suffix.

This commit fixes the problem by checking for buffer-local shell
type variables (set by Vim) before falling back to the file type.
2020-11-02 10:59:16 -05:00
Jason Franklin 73632312c2
Use the proper term for the "#!" line 2020-11-02 10:46:56 -05:00
Jason Franklin 6c22936303
Remove a noise comment 2020-11-02 10:46:28 -05:00
pinicarus db96b00720
Merge branch 'custom-erlc-executable' 2020-11-01 11:45:36 +01:00
cyy a49f664aea chang fishindent to fish_indent 2020-10-31 14:01:08 +08:00
cyy 194660660d update url 2020-10-31 14:01:08 +08:00
cyy 9d1a71a5cb add doc and test 2020-10-31 14:01:08 +08:00
cyy 983c7e8805 add fish_indent fixer 2020-10-31 14:01:08 +08:00
pinicarus 62f2c6d326
test(erlang/erlc): simplify matches 2020-10-28 12:58:15 +01:00
pinicarus 7d69cdf4ad
test(erlang/erlc): make quotes optional in matches 2020-10-28 12:51:38 +01:00
pinicarus 15f44933c2
feat(erlang/erlc): add option for custom executable 2020-10-28 12:38:28 +01:00
Lyz 513e6ee972
feat: add autoimport fixer 2020-10-23 18:53:38 +02:00
David Wood b496c4b164
Add ormolu fixer.
This commit adds a fixer for the Haskell language, ormolu
(https://github.com/tweag/ormolu).

Signed-off-by: David Wood <david@davidtw.co>
2020-10-23 11:48:21 +01:00
Will Leinweber cafe8621e2 Add Ruby sorbet option to enable watchman 2020-10-20 23:13:53 -07:00
StephenWithPH af5a8e1abf
add sbt as a suggested filetype for scalafmt fixer 2020-10-19 09:47:54 -07:00
Bartek thindil Jasicki b84d41f9ea Merge remote-tracking branch 'upstream/master' 2020-10-16 17:51:08 +02:00
w0rp 557a1ed5da
Make the two nearly identical Swift tools easier to distinguish 2020-10-15 22:02:27 +01:00
w0rp 477eb89793
#3332 Implement :ALERename! for ignoring errors
:ALERename! now ignores errors for files that cannot be modified, and
modifies all other files.
2020-10-15 21:56:21 +01:00
w0rp f384d61c3d
Fix sorting of supported tools 2020-10-15 21:24:27 +01:00
ecly f125c11faa Update FindProjectRootIni with poetry.lock and pyproject.toml 2020-10-15 13:35:47 +02:00
Bartek thindil Jasicki c4eb41f091 Merge remote-tracking branch 'upstream/master' 2020-10-09 12:54:48 +02:00
D. Ben Knoble 160af49450 update tests 2020-10-08 12:02:30 -04:00
D. Ben Knoble 47da7483d8 Merge remote-tracking branch 'origin/master' into fix-swipl
* origin/master:
  Add tests for maven.vim file
  Fix grammatical error in doc
  Add maven helper file; use maven wrapper if available instead of global 'mvn' executable
  fix lint, fix variable semantics and update tests
  bibclean: update matchlist reges for bibclean > v2.11.4
  Update rubocop_auto_correct_all tag
2020-10-08 11:55:39 -04:00
D. Ben Knoble c37cc1c8a3 dafny: include correct filename in lint results
Results can come from included files, not just the current buffer.
2020-10-08 11:54:56 -04:00
Andrey Popp 96ec33e6d6 Use stdin/stdout to communicate with gofmt 2020-10-03 18:44:19 +03:00
pinicarus d7557ef9be
refactor(erlang/dialyzer): simplify option handling 2020-10-03 10:16:04 +02:00
rgossiaux 9a8ab764d5
Fix typo in ale-python.txt 2020-10-02 22:51:54 -04:00
Horacio Sanson b91c6c2edd
Merge pull request #3374 from fenuks/maven_helper
Use maven wrapper if available
2020-10-02 20:07:28 +09:00
fenuks 4466c47990 Add tests for maven.vim file 2020-10-02 10:03:14 +02:00
Bartek thindil Jasicki bd1b671e82 Merge remote-tracking branch 'upstream/master' 2020-10-02 09:36:32 +02:00
pinicarus ef145bda1c
docs(erlang/dialyzer): change wording a bit 2020-10-01 19:20:31 +02:00
D. Ben Knoble 3410c1b1e2 prolog/swipl: add blank line after call
Though I do not see this specified or followed anywhere else
2020-10-01 13:18:34 -04:00
D. Ben Knoble 81b92bcbfa prolog/swipl: add test for new format 2020-10-01 13:12:43 -04:00
D. Ben Knoble e32d5fc03d prolog/swipl: address linter feedback
This actually caught a bug where I forgot to rename the function
2020-10-01 13:12:18 -04:00
D. Ben Knoble abe1440268 prolog/swipl: update error format for new version
A recent(?) update to swipl changed the error format from

  Warning: some.pl:2:
              Singleton variables: [Y]

to

  Warning: some.pl:2:
  Warning:    Singleton variables: [Y]

The old error handler doesn't report the correct line numbers and
messages on the old format.

I've chosen to add a function that covers the second case and detect it,
rather than rewrite the current function. This way, both versions should
be able to live together.

---

Example file that demonstrates the issue (some.pl above):
```
% vim: ft=prolog
ii(X, Y) :- X.
```

---
2020-10-01 12:49:53 -04:00
Horacio Sanson 2d3ed956b9
Merge pull request #3375 from isaif/fix-doc
Fix grammatical error in doc
2020-10-01 20:44:35 +09:00
isaif 7857098cb0 Fix grammatical error in doc 2020-10-01 16:23:49 +05:30
pinicarus ac3c0c093a
feat(erlang/dialyzer): add custom options passing 2020-09-30 23:16:50 +02:00
fenuks 7186b0437f Add maven helper file; use maven wrapper if available instead of global 'mvn' executable 2020-09-30 00:11:57 +02:00
Horacio Sanson 96dcbd1f20
Merge pull request #3367 from bratekarate/update-bibclean
bibclean: update matchlist reges for bibclean > v2.11.4
2020-09-28 10:53:19 +09:00
bratekarate 56242cb874
fix lint, fix variable semantics and update tests 2020-09-26 17:09:54 +02:00
Horacio Sanson 94927195ee
Merge pull request #3284 from resong/bug/duplicateTag
Update ale_ruby_rubocop_auto_correct_all tag
2020-09-26 14:50:36 +09:00
bratekarate 5f2aeba8cc
bibclean: update matchlist reges for bibclean > v2.11.4 2020-09-26 03:21:26 +02:00
Marcus Zanona e089969404
fix(ale_linters/phpcs): add support for multiline error messages 2020-09-25 11:25:24 +02:00
toastal 48cbf1cb36
dhall alias 2020-09-25 08:26:17 +07:00
Łukasz Woźniak 6bebdcfa30 Improves fixer performance for large buffers 2020-09-18 12:59:27 +02:00
Arnold Chand f8351c1b22 fix: test: mkdir should create if it doesn't exist 2020-09-17 09:58:45 -04:00
Arnold Chand 8a855e3e64 fix: tests 2020-09-17 09:35:06 -04:00
Arnold Chand fec6b63494 feat: add intelephense support for php 2020-09-17 08:06:11 -04:00
Raphael Nepomuceno 9769565f88 Collapse spaces and lines in the completion menu. 2020-09-14 12:11:16 -03:00
Arthur Arnold 63a528eac2
Fix wording in Rust doc 2020-09-14 07:57:22 -03:00
toastal ed47008710
addressing missing docs + cleaning up older Dhall files 2020-09-14 10:13:11 +07:00
toastal b32954a46c
Merge branch 'master' into dhall 2020-09-14 08:54:07 +07:00
Bartek thindil Jasicki 1781b1eab0 Merge remote-tracking branch 'upstream/master' 2020-09-11 10:38:36 +02:00
w0rp 08295ce174
Bump the ALE version to 3.0.0 2020-09-09 22:06:38 +01:00
w0rp 4ddf742643
Close #2522 - Check pylint on the fly
Newer versions of pylint will now check your code as you type. Older
versions will still only check the file on disk.

Co-authored-by: Oliver Wiegers <oliver.wiegers@gmail.com>
2020-09-09 21:45:15 +01:00
w0rp 78fa93bd55
Add tests for covering the coming Vint version 2020-09-09 20:34:27 +01:00
w0rp 62fd83f1dd
Merge pull request #3108 from timbedard/vint-add-stdin
Add stdin option for supported vint versions
2020-09-09 20:15:54 +01:00
Christian Keil d1f48e5ede Remove unnecessary length check. 2020-09-09 17:49:21 +02:00
Christian Keil d3932c0242 Fix format linting error. 2020-09-09 17:44:09 +02:00
Christian Keil 20f6bebdf2 Fix handling of ranges at file end. 2020-09-09 17:30:41 +02:00
w0rp 6a367e44aa
Close #3003 - Show ignored linters in :ALEInfo 2020-09-08 22:19:13 +01:00
w0rp 7d90ff56d9
Close #3333 - Add an ALECompletePost event
Add an `ALECompletePost` event along with everything needed to make it
useful for its primary purpose: fixing code after inserting completions.

* `ALEFix` can now be called with a bang (`!`) to suppress errors.
* A new `ALELintStop` command lets you stop linting, and start it later.
2020-09-08 21:40:10 +01:00
toastal f07ecbc579
merge master -- apparently someone else added dhall? 2020-09-08 10:08:00 +07:00
w0rp b4b75126f9
Fix a completion error 2020-09-07 10:01:18 +01:00
Horacio Sanson fc2a34e9d8
Merge pull request #3337 from sodapopcan/patch-1
Fix typo
2020-09-07 16:30:42 +09:00
Horacio Sanson 8950f6b812
Merge pull request #3334 from remi6397/bugfix/asciidoc-languagetool-typo
Fix asciidoc languagetool integration
2020-09-07 15:37:04 +09:00
Andrew Haust 417761b415
Fix typo 2020-09-07 02:24:39 -04:00
w0rp c36053d4cc
Close #3268 - Implement :ALEImport
A new command, `:ALEImport`, has been added, which lets you import words
at your cursor if a completion provider can provide a completion for
that word which includes some additional text changes.
2020-09-06 22:37:37 +01:00
Dmitri Vereshchagin 49718e0ec6 Add Elvis handler for Erlang
[Elvis][1] is an Erlang style reviewer.

[1]: https://github.com/inaka/elvis
2020-09-06 12:40:28 +03:00
w0rp 5bc49d2047
Fix #3183 - Escape filename characters from LSP/tsserver 2020-09-05 21:46:39 +01:00
w0rp 152b2cb691
Clean up embertemplatelint code
Alias ember-template-lint to embertemplatelint so users can use either
string to enable the linter.
2020-09-05 19:06:07 +01:00
Jeremiasz Nelz 0b55098bd0 Fix asciidoc languagetool integration 2020-09-04 22:52:29 +02:00
Bartek thindil Jasicki c78be86103 Merge remote-tracking branch 'upstream/master' 2020-09-04 13:46:11 +02:00
w0rp 844febb9fb
Fix #3322 - Apply rename changes correctly 2020-09-04 09:37:33 +01:00
Cyrille David d4a14746cd
feat(template-lint): Read from stdin (#2622)
* ember-template-lint: Lint from stdin
  * This feature has recently been implemented in ember-template-lint.
* Refactor ember-template-lint executable
* Fallback on a temporary file for old template-lint

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-08-31 09:26:33 +01:00
w0rp ac2100d410
Fix flake8 cd logic for invalid options 2020-08-31 09:12:36 +01:00
w0rp cdaeca452e
Add tests for \r removal 2020-08-31 09:01:44 +01:00
w0rp 31942c99b9
Merge pull request #2858 from kalekseev/patch-flake8
Provide configuration option to run flake8 from project root.
2020-08-31 09:01:16 +01:00
w0rp 4a91f92f28
Merge pull request #3078 from jgehrig/jg-issue2958
Issue 2958: Addtional ^M characters on Windows
2020-08-31 08:31:44 +01:00
Konstantin Alekseev 1462de6685 Run flake8 from project root by default.
Option `per-file-ignores` was introduced in flake8 version 3.7.0.
It allows to ignore specific errors in specific files using glob syntax.
For example `per-file-ignores = src/generated/*.py:F401` will
ignore `F401` error in all python files in `src/generated`.
Thus ale has to run flake8 from project root where .flake8 config
is placed otherwise glob won't match linted file.
2020-08-30 22:56:10 +03:00
w0rp 0989da4a38
Merge pull request #3194 from maxwell-k/vint
vim/vint: show policy name
2020-08-29 20:54:09 +01:00
w0rp 33202a39f5
#2107 - Recommend <C-c> instead, which avoids autocmd functions 2020-08-29 20:45:45 +01:00
w0rp 303bed6ec1
#2107 - Document completion fallbacks and insert-completion trick 2020-08-29 20:40:50 +01:00
w0rp 25b572b3bf
Close #3205 - Avoid inserting completions by default 2020-08-29 17:36:25 +01:00
w0rp 6e2e51b154
Fix #2971 - Disable automatic completion while 'paste' is active 2020-08-29 17:27:53 +01:00
w0rp 6888ca46a7
Fix retrying on some test failures 2020-08-29 16:32:17 +01:00
w0rp f1ecc2e068
Fix psalm options. Retry on some test failures 2020-08-29 16:31:47 +01:00
w0rp 7e0cdb53ec
Fix #3247 - Use --always-make for make -n by default 2020-08-29 16:05:49 +01:00
w0rp bc3a843e10
Add a missing `augroup END` line 2020-08-29 14:23:58 +01:00
w0rp 6b138b965d
Merge pull request #3327 from Kimplul/master
Improved macro handling in gcc
2020-08-29 13:57:16 +01:00
Kimplul d9a7d6bc23 Improved macro handling in gcc 2020-08-29 15:17:20 +03:00
w0rp 06264c264f
typo 2020-08-29 12:35:40 +01:00
w0rp dd9ad9b5be
#3319 - Try to modify buffers later for ALEFix 2020-08-29 12:33:17 +01:00
Bartek thindil Jasicki 0de847a8e1 Merge remote-tracking branch 'upstream/master' 2020-08-29 10:42:25 +02:00
w0rp 7d4ce4e6aa
Close #3325 - Apply new formatting where possible 2020-08-28 19:50:36 +01:00
w0rp 3d5a2690ce
#3325 - ale#path#BufferCdString now generates %s:h 2020-08-28 17:46:43 +01:00
w0rp 34e409ea21
Close #3285 - lint_file is now dynamic
`lint_file` can now be computed dynamically with a callback function,
which can return a deferred result, as per `ale#command#Run`. This
allows linters to dynamically switch between checking files on disk,
or checking code on the fly.

Some tests have been fixed on Windows.
2020-08-28 14:02:05 +01:00
w0rp b8c0ac2e61
Close #3309 - Add b:ale_lint_delay 2020-08-28 09:54:43 +01:00
w0rp 6874120405
Fix #3323 - Set default for g:ale_filename_mappings 2020-08-28 09:33:09 +01:00
w0rp 36e959a466
Add sql-lint to supported tools 2020-08-28 09:25:40 +01:00
w0rp 47fdc02fc7
Merge pull request #2988 from joereynolds/master
Add sql-lint as linter
2020-08-28 08:43:10 +01:00
w0rp 369e3876f0
#3324 - Enable rls by default 2020-08-28 08:23:10 +01:00
Sorin Iclanzan 80bd2e18d6
Set prettier working directory to where .prettierignore is (#3101)
Prettier does not use `.prettierignore` unless the current directory is the root where the `.prettierignore` file resides.

* Update Prettier tests
* Look for prettierignore to determine project root
2020-08-28 08:14:50 +01:00
w0rp ecd7abecc0
Fix #3319 - Force modifications to buffers 2020-08-27 21:29:13 +01:00
w0rp 7545b18ba1
Fix #3318 - Escape macros when parsing C flags 2020-08-27 21:17:24 +01:00
w0rp 6d843715f3
Fix C flag parsing and tests on Windows 2020-08-27 20:18:13 +01:00
w0rp 6074720dc2
Mention --fast, and document running Windows tests locally 2020-08-27 19:39:16 +01:00
w0rp af177d7825
#3318 Refactor C flag parsing to set up for quoting arguments 2020-08-27 19:33:43 +01:00
w0rp 719f3c62b0
#3266 - Catch echo visual selection errors 2020-08-27 13:57:20 +01:00
w0rp 5d3d33626c
Merge pull request #3310 from pbrisbin/master
Add dhall-format as a Fixer
2020-08-27 13:39:30 +01:00
w0rp 571cff932d
Label the test cases more clearly 2020-08-27 13:15:04 +01:00
w0rp 17605777d6
Fix #3317 - Parse -include from C flags 2020-08-27 13:05:50 +01:00
w0rp 66ff00c420
Fix #3316 - Repeat -relative for ALERepeatSelection 2020-08-27 12:41:07 +01:00
w0rp f5aa0e8457
Fix #3307 - Handle compile_commands paths better
ALE now converts paths from compile_commands.json files into absolute
paths and prefers matching against absolute file and directory names for
determining which flags to use for files. As a result, parsing
compile_commands.json to determine flags should work for a lot more C
and C++ projects.
2020-08-27 11:44:35 +01:00
w0rp 686f42a2e1
Fix a typo 2020-08-27 09:18:10 +01:00
w0rp c9377e9baf
#3314 - Tell people how to make new plug mappings 2020-08-27 09:17:14 +01:00
w0rp a955f5dfa8
#3312 - Just check if additionalTextEdits is non-empty 2020-08-27 08:57:12 +01:00
w0rp 396fba7cca
Fix #3312 - Fix a false positive for auto imports
ALE was incorrectly detecting completion results from servers such as
rust-analyzer as wanting to add import lines when additionalTextEdits
was present, but empty.

Now ALE only filters out completion results if the autoimport setting is
off, and one of the additionalTextEdits starts on some line other than
the current line. If any additionalTextEdits happen to be identical to
the change from completion anyway, ALE will skip them.
2020-08-27 08:44:43 +01:00
patrick brisbin 447aea4af0
Add dhall-format as a Fixer
https://github.com/dhall-lang/dhall-lang
2020-08-25 09:34:34 -04:00
w0rp 3e2abe3f25
#2556 - Support modifiers for formatted filenames 2020-08-24 09:33:07 +01:00
Horacio Sanson 1a7366067a
Merge pull request #3302 from khaveesh/master
latexindent: Run fixer from stdin instead of a temporary file
2020-08-24 09:16:35 +09:00
w0rp 33eb03ea71
Yes, try again to fix Windows tests 2020-08-23 20:19:22 +01:00
w0rp d4583f1a63
Try to fix Windows tests again 2020-08-23 20:14:08 +01:00
w0rp c0566db1d2
Try to fix Windows tests 2020-08-23 20:05:09 +01:00
w0rp ba3dd0d027
Close #2556 - Support filename mapping
ALE now supports mapping files between different systems for running
linters and fixers with Docker, in virtual machines, in servers, etc.
2020-08-23 19:55:42 +01:00
Khaveesh N 76801743cf
Fixed tests 2020-08-21 17:29:43 +05:30
Khaveesh N 4bece27bd4
refactor(Fixer): Change latexindent to read from stdin instead of temporary file
This is a better strategy as it avoids creating temporary files and the delay that follows
2020-08-21 17:19:22 +05:30
Bartek thindil Jasicki 62f07d820c Merge remote-tracking branch 'upstream/master' 2020-08-21 10:39:39 +02:00
w0rp 2b785688ea
#3299 Merge gcc and clang into a cc linter
Users can easily be confused when they set some options for a C or C++
compiler, and another compiler is run with different options, which
still reports errors. To remedy this, the existing `gcc` and `clang`
linters have been replaced with a `cc` linter that will run either
compiler.

This is a breaking change for ALE v3.0.0.
2020-08-20 01:49:14 +01:00
awang 4d42ebc160
Keep -iframework if present in parsed C/C++ flags (#3057)
* Keep -iframework if present in parsed C/C++ flags
* Add test to make sure -iframework is parsed

Co-authored-by: Alex Wang <ts826848@gmail.com>
2020-08-20 00:09:02 +01:00
w0rp 90abb7e7ef
Try to fix Windows tests again 2020-08-19 01:22:43 +01:00
w0rp de7b0567b1
Try to fix tests on Windows 2020-08-19 01:10:33 +01:00
w0rp 361027eac6
Fix #3200 - Do not use -fstack-usage from parsed flags 2020-08-19 01:04:08 +01:00
w0rp 794224aafa
#3056 Add tests for parsed C/C++ -std flag handling 2020-08-19 00:47:39 +01:00
w0rp 92cada9913
Merge pull request #3056 from ts826848/remove-ale-std-if-already-in-GetCFlags
[WIP] Avoid overriding parsed C/C++ -std=* flag
2020-08-19 00:21:22 +01:00
w0rp e27d4377b5
Merge pull request #3178 from sudobash1/expand_at
Fixes #3092 - Implement loading `@file` c arguments
2020-08-19 00:15:34 +01:00
w0rp f8b3a43aab
Merge pull request #3229 from hsanson/3220-enable-languagetool-for-asciidoc
Enable languagetool for asciidoctor files.
2020-08-18 23:22:01 +01:00
w0rp 5eda1df0a9
Remove features deprecated in previous versions 2020-08-18 23:03:43 +01:00
w0rp 4df352eee5
Fix #3294 - Fix hover off by 1, handle LSP server crashes 2020-08-18 01:48:07 +01:00
w0rp bc6304bdb0
Merge pull request #3007 from klaaspieter/swift-format
Add Apple's swift-format as a linter
2020-08-17 23:37:23 +01:00
w0rp ac56574b55
Merge pull request #3046 from hsanson/2816-fix-standard-fix-doesnt-work
Fix 2816 - Standard fix does not work.
2020-08-17 21:44:19 +01:00
w0rp 6d33417b15
Merge pull request #2759 from kgrzywacz/master
credo now recognizes umbrella projects
2020-08-17 21:34:10 +01:00
w0rp eb864730e2
Merge pull request #2906 from elebow/shelldetect-fall-back-to-filetype-if-no-hashbang
ShellDetect falls back to filetype if no hashbang (fixes #2886)
2020-08-17 21:29:16 +01:00
w0rp 514e5a8baa
Merge pull request #2940 from davidsierradz/add-markdownlint-options
allow passing custom options to markdownlint
2020-08-17 10:21:36 +01:00
w0rp cfda549056
Tell stale bot to wait longer before closing PRs 2020-08-17 10:20:41 +01:00
blyoa d5c1d84230
Add remark-lint for a markdown fixer (#2836) 2020-08-17 10:14:38 +01:00
w0rp 5c778e1ae7
Make it easier to run tests locally
Certain tests could break if you ran them separately from other tests.
They have been patched.

`run-tests` now has a `--fast` option which runs tests with only the
fastest Vim version ALE tests with, and the custom checks.
2020-08-16 21:20:08 +01:00
Bartek thindil Jasicki 04bd84e914 Merge remote-tracking branch 'upstream/master' 2020-08-14 19:38:09 +02:00
Horacio Sanson 5ceda0164c
Merge pull request #3288 from nibocn/master
fix(eclipselsp): Get jar file path failed
2020-08-14 13:49:09 +09:00
w0rp 5a4fad6172
Fix #2899 - Handle tsserver default import completion 2020-08-14 01:55:54 +01:00
w0rp 2b2403a20d
Merge pull request #3144 from jamescdavis/dont_append_newline_when_noeol
don't append a newline to temp file when buffer is noeol and nofixeol is set
2020-08-14 00:32:28 +01:00
w0rp 8151e3e8fa
Merge pull request #2920 from ConradIrwin/prettier-standard-stdin
Fix prettier_standard to respect the configuration file
2020-08-14 00:27:41 +01:00
w0rp 94a968ef39
Merge pull request #2924 from patrick96/vlog-filename
verilog: Add filename to vlog linter output
2020-08-14 00:20:57 +01:00
toastal 167e2e7750
tests 2020-08-14 00:31:49 +07:00
toastal f1080a2bbe
Dhall language support (fixes #2820) 2020-08-14 00:31:47 +07:00
w0rp ed69b074ba
Merge pull request #3164 from mathstuf/cargo-separate-target-dir
rust/cargo: add support for a custom target directory
2020-08-13 16:29:19 +01:00
NiBo a4f70163eb fix(eclipselsp): Get jar file path failed
Error: Unable to access jarfile
2020-08-13 23:12:12 +08:00
Ben Boeckel 506a8532d0 rust/cargo: add support for a custom target directory
This can avoid having to wait for ALE or ALE being blocked on other
cargo actions within the same crate.
2020-08-13 10:22:33 -04:00
w0rp 0b77766337
Merge pull request #3010 from kevinoid/ps1-powershell
Alias ps1 filetype to powershell
2020-08-13 13:45:49 +01:00
w0rp 979062235a
Fix #3286 - Fix duplicate tags 2020-08-13 13:44:22 +01:00
Horacio Sanson 8e6c7bff9a
Fix 1695 - Change rubocop fixer to use stdin (#3230)
* Fix 1695 - Change rubocop fixer to use stdin
* Update test_rubocop_fixer_callback.vader

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-08-13 11:25:07 +01:00
w0rp 34adb997c6
Configure the stale bot 2020-08-13 02:37:54 +01:00
w0rp 64d4c951ae
Fix #3281 - Stop CursorHold flickering 2020-08-13 02:22:21 +01:00
Rebecca Song 80b93a3606 Update rubocop_auto_correct_all tag 2020-08-12 20:04:51 -04:00
w0rp 7c4b1d8444
Close #3274 - Handle basic LSP markdown formatting 2020-08-12 22:11:45 +01:00
Nihad Abbasov d5912b53dd
Restore old behavior of ALEFix command for Rubocop (#3237)
* Restore old behavior of ALEFix command for Rubocop

Since RuboCop 0.60 ALEFix command stopped to fix all found offenses. This change restores the 
previous behavior by allowing rubocop to fix all detected offenses.

* Fix tests
* Allow to configure auto-correct option for Rubocop
2020-08-12 14:04:54 +01:00
w0rp d3f410b6f7
Fix #1608 - Treat .h as C++ files for C++ clang-tidy 2020-08-10 02:33:50 +01:00
w0rp 2237f9b462
#2919 Use compile_commands.json for headers 2020-08-10 02:14:23 +01:00
w0rp 05210846e4
Fix #3278 - Handle UTF-8 in URI encoding/decoding 2020-08-10 02:03:41 +01:00
w0rp bf3c3e9438
#3276 - Update README for make -n changes 2020-08-09 20:13:21 +01:00
w0rp 9e1f511003
#3276 - Disable make -n by default again 2020-08-09 20:08:42 +01:00
w0rp affeed7a87
Enable C flag parsing by default
The options for parsing `make -n` and `compile_commands.json` flags
are now enabled by default, so people can start getting better flags
for their files by default.

`compile_commands.json` flags are now preferred over `make -n` results,
to make the options work better by default.
2020-08-09 04:23:32 +01:00
w0rp 681ca5fee8
Explain how to use ALE and coc.nvim together 2020-08-09 03:18:21 +01:00
w0rp 2ed09f51b6
Move :ALEInfo higher up in the FAQ 2020-08-09 02:50:25 +01:00
w0rp 6d502233d8
Close #3267 - Add a general autoimport setting 2020-08-09 02:32:47 +01:00
w0rp 8bfb5c6407
Merge pull request #2849 from DonnieWest/excludeTsserverWarnings
Allow the user to remove warnings from completions
2020-08-09 01:32:27 +01:00
w0rp 2d174db5b2
Merge pull request #3107 from daliusd/tslintfix
Fix tslint fixer not working issue (temporary file not found)
2020-08-07 19:52:18 +01:00
Bartek thindil Jasicki 973c4ea053 Merge remote-tracking branch 'upstream/master' 2020-08-07 17:43:11 +02:00
w0rp f741245f11
Fix #3273 - Handle missing keys in hover information 2020-08-07 12:34:45 +01:00
w0rp 388049dbea
Try to fix gopls tests again 2020-08-07 12:30:50 +01:00
w0rp 96d525a287
Try to fix gopls tests 2020-08-07 12:27:26 +01:00
w0rp b9a1c0e6d3
Fix order of supported-tools for pyright 2020-08-07 12:24:59 +01:00
w0rp 97d887ae22
It's the Current Year 2020-08-07 12:22:25 +01:00
w0rp 7cefc80f1b
Fix a failing test 2020-08-07 12:21:22 +01:00
w0rp 19229e8e27
Close #2472 - Add support for pyright 2020-08-07 12:16:13 +01:00
w0rp 9bdabce8df
Fix #2907 - Handle dictionaries for capabilities 2020-08-07 10:54:38 +01:00
w0rp 667618b399
Merge pull request #3191 from mostfunkyduck/master
Fixes govet linter for go 1.13+, with tests
2020-08-07 08:54:17 +01:00
tsjordan-eng f17b74679f
fix cppcheck for 1.89+, and add column support (#3030)
* fix cppcheck for 1.89+, and add column support

In cppcheck 1.89 the output changed to be more like GCC. This commit
forces any version of cppcheck to output in that same format. This also
allows for ALE to pick up the linter's column information

* Add parameters to tests. Vader passes.

* Fix c cppcheck for v1.89
2020-08-06 20:50:44 +01:00
w0rp 4044196047
#2804 Add hdl-checker to supported tools 2020-08-06 13:24:20 +01:00
Andre Souto 5b3da60cea
Adds hdl_checker LSP support (#2804)
* Added hdl_checker support
* Added hdl_checker tests

HDL Checker searches for files when no config file is found, which could lead to very long searches when the user is not really on a project setting
2020-08-06 13:20:54 +01:00
w0rp 711c90c523
Merge pull request #3123 from liskin/ccls-build-dir
ccls: Detect build dir and set compilationDatabaseDirectory
2020-08-06 13:12:56 +01:00
w0rp cdd8d38e2f
Fix #3266 Part 2: Fix Harder 2020-08-06 09:36:00 +01:00
w0rp fa3a927ca3
Fix #3266 - Truncate hover messages for LSP too 2020-08-05 13:46:08 +01:00
w0rp 1bd7b3e4ad
Merge pull request #3196 from jeremija/autoimport-langserver-pr
Add autoimport and rename support for langservers
2020-08-05 13:35:48 +01:00
w0rp 86d5cb81bd
Use more American English 2020-08-04 20:11:49 +01:00
w0rp acf892c4d1
#1532 - Display hover information on CursorHold 2020-08-04 20:11:49 +01:00
Horacio Sanson 316c7c7372
Merge pull request #3259 from sblask/support-markdownlint-rules-with-multiple-slashes
Support markdownlint rules with multiple slashes
2020-08-01 13:22:22 +09:00
Horacio Sanson 9894e92553
Merge pull request #3257 from jhlink/fix_astyle_config_detection_with_source
Fix Astyle Project Option Detection when Placed with Source Files
2020-08-01 13:21:16 +09:00
Bartek thindil Jasicki 9a9d12cf4f Merge remote-tracking branch 'upstream/master' 2020-07-31 07:56:28 +02:00
jhlink e2d1e54eb5 doc: Meaningless comment to kick CI from hang 2020-07-30 21:54:41 -04:00
Horacio Sanson fc7b4585e6
Merge pull request #3246 from lgmsantos/patch-1
Update ale-java.txt
2020-07-31 08:16:11 +09:00
Sebastian Blask fbfeae0587 Support markdownlint rules with multiple slashes 2020-07-31 11:15:13 +12:00
Horacio Sanson 275b5248e5
Merge pull request #3258 from jmreicha/patch-3
bashate typo
2020-07-31 08:13:04 +09:00
jhlink 84a413350c fix: Replace hardcoded quotes with ale#Escape 2020-07-30 10:07:53 -04:00
Josh Reichardt 72f1d730fd
Typo 2020-07-30 09:00:20 -05:00
jhlink ac2ebafadd fix: Force add .astylerc in test_cpp_project 2020-07-30 09:58:14 -04:00
jhlink ab6aed17ab test: Find .astylerc placed with src for astyle 2020-07-30 09:43:41 -04:00
jhlink d49b06e030 fix: Find proj_options in same dir for astyle 2020-07-30 09:29:33 -04:00
Horacio Sanson e03e24c091
Merge pull request #3253 from sblask/support-markdownlint-0.19.0-and-0.22.0
Support markdownlint 0.19.0 and 0.22.0
2020-07-30 09:45:13 +09:00
Sebastian Blask 7cada95683 Support markdownlint 0.19.0 and 0.22.0
Fixes #2965
2020-07-30 09:57:46 +12:00
Horacio Sanson 5338dbf680
Merge pull request #3231 from jhlink/add-astyle-for-c-formatting
Add astyle for C/C++ formatting
2020-07-29 22:08:46 +09:00
jhlink cef64424ce style: Resolve lint issue 2020-07-29 01:52:36 -04:00
jhlink 428c5f94da fix: Use ALE to reliably find project options 2020-07-29 01:36:45 -04:00
jhlink f4cff3bc06 test: Set empty values for astyle project_options 2020-07-28 23:29:19 -04:00
jhlink 7d40d0a16f chore: Distinguish test value name 2020-07-28 23:28:25 -04:00
jhlink a9b2f6362d chore: Delete dead test code 2020-07-28 23:26:49 -04:00
jhlink 5377272d20 fix: Change _options to _project_options 2020-07-28 19:48:27 -04:00
jhlink 0e6578cf65 fix: Remove explicit calls to file path in astyle 2020-07-26 22:05:14 -04:00
jhlink 75723e4522 doc: Add C++ desc in astyle entry in registry 2020-07-26 22:05:10 -04:00
jhlink 028485b4de doc: Add ale_cpp_astyle_options in ale-cpp 2020-07-26 21:22:17 -04:00
jhlink c38b2a6524 doc: Add ale_c_astyle_options in ale-c 2020-07-26 21:21:38 -04:00
jhlink 78295024e1 feat: Add project option file support for astyle 2020-07-26 21:11:37 -04:00
jhlink b25bb64a4d feat: Use stdin/redirection for astyle 2020-07-26 20:51:41 -04:00
jhlink a9799fe90e test: Add cpp test case for astyle 2020-07-25 21:25:11 -04:00
jhlink b3ad7bb3d0 Merge branch into add-astyle-for-c-formatting 2020-07-25 20:38:21 -04:00
jhlink f26b2e7f01 doc: Add astyle to ale-cpp-options in ale.txt 2020-07-25 20:38:15 -04:00
jhlink 4fc59ccace doc: Add astyle in c++ section in supported-tool 2020-07-25 20:38:12 -04:00
jhlink 9316b7b3f2 doc: Add astyle to c++ in supported lang & tools 2020-07-25 20:38:09 -04:00
jhlink ee466de733 feat: Add astyle in c++ section in supported-tool 2020-07-25 20:35:28 -04:00
jhlink 2987ebcfae feat: Add astyle to c++ in supported lang & tools 2020-07-25 20:34:03 -04:00
jhlink a2d172c457 doc: Add astyle to ale-cpp 2020-07-25 20:32:06 -04:00
jhlink 488df0fa41 feat: Add cpp to registry.vim 2020-07-25 20:22:10 -04:00
jhlink 076f9efbd9 feat: Add cpp support to astyle fixer 2020-07-25 20:20:47 -04:00
Luiz Gustavo 9fe208a01f
Update ale-java.txt 2020-07-25 02:32:10 -03:00
Bartek thindil Jasicki e06060a31f Merge remote-tracking branch 'upstream/master' 2020-07-24 10:38:29 +02:00
w0rp 68b484a49f
Merge pull request #2914 from hsanson/2913-fix-checkstyle-config-with-options
Fix 2913 - checkstyle config file ignored.
2020-07-21 12:49:55 +01:00
w0rp f31182beee
Merge pull request #3060 from hsanson/345-update-javalsp-documentation
Fix 345 - update java language server docs.
2020-07-21 12:48:57 +01:00
w0rp f4668c751f
Merge pull request #3070 from hsanson/2732-add-bashate-support
Fix 2732 - Add bashate support
2020-07-21 12:47:33 +01:00
w0rp 70ab831001
Merge pull request #3119 from hsanson/2269-ktlint-stdin-support
Fix 2269 - use ktlint stdin.
2020-07-21 12:45:26 +01:00
w0rp c1c3bd9227
Merge pull request #3137 from hsanson/3132-fix-eclipselsp-command
Fix eclipselsp command function.
2020-07-21 12:43:28 +01:00
Horacio Sanson 54aeeec97f
Merge pull request #3225 from markeganfuller/puppet_parser_error_at_end
Handling for puppet parser error at end of input.
2020-07-15 21:08:42 +09:00
Mark Egan-Fuller d38b92c957 Handling for puppet parser error at end of input.
Add handling for `Syntax error at end of input` which doesn't give a
line or column.

Fixes #2656
2020-07-15 12:10:34 +01:00
Horacio Sanson ddf4e7e9ba Enable ktlint fixer for kotlin files. 2020-07-12 20:49:04 +09:00
Horacio Sanson 26571fa050
Merge pull request #3232 from CherryMan/master
Zig support using zls.
2020-07-11 11:40:52 +09:00
Sheheryar Parvaz 23c58e63d4 Support zls language server for zig 2020-07-10 22:33:37 -04:00
jhlink d0b7a6e71f doc: Remove c++ from astyle 2020-07-10 19:06:22 -04:00
jhlink 57423f13ec style: Adjust spacing 2020-07-10 18:59:29 -04:00
jhlink fecffeee91 test: Add astyle vader test 2020-07-10 18:26:15 -04:00
jhlink 56b92544c2 doc: Add astyle to supported lang & tools 2020-07-10 18:16:12 -04:00
jhlink 5dbbd2d18b doc: Add astyle to supported-tools.md 2020-07-10 17:59:14 -04:00
jhlink 8c0b9ecdfd doc: Add astyle to ale-c-options in ale-contents 2020-07-10 17:56:02 -04:00
jhlink 4394084d99 doc: Add astyle entry to ALE c integration 2020-07-10 17:54:27 -04:00
jhlink 6c58164094 feat: Add astyle to fix/register.vim 2020-07-10 17:47:01 -04:00
jhlink 7f881f66a8 feat: Add ALE fixer for astyle 2020-07-10 17:46:01 -04:00
Horacio Sanson c136061b3f Enable languagetool for asciidoctor files. 2020-07-09 10:46:33 +09:00
Kevin Locke 106c27644b
eslint: Use cwd from executable location to fix nested projects (#3222)
* Split FindNearestExecutable from FindExecutable

The path searching in ale#node#FindExecutable() will be useful for
eslint.  Refactor it into a separate function so it can be used without
regard for the state of the _use_global and _executable variables.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* eslint: Set project root from local executable

Using the nearest directory with node_modules does not work correctly
for nested projects where the eslint dependencies are in the outer
project.  For example:
https://github.com/dense-analysis/ale/issues/3143#issuecomment-652452362

Adopt the behavior of SublimeLinter, which runs from project_root
determined by the presence of the eslint executable in node_modules/.bin
(or eslint in dependencies/devDependencies of package.json, which we can
add later as necessary).  See [NodeLinter#find_local_executable].

[NodeLinter#find_local_executable]: https://github.com/SublimeLinter/SublimeLinter/blob/056e6f6/lint/base_linter/node_linter.py#L109

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-08 14:42:01 +01:00
Horacio Sanson fd399c527f
Merge pull request #3223 from cspeterson/master
Puppet handler regex fix, plus new test
2020-07-08 22:24:28 +09:00
Christopher Peterson 1fcb9d1e1a Tests/puppet: add new test case for a heretofore unaccounted-for version of error message 2020-07-02 12:44:39 -04:00
Christopher Peterson 9b8ec86d7f Puppet handler: make error-parsing regex more robust 2020-07-02 12:42:44 -04:00
Bartek thindil Jasicki 0f45d3d01d Merge remote-tracking branch 'upstream/master' 2020-07-02 10:11:30 +02:00
Kevin Locke b3c6db173a
Run ESLint fixer from project root, where possible (#3096)
* Split eslint#GetCdString from eslint#GetCommand

Move the code for finding the project root and building the cd string
into a separate function so that it can be reused in the eslint fixer.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Run ESLint fixer from project root dir

To match the ESLint linter, as changed in 9ee57d43 (which I forgot to
apply to the fixer, whoops).

Fixes: #3094
Closes: #3095

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-01 17:00:21 +01:00
Horacio Sanson 834d6f9c48
Merge pull request #3158 from ulidtko/improve-dockerfile_lint
Improve :ALEDetail for dockerfile_lint [READY TO REVIEW]
2020-06-20 20:58:42 +09:00
Horacio Sanson 4f25498806
Merge pull request #3172 from 0xMH/patch-1
More docs for beginners to use cloudformation linter
2020-06-19 22:26:45 +09:00
w0rp 1428c7b29e
Update the internal ALE version to 2.7.0 2020-06-11 19:21:17 +01:00
Bartek thindil Jasicki a5e7f2c8bb Merge remote-tracking branch 'upstream/master' 2020-06-07 09:26:06 +02:00
Jerko Steiner b29e9867e8 Add test for LSP autoimport 2020-05-31 11:46:10 +02:00
Jerko Steiner b339a8bfa0 Add support for rename (documentChanges) 2020-05-31 11:00:53 +02:00
Jerko Steiner 4062b05669 Fix completion with langserver (autoimport in go) 2020-05-31 11:00:53 +02:00
Keith Maxwell 53bfe41841 vim/vint: show policy name
So that I can find the relevant information in the vint
linting policy summary and policies can be easily configured
https://github.com/Vimjas/vint/wiki/Vint-linting-policy-summary

Before this change an example warning message appears as:

    autocmd should execute in an augroup or execute with a group (see :help :autocmd)

After this change the same example appears as:

    ProhibitAutocmdWithNoGroup - autocmd should execute in an augroup or execute with a group (see :help :autocmd)
2020-05-30 08:38:07 +01:00
mostfunkyduck 35c7c297b6 Fixes govet linter for go 1.13+, with tests 2020-05-25 11:46:16 -04:00
Paco 7265ceb6d0
Support revive for go files (#2933)
Signed-off-by: Penghui Liao <liaoishere@gmail.com>
2020-05-22 06:09:14 -05:00
Stephen Robinson b209315714 Fixes #3092 - Implement loading `@file` c arguments 2020-05-20 18:15:52 -07:00
Horacio Sanson 7ff87a942b
Merge pull request #3173 from nibocn/feat#javac-sourcepath
feat(javac): Add java_javac_sourcepath variable
2020-05-19 22:51:42 +09:00
NiBo 0b5d72fecd refactor(javac): ale_java_javac_sourcepath variable defaults to String 2020-05-19 11:25:54 +08:00
NiBo e61e1147b0 refactor(javac): ale_java_javac_classpath variable supports String and List types 2020-05-19 10:43:16 +08:00
NiBo ff6bfc3d37 refactor(javac): ale_java_javac_sourcepath variable supports String and List types 2020-05-19 10:41:35 +08:00
NiBo 3635285c02 style(javac): Code formatting 2020-05-15 11:21:00 +08:00
NiBo 3b4193175e feat(javac): Add java_javac_sourcepath variable
This variable can set multiple source code
paths, the source code path is a relative
path (relative to the project root directory)
2020-05-15 10:48:03 +08:00
Mohamed hamza 6b8f08f7fc Added linter installing methods 2020-05-15 03:40:46 +02:00
Horacio Sanson 69d96aa9d9
Merge pull request #3077 from puritys/javaagent
To support javaagent on eclipselsp
2020-05-15 10:12:25 +09:00
NoNE 345daf683b
More docs for beginners to use cloudformation linter 2020-05-15 00:35:15 +02:00
Horacio Sanson c2b01f0e28
Merge pull request #3134 from Ian2020/master
Add shellcheck as linter for bats files
2020-05-09 11:24:55 +09:00
Ian2020 ca97f32258 Use a function to define shellcheck linters and vars needed, fixes tests 2020-05-08 12:55:54 +01:00
max ulidtko c0d74b8094 Fix style and test 2020-05-06 14:05:39 +03:00
max ulidtko 5f4103fb35 Improve :ALEDetail for dockerfile_lint
1. The often longish `description` moved away from (supposedly short)
statusline `message` into the `detail` section.

2. dockerfile_lint sends `reference_url` pointing to issue explanations.
Use that.
2020-05-06 13:07:08 +03:00
RyanSquared 70005134e5
Merge branch 'rust-analyzer' of https://github.com/jonhoo/ale into jonhoo-rust-analyzer 2020-05-05 09:21:49 -05:00
James C. Davis 15d590ee5e
fix: don't append newline when buffer is noeol and nofixeol 2020-04-30 15:00:10 -04:00
Ian2020 65bea1a5cb Main logic of shellcheck has moved, updated backward compat test 2020-04-29 17:45:16 +01:00
Klaas Pieter Annema 2548763d04
Add Apple's swift-format as a linter 2020-04-29 14:33:13 +02:00
Ian2020 716f9a9bbb Fix linting issue - indentation incorrect 2020-04-28 20:53:42 +01:00
Ian2020 f67cb56e5e Fix shell detection test, shellcheck function name has changed 2020-04-28 18:20:10 +01:00
Ian2020 3f34265151 Fix handler test, function name has changed 2020-04-28 18:13:34 +01:00
Ian2020 d4e1c57026 Moved common code to ale handlers, updated bats doc 2020-04-28 17:46:15 +01:00
Ian2020 76cd6b0f92 Fix documentation oversights 2020-04-28 16:02:46 +01:00
Horacio Sanson e641fe0c5d Fix eclipselsp command function.
Changes in eclipselsp and java caused the command needed to run the
language server fail to build properly.

Thi PR fixes those issues.
2020-04-25 15:21:09 +09:00
Ian2020 47d941b491 Add shellcheck as linter for bats files 2020-04-24 11:39:45 +01:00
Horacio Sanson 36e5337e30
Merge pull request #3117 from zoonfafer/vim-vimls
Add vim-language-server linter support
2020-04-21 13:36:57 +09:00
Jeffrey Lau 60d683da3b Add vim-language-server linter support 2020-04-21 02:29:22 +08:00
w0rp d2934ba017
Merge pull request #3121 from zoonfafer/scala-metals
linter/scala/metals: Fix return value of GetProjectRoot()
2020-04-20 17:39:48 +01:00
Oliver Ford 36b50058bb
Add terraform-lsp integration (#2758)
* Add terraform-lsp integration

https://github.com/juliosueiras/terraform-lsp

* Add tests & docs for terraform-lsp integration

terraform_langserver_options setting added to send custom flags to
terraform-lsp.

Vader tests have been added to test custom executable, custom flags, and
finding the project root. All tests pass.

Initial documentation has been added for the above.

Resolves dense-analysis/ale#2758, juliosueiras#57

* Fix tag alignment

Co-authored-by: = <Aubrey.S.Lavigne@gmail.com>
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-04-20 16:02:31 +01:00
Horacio Sanson 3281321d5c
Merge pull request #3027 from ndtho8205/fix-kotlinc-stderr
Fix 3011 - not catching kotlinc output on stderr
2020-04-19 18:55:47 +09:00
Tomas Janousek 4fbfcc9dec ccls: Detect build dir and set compilationDatabaseDirectory
Fixes #2621
2020-04-18 13:57:57 +02:00
Jeffrey Lau e0181f8832 linter/scala/metals: Fix return value of GetProjectRoot()
It was returning 0 when it should be returning an empty string.

The 'AssertEqual' in the ale image is from an old version so it does not
check the types of the arguments.

This is already fixed in 427fe19104

Closes #3120
2020-04-18 19:51:31 +08:00
w0rp 64b9a2708d
Merge pull request #3098 from tarikgraba/verilator-columnn
Adds column number to the verilator verilog linter
2020-04-18 12:36:16 +01:00
w0rp 1f9ac1c6dc
Fix the cursor tests, that stop tests running 2020-04-18 12:26:38 +01:00
Yuto 93a13d7353
Broken message in pycodestyle (or any other Linters whose name include 'code') (#3114)
* Swap substitution order for echoed message

This prevents 'code' string in liter_name to be substituted by accident.
Linters including pycodestyle have been affected by this problem.

* Add test for linter whose name contains 'code'

Test for c525db8cb4088d02448c5ddcf4a80ffa028c3181
2020-04-18 11:59:26 +01:00
TG 00eee550ea Adds column number to the verilator verilog linter
Since version 4.032 (04/2020) verilator linter messages also contain the
column number, and look like:

%Error: /tmp/test.sv:3:1: syntax error, unexpected endmodule, expecting ';'

To stay compatible with old versions of the tool, the column number is
optional in the researched pattern regular expression.

See commit:
81c659957e
2020-04-18 09:57:01 +02:00
Horacio Sanson 5035281cb9 Fix 2269 - use ktlint stdin.
Use stdin flag instead of temporary files. This allows ktlint to work
with .editorconfig files.
2020-04-18 15:27:11 +09:00
w0rp 198361bc0d
Merge pull request #2681 from mynomoto/clj-kondo-cache
Use cache for clj-kondo linter
2020-04-17 17:50:18 +01:00
w0rp dc054f30c8
Merge pull request #2823 from jeremija/do-not-save-on-autoimport
Do not save after ALERename and ALEOrganizeImports
2020-04-17 17:32:36 +01:00
Horacio Sanson 16cd59805b
Merge pull request #3050 from StarryLeo/fix-vim-sign-priority-patch-check
Fix vim sign priority patch check
2020-04-17 22:22:03 +09:00
w0rp 82f734a7c2
Closes #3019 - Implement default navigation
Default navigation for commands that jump to new locations has been
implemented with the `ale_default_navigation` variable, and all commands
that jump to locations now support `-tab`, `-split`, or `-vsplit`
arguments for overriding the default navigation behavior.
2020-04-15 16:50:13 +01:00
Dalius Dobravolskas 891852de71
Fix tslint fixer not working issue (temporary file not found) 2020-04-15 17:30:19 +03:00
Jon Gjengset 6087765cad
Move to rust-analyzer everywhere 2020-04-09 13:23:03 -04:00
Jon Gjengset 58404b5b83
rust-analyzer server binary changed name 2020-04-09 08:57:02 -04:00
Tim Bedard b800d24212
add stdin option for supported vint versions 2020-04-02 22:52:47 -05:00
John Gehrig 1c6b9354a8 Issue 2598: Addtional ^M characters on Windows
Windows may insert carriage return line endings, which ALE does not handle
well. These characters should not be displayed.

Adds a line to remove these characters for all messages.
2020-03-26 09:25:18 -04:00
puritys 852a6a1753 Fix code convention 2020-03-26 08:14:06 +00:00
puritys 9edefa724b Fix code convention 2020-03-26 07:54:12 +00:00
puritys fa19bca80e To support javaagent on eclipselsp 2020-03-26 06:40:07 +00:00
Horacio Sanson 7b9855f1fe Fix 2732 - Add bashate support 2020-03-23 12:18:35 +09:00
Horacio Sanson c2aa01199e Fix 345 - update java language server docs. 2020-03-19 18:00:13 +09:00
Alex Wang fc6677d405 Avoid overriding parsed C/C++ -std=* flag
ALE appends flags from {c,cpp}_{clang,gcc}_options after those found by
parsing compile_commands.json or Makefile output. If -std=* flags are
present in both the ALE flags and parsed flags, the last one present
(i.e., ALE's -std=* flag) will determine the mode the compiler works in.
This can result in errors showing up in vim but not in the actual build
or vice-versa.

For example, say you have foo.cpp:

    #include <type_traits>
    int main() {
        return std::is_same_v<float, int>;
    }

If cpp_clang_options contains -std=c++17 and -std=c++14 is parsed from
compile_commands.json, then ALE would end up running something like:

    clang++ -S -x c++ -fsyntax-only -std=c++14 -std=c++17 - < foo.cpp

This would result in no errors showing up in Vim, but the actual build
would fail with:

    <stdin>:3:14: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?
            return std::is_same_v<float, int>;
                   ~~~~~^~~~~~~~~
                        is_same
    /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:872:61: note: 'is_same' declared here
    template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same           : public false_type {};
                                                                ^
    <stdin>:3:35: error: expected '(' for function-style cast or type construction
            return std::is_same_v<float, int>;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^
    2 errors generated.

as the actual build would not have the -std=c++17 flag added by ALE.

If cpp_clang_options contains -std=c++14 and -std=c++17 is parsed from
compile_commands.json, then the opposite problem would occur. ALE would
end up running something like:

    clang++ -S -x c++ -fsyntax-only -std=c++17 -std=c++14 - < foo.cpp

and would show an error on line 3 of foo.cpp:

    [clang] No template named 'is_same_v' in namespace 'std'; did you mean 'is_same'? (fix available)

The actual build, on the other hand, would succeed without any
complaints.

Removing -std=* from ALE's flags if it is already present in the parsed
flags ensures that the wrong -std=* flag is not used.

An alternative would have been to switch the order in which parsed flags
and ALE flags were concatenated when producing the command to execute,
but that could prevent a user from intentionally using ALE's flags to
override some other flags, e.g.  -W* flags to enable/disable warnings in
a project whose flags are not under the developer's control.

-std=* flags are also present in cuda/nvcc.vim, objc/clang.vim,
objcpp/clang.vim, and vhdl/ghdl.vim, but none of those linters appear to
parse compile_commands.json or `make` output.
2020-03-17 22:51:54 -04:00
StarryLeo 302ce71931 Fix vim sign priority patch check
With Vim 8.2 released, the previous check method is not accurate enough.
2020-03-15 14:58:38 +08:00
Horacio Sanson c207d6a550 Fix 2816 - Standard fix does not work.
The standard linter --fix fails if the file being input is not relative
to the project root (https://github.com/standard/standard/issues/1384).

This MR attempts to fix this by changing the command so the input file
is relative to the project root and the output is to a temporary file.

Preliminary tests with toy javascript projects seem to indicate this
works fine.
2020-03-12 16:29:46 +09:00
w0rp bbe5153fcb
Fixes #2982 - Implement g:ale_exclude_highlights
Particular highlights can now be excluded by providing Lists of regular
expressions.
2020-03-11 12:52:41 -04:00
Tho Nguyen Duc 46d7ee564f Fix 3011 - not catching kotlinc output on stderr 2020-03-06 13:44:30 +09:00
w0rp 8f7ccdc5e9
Refactor the "s:LoadArgCount()" function (#3025)
* Refactor the "s:LoadArgCount()" function

Previously, this function would always set "v:errmsg" on the first
call with a given function.  This is because autoloaded functions
are not defined on the first call.

A number of improvements have been made:
 - a useless local function ("l:Function") is removed
 - the "execute()" builtin captures the output, instead of ":redir"
 - a ":try" block handles the case where a function is not defined
 - a useless ":if" is removed since ":redir" always defines the var
 - confusing quoting is re-written (remove double "'" chars)

Fixes: #3021
2020-03-04 20:56:22 +00:00
w0rp 634c81fd46
Mention using 'hidden' in combination with ALEGoToDefinition 2020-02-25 13:50:44 +00:00
w0rp 8012809c3f
Add default labels to issue templates 2020-02-22 10:26:03 +00:00
Kevin Locke 8c0b0f085f Alias ps1 filetype to powershell
Rather than requiring users to alias ps1 to powershell themselves,
include it in s:default_ale_linter_aliases.  Since [vim-ps1] is a
popular (the only?) PowerShell ftplugin and there do not appear to be
any other uses of ft=ps1 on vim.org, this seems like a safe and
reasonable default.

[vim-ps1]: http://www.vim.org/scripts/script.php?script_id=1327

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-02-16 14:03:41 -07:00
Ryan d6d2a0c770 Merge pull request #2986 from ndrewtl/patch-1
misc: change email address for @ndrewtl
2020-02-08 15:58:26 -06:00
Joe Reynolds 07080066e4 Add sql-lint as linter 2020-01-31 11:11:12 +00:00
Andrew Lee 07ee4d39c5
misc: change email address for @ndrewtl
This is kind of a peculiar reason for a PR, but I no longer control the email listed. I want to change it to avoid people getting the wrong email for me. Also, I still control the domain, but if at any point I don't, I want to put down in writing that if you get an email from this, it's not from me.
2020-01-28 10:47:37 -08:00
w0rp 4afbf2f25d
Merge pull request #2908 from af/patch-1
Fix for incorrect eslint output parsing for graphql files
2020-01-02 14:53:06 +00:00
Harry Percival 72d2c55479 Mypy: try to find folder containing mypy.ini to use as cwd. (#2385)
* When deciding which directory to run mypy from, prefer a folder with mypy.ini in it
* Add a test for mypy.ini-finding behaviour
2020-01-02 14:35:21 +00:00
w0rp 57eba1afac
Fix the build 2020-01-02 14:23:28 +00:00
w0rp 8c4c8dfd97
Fix #2704 - Show mypy notes; can be disabled 2020-01-02 14:19:21 +00:00
Jerko Steiner 0cb432cb82 Add TypeScript autoimport support for deoplete (#2779)
* Add autoimport support for deoplete

* Fix test_deoplete_source.py

* Use callback instead of is_async for deoplete

Shuogo, the author of Deoplete, does not recommend using the `is_async`
option:

> I think is_async is not recommended. It is not so useful and broken.
> You should use callback system instead.

Link: https://github.com/Shougo/deoplete.nvim/issues/1006#issuecomment-526797857

Incidentally, the same thread mentiones an issue started by w0rp:
https://github.com/Shougo/deoplete.nvim/issues/976

The deoplete docs also say is_async is deprecated:

> is_async        (Bool)
>     If the gather is asynchronous, the source must set
>     it to "True". A typical strategy for an asynchronous
>     gather_candidates method to use this flag is to
>     set is_async flag to True while results are being
>     produced in the background (optionally, returning them
>     as they become ready). Once background processing
>     has completed, is_async flag should be set to False
>     indicating that this is the last portion of the
>     candidates.
>
>     Note: The feature is deprecated and not recommended.
>     You should use callback system by
>     |deoplete#auto_complete()| instead.

Link: https://github.com/Shougo/deoplete.nvim/blob/master/doc/deoplete.txt

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-01-01 19:00:41 +00:00
w0rp 874c98b96d
Make it more obvious you can use popup in completeopt now 2020-01-01 18:49:01 +00:00
w0rp 7a4f5cefba
Merge pull request #2942 from PsiPhire/master
Allow popup to be used instead of preview in completeopt
2020-01-01 18:43:53 +00:00
w0rp 6ad8836c68
Merge pull request #2937 from kevinoid/eslint-run-from-project-root
Run ESLint from project root dir where possible
2020-01-01 18:30:01 +00:00
w0rp 8148a67b37
Documented g:ale_hover_to_preview 2020-01-01 18:25:04 +00:00
w0rp 25e457595a
Merge pull request #2828 from akhilman/hover-to-preview
Add option to show hover messages in preview.
2020-01-01 18:21:00 +00:00
Jerko Steiner 493705336c Add old check for bufline api 2019-12-29 15:08:22 +01:00
Zander Lee 4cbe16197c
Allow popup to be used instead of preview in completeopt 2019-12-22 09:35:29 +01:00
davidsierradz 0cea55924b allow passing custom options to markdownlint 2019-12-19 13:11:25 -05:00
Kevin Locke 9ee57d4362 Run ESLint from project root dir where possible
ESLint 6 loads all plugins/configs/parsers relative to the project root
which, by default, is the directory in which ESLint is invoked, as
described in [ESLint RFC 2018-simplified-package-loading].

Therefore, ALE should run ESLint from the project root, when possible,
so that dependencies will load.  This commit does so.

[ESLint RFC 2018-simplified-package-loading]: https://github.com/eslint/rfcs/blob/master/designs/2018-simplified-package-loading/README.md

Fixes: #2787

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-12-17 12:25:44 -07:00
Jon Gjengset 715733f44d
Fix Rust linter/fixer listing 2019-12-11 12:02:18 -05:00
patrick96 1e9f870b74
verilog: Add filename to vlog linter output 2019-12-05 19:35:34 +01:00
Conrad Irwin efe120ce9a Fix prettier_standard to respect the configuration file
Before this change, prettier_standard would run and ignore any
.prettierrc, now it will respect the configuration of the file being
linted.

This change relies on prettier-standard 16.1.0 for the --stdin-filepath
flag, but is backward compatible: older versions of prettier-standard
will ignore the unknown flag and continue to run with no configuration
file.
2019-12-04 23:15:41 -08:00
w0rp 5f84325cd8
Add a Help Wanted message in case people are interested 2019-12-03 11:47:26 +00:00
Horacio Sanson 8fbcba0091 Fix 2913 - checkstyle config file ignored.
If checkstyle is configured with custom options that contain "-c" then
the checkstyle config file option is ignored. This PR modifies the
regular expression when creating the checkstyle command to avoid this.
2019-11-27 23:19:44 +09:00
w0rp d8195e9276
Merge pull request #2910 from hsanson/2891-fix-eslinter-json-parser
Fix 2891 - eslint not showing errors.
2019-11-27 10:15:59 +00:00
Horacio Sanson 5f95d032ee Fix 2891 - eslint not showing errors.
ESLint errors are contained in an array that can contain different
stuff other than JSON error messages. This patch iterates over the whole
array ignoring any non-json data.
2019-11-26 13:37:25 +09:00
Aaron Franks 31715ff227
Fix for incorrect eslint output parsing for graphql files
The output is configured to be JSON, but the handler was parsing it as 'lines'
2019-11-24 15:47:07 -08:00
Eddie Lebow ece229c06f
shell: Make description more accurate
The shell linter does more than just bash.
2019-11-23 00:34:40 -05:00
Eddie Lebow 1997a8f7e2
ShellDetect: fall back to filetype if no hashbang
Some files lack a hashbang line but still have an unambiguous filetype.
For example, the file `.zshrc` has the filetype `zsh`.

Augment ale#handlers#sh#GetShellType to fall back to the filetype if
no hashbang line can be found.
2019-11-23 00:34:40 -05:00
w0rp b91d82bfaa
Merge pull request #2847 from DonnieWest/allowUserToCustomizeItems
Allow user to customize items
2019-11-15 09:34:24 +00:00
w0rp 9005a62dc2
Clean up the nimpretty code 2019-11-14 14:50:21 +00:00
w0rp 7665559d0e
Merge pull request #2660 from YPCrumble/master
Add StandardJS linter for TypeScript
2019-11-14 14:47:19 +00:00
w0rp 66a8df081e
Merge pull request #2890 from nhanb/master
Add nimpretty fixer for nim-lang
2019-11-14 14:35:31 +00:00
w0rp b76165abf6
Merge pull request #2889 from zigford/powershell-7-errorview
Default errorview in pwsh7 now concise
2019-11-14 14:24:19 +00:00
Bùi Thành Nhân abad8e474b add nimpretty fixer 2019-11-09 16:28:49 +07:00
Jesse Harris f09cc26f87 Default errorview in pwsh7 now concise 2019-11-09 13:43:00 +10:00
Donnie West e2a67812de
Add tagged entry for symbols to documentation 2019-11-08 16:44:05 -06:00
Donnie West e6ee613e00
Switch variables to dictionary key 2019-11-08 16:44:04 -06:00
Donnie West 6637de46c2
Add scriptencoding to `completion.vim` 2019-11-08 16:44:03 -06:00
Donnie West 5985f8bd63
Fix typo 2019-11-08 16:44:02 -06:00
Donnie West 977921461d
Add documentation for ale-symbols feature 2019-11-08 16:44:01 -06:00
Donnie West 0b5fcbad1f
Allow the user to set their own completion values 2019-11-08 16:44:00 -06:00
Donnie West 4222f32cc4
Include documentation item for removing warnings 2019-11-08 16:41:39 -06:00
Donnie West 4bdde36661
Check kind safely 2019-11-08 16:41:38 -06:00
Donnie West db5fe5659f
Allow the user to remove warnings from completions 2019-11-08 16:41:37 -06:00
Bartek thindil Jasicki b6828ac5c5 Merge remote-tracking branch 'upstream/master' 2019-11-07 22:07:26 +01:00
Thibault Vatter db6b1b5ecc Switch from style to transformers (#2838)
* Switch to transformers for styler
* Adapt unit test too
2019-11-07 18:22:57 +00:00
w0rp a273b9cf4a
Fix a test failing in AppVeyor 2019-11-07 15:52:03 +00:00
w0rp f11f6a2195
Merge pull request #2887 from tamago324/add-nimcheck-end_col-options
Add nimcheck end_col options
2019-11-07 15:47:31 +00:00
w0rp bde9b1cfcd
Revert "Add definition of c/clangd's language as C (#2791)"
This reverts commit f4070f6c43.
2019-11-07 15:41:58 +00:00
w0rp 5eefe544ed
Merge pull request #2617 from robindar/master
Fix crystal-lang non file-tied message handling
2019-11-07 08:36:42 +00:00
tamago324 dfbb387cc7 Add nimcheck end_col options
nimcheck
2019-11-07 02:44:56 +09:00
Bartek thindil Jasicki b8d69cb0d5 fixed typo 2019-11-05 18:59:13 +01:00
Bartek Jasicki b454e43143
Update test/command_callback/test_adals_command_callbacks.vader
Co-Authored-By: timlag1305 <timlag1305@gmail.com>
2019-11-05 18:00:16 +01:00
Bartek Jasicki f63fd23f2e
Update doc/ale-ada.txt
Co-Authored-By: timlag1305 <timlag1305@gmail.com>
2019-11-05 17:59:51 +01:00
Bartek Jasicki 09209dc54b
Update ale_linters/ada/adals.vim
Co-Authored-By: timlag1305 <timlag1305@gmail.com>
2019-11-05 17:59:17 +01:00
Bartek Jasicki 3c80c67633
Update ale_linters/ada/adals.vim
Co-Authored-By: timlag1305 <timlag1305@gmail.com>
2019-11-05 17:58:53 +01:00
Bartek thindil Jasicki 3e4a23cb14 Merge remote-tracking branch 'upstream/master' 2019-10-31 09:42:58 +01:00
w0rp 2d9380d75c
Merge pull request #2690 from iclanzan/purty
Add purty fixer for PureScript
2019-10-29 17:37:18 +00:00
w0rp e259dd525f
Merge pull request #2819 from greg0ire/psalm_extra_options
Add the possiblity to add extra psalm options
2019-10-29 17:21:01 +00:00
w0rp 9a0b604a99
Fix the test issues with html-beautify 2019-10-28 13:45:25 +00:00
Hugo Osvaldo Barrera 47eb3dd0c0 Add support for html-beautify (#2788)
* Add support for html-beautify
* Add html-beautify to the list of supported tools
* Update docs
2019-10-28 13:25:36 +00:00
Charlie Johnson af8c8516d1 fixers/stylelint: enhance `stylelint` fixer (#2745)
* Refactor stylelint fixer test
* Support additional stylelint fixer options
* Support changing working directory for stylelint fixer
* Force css syntax for stylelint fixer
2019-10-28 13:23:02 +00:00
w0rp 0d4dfb61dc
Merge pull request #2700 from elebow/clangcheck-no-color-diagnostics
clangcheck: Add -fno-color-diagnostics (closes #2188)
2019-10-28 13:14:14 +00:00
Jerko Steiner 463deedc29 Merge branch 'master' into do-not-save-on-autoimport 2019-10-22 16:40:27 -05:00
Jerko Steiner 40890cfcf3 Rename ale#fix#SetBufferContents to ale#util#SetBufferContents 2019-10-22 16:39:43 -05:00
Ian Campbell ea91209a66 Allow the use of StandardX for StandardJS linting and fixing.
See https://github.com/standard/standardx
2019-10-21 20:46:54 -04:00
Ian Campbell cf5120ba75 Remove standardts fixer in favor of allowing standard.vim fixer to handle JavaScript or TypeScript options. 2019-10-21 20:46:54 -04:00
Ian Campbell 79e9ae4550 Make sure README and docs are synced. 2019-10-21 18:20:43 -04:00
Ian Campbell 9017d3ef9c Add StandardJS for TypeScript linting and fixing. 2019-10-21 18:20:43 -04:00
w0rp 67d0ccc398
Fix #2835 - Bump up the sign group version check for NeoVim 2019-10-21 09:35:23 +01:00
Bartek thindil Jasicki 2f181658e6 rename command variable to *_adals_* instead of *_lsp_* and whole name to adals instead of adalsp 2019-10-18 18:26:08 +02:00
Bartek thindil Jasicki 8239b76c5a Merge remote-tracking branch 'upstream/master' 2019-10-18 18:15:05 +02:00
Jon Gjengset 9c797961fa
Make more names match up 2019-10-18 12:01:31 -04:00
w0rp c06467438d
Mention the disabled option for message severity 2019-10-18 16:22:17 +01:00
Andre Souto 5e69aaf4c2 Adding support for LSP `window/showMessage` method (#2652)
* Added base handling for window/showMessage
* Ignoring severity log
* Code formatting
* Added user configurable severity
* Preferring ale#util#ShowMessage over echo'ing directly
* Using format similar to ale_echo_msg_format for consistency
* Updating docs
* Added LSP log config string; improved tests
* Use warning as fallback for incorrect user config
2019-10-18 16:17:54 +01:00
w0rp 9125ec8739
Merge pull request #2845 from DonnieWest/fixItemDetailsOnEmptySource
Fix tsserver not returning details for items with empty source
2019-10-18 15:16:54 +01:00
w0rp 99e64ed084
Merge pull request #2844 from DonnieWest/fixAsyncompleteCodeActions
Allow code actions to work on callback based sources
2019-10-18 15:10:36 +01:00
Donnie West 8698c44e2a
Fix tsserver not returning details for items with empty source 2019-10-17 23:26:24 -05:00
Donnie West b27df1b169
Allow code actions to work on callback based sources 2019-10-17 23:22:31 -05:00
w0rp dfe9b7cc26
Merge remote-tracking branch 'murfalo/clangd-compile-commands' 2019-10-17 17:54:02 +01:00
Jerko Steiner e5a4c82917 Add support for nimlsp (#2815)
* Add support for nimlsp.vim
* Add test and docs for nimlsp
* Add nimlsp to supported-tools.md
* Add nimlsp to doc/ale-supported-languages-and-tools.txt
2019-10-17 17:32:31 +01:00
João Borges f4070f6c43 Add definition of c/clangd's language as C (#2791)
* Add definition of c/clangd's language as C
* Update tests for clangd to be called with '-x c'
* Change to use single quotes instead of double quotes
2019-10-17 17:28:48 +01:00
Jon Gjengset fedd3de59f Place rust sections in alphabetical order 2019-10-16 14:41:04 -04:00
Jon Gjengset 4b53d88cb8
Also list analyzer in doc/ supported tools 2019-10-16 14:03:10 -04:00
Jon Gjengset 29d0987859
Fix TOC sorting 2019-10-16 14:01:57 -04:00
Jon Gjengset d74db90550
Make TOC match up 2019-10-16 13:44:01 -04:00
w0rp b24fd13423
Bump the ALE version 2019-10-16 17:23:31 +01:00
Jon Gjengset 81cb40ce4b
minor test fix 2019-10-16 11:54:43 -04:00
Jon Gjengset f5c289dce6
Add support for rust-analyzer
Fixes #2832
2019-10-16 11:34:16 -04:00
w0rp 7c5825ecbc
Merge pull request #2803 from diegosouza/update_highest_phpstan_level
Update highest phpstan level
2019-10-14 16:18:10 +01:00
w0rp 01219f0308
Merge pull request #2810 from jmreicha/patch-2
Fix Powershell emoji
2019-10-14 16:16:02 +01:00
w0rp af1643a948
Merge pull request #2829 from rcorre/fix-doc-example
Fix TCP server config example.
2019-10-14 16:15:35 +01:00
Ryan Roden-Corrent 5a1505ad62
Fix TCP server config example.
The docs for the `address` parameter of `Define` say:

> This argument must only be set if the `lsp` argument
> is set to `'socket'`.
2019-10-13 09:06:38 -04:00
Ildar Akhmetgaleev 31d6f72abf Add option to show hover messages in preview.
Add new option 'ale_hover_to_preview' to show hover messages
in preview window.
2019-10-12 16:45:12 +07:00
David A. R. Robin e19b8c05cd Fix crystal-lang non file-tied message handling
Some messages of the crystal compiler are not tied to a file.
This causes a 'Key not present in Dictionnary' error (E716).
For the record, the json output on ```require "./nonexistent.cr"```
is the following :
```json
  [
  { "file":"/tmp/file.cr", "line":1, "column":1, "size":0,
    "message":"while requiring \"./nonexistent.cr\"" },
  { "message":"can't find file './nonexistent.cr' relative to '/tmp'" }
  ]
```
The second message does not have line/column attributes.
2019-10-11 18:34:09 +02:00
Bartek thindil Jasicki 6d5d3fa4dd fixed documentation headers 2019-10-11 11:10:02 +02:00
Bartek thindil Jasicki 5cbf7007ff fixed documentation 2019-10-11 11:00:49 +02:00
Bartek thindil Jasicki c30869617f another fix for test 2019-10-11 10:48:50 +02:00
Bartek thindil Jasicki 321a3892a7 fixed test again (this time for sure) 2019-10-11 10:41:19 +02:00
Bartek thindil Jasicki c74cc93140 fixed test 2019-10-11 10:35:54 +02:00
Bartek thindil Jasicki 38e0e3feef added adalsp test 2019-10-11 10:08:36 +02:00
Bartek thindil Jasicki 489b7d64e4 updated documentation 2019-10-11 09:55:05 +02:00
Bartek thindil Jasicki 87a0227d01 added support for Ada Language Server 2019-10-11 09:43:55 +02:00
Jerko Steiner c8c142b881 Do not save for ALERename and ALEOrganizeImports 2019-10-09 20:54:47 -05:00
Murfalo a1fab59811 Suboptimal fix to prevent variables from leaking out of new clangd test 2019-10-09 14:24:56 -04:00
Murfalo d488198c9c Hopefully fixed issue with Windows paths 2019-10-09 13:52:17 -04:00
Murfalo a62f26434a Added tests for clangd compile commands dectection 2019-10-09 13:40:04 -04:00
Murfalo 35f51221f1 Updated ale_linters/c/clangd.vim to match ale_linters/cpp/clangd.vim 2019-10-09 13:30:10 -04:00
w0rp 3fe2223a48
Fix #2800 - Ignore completion user data which is not a dictionary 2019-10-09 10:12:31 +01:00
w0rp e8de12c9f0
Fix #2821 - Fix the debride linter after merging older code 2019-10-09 09:53:50 +01:00
Grégoire Paris 95b8689835
Add the possiblity to add extra psalm options 2019-10-07 23:15:01 +02:00
Jérôme Foray f932211309 fix tflint handler for 0.11+ (#2775)
* fix tflint handler for 0.11+
* fixup! fix tflint handler for 0.11+
* maintain compatibility with previous tflint output format
* fixup! maintain compatibility with previous tflint output format
* Add comment about tflint's output format accross versions
2019-10-07 20:14:22 +01:00
w0rp 6d88801789
Clarify that virtualtext is only in NeoVim 2019-10-07 20:03:59 +01:00
w0rp 59b34dd017
Merge pull request #2813 from werneta/master
Update vlog parser to handle new output format
2019-10-07 19:55:41 +01:00
w0rp f2b231dd76
Merge pull request #2771 from gpanders/master
Use Makefile output with clang-tidy when useful
2019-10-07 19:34:52 +01:00
w0rp 8fda1cebff
Merge pull request #2814 from andys8/improvement/elm-ls-name-fix-in-documentation
elm-ls: Removed some leftovers of previous name
2019-10-07 19:32:00 +01:00
w0rp 8097d51e33
Merge pull request #2750 from andys8/improvement/elm-language-server-elm-analyse-trigger-param
Elm language server params update
2019-10-07 19:30:59 +01:00
w0rp 06082ef377
Merge pull request #2735 from zoonfafer/scala-metals
Add linter for Scala Metals
2019-10-07 19:24:47 +01:00
w0rp d3a3f4011b
Merge pull request #2676 from davidtwco/nixfmt-fixer
Add nixpkgs-fmt fixer.
2019-10-07 19:22:01 +01:00
w0rp cebbb67ea6
Merge pull request #2659 from greg0ire/psalm-language-server-option
Use the psalm executable with the LS option
2019-10-07 19:19:54 +01:00
w0rp 32b784219b
Merge pull request #2694 from elebow/add-ruby-debride
Add ruby debride (closes #2471)
2019-10-07 19:17:55 +01:00
Greg Anders 7795898841 Add tests for clangtidy with Makefile 2019-10-06 10:29:23 -06:00
Greg Anders 06a97a8541 Use Makefile output with clang-tidy when useful
In the case where neither a build directory nor a compile_commands.json
file is found, use the output of `make -n` to provide options to
clang-tidy.
2019-10-06 10:29:17 -06:00
andys8 0fa2d18230 elm-ls: Removed some leftovers of previous name
Plugin name is `elm-ls`
Project page: <https://github.com/elm-tooling/elm-language-server>
2019-10-06 00:37:24 +02:00
Thomas A. Werne d0e87c0df4 Correct vint-discovered advisory in vlog handler 2019-10-05 11:25:56 -07:00
Thomas A. Werne 89fa43551f Add test for new vlog format 2019-10-05 11:25:56 -07:00
Thomas A. Werne 98b0dcd7d6 Update vlog parser to handle new output format
Re #2812, the parser now takes a second pass through the output using an
updated regex.
2019-10-05 10:44:02 -07:00
Josh Reichardt b96574e5b5
Fix Powershell emoji 2019-10-04 10:48:06 -07:00
w0rp a486aa1d24
Merge pull request #2809 from hsanson/2802-fix-sign-group-parsing
Fix sign parser to be language independent.
2019-10-04 15:42:46 +01:00
Horacio Sanson 7c2f5e83ab Fix sign parser to be language independent. 2019-10-04 21:58:44 +09:00
Murfalo 618f2d71fc Added automatic compile-commands-dir arg to ale_cpp_clangd linter 2019-10-03 13:22:13 -04:00
Diego Mendes 889e6338fe highest phpstan level in doc updated 2019-10-02 09:22:04 -03:00
Eddie Lebow 62602569b3
clangcheck: Add -fno-color-diagnostics
Also change to the modern --extra-arg syntax.
2019-09-26 20:28:33 -04:00
Horacio Sanson 41ff80dc9e 569 support vim sign group and priority (#2786)
* Use sign-group only on supported vim versions.

The sign-group feature is only available in nvim 0.4.0 and vim 8.1.614.

* Add priority to ALE signs.

This allows users to set a priority to ALE signs to take precedence over
other plugin signs.
2019-09-25 09:15:16 +01:00
w0rp 6746eaeaa0
Merge pull request #2683 from ahayworth/ahayworth-add-ink-lsp
Add support for ink-language-server
2019-09-22 13:07:19 +01:00
w0rp d7dbc8f2cf
Merge pull request #2719 from kevinywlui/patch-1
Remove texlab rust rewrite link
2019-09-22 12:41:12 +01:00
w0rp e329413a31
Merge pull request #2667 from Chris-Slade/master
Edit ale-cs-csc docs to remove typos
2019-09-22 12:37:00 +01:00
w0rp e6241ee0d2
Merge pull request #2784 from hsanson/2733-add-semistandard-executable-to-path-search
Add semistandard to node_modules search.
2019-09-22 11:36:53 +01:00
Horacio Sanson 07c11e4e7f Add semistandard to node_modules search. 2019-09-22 09:11:21 +09:00
w0rp ab8e043353
Merge pull request #2691 from elebow/mdl-use-json-output
mdl: Use JSON output instead of parsing text
2019-09-20 20:59:59 +01:00
w0rp e6946de98a
Merge pull request #2736 from zoonfafer/doc-typos
doc: Fix typos
2019-09-20 20:50:58 +01:00
w0rp 6ab264ff0f
Close #2641 - Document how to add your own LSP linters 2019-09-20 20:38:37 +01:00
w0rp d93512fe60
Fix #2744 - Make ALEFix work when only casing is changed 2019-09-20 19:02:21 +01:00
w0rp 7b38e97943
Merge pull request #2780 from jeremija/tsserver-autoimport-desc
Show description of autoimport action for tsserver
2019-09-20 09:30:52 +01:00
Jerko Steiner f5e44415e8 Show description of autoimport action for tsserver 2019-09-20 13:11:16 +07:00
w0rp e3784c4c4e
Close #2764 - Support the new React filetypes with aliases 2019-09-19 20:48:37 +01:00
w0rp b531a4e0b3
Merge pull request #2653 from AntoineGagne/bugfix/bugged-plt-detection
Fix bug with detection of the PLT in Erlang Dialyzer
2019-09-19 20:35:54 +01:00
w0rp dd6bd6f0fe
Fix #2711 - Fix writing to files on save 2019-09-19 20:32:33 +01:00
w0rp 529f57a66f
Document and test solc 2019-09-19 20:26:24 +01:00
Mo Zhonghua b8949aaac3 `arguments` needs to be handled for `compile_commands.json` in addition to `command` (#2123)
* c linter: compatible with compile_commands.json without command field
2019-09-19 20:20:37 +01:00
Karl Bartel dc42c0f948 Add support for `solc` Solidity compiler (#2648)
* Add support for `solc` Solidity compiler
* Set default value for `solidity_solc_options`
* Add test for solc handler
2019-09-19 19:40:00 +01:00
w0rp 41ed10be4e
Merge pull request #2770 from statquant/master
Adding linting for rmd filetype (duplicate of rmarkdown)
2019-09-19 19:29:38 +01:00
statquant 34431d885b Adding linting for rmd filetype (duplicate of rmarkdown) 2019-09-14 15:55:04 +01:00
w0rp 61cfb3fefb
Merge pull request #2693 from elebow/chmod-remove-x
Remove +x bit from some files that don't need it.
2019-09-12 23:00:34 +01:00
w0rp 321ee6d26b
Merge pull request #2738 from Joshuao95/patch-1
Update irrelevant JSCS site link
2019-09-12 22:59:20 +01:00
w0rp 58b7c281c5
Merge pull request #2696 from elebow/update-test-docs-for-linter-lists
Update test docs and output for linter tables checked
2019-09-12 22:57:44 +01:00
Cluas a6c59faa0f feat: support sqlformat. (#2702)
* feat: support sqlformat.
2019-09-12 22:48:27 +01:00
Jerko Steiner 3e8c8d3ccb Add ALERename (tsserver & LSP), ALEOrganizeImports (tsserver) and auto import support (tsserver) (#2709)
This commit adds support for renaming symbols in tsserver and with LSP tools, and for organising imports with tsserver. Completion results for symbols that can be imported are now suggested if enabled for tsserver completion done via ALE.
2019-09-12 21:53:23 +01:00
w0rp b66d202c1d
Merge pull request #2695 from elebow/move-ruby-escape-executable
Move ale#handlers#ruby#EscapeExecutable to ale#ruby#EscapeExecutable
2019-09-12 21:29:41 +01:00
Samuel Roeca 05ba522c9a languagetools: stop auto-appending --autoDetect (#2616)
Options are now configurable for languagetools, and `--autoDetect` can be removed by changing the options.
2019-09-12 21:22:47 +01:00
w0rp 34f2943fdd
Limit the branches for branch builds for AppVeyor 2019-09-12 20:59:44 +01:00
w0rp 84a455185c
Limit the branches for Travis CI branch builds 2019-09-12 20:52:36 +01:00
w0rp fbe7cea91c
Merge pull request #2741 from zoonfafer/shell
linter/sh: Improve parsing of error messages in different locales
2019-09-12 20:41:49 +01:00
w0rp cda46636f4
Fix #2760 - Ignore all errors for adding NeoVim highlights 2019-09-11 16:49:25 +01:00
theoremoon 2e323b529d dfmt support (#2662)
* Add support for `dfmt`
2019-09-10 20:54:14 +01:00
Kamil Grzywacz e5e39a939a credo now recognizes umbrella projects
Use ale#handlers#elixir#FindMixUmbrellaRoot to determine project root
instead of ale#handlers#elixir#FindMixProjectRoot
2019-09-07 15:40:35 +02:00
andys8 bd1f7e1420 Elm language server params update
* There is a new param 'elmAnalyseTrigger' (change|save|never)
* Empty path default to let the language server search for binary
2019-09-04 00:20:12 +02:00
w0rp 6e18c03d80
Make help text clearer for line number highlights 2019-09-01 14:09:17 +01:00
BlahGeek 9f814a8ce9 Add g:ale_sign_highlight_linenr (#2678)
* add g:ale_sign_highlight_linenr
* Fix tests. Change option default value
* Rename ale_sign_highlight_linenr to ale_sign_highlight_linenrs
* Default ale_sign_highlight_linenrs to 0
2019-09-01 14:03:54 +01:00
w0rp 67ee2b9586
Fix tests so they work with new NeoVim highlight code 2019-09-01 13:31:09 +01:00
w0rp 7d7ddf22d3
Merge pull request #2638 from frangio/nvim-highlight
Use Neovim API for highlights when available
2019-09-01 10:47:28 +01:00
Jeffrey Lau 2b12c8ccbf linter/sh: Improve parsing of error messages in different locales
Fixes #2687
2019-08-31 15:08:54 +08:00
Jeffrey Lau 5fcb24bb3e Add linter for Scala Metals
https://scalameta.org/metals/
2019-08-31 12:34:57 +08:00
Joshuao95 cf47bda024
Update irrelevant JSCS site link
jscs.info appears to have nothing to do with the linter, and just contains a blogpost about student debt.
This appears to be the closest to canonical site for the project (although it's now merged with ESLint I suppose some still use it?)
2019-08-29 17:05:38 +01:00
Jeffrey Lau da262f40dd doc: Fix typos 2019-08-28 00:28:58 +08:00
David Wood 6aeb462171
Add nixpkgs-fmt fixer.
This commit adds a fixer for the Nix language, nixpkgs-fmt
(https://github.com/nix-community/nixpkgs-fmt).
2019-08-26 19:21:07 +01:00
Kevin Lui 442fb2d22f
Remove texlab rust rewrite link
It seems like the texlab rust rewrite has completed so the link is now broken and not necessary.
2019-08-19 23:10:40 -07:00
Eddie Lebow 08a5bfcaa9
mdl: Use JSON output instead of parsing text
Also add test coverage for the mdl handler.
2019-08-18 23:28:32 -04:00
w0rp 73812c3e41
Merge remote-tracking branch 'AlexeiDrake/master' into bugfix/c-lsp-build-dir-settings 2019-08-18 18:29:59 +01:00
w0rp 91636cff06
Merge pull request #2677 from davidtwco/check-toc-test-failure
Remove `/bin/ls` assumption from check-toc test.
2019-08-18 16:26:14 +01:00
w0rp d787369f37
Merge pull request #2701 from elebow/doc-elixir-linters-floppy_disk
Add 💾 to dialyxir and dogma
2019-08-18 16:22:46 +01:00
richyfish c4bdf165ca Black fixer should include --pyi for files with .pyi extension (#2705)
* black fixer should include --pyi for files with .pyi extension
2019-08-18 15:45:15 +01:00
w0rp ddb559b3be
Merge pull request #2631 from timlag1305/feat/ada-gnatpp
Add gnatpp fixer for Ada
2019-08-18 15:37:51 +01:00
w0rp ee62cc6898
Merge pull request #2706 from richyfish/2703_mypy_stderr
mypy linter capture stderr for error reporting in ALEInfo
2019-08-17 19:21:42 +01:00
Andre Souto 219fb5873c Keep cursor position on screen when opening/closing lists (#2632)
* Trying to keep win view from bouncing
* Adjusting when views are saved and restored
* Also restore view when closing quickfix
* Don't restore view when opening list vertically
2019-08-17 19:14:21 +01:00
fx-carton b62e306222 Fix cflags parsing (#2510, #2265) (#2590)
* Parse CFLAGS that can be passed using a whitelist

I went through GCC's man page and selected flags that can safely be
passed to GCC and that can be useful to syntax checking. These include:

- -I/-i* include flags
- preprocessor flags such as -D
- -W* warning flags
- -O* optimization flags
- most -f options
- -m arch dependent options

* Fix CFLAGS tests: -Idir is now parsed to -I dir
* Added two tests for flags we want or don't want to pass.
* Also check for / in addition to s:sep
2019-08-17 19:08:14 +01:00
Donnie West 5388ff1d54 Add asyncomplete.vim Support (#2627) 2019-08-17 18:40:05 +01:00
Richard French 266fa1c0a4 mypy linter capture stderr for error reporting in ALEInfo 2019-08-15 16:36:11 +01:00
Eddie Lebow b70eeaadb4
Add 💾 to dialyxir and dogma 2019-08-15 00:40:30 -04:00
Eddie Lebow 74a43755c6
Update test docs and output for linter tables checked
This makes some of the run-test output less misleading.

Also fix a minor shellcheck issue: "\*" and "\\*" are equivalent, but
the second one makes clear that the literal backslash is intentional.
2019-08-13 21:30:13 -04:00
Eddie Lebow 58e8d32d79
Move ale#handlers#ruby#EscapeExecutable to ale#ruby#EscapeExecutable
This function is generally applicable to Ruby, not just handling linter
output.
2019-08-13 01:52:13 -04:00
Eddie Lebow 8aa1578605
Correct copied typo in doc/ale-ruby 2019-08-13 01:48:18 -04:00
Eddie Lebow 501af8dd8b
debride: Add debride linter (closes #2471) 2019-08-13 01:43:27 -04:00
Eddie Lebow b1810b2752
Remove +x bit from some files that don't need it. 2019-08-13 00:28:31 -04:00
Sorin Iclanzan f89b49a014 Add purty fixer. 2019-08-12 11:49:19 -04:00
richyfish 28c93ab185 aleinfo global options (#2686)
* added omitted global variables which was breaking this test when run standalone
* invert logic for s:GetLinterVariables excluding disabled linters, so that linter global options can appear in output
* additional tests for s:GetLinterVariables for linter global options
2019-08-12 16:29:28 +01:00
Andrew Hayworth ab0bf61512 Add support for ink-language-server
This commit add support for ink-language-server, which it does by
largely copying and pasting from the pure-language-server PR that was
merged recently.

The most interesting things to note are:
- ink-language-server is distributed upstream via npm, which is why we
  search through node_modules
- With some coaxing, it can be installed globally - which is why we
  search for a global binary.
- Ink is a funky language, and users will likely need to add
  initialization options.
- I am not incredibly familiar with vimscript; and I may not have done
  some of the buffer searching correctly.
2019-08-07 16:35:12 -05:00
mynomoto 9ee8067df6 Use cache for clj-kondo linter 2019-08-06 18:44:53 -03:00
David Wood 20cc6d3e05
Remove `/bin/ls` assumption.
On some systems, notably NixOS, there is no `/bin/ls` and thus this test
can fail unnecessarily on those systems. This commit uses
`/usr/bin/env ls` which resolves the issue.
2019-08-03 12:42:22 +01:00
w0rp dd1e1025b8
Fix #2668 - Set g:ale_go_go111module 2019-08-02 09:09:10 +01:00
w0rp 3ae01ba249
Merge pull request #2430 from eliath/master
Support $GO111MODULE with Go tooling
2019-07-30 21:17:20 +01:00
Chris-Slade 9c7673e6c9 Edit ale-cs-csc docs
Edits the ale-cs-csc docs to remove typos, misspellings, and run-on
sentences.
2019-07-30 11:12:46 -04:00
w0rp 8f5ecf0120
Merge pull request #2646 from paulreimer/fixer-clangformat-use-assume-filename
Set --assume-filename for clangformat fixer
2019-07-30 08:21:21 +01:00
JINNOUCHI Yasushi d1c56769b7 Add setting for numhl highlights (#2637)
* Add setting for numhl highlights
* Add doc for numhl feature
2019-07-29 22:08:33 +01:00
w0rp b1230873b6
Merge pull request #2612 from andys8/feature/elm-language-server-update
Update elm-ls
2019-07-29 21:56:27 +01:00
w0rp 4fe7402e89
Update links to use the new GitHub organization 2019-07-29 21:10:41 +01:00
Grégoire Paris e47c1965a6
Use the psalm executable with the LS option
This is the simplest way of getting the psalm language server to run
now.
2019-07-25 23:19:30 +02:00
Antoine Gagné c675212ddd Fix bug with detection of the PLT
Previously, it did not detect the PLT inside the `_build` directory and
would always default to the default PLT or the one from the `kerl` tool.
2019-07-22 09:50:16 -04:00
Paul Reimer d25711a516
Set --assume-filename for clangformat fixer 2019-07-19 07:57:10 -07:00
w0rp aae6d30b1e
Merge pull request #2618 from rustic-games/clippy-flags
Update Rust cargo linter to better integrate with Clippy
2019-07-14 15:16:15 +01:00
w0rp bafa1c619d
Merge pull request #2643 from delphinus/feature/update-deoplete-for-cpp
Add Deoplete's input_patterns for cpp
2019-07-14 15:05:00 +01:00
delphinus 240bb8abae Add Deoplete's input_patterns for cpp 2019-07-14 22:20:44 +09:00
w0rp 36a50111b9
Merge pull request #2601 from delphinus/feature/better-completion-for-deoplete
Show more candidates for Deoplete completion
2019-07-14 10:29:03 +01:00
Matthew Lanigan abb38955d3 Add Sorbet ruby linter and fixer (#2614) 2019-07-13 17:37:48 +01:00
andys8 fa5aecc250 Elm-ls backward compatibility for previous naming
Previous name of `elm-language-server` was `elm-lsp`
2019-07-10 12:04:33 +02:00
Francisco Giordano 6e6ad2e430 Try to mock nvim api functions 2019-07-10 01:20:22 -03:00
Francisco Giordano 79dde5f0e5 Implement highlights using neovim API 2019-07-09 23:23:27 -03:00
w0rp 6c47d7fc35
Merge pull request #2606 from hsanson/fix-javalsp-executable-docs
Default executable for javalsp is empthy string.
2019-07-06 14:31:32 +01:00
Pete Beardmore a5240009ba Fix incorrect re-selection (#2630)
ALE now only resets selections when needed, to prevent side effects.
2019-07-02 08:31:24 +01:00
hernot 46ab7c5904 Support csc, update mcsc (#2586)
* Added a new csc linter for C# code.
* More output is now handled for mcsc.
2019-07-02 08:18:17 +01:00
ObserverOfTime 8700586890 Add clangtidy fixer (#2548)
* Add clangtidy fixer
* Add extra_options to clangtidy fixer
* Also, use cpp variables in cpp filetypes
2019-07-02 08:11:10 +01:00
Tim Lagnese 221aceb6db Add gnatpp fixer for Ada 2019-07-01 20:50:02 -04:00
Elias Martinez Cohen 49db8210f6 Support $GO111MODULE with Go tooling
Allows the user to override $GO111MODULE environment variable through
ale options. This gives control over the default behavior of Go module
resolution.

Golang documentation:
https://github.com/golang/go/wiki/Modules#how-to-use-modules

Add `ale#Go#EnvString()` function to make it easy to add similar Go
environment variables in the future.

Use the new `EnvString` function in all available Go tools callbacks
& update tests

Also add test of linter command callback for `gofmt`
2019-07-01 11:04:33 -04:00
w0rp 89f7292138
Merge pull request #2625 from ericdwang/update-readme
Update README section about running linters on save
2019-06-30 18:17:19 +01:00
Eric Wang 6feeca793a Update README section about running linters on save
The default for `g:ale_lint_on_insert_leave` was recently changed to 1,
so it now needs to be explicitly set to 0 to run linters only when files
are saved.
2019-06-27 19:25:06 -07:00
Jean Mertz 53b0e6c37d
support all cargo options for build/clippy 2019-06-25 11:22:36 +02:00
delphinus a3521de64e Use input_patterns & add comments for updating it 2019-06-25 18:04:04 +09:00
Jean Mertz e52388b8b1
support clippy options with -- 2019-06-24 19:47:49 +02:00
andys8 0843efc7a5 Update elm-ls
* elm_lsp is now elm_ls
* The binary published by @elm-tooling is elm-language-server

Updates tests, docs and adds more options to the plugin.
2019-06-21 20:10:23 +02:00
RyanSquared 65ba4b85ec
Merge branch 'fix-small-doc-typo' 2019-06-21 04:16:42 -05:00
Horacio Sanson bf0d0597cb Fix small doc typo 2019-06-20 08:51:45 +09:00
Jesse Harris 9ad8fd6a1b Handle powershell unexpected token with newline (#2588)
* Newline in unexpected token broke parser
* fixed test to properly capture regressions
* removed deprecated linter options for powershell
2019-06-19 23:35:10 +01:00
w0rp d2c3141f26
Merge pull request #2600 from hsanson/add-javalsp-lsp-options-2
Add support for javalsp configuration options.
2019-06-19 23:32:06 +01:00
w0rp 418f8a6fed
Merge pull request #2602 from lbonn/master
Update docs on default after recent changes
2019-06-19 16:18:41 +01:00
lbonn 9c48c584a9 Update docs on default after recent changes
`g:ale_lint_on_insert_leave` default has been changed from 0 to 1 in
168768b326
2019-06-19 13:32:11 +02:00
w0rp 38a55fa9fe
Merge pull request #2599 from parkovski/cpp-autocomplete-trigger
Enable C++ autocompletion on '::' and '->'
2019-06-19 10:46:19 +01:00
delphinus 4e1c46947d Add & fix tests for added funcs 2019-06-19 15:34:53 +09:00
delphinus e0f8304860 Add separated func for deoplete
Deoplete needs `get_complete_position` method and it has a different
signature. It already fetches the input string and attempts to detect
the position with `\k*` regexp patterns.
2019-06-19 15:08:24 +09:00
delphinus f5a908bf99 Add input_pattern setting for deoplete
This option is used to determine if `min_pattern_length` is ignored.
In usual, it does not start completion when the matched input string is
shorter than `min_pattern_length`. But when the string matches
`input_pattern`, it starts completion even when ths string is `''`.
2019-06-19 15:08:24 +09:00
Horacio Sanson f2e52b9432 Default executable for javalsp is empthy string.
This fixes documentation to match actual implementation.
2019-06-19 11:50:03 +09:00
Horacio Sanson 40bf6e6b5c Add support for javalsp configuration options.
This MR adds a new configuration variable `g:ale_java_javalsp_config`
that allows to configure external dependencies and class paths to the
language server.

The variable accepts a dictionary similar to the one supported by the
[vscode/settings.json](https://github.com/georgewfraser/java-language-server#settings)
file.

Deprecates: #2561
2019-06-19 11:38:23 +09:00
Parker Snell c5a4bbf8b0 Enable C++ autocompletion on '::' and '->' 2019-06-18 18:02:44 -07:00
Drew Olson 1c71da5624 Add support for purescript language server (#2572)
* Add support for purescript language server
* Update naming
* Add purescript language server tests
2019-06-17 12:54:43 +01:00
w0rp 701c1e4f17
Merge pull request #2578 from andys8/patch-2
Elm: Update link to compiler repository
2019-06-17 12:48:01 +01:00
w0rp 15f23532b7
Merge pull request #2577 from hsanson/fix-checkstyle-defaults
Fix checkstyle default configuration.
2019-06-16 18:13:47 +01:00
w0rp 3acfa0813e
Merge pull request #2591 from blahgeek/inc-deoplete-rank
Raise deoplete source rank to 1000
2019-06-16 17:29:26 +01:00
BlahGeek e0871be22b Raise deoplete source rank to 1000 2019-06-15 16:00:17 +08:00
w0rp 6e28eec243
Merge pull request #2563 from dcyriller/fixer-prettier-glimmer
prettier: Support experimental languages (Handlebars)
2019-06-13 11:08:21 +01:00
Cyrille David 86205967ea Refactor to be less verbose 2019-06-13 10:36:51 +02:00
Horacio Sanson eb6a7b7516 Fix checkstyle default configuration.
Checkstyle xml configuration is mandatory and not providing one causes
the tool to fail with the following error:

    Must specify a config XML file.

Checkstyle itself contains a default configuration as part of its
assests named `/google_checks.xml`. Invoking checkstyle with this config
works even if such file does not exists in the file system:

    checkstyle -c /google_checks.xml

This should be the default invocation to allow ALE to use checkstyle
with zero configuration.

Also when a user sets `g:ale_java_checkstyle_config` option, ALE should
use it to invoke checkstyle even such file does not exists in the
filesystem. This is because checkstyle is able to use configuration files
within JAR files defined in the CLASSPATH. The default `/google_checks.xml`
is an example of such configuration available within a JAR resource.
2019-06-12 10:53:28 +09:00
Andy 0135fb3ad3
Elm: Update link to compiler repository 2019-06-11 18:14:57 +02:00
w0rp 80ab12c7b6
Bump the ALE version 2019-06-10 23:53:42 +01:00
w0rp ce91972c94
Fix #1727 - Replace previoulsy defined linters with matching names 2019-06-10 22:41:20 +01:00
w0rp 168768b326
Lint on InsertLeave, not in insert mode by default
b:ale_lint_on_insert_leave is now supported as tests need it.

These defaults are saner and cause fewer issues for users by default.
2019-06-10 20:54:38 +01:00
w0rp 8b46fa3ee7
Merge pull request #2567 from theevocater/add_reorder_python_imports
Add support for reorder-python-imports fixer
2019-06-10 19:33:00 +01:00
Thibault Vatter 22e7a6f6c2 Make rmarkdown files work with styler and lintr (#2564)
* add R markdown as filetype for styler
* Add rmarkdown as an alias for R
2019-06-10 19:27:42 +01:00
w0rp 1ba1a9ef0e
Merge pull request #2558 from hsanson/fix-javalsp-command-callback
Fix javalsp command callback.
2019-06-10 19:15:15 +01:00
w0rp fea666bd27
Move images to a GitHub issue 2019-06-10 13:43:53 +01:00
w0rp 730752523b
Merge pull request #2574 from enterprisey/patch-1
In README, more efficient git clones
2019-06-10 13:33:54 +01:00
w0rp d9bad6c0b8
Merge pull request #2568 from h-michael/fix-reasonml-doc
Remove unnecessary asterisk from doc/ale-reasonml
2019-06-10 09:06:43 +01:00
enterprisey b41eecd31b
In README, more efficient git clones
Users don't need the entire git history to use the plugin, so don't download it
2019-06-09 22:12:29 -07:00
Horacio Sanson e84c9b300b Do not set default binary.
The default binary "launcher" is too generic and can get mixed with
other tools. To use this linter user must explicitly set the absolute
path of the launcher path.
2019-06-09 14:02:50 +09:00
Hirokazu Hata efa95e2657 Remove unnecessary asterisk from doc/ale-reasonml 2019-06-09 12:08:10 +09:00
Jake Kaufman 56641e0230 Add support for reorder-python-imports fixer
isort is great, but I've come to prefer reorder-python-imports. The tool
has a focus on smaller diffs than isort. reorder-python-imports is also
a little smarter than isort which is nice.
2019-06-08 19:22:50 -04:00
w0rp 507f164a09
Document and test reason-language-server 2019-06-09 00:12:11 +01:00
David Buchan-Swanson 92d515c211
Add support for reason-language-server 2019-06-08 23:50:41 +01:00
w0rp 59829bc194
Merge pull request #2253 from jj-kim/master
Improve location list behavior on split windows of same buffer.
2019-06-08 23:25:02 +01:00
w0rp d9931b9891
Merge pull request #2559 from nerdrew/rust-cargo-rendered-detail
show rendered cargo error in detail for clippy errors
2019-06-08 23:20:18 +01:00
w0rp 3aa58ca179
Merge pull request #2565 from Tharre/master
Run xml linters on xsd and xslt files
2019-06-08 23:09:09 +01:00
w0rp 5826b4927c
Merge pull request #2551 from laino/eslint-json
Use JSON output for ESLint and fix tsserver column
2019-06-08 23:05:35 +01:00
w0rp 6eb68b4507
Merge pull request #2566 from grimmn/extend-clangtidy-options
Add additional options setting for clang-tidy linter
2019-06-08 22:45:39 +01:00
Jonathan Vander Mey 3c799abb44 Add additional option setting for clangtidy linter
The existing option setting handles setting additional compile flags to
pass to clang-tidy. The new option setting added here allows setting
additional clang-tidy specific flags to be passed as well.
Fixes #2324
2019-06-08 15:35:08 -04:00
Tharre 3b8fb39b4a Run xml linters on xsd and xslt files
Both xsd and xslt are by definition written in XML, and thus the same
linter(s) can be run to check them for well-formedness.
2019-06-06 23:46:43 +02:00
Cyrille David 3e4b8ea466 prettier: Support experimental languages
Such as handlebars
2019-06-06 22:04:32 +02:00
w0rp 7b78f2b846
Fix #2525 - Convert Windows paths in a Unix environment 2019-06-05 14:16:43 +01:00
Andrew Lazarus e7317e05ea show rendered cargo error in detail 2019-06-04 22:20:57 -07:00
w0rp 381fff0e4c
Make ale_lint_on_save work with b:ale_fix_on_save = 1 2019-06-04 21:51:53 +01:00
Horacio Sanson 5ce97f8cdb Fix javalsp command callback.
The command used to invoke the language server is missing some options
to include additional java modules. Without these modules the server
was not working properly.

The correct command can be found in a `launcher` script on the same
directory the `java` executable for the language server is found.

This commit changes the docs to prefer the launcher script over the java
executable. For backward compatibility it also fixes the command
invocation in case the java executable is configured.
2019-06-05 00:50:23 +09:00
w0rp 42a1fc2d29
Merge pull request #2557 from hy2k/update-doc
Change ALE integration with Deoplete in README
2019-06-04 16:18:43 +01:00
hy2k bb7481effb Update README deoplete completion source section 2019-06-04 22:35:29 +09:00
Nils Kuhnhenn 7d4a83ecd4 Use correct handler for 'xo' linter 2019-06-04 13:14:08 +02:00
w0rp eb6015c6fd
#2542 - Improve checkstyle project configuration 2019-06-03 23:40:22 +01:00
w0rp 4496c9b3c1
Fix tests on Windows 2019-06-03 22:14:18 +01:00
Christoph Koehler 4129c356e8
Fix #1279 - Run cppcheck differently when modified
cppcheck is now run without the --project option and from the buffer's
directory instead when the buffer has been modified. Saving the buffer
will get results by linting the project instead.
2019-06-03 21:54:23 +01:00
Andrew Lee c6a5cbb3c7 Feature/add ant support (#2539)
Use ant files to load Java settings too.
2019-06-03 20:30:18 +01:00
w0rp a76f056bd9
Fix #2555 - Remove highlights in lowercase, etc 2019-06-03 20:16:49 +01:00
w0rp a730a6d5d5
Update the license year 2019-06-03 09:19:11 +01:00
Nils Kuhnhenn 79d1b99067 Use JSON output for eslint and fix tsserver column 2019-06-02 14:39:03 +02:00
w0rp 135de34d22
Merge pull request #2549 from m-pilia/custom-lsp-requests
Add API for custom LSP requests
2019-06-01 16:48:04 +01:00
Martino Pilia 5542db1507
Support custom LSP notifications
Allow to send custom notification mesages, that expect no response from
the server.
2019-06-01 16:27:44 +02:00
Martino Pilia 3321685940
Refactor LSP custom request handling 2019-05-31 21:56:38 +02:00
Martino Pilia 7053d468cc
Add API for custom LSP requests
Implement a function `ale#lsp_linter#SendRequest` that allows to send
custom LSP requests to an enabled LSP linter.

Resolves #2474
2019-05-31 17:58:27 +02:00
w0rp 27146ade32
Fix #2544 - Completion positions are off by one 2019-05-30 10:26:17 +01:00
w0rp 4f02edc3f8
Merge pull request #2529 from maxwell-k/terraform_linter
Add a terraform linter
2019-05-29 23:28:50 +01:00
w0rp 166435dbf1
#2533 - Run phpcs in the directory the file is in 2019-05-29 23:17:14 +01:00
w0rp ca0cdd26fc
Merge pull request #2540 from sijad/pgformatter
add pgformatter fixer
2019-05-29 21:26:01 +01:00
w0rp 6b819dd74a
Merge pull request #2543 from hsanson/fix-checkstyle-handler
Fix java checkstyle handler.
2019-05-29 20:16:51 +01:00
w0rp 90b1ea230d
Fix #2438 - Print a friendly message when the clipboard is not available 2019-05-28 20:27:10 +01:00
w0rp 67d7caee30
Fix #2535 - Automatically emit <C-x><C-o> less to prevent <C-o> issues 2019-05-28 20:03:35 +01:00
w0rp bc0abc3b96
Merge pull request #2541 from jwkvam/neovim-bufline
fix neovim missing setbufline
2019-05-28 09:55:08 +01:00
Horacio Sanson 181bc69c8c Fix java checkstyle handler.
The checkstyle handler is capable of parsing the new and old output
formats. Unfortunately there are some particular output messages that
matched both the new and old regular expressions:

   [WARN] whatever:11:7: WhitespaceAround: ''if'' is not followed by whitespace. [WhitespaceAround]

This caused ALE to report extra errors since the message was being
matched twice, once as a warning and another (incorrect) old formatted
error.

This MR fixes this by stopping any parsing using the old format regexp
is any errors of the new format are correcly parsed. There is no reason
to expect checkstyle to output both styles in the same report.
2019-05-28 17:48:27 +09:00
Jacques Kvam 47ad24c221 fix neovim missing setbufline 2019-05-27 20:12:24 -07:00
Sajjad Hashemian 8d8b295ef5 add pgformatter 2019-05-27 09:00:11 +04:30
w0rp bb08b81bf7
Merge pull request #2524 from hsanson/2521-fix-lsp-diagnostics-buffer-match
WIP Fix HandleLSPDiagnostics buffer match logic.
2019-05-24 01:21:02 +01:00
w0rp 36c35d840b
Fix LSP tests 2019-05-24 01:13:52 +01:00
Keith Maxwell 88fa0b9294 Add a terraform linter
This linter uses the check functionality built into terraform. ALE
already has a fixer using `terraform fmt` but this doesn't provide error
messages. ALE already has a linter using `tflint` but this requires an
extra application to be installed.

For example this linter will give a warning that ! is an illegal
character in the line below:

    variable "example" !{}

This linter runs the buffer through the command below and parses the
output:

    terraform fmt -no-color -check=true -

This commit includes a basic implementation, documentation and tests.
The only option is to control which executable is run.

Tested with:

    $ terraform -version
    Terraform v0.11.13
2019-05-23 15:49:02 +01:00
w0rp 1a9b8a58c7
Merge pull request #2520 from hsanson/fix-eclipselsp-workspace-config
Fix eclipselsp workspace config
2019-05-23 12:05:21 +01:00
Horacio Sanson 33b4a90507 Add tests for LSP responses 2019-05-23 10:19:50 +09:00
Horacio Sanson 85b3a4a5c6 Add exact file match test to TSServer response handler 2019-05-23 10:19:07 +09:00
w0rp 092748caac
Update the README to use travis-ci.com 2019-05-22 22:27:10 +01:00
Horacio Sanson 2f13c2d263 Add fix to HandleTSServerDiagnostics function. 2019-05-22 20:19:45 +09:00
Horacio Sanson b41836130c Fix HandleLSPDiagnostics buffer match logic.
To find the buffer corresponding to URIs reported by LSP the
HandleLSPDiagnostics() method uses the built-in bufnr() function. From
the documentation we learn that the first parameter of bufnr() is
an expression, not a path.

EclipseLSP will report project wide errors (e.g. gradle errors) that are
not related to any actual source file with an URI that corresponds to the
project root folder, e.g:

   file:///home/username/Projects/gradle-simple

This URI will match any open buffer of files within the project root
hiearchy, thus project-wide errors appear as part of every file within
the project, e.g:

   file:///home/username/Projects/gradle-simple/src/main/java/Hello.java

To fix this, this MR adds '^' to the beginning and '$' at the end of the
URI path to force an exact match. This is how is recommended in vim
help (see :h bufname).
2019-05-22 10:30:24 +09:00
Horacio Sanson 5a8ba75265 Fix eclipse.jdt.ls workspace data path.
We were setting the -data parameter to the project root but this caused
the language server to fail initialization and synch of gradle
dependencies. As consequence ALE failed to work fully on gradle
projects.

This fix sets the workspace to the parent folder of the project root.
Normally this corresponds to the correct Eclipse workspace path.

When this is not the case, this fix also allows users to explicitly set
the absolute path to the workspace via configuration variable.
2019-05-22 09:23:03 +09:00
w0rp 67d49c75a8
Fix the eclipselsp tests 2019-05-21 21:23:21 +01:00
Grim Kriegor 0427ee84b4 Allow running eclipselsp as installed by system package on GNU/Linux (#2523)
* Search eclipselsp jar and config files within system package path
* Allow setting an alternate eclipselsp configuration directory
* Add test for ale_java_eclipselsp_config_path
2019-05-21 21:13:06 +01:00
w0rp f6ae056d02
Stop a test from failing randomly 2019-05-21 14:01:58 +01:00
w0rp 3e3801e81e
Revert "Fix #2492 - Remove all Deoplete support for now"
This reverts commit 975cc7af8f.
2019-05-21 13:53:09 +01:00
w0rp 89db85121c
Merge pull request #2502 from ericvw/flake8-config
Change Python project root dir detection for flake8 configuration
2019-05-21 00:15:12 +01:00
w0rp 26e5948617
Close #2516 - Handle problems with inlined functions 2019-05-20 23:50:38 +01:00
w0rp 42f5e8c62c
Fix a test on Windows 2019-05-20 22:11:49 +01:00
w0rp 28819eedd3
Close #2359 - Find compile_commands.json in build dirs for cppcheck 2019-05-20 22:08:03 +01:00
w0rp 937138dad4
Try to fix the tests 2019-05-20 20:06:44 +01:00
w0rp 143af2b9fd
Fix #2421 - Use compile_commands.json in build dirs to find roots 2019-05-20 19:57:08 +01:00
w0rp 781bf1502f
Make a test fail less 2019-05-20 19:27:47 +01:00
w0rp 5e64acc6ab
Fix #2512 - Use -o /dev/null for gcc linting 2019-05-20 13:00:32 +01:00
w0rp 4ee28d3129
Fix #2515 - Send client capabilities to LSP servers 2019-05-20 09:40:06 +01:00
w0rp 9d908ecc66
Close #1739 - Use deletebufline() for fixing files were available 2019-05-20 02:06:25 +01:00
Antoine Gagné 3b7c86e401 Add support for Erlang dialyzer (#2509)
* Add support for Erlang dialyzer
* Add an option to specify rebar3 profile

In doing so, the use of the `**` wildcard becomes unnecessary.
2019-05-19 21:16:17 +01:00
Eric N. Vander Weele 57736cdccc Change Python project root dir detection for flake8 configuration
The official configuration files for `flake8` are `.flake8`, `tox.ini`,
and `setup.cfg`.

After investigation, it is safe to remove `flake8.cfg` as it appears to
only exist as a typo in other tooling documentation (e.g.,
`python-language-server`).

Even though no linters automatically read `.flake8rc`, it is kept in
case projects may be using it for detecting the projects root directory.
2019-05-19 09:51:26 -04:00
Eric N. Vander Weele 57b9d8bc0e Test for Python project root directory
Add test files and a new test suite for detecting a Python project's
root directory.
2019-05-19 09:51:26 -04:00
w0rp 652d991077
Fix #1317 - Jump to column 1 for problems at column 0 2019-05-17 22:08:03 +01:00
w0rp e6745a3811
Fix #1989 - Use ESlint options for fixers too 2019-05-17 20:45:25 +01:00
w0rp e5ea809094
Close #2285 - Add a function for use with omnifunc 2019-05-17 00:57:52 +01:00
w0rp 8cb6d043b4
Use the updated Docker image 2019-05-16 22:22:47 +01:00
w0rp 8c76b88392
Update the Dockerfile with newer Vim versions 2019-05-16 21:36:05 +01:00
w0rp 975cc7af8f
Fix #2492 - Remove all Deoplete support for now 2019-05-16 20:11:42 +01:00
w0rp d0f2a0ae94
Fix #2505 - Remove NeoVim highlight support for now 2019-05-16 20:04:18 +01:00
w0rp 9b89ec3d86
#2505 Try to fix NeoVim highlighting out of range errors 2019-05-16 13:44:40 +01:00
w0rp 4234d39d87
Close #908 - Report phpcs problems as style problems 2019-05-14 22:58:58 +01:00
w0rp 381fe1badf
Close #829 - Close LSP documents when buffers are deleted 2019-05-14 00:21:58 +01:00
w0rp 07b596efb5
Close #791 - Handle exceptions for puglint 2019-05-13 21:57:44 +01:00
w0rp 70604828fa
Merge pull request #2500 from rliang/texlab
[lsp] Add Texlab support
2019-05-13 20:17:35 +01:00
rliang ab7e5b264f [linter] Add LSP support for LaTeX via texlab 2019-05-13 15:50:03 -03:00
w0rp c88ebc5e70
Make phpstan tests fail less 2019-05-13 14:00:12 +01:00
w0rp 42cbff29f8
Fix #2497 - ALE should not lint on save when disabled after fixing 2019-05-13 13:44:29 +01:00
w0rp bf17bbf898
Merge pull request #2496 from liskin/sort-locale
Force sort locale in check-supported-tools-tables
2019-05-13 09:11:55 +01:00
w0rp aa047b5ba3
Merge pull request #2491 from mpesari/phpstan-autoload-option
Add phpstan autoload option
2019-05-12 21:32:57 +01:00
Mikko Pesari 6b919e88be Add test to verify phpstan autoload parameter 2019-05-12 23:12:52 +03:00
w0rp bfc79bd2aa
#2492 - Try to fix a deoplete bug again 2019-05-12 19:35:10 +01:00
Tomas Janousek fb6fd80bd2 Force sort locale in check-supported-tools-tables
Otherwise it reports that the list isn't sorted properly if user's LANG
is different.
2019-05-12 18:49:20 +02:00
w0rp 7943bfab96
Make eslint respect the ale_warn_about_trailing_whitespace setting 2019-05-12 15:49:16 +01:00
w0rp 3303f596e5
Fix #2490 - Kill other processes when the test script is interrupted 2019-05-12 15:42:09 +01:00
w0rp df90725c85
Support b:ale_completion_enabled for disabling it for some buffers 2019-05-11 17:19:45 +01:00
w0rp edd3114394
Make it less likely people will do the wrong thing
Make it very clear in every single place that the setting for ALE's own
completion implementation is mentioned that you should not enable it if
you want to use ALE as a completion source for other plugins like
Deoplete.
2019-05-11 17:06:32 +01:00
w0rp f0152bca98
#2492 - Try to fix a bug with ALE's deoplete source 2019-05-11 16:40:26 +01:00
Mikko Pesari afa20d96ca Add phpstan autoload option 2019-05-10 18:28:32 +03:00
w0rp 79e42fed14
#2403 - Make ale_disable_lsp apply consistently, and document it better 2019-05-10 13:42:41 +01:00
Katsuya Horiuchi f444abdfe6 Add option to show msg id when pylint is used (#2445)
* Add python_pylint_use_msg_id to tweak output of pylint
* Add test for ale_python_pylint_use_msg_id
* Add doc on ale_python_pylint_use_msg_id
2019-05-09 17:28:18 +01:00
w0rp 722c3e8dae
#2481 - Use text to insert from insertText 2019-05-09 17:26:33 +01:00
w0rp bff3d253e9
Merge pull request #2486 from Sh3Rm4n/doc-typo-fix
Fix typos in documentation
2019-05-09 17:01:46 +01:00
Sh3Rm4n 77c5802fc7 Fix typos in documentation 2019-05-09 13:49:44 +02:00
w0rp a223253f35
Merge pull request #2134 from oaue/master
javac linter: fix handling of error messages containing ':' character
2019-05-08 09:50:12 +01:00
w0rp d390abd721
Merge pull request #2479 from hsanson/288-fix-eclipse-jar-path-docs
Fix eclipselsp path documentation.
2019-05-08 09:17:57 +01:00
Horacio Sanson 53db52e713 Improve eclipselsp jar search logic.
- Set default value to $HOME/eclipse.jdt.ls
 - Make JAR search regexp more specific.
 - Allow to set the VSCode extensions folder as ale_java_eclipselsp_path.
2019-05-08 13:24:34 +09:00
Horacio Sanson 63abd2dfef Fix eclipselsp path documentation.
Closes #2468
2019-05-08 11:48:44 +09:00
w0rp 5f64f8dc57
Escape phpstan arguments, and update documentation 2019-05-07 19:38:38 +01:00
Kanenobu Mitsuru c10da0e390 Add fixer for OCaml ocp-indent (#2436) 2019-05-07 18:50:26 +01:00
w0rp 548ee56f40
Merge pull request #2475 from andreypopp/andreypopp/fix-nvim-hl
Fix off by one error line highlight w/ nvim api
2019-05-07 10:47:20 +01:00
Andrey Popp e6ba936a0c Fix off by one error line highlight w/ nvim api 2019-05-05 19:14:40 +03:00
Alvin Chan 7f0954b89e Add XO as a linter/fixer for TypeScript files (#2453) 2019-05-02 11:59:18 +01:00
Julien Deniau c6aae3bcfc Better phpstan default configuration (#2444)
* Use phpstan config file as default whenever possible + report as error
2019-05-01 23:14:39 +01:00
w0rp 4c6f67a3d0
Merge pull request #2446 from fnichol/add-var-sh-shellcheck-change-directory
Add g:ale_sh_shellcheck_change_directory
2019-05-01 22:47:08 +01:00
w0rp 5d65f93033
Merge pull request #2437 from robertjlooby/add-floskell
Add floskell for Haskell formatting
2019-05-01 22:43:44 +01:00
w0rp eae124e8ce
Fix #2460 - Do not track when LSP linters are busy 2019-05-01 20:49:03 +01:00
Andrey Popp 114198e082 Optionally use neovim's api-highlights (#2169) 2019-05-01 19:35:15 +01:00
w0rp 2f3bce5a1d
Merge pull request #2448 from reedriley/master
Add support for Vim's tagstack to ALEGoToDefinition
2019-04-29 20:55:45 +01:00
w0rp b34274ab10
Merge pull request #2466 from alerque/patch-1
Include plugin description in local help line
2019-04-29 10:17:38 +01:00
Caleb Maclennan 69b7ec1c4c
Include plugin description in local help line
The recommended format for _vim's internal help files_ is "<tag> <for vim version> <last change>", (see `:help help-writing` but this format is not parsed the same way for plugins. For plugins the recommended format includes a description of the plugin such as "<tag> <description>". See `:help write-local-help` for the different template.
2019-04-29 09:48:48 +03:00
w0rp 737ed31de5
Disable fsync for writefile() calls for performance 2019-04-26 20:17:33 +01:00
Reed Riley 46c743a247 Updated Vim version in Dockerfile and made UpdateTagStack clearer
The `settagstack` and `gettagstack` functions don't exist prior to Vim
8.1.0519.  And the function definition was unclear whether it intended
  to grab the *old* or the *new* file/line/col.
2019-04-24 09:58:13 -04:00
w0rp 01331266a8
Close #1753 - Implement minimum viable integration with Deoplete 2019-04-23 21:26:25 +01:00
Thibault Vatter ce0b14979e Add a fixer for r based on the styler package (#2401)
* Add styler as a new fixer for R files
* Add to the list of supported tools
* Add documentation
2019-04-23 19:44:26 +01:00
w0rp 893ac34cca
Fix #2452 - Strip trailing spaces off sign text automatically 2019-04-23 15:58:10 +01:00
Reed Riley c36f3e78e4 Add support for Vim's tagstack to ALEGoToDefinition
fixes 1236
2019-04-19 23:10:55 -04:00
Fletcher Nichol 2303b05baa Add g:ale_sh_shellcheck_change_directory 2019-04-18 16:48:10 -06:00
w0rp fcc2c3ba71
Fix #2415 - Mark tsserver and LSP linters inactive again 2019-04-17 18:12:50 +01:00
Ian Shipman 2eb68f6d23 #1791 Set the working directory for cabal and stack 2019-04-17 14:26:09 +01:00
w0rp 104980e40b
Merge pull request #2443 from JulioJu/patch-1
Documentation: ale-java eclipselsp customization
2019-04-17 11:57:14 +01:00
Julio 5bbce34605 Documentation: ale-java eclipselsp customization
See also https://github.com/w0rp/ale/pull/2121
2019-04-17 11:49:35 +02:00
Jethro Shuwen Sun 9e95032b30 fix 2434: use text field instead of the detail field for virtualtext (#2441)
* use text field instead of the detail field for virtualtext

*  make the change simpler
2019-04-16 14:40:39 +01:00
w0rp 59f8c35a2f
Fix #1930 - Finish ale_fix_on_save_ignore
* Implementation had a bug
* Documentation added
* Tests added
2019-04-16 13:44:43 +01:00
w0rp 24d277384c
#1930 - Add ale_fix_on_save_ignore for disabling some fixers on save 2019-04-15 23:15:18 +01:00
w0rp 3a010f68b8
Adjust the README wording slightly 2019-04-15 22:00:57 +01:00
w0rp 23a8208498
#782 - Use compile commands for matching source files for headers 2019-04-15 21:38:11 +01:00
Jethro Shuwen Sun 7f31065fce improve the lsp diagnostic message format (#2425) 2019-04-15 14:36:18 +01:00
w0rp 61c1ddd904
Fix #2440 - Fix the kotlinc command when Maven and Gradle are missing 2019-04-15 13:36:03 +01:00
Rob Looby 99361b2ca9
Add floskell for Haskell formatting 2019-04-14 11:27:48 -05:00
Riley Martine 495bce32e9 Add support for latexindent (#2387) 2019-04-13 13:21:59 +01:00
w0rp f0f0cc3c18
Merge pull request #2121 from hsanson/1996-add-support-for-eclipse-jdt-ls
WIP Fix 1996 - Add eclipse LSP support.
2019-04-13 12:48:20 +01:00
w0rp 784d1a9a62
Merge pull request #2394 from harttle/master
feat: fecs support for js/html/css lint and format
2019-04-13 12:35:52 +01:00
w0rp 6428162f79
Merge pull request #2433 from belka-ew/bugfix/remove-otherproject-util-double
Remove otherproject#util#Double from d.vim
2019-04-13 12:29:31 +01:00
Jesse Harris 2ed53108c4 Linter for powershell syntax errors (#2413)
* Linter for powershell syntax errors
2019-04-13 12:24:56 +01:00
Eugen Wissner 751838621a Remove otherproject#util#Double from d.vim 2019-04-13 07:59:01 +02:00
w0rp d7395906ba
Merge pull request #2432 from superobertking/master
Let rust rls linter find the default rust toolchain automatically
2019-04-11 17:13:52 +01:00
robertking fb7099d440 modify rls testcase 2019-04-11 23:38:16 +08:00
robertking df806c511c change default value of ale_rust_rls_toolchain and update documentation 2019-04-11 23:05:59 +08:00
harttle 4b6691f602 test: unit test for fecs fixer, fecs command 2019-04-11 19:47:31 +08:00
Jun Yang d4841cedf2 style: fecs related doc and vim scripts 2019-04-11 16:24:59 +08:00
harttle c820089c44 feat: fecs support for js/html/css lint and format
`fecs` is a lint tool for HTML/CSS/JavaScript,
see http://fecs.baidu.com for more options.
2019-04-11 16:24:58 +08:00
Horacio Sanson f02e2ec54c Fix 1996 - Add eclipse LSP support. 2019-04-11 08:50:04 +09:00
Masashi Iizuka 4813165614 Add a linter for clojure using clj-kondo (#2377) 2019-04-10 20:59:58 +01:00
w0rp 16b43a5708
Do not complain about generated _callback settings 2019-04-10 19:53:11 +01:00
w0rp 2ef3f9806c
#2428 Remove deprecated linter options for psscriptanalyzer 2019-04-10 19:44:57 +01:00
w0rp 2e8c8085a6
Close #2179 - Add support for gopls 2019-04-10 19:23:16 +01:00
w0rp 042b351b7a
Merge pull request #2366 from aweis/fixtypo
ruby: fix a typo in a comment
2019-04-10 18:54:43 +01:00
Raphael Hoegger 81423701b0 Adding new linter "cookstyle" for chef recipes (Issue #1187) (#2362) 2019-04-10 18:52:52 +01:00
Dan Loman abcefe7a6e [doc] Add swift support documentation (#2426)
* [doc] Add swift support documentation
* [doc] Add swift bullets in main help file
* [doc] Add to supported languages and tools txt file as well
* Ensure same name styling for help/readme files
2019-04-08 18:22:59 +01:00
Dan Loman 864d0861e4 [lsp] Add Swift / SourceKit-LSP support (#2420)
* [linter] Add LSP support for Swift via sourcekit-lsp
2019-04-08 16:25:30 +01:00
w0rp 9a0ece1ecb
Fix #2399 - Do not check buffers used for displaying diffs 2019-04-08 13:42:09 +01:00
w0rp 6d14dc0ac0
#2417 - Silence errors for shortmess+=T 2019-04-08 11:41:23 +01:00
w0rp 02af53b8b0
Document ale#Has 2019-04-07 16:29:55 +01:00
w0rp ce64e349cd
Close #2132 - Add deprecation warnings for old features 2019-04-07 16:24:08 +01:00
w0rp e85eb82401
#2132 - Implement feature tests with ale#Has 2019-04-07 15:34:39 +01:00
w0rp 3bebcb5d48
#2132 - Replace command_chain and chain_with with ale#command#Run 2019-04-07 14:58:06 +01:00
w0rp cdf89f8269
Merge pull request #2414 from rpdelaney/severity-sp
Fix missing character in %severity%
2019-04-04 15:34:02 +01:00
Ryan Delaney 8c31e2f04a Fix missing character in %severity% 2019-04-03 18:21:06 -07:00
w0rp 435a072181
#2397 - didChangeConfiguration should be a notification 2019-04-02 22:00:03 +01:00
w0rp 5be6a2b4e0
Merge pull request #2340 from svanharmelen/svh/f-gotype
make `gotype` return all errors
2019-04-02 14:27:01 +01:00
w0rp 669aeb2c9d
Add pyflakes to the Vim help file too 2019-04-02 09:37:01 +01:00
w0rp e3080e2c1b
Merge pull request #2406 from mafrosis/pyflakes-is-supported
Pyflakes is supported + FAQ update
2019-04-02 09:36:16 +01:00
w0rp cfffdab856
Sort the documented options 2019-04-02 09:31:00 +01:00
w0rp 1dbba6849f
Merge pull request #2403 from rhysd/config-disable-lsp
Add g:ale_disable_lsp and b:ale_disable_lsp to disable linters powered by LSP
2019-04-02 09:28:27 +01:00
Matt Black 2f1d1b7826 FAQ: how can I see what is currently enabled? 2019-03-31 12:02:18 +11:00
Matt Black 5fe45f3219 Pyflakes is supported 2019-03-31 07:36:02 +11:00
rhysd 6a29641872 Add g:ale_disable_lsp and b:ale_disable_lsp to disable linters powered by LSP 2019-03-30 15:29:17 +09:00
w0rp 89273b65b8
Merge pull request #2369 from ajcrites/ajcrites/2368/vertical-focus-fix
Fix #2368 - Open vertical list to the right
2019-03-29 19:23:52 +00:00
w0rp 3eb6d7b3db
#2395 - Handle empty output for redpen 2019-03-29 16:09:27 +00:00
w0rp e1e8f0dae1
Fix the table of contents 2019-03-29 15:36:11 +00:00
Jesse Harris 000c37e775 PSScriptAnalyzer (#2370)
* Added psscriptanalyzer
* Added exclusions and documentation
* Added PSScriptAnalyzer handler test
2019-03-29 15:25:55 +00:00
w0rp 442d672d8a
#2397 - disable elixir-ls by default, which can be CPU hungry 2019-03-29 14:19:13 +00:00
w0rp a92627e1e1
Fix #2402 - Handle null LSP references responses 2019-03-29 13:42:24 +00:00
w0rp 32c8bd1fa4
Merge pull request #2363 from davidsierradz/master
support jsonlint local executable
2019-03-25 22:05:28 +00:00
w0rp 8768a309b8
Merge pull request #2378 from antew/feature/elm-lsp-linter
Elm: Support for elm-lsp
2019-03-25 21:41:33 +00:00
Shahin Sorkh ad998211f8 Use location of `composer.json` for PHP project path too (#2391)
* move php-langserver "test for .git dir" test-project to its own directory
* search for composer.json file in php-langserver first then .git dir
* add test for php-langserver composer.json
2019-03-25 21:29:34 +00:00
Antew 8ec9615400 Add support for elm-lsp 2019-03-21 02:55:49 -04:00
Andrew Crites a3a052b55a
Fix #2368 - Open vertical list to the right
This was normal behavior before, and it also stops ale from stealing focus.
2019-03-16 21:39:11 -04:00
Adam Weis 1427a090df ruby: fix a typo in a comment 2019-03-15 16:18:57 -07:00
davidsierradz dfff73795a support jsonlint local executable 2019-03-15 16:21:48 -05:00
w0rp 80ef7ea2d0
#2357 Handle Windows paths where the drive letter colon is encoded 2019-03-13 16:44:29 +00:00
w0rp 67ea571659
Handle pipes in Windows drive letters for URIs 2019-03-13 15:54:09 +00:00
Tomasz N 5f03bae41c Fix parsing the third part of version string (#2355)
* Fix parsing the third part of version string
* Add test
* Test: fix checking cached version
2019-03-12 17:49:48 +00:00
Sander van Harmelen b0fac47060 make `gotype` return all errors
When using `gotype` without the `-e` option, it will only output the
first 10 errors. When working on a larger package that ofter means taht
those 10 errors are in other files then the one that you are currently
working on which then seems to indicate that there are no errors.

By adding the `-e` flag, all errors will be returned and shown properly
in the file that you are working on.
2019-03-12 09:32:39 +01:00
w0rp 365ffae6c4
Fix #2351 - Escape spaces and backslashes for signs 2019-03-11 19:44:51 +00:00
w0rp f0da35b958
Merge pull request #2349 from oblitum/fix-missing-languagetool-file-argument
Fix passing file to languagetool
2019-03-11 09:15:29 +00:00
Adam Trepanier a22ab78dd7 make options for credo configurable (#2337)
* Add credo --strict option

If a user sets 'let g:ale_elixir_credo_strict=1' it will run credo with
--strict instead of suggest.  The default (0) is to run as suggest.

* Added credo docs
2019-03-11 09:12:32 +00:00
w0rp a6012d853c
Merge pull request #2347 from codenut/master
Fix for #2346
2019-03-11 09:07:31 +00:00
Francisco Lopes d9a12348d0 Fix passing file to languagetool 2019-03-11 04:42:25 -03:00
w0rp 03384a5d6f
#2341 - Handle completion messages with textEdit objects 2019-03-10 15:21:36 +00:00
Michael Valladolid a5cf7e854b set maximum number of autocomplete suggestions for results coming from LSP 2019-03-10 00:50:25 +08:00
w0rp 8a0213f1fd
Remove more uses of command_callback and executable_callback 2019-03-09 14:30:28 +00:00
w0rp c6a6a37931
Update documentation for languagetool 2019-03-09 14:12:31 +00:00
Vincent Dahmen 7eae06d3f3 linter/markdown: adds support for languatool (#2155) 2019-03-09 13:55:54 +00:00
w0rp fd31987f23
Merge pull request #2327 from akshit-sharma/master
clang-format supported with nvcc (cuda files)
2019-03-08 21:36:43 +00:00
w0rp 413529f603
Fix #2326 - ALEComplete no longer replaces completeopt 2019-03-08 21:32:05 +00:00
w0rp be2c0c3af5
Merge pull request #2325 from rustic-games/rust-spans
set correct Rust span end column
2019-03-08 20:23:42 +00:00
w0rp 5505f2323d
Fix #2330 - Do not use getcurpos() to avoid changing curswant 2019-03-07 12:28:42 +00:00
w0rp 6aef52f026
Merge pull request #2305 from campbellr/master
javac: Don't assume src/main/java always exists
2019-03-06 10:39:32 +00:00
w0rp cf883aa5a8
#2132 - Document ale#command#Run 2019-03-05 14:07:38 +00:00
Nathan Henrie e5746d9a83 Add lsp_config support for rls (#2332)
* Add lsp_config for rls
* Add working config example and test
2019-03-05 09:09:29 +00:00
Ryan Campbell 4fc27f099b
javac: Don't assume src/main/java always exists
Some projects I have only have src/test/java (no /src/main/java), which
seemed to break some incorrect assumptions the linter had.
2019-03-03 14:43:21 -07:00
akshit-sharma 32dbf5942e fixed mismatched ToC and heading 2019-03-02 22:19:28 -07:00
akshit-sharma 163f0ab06e clang-format supported with nvcc (cuda files) 2019-03-02 21:39:44 -07:00
Jean Mertz 26460a77a7
set correct Rust span end column
The Rust compiler returns the first column that is _not_ part of the
current span as `column_end`, while Ale expects `end_col` to signify
the last column of the span.
2019-03-02 16:17:17 +01:00
w0rp c4328f2a31
#2132 - Support deferred execution for LSP executables, commands, and addresses 2019-02-27 23:26:32 +00:00
w0rp 37a1d24a36
Skip the command#Run test for fixers on Windows 2019-02-26 16:57:57 +00:00
w0rp 38009b8e58
#2132 - Support deferred fixers 2019-02-26 16:56:16 +00:00
w0rp 70a9176de0
#2132 - Set up fixers for deferred support 2019-02-26 08:35:58 +00:00
w0rp 89e5491862
Revert "#2132 Change (buffer, lines) fixer functions to (buffer, done, lines)"
This reverts commit f1ed654ca5.
2019-02-22 20:48:06 +00:00
w0rp 883978ece9
#2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
w0rp f53b25d256
#2132 - Implement project_root as a replacement for project_root_callback 2019-02-22 15:24:34 +00:00
w0rp f8aeb5c5a4
#2132 - Make most foo_callback options work as foo 2019-02-22 00:35:53 +00:00
w0rp ffa45fa3fb
#2132 - Implement deferred command handling for linters 2019-02-21 21:24:41 +00:00
w0rp a8b987a1c3
Fix #2300 - Handle more URIs per RFC 3986 2019-02-21 19:47:22 +00:00
w0rp 8012e5b60f
Merge pull request #2303 from kevinoid/bandit-use-config
python/bandit: Use .bandit configuration file
2019-02-20 09:58:02 +00:00
w0rp 707a42167f
Merge pull request #2302 from kevinoid/pylint-cd-proj-root
python/pylint: Change directory to project root
2019-02-20 09:54:13 +00:00
w0rp 09cbd70d9b
Merge pull request #2307 from lukas-reineke/clear-virtualtext-on-disable
Clear the virtualtext on disable
2019-02-20 09:04:19 +00:00
Lukas Reineke b8cecca8c8 Clear the virtualtext on disable 2019-02-20 11:08:27 +09:00
w0rp fefc093e70
Merge pull request #2304 from mandreyel/patch-1
Fix typo in ale.txt
2019-02-18 09:06:34 +00:00
mandreyel 90457fdb6b Fix typo in ale.txt 2019-02-18 09:33:03 +01:00
Kevin Locke 52c2400786 python/bandit: Use .bandit configuration file
Bandit automatically [uses any .bandit file] within the directories on
which it is invoked.  Since ALE invokes bandit on stdin, it does not
load a .bandit file automatically.  Add support for automatically
finding a .bandit file and passing it to bandit via the --ini option
along with a variable to disable this behavior if desired.

Note: This is useful for the skips and tests configuration options, but
not exclude which would require invoking bandit using a file name, which
may or may not be a good trade-off.

[uses any .bandit file]: https://github.com/PyCQA/bandit/blob/1.5.1/bandit/cli/main.py#L70-L73

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-02-17 14:24:18 -07:00
Kevin Locke 3300b1aca7 python/pylint: Change directory to project root
Pylint only [checks for pylintrc] (and .pylintrc) files in the packages
aboves its current directory before falling back to user and global
pylintrc.  For projects with a src dir, running pylint from the
directory containing the file will not use the project pylintrc.

Adopt the convention used by many other Python linters of running from
the project root, which solves this issue.  Add pylintrc and .pylintrc
to FindProjectRoot.  Update docs.

[checks for pylintrc]: https://github.com/PyCQA/pylint/blob/pylint-2.2.2/pylint/config.py#L106

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-02-17 10:40:50 -07:00
w0rp c3d4e0983b
Try to get tests to pass on Windows again 2019-02-15 16:40:01 +00:00
w0rp 5b6df0a85f
Fix #2299 - Make tsserver run again 2019-02-15 15:34:31 +00:00
w0rp 1a69c9c88c
#2295 Send an empty object for the initialized notification, per the spec 2019-02-15 10:44:45 +00:00
w0rp 0d10653a7c
Fix #2295 - Respond to initialize with an initialized message 2019-02-15 08:54:53 +00:00
w0rp 89039187da
Fix #2294 - Fix some syntax that broke LSP 2019-02-15 08:32:01 +00:00
w0rp 7487ecb957
Simplify code for marking linters as active 2019-02-14 10:10:46 +00:00
w0rp 3140abcd0c
Fix #2293 - Update linter option documentation
* The README now points to a valid helptag for linter options.
* The now very, very large part of the table of contents for linter and
  fixer options has been moved into a section so the initial table is
  smaller.
* Special linter or fixer options now lie beneath the general linter
  or fixer options.
2019-02-13 21:22:02 +00:00
w0rp 3050a132b5
Remove ProcessChain code we do not need now 2019-02-13 17:56:10 +00:00
w0rp 21a8b9f1e3
Make it easier to remove command_chain support later 2019-02-13 17:53:01 +00:00
w0rp 1ee56713b8
#2132 Use an on-init callback for all LSP logic 2019-02-13 17:26:37 +00:00
w0rp e88243687a
Better wording 2019-02-13 10:38:04 +00:00
w0rp f1bf795b8b
Explain what linting is in the first sentence 2019-02-13 10:35:26 +00:00
w0rp 690b1a5bb1
Merge pull request #2291 from kevinoid/pylama-no-temp
pylama: Use %s instead of %t
2019-02-12 21:08:31 +00:00
w0rp 926ad47a49
#2132 - Implement deferred executable string handling for linters 2019-02-12 18:05:33 +00:00
Kevin Locke a6caa85a58 pylama: Use %s instead of %t
Although using %t to lint changes was desirable, many pylama checks use
surrounding paths and file contents (e.g. C0103 module name, E0402
relative import beyond top, etc.)  The more such errors I find during
testing, the less %t seems like a good idea.  Switch to %s.

Also set `lint_file` to 1 and mark Pylama as a file linter in the docs.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-02-12 10:45:26 -07:00
w0rp bf196ba17c
Fixers are not disabled by default 2019-02-11 22:14:35 +00:00
w0rp df9bee88f6
Rewrite the supported tools lists in new files 2019-02-11 22:07:52 +00:00
Derek Sifford aca1edb476 add project_root_callback for tsserver (#2290)
* add project_root_callback for tsserver
* add tests for tsserver project root
* Update test/command_callback/test_javascript_tsserver_command_callback.vader
2019-02-11 21:24:22 +00:00
w0rp 6ebe24b5ff
Merge pull request #2268 from m-pilia/alex
Add settings for the Alex linter
2019-02-10 23:43:43 +00:00
w0rp 752e6f0ab9
Merge pull request #2277 from chaucerbao/feature/redraw-after-open
Center the result after `ale#util#Open` jumps
2019-02-10 23:34:21 +00:00
w0rp 5dbac4ab9c
Merge pull request #2287 from kevinoid/vulture-options
Document and test ale_python_vulture_options
2019-02-10 23:24:31 +00:00
w0rp b235e08b3c
Merge pull request #2289 from kevinoid/shellcheck-dialect
Support ale_sh_shellcheck_dialect to set shellcheck dialect
2019-02-10 22:47:53 +00:00
Kevin Locke a0d4eb3699 Support ale_sh_shellcheck_dialect to set dialect
As discussed in w0rp/ale#1051, there are cases where it would be useful
to be able to specify the dialect explicitly.  This commit allows users
to do so using the ale_sh_shellcheck_dialect variable.

Fixes: w0rp/ale#1051

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-02-10 09:00:55 -07:00
Kevin Locke 82b15fb706 Document and test ale_python_vulture_options
The vulture linter already supports ale_python_vulture_options, but it
is not documented or tested.  Since vulture only supports configuration
via options, it is an important use case.  Add docs and test.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-02-10 08:18:55 -07:00
w0rp 7a48750610
Complain about binary operators on the ends of lines 2019-02-10 11:43:48 +00:00
Théo Cavignac d072d2654c Supporting filtered jump (#2279)
* Support filtered jump based on loclist item type (E or W for now)
* Use flags to customize the behavior of ALENext and ALEPrevious
* Update <plug> bindings with flags
* Update documentation about ALENext and ALEPrevious
* Use ale#args#Parse in JumpWrap
2019-02-10 11:11:29 +00:00
Kevin Locke a24f0b4d5f Support pylama for python (#2266)
* Add pylama for python
* Consolidate python traceback handling
2019-02-08 21:44:34 +00:00
w0rp 422908a572
#2009 - Force Windows jobs to run in a CMD shell 2019-02-08 21:33:16 +00:00
w0rp ba6f08f3d4
Merge pull request #2262 from sectioneight/cd-for-black
Respect python black fixer configuration file
2019-02-08 20:11:11 +00:00
w0rp 3ba7d02708
Merge pull request #2272 from Rahlir/fix-c-compilecommand
Fix error when parsing compile_commands for c languages
2019-02-08 20:06:12 +00:00
Alvin Chan 1fb0de2a8e Add `-relative` option to ALESymbolSearch (#2255)
* Add `-relative` option to ALESymbolSearch
* Document the `-relative` option for ALEFindReferences and ALESymbolSearch
2019-02-08 19:43:04 +00:00
w0rp d21581016e
Fix #2257 - Fix an off by 1 which broke completion for some servers 2019-02-08 19:31:47 +00:00
w0rp 800d029b46
Merge pull request #2284 from jqno/master
Fixes javalsp linter
2019-02-08 10:08:09 +00:00
w0rp b32fdfe816
#2132 Implement deferred objects for ale#command#Run 2019-02-08 08:41:38 +00:00
w0rp 19cc724807
Add a function for parsing command args 2019-02-07 18:10:34 +00:00
w0rp 2885c57e3e
Fix #2276 - Replace a potentially infinite loop for hie 2019-02-07 16:24:41 +00:00
Jan Ouwens 5ce1e9b0b4 Fixes javalsp linter 2019-02-07 11:20:18 +01:00
w0rp 0b9c0c2200
Merge pull request #2278 from oblitum/improve-cypher-lint
linter/cypher: make Cypher linter dynamic
2019-02-07 09:24:41 +00:00
Francisco Lopes b47a0c9519 Make Cypher linter dynamic 2019-02-06 20:29:58 -02:00
w0rp c0c634c5ec
Merge pull request #2270 from oblitum/add-cypher-lint
linter/cypher: add cypher-lint
2019-02-06 22:04:47 +00:00
w0rp 81c73da3b9
#2132 - lint and fix with ale#command#Run
A new function is added here which will later be modified for public use
in linter and fixer callbacks. All linting and fixing now goes through
this new function, to prove that it works in all cases.
2019-02-06 22:00:11 +00:00
w0rp 3e11cbd18d
Update syntax checking
* Line continuation characters should be on the same lines.
* .vim file line indentation should be a multiple of 4.
2019-02-06 18:05:13 +00:00
Alvin Chan 70b95f16c3 Replace `normal` with `normal!` 2019-02-05 16:37:26 -08:00
Alvin Chan 9f63bec12c Remove the `redraw` since it's implicit with the `zz` 2019-02-05 16:31:02 -08:00
Alvin Chan 7ce481c8f6 Center the line within the viewport after a jump 2019-02-05 16:27:13 -08:00
Alvin Chan a4ed9a1c35 Force Vim to `redraw` after `ale#util#Open` 2019-02-05 16:13:58 -08:00
Tadeas Uhlir 37daedafed Fix error when parsing compile_commands for c langs
This little error caused that when parsing compile_commands json, the
filename was used to fetch entries in directory dictionary, hence, when
adding new json commands, it never found anything in dir_lookup and
instead rewrote the previous entry. Hence, the dir_lookup always
contained list of only one compile_command per directory instead of all
compile_commands for given directory.
2019-02-04 16:50:46 -05:00
Francisco Lopes 626572a539 linter/cypher: add cypher-lint 2019-02-03 03:09:51 -02:00
Martino Pilia 771581a945
Add settings for the Alex linter
The executable for the Alex linter is currently hard-coded as 'alex',
which is an issue given the fact that it conflicts with the Haskell
lexer generator, whose executable is also called 'alex', has been around
a dozen years before the linter, and is packaged in the official
repositories of the major Linux distributions.

This commit adds options to use a local executable for the alex linter
(which is a node package), and an option to set a custom executable.

As side changes:
* The pattern in the alex handler is made more readable by turnig it
  into a very-magic regex.
* Alex handles plain text, markdown, and HTML. Specific flags for HTML
  and markdown are provided when instantiating the linters for the
  respective filetypes, while before those formats were treated as plain
  text.
2019-02-02 16:20:14 +01:00
w0rp 4d426bf287
Fix #2263 - detailed Flow errors should show the original message 2019-02-01 13:01:56 +00:00
Aiden Scandella de29ff26ff
Respect python black fixer configuration file
Similar to other linters/fixers, by default change to the directory of
the file being fixed before invoking `black`, which allows the tool to
read project-specific configuration (pyproject.toml)

Fixes #2218
2019-01-30 14:44:38 -08:00
w0rp 067601e9db
Set lint_file for the ameba linter 2019-01-27 16:16:22 +00:00
Harrison Bachrach 17a2f554e3 Add initial ameba (crystal linter) support (#2174)
* Add initial ameba (crystal linter) support

Note that this depends on saved file as `ameba` does not have STDIN
support

* Fix formatting of crystal linter documentation
* Add tests for ameba executable customization
2019-01-27 16:01:42 +00:00
w0rp 08d3523962
Merge pull request #2228 from Nomad145/ktlint
Add ktlint Fixer Support
2019-01-27 15:55:13 +00:00
petpetpetpet 3c38fdb1bb Extend statusline interface (#2240)
* Extended statusline.vim to provide an efficient way to access the first errors,warnings,stylerrors,stylewarnings,etc from the loclist.
* Added documentation and help for the new API function.
2019-01-27 12:44:49 +00:00
w0rp a7b3b84899
Merge pull request #2225 from ravicious/master
Pass --compiler flag to elm-test when linting 0.19 tests
2019-01-27 12:36:22 +00:00
TANIGUCHI Masaya 03b25dd39b Add textlint for tex (#2234) 2019-01-27 12:14:34 +00:00
w0rp 79135dfe13
Fix #2192 - Handle more ignore-pattern messages for ESLint 2019-01-27 12:08:39 +00:00
Attila Maczak d7ced31fe2 add cmake-format fixer support (#2244) 2019-01-27 11:45:57 +00:00
Niclas Åhdén e46c17e8ef SugarSS support from PR 1967 (#2219)
* sugarss support + bonus naming Sass correctly
* cleanup + alphabetic ordering
2019-01-27 11:42:11 +00:00
w0rp f03370e183
Merge pull request #2207 from pmacosta/master
Fixed parsing of pydocstyle errors
2019-01-27 11:01:14 +00:00
w0rp d882c434a1
Merge pull request #2215 from irwand/master
support older flake8 output, still used by hacking module from openstack style guide
2019-01-27 10:57:42 +00:00
w0rp 3ac12b6939
Fix #2216 - Tolerate versions without path numbers 2019-01-27 10:56:08 +00:00
w0rp dd995d9aa9
Merge pull request #2235 from erydo/stack-ghc-options
Add g:haskell_stack_ghc_options like …_cabal_ghc_…
2019-01-27 10:20:46 +00:00
Alvin Chan 6288c8b08e Use relative paths when previewing file locations (#2238)
* Use relative paths when previewing file locations

Example: ALEFindReferences -relative
2019-01-27 10:18:20 +00:00
John Gentile b8bf7b220d Add VHDL Support & Newer Verilog Linters (#2229)
* Added VHDL file support with ghdl compiler
* Update ghdl.vim
* Create vcom.vim
* Create xvhdl.vim
* Update xvlog.vim
* Added documentation for VHDL & Verilog linters
* Added tests to VHDL & Verilog linters
2019-01-27 09:46:33 +00:00
w0rp 91c1fc3bb3
Sort documentation entries alphabetically better 2019-01-27 09:32:39 +00:00
w0rp 20b9dfdb4a
Fix #2195 - Handle the command key being missing 2019-01-27 09:12:59 +00:00
w0rp 6e9040da75
Merge pull request #2131 from 0mco/master
Parse more C/C++ compiler options
2019-01-26 22:10:48 +00:00
w0rp 0a9dc7b4ba
Merge pull request #2245 from andrewimeson/adi/add-ksh-support
Add better ksh support
2019-01-26 22:04:29 +00:00
w0rp 6543d0e902
#2248 Mention tsserver as a JavaScript tool too 2019-01-26 22:02:21 +00:00
w0rp a47deeae40
Merge pull request #2250 from m-pilia/bandit
Add bandit linter for Python
2019-01-26 21:41:40 +00:00
w0rp 452460b8cd
Merge pull request #2241 from bk2204/lsp-detect-hook
Add a hook to detect LSP project root
2019-01-26 19:40:45 +00:00
w0rp cf14d0aa53
#2132 Unify temporary file management in command.vim 2019-01-26 19:33:52 +00:00
Martino Pilia 0a5de2b42b
Add bandit linter for Python 2019-01-26 11:48:03 +01:00
brian m. carlson 6fc016ad05
Add additional ways to detect LSP project root
Currently, we detect the linter root based on a variety of techniques.
However, these techniques are not foolproof. For example, clangd works
fine for many things without a compile_commands.json file, and Go
projects may be built outside of the GOPATH to take advantage of Go
1.11's automatic module support.

Add global and buffer-specific variables to allow the user to specify
the root, either as a string or a funcref. Make the funcrefs accept the
buffer number as an argument to make sure that they can function easily
in an asynchronous environment.

We define the global variable in the main plugin, since the LSP linter
code is not loaded unless required, and we want the variable to be able
to be read correctly by :ALEInfo regardless.
2019-01-26 04:46:41 +00:00
brian m. carlson 766636e0c4
test/lsp: ensure linter name is set
All linters should have a name variable set in their dictionary, and
code should be able to rely on that. Fix this test such that its example
linter contains a name entry.
2019-01-26 04:46:41 +00:00
Andrew Imeson a6de3f3727
Add better detection for KornShell/ksh 2019-01-24 14:14:49 -05:00
Andrew Imeson eec8b9da60
Fix test name for csh to not say zsh 2019-01-24 13:30:50 -05:00
Louis Xu 8037f472ef Parse more C/C++ compiler options 2019-01-24 09:44:52 +08:00
Robert Estelle e273f678ff Add haskell_stack_ghc_options like …_cabal_ghc_…
Adds new option `g:haskell_stack_ghc_options` which passes options to
`stack ghc`. This is implemented similiarly to
`g:haskell_cabal_ghc_options`.
2019-01-22 09:46:08 -05:00
Alvin Chan f12d312aa4 Add `babylon` as default Prettier parser (#2220)
* Mimic Prettier's default parser by setting it to `babylon`
* Add tests to check default Prettier `parser`
* Set Prettier default parser based on version
* Update the comment to explain the reason for an explicit default
2019-01-22 10:24:15 +00:00
Andrey Popp d0284f22ea Add textDocument/typeDefinition for LSP (#2226)
* Add textDocument/typeDefinition for LSP

Doc to spec https://microsoft.github.io/language-server-protocol/specification#textDocument_typeDefinition

This works like textDocument/definition but resolves a location of a
type of an expression under the cursor.

I'm not sure what to do with tsserver though.

* Fix passing column to LSP
* test_go_to_definition: wording
* Add tests for textDocument/typeDefinition
* Add docs for textDocument/typeDefinition
2019-01-21 23:06:28 +00:00
w0rp a4932679b5
Merge pull request #2224 from andreypopp/andreypopp/lsp-hover-fix-column
Adjust column to be 0-based for LSP messages
2019-01-21 21:11:02 +00:00
Andrey Popp bcf63eea96 Request LSP completion for the next col after the cursor 2019-01-21 23:19:47 +03:00
w0rp 37107df6f3
Merge pull request #2223 from andreypopp/andreypopp/lsp-diagnostics-end
End position in LSP range is exclusive
2019-01-21 19:59:38 +00:00
Andrey Popp c2e4b553d0 Update tests 2019-01-21 18:36:52 +03:00
Andrey Popp e960e54eca Update tests 2019-01-21 17:40:33 +03:00
Andrey Popp 2e85eed756 Fix ale#lsp#message#* to convert column to 0-based
This is what LSP specifies.
2019-01-21 17:40:33 +03:00
w0rp bffb26cb72
Merge pull request #2230 from yut23/master
Add support for pyls configuration options
2019-01-21 09:10:57 +00:00
yut23 f2db164268 Add support for pyls configuration options
Resolves #1443.
Heavily inspired by the analogous support added for elixir-ls.
2019-01-20 23:59:46 -05:00
Michael Phillips bd1e639681 Add ktlint fixer support. 2019-01-20 19:39:47 -06:00
Rafał Cieślak 9c0c6efbd0 Pass --compiler flag to elm-test when linting 0.19 tests
This makes elm make linter work when elm is not installed globally.
2019-01-19 22:22:10 +01:00
Andrey Popp d6d6fcf928 End position in LSP range is exclusive
From LSP spec:

> A range in a text document expressed as (zero-based) start and end
> positions. A range is comparable to a selection in an editor. Therefore
> the end position is exclusive.
2019-01-19 18:50:21 +03:00
Jason Kim 8b0879212f Improve location list behavior on split windows of same buffer. 2019-01-16 17:15:47 -08:00
Irwan Djajadi cdc3bc9238 added hacking compatibility test 2019-01-16 11:27:34 -06:00
Irwan Djajadi 08affaad7a support older flake8 output, still used by hacking module from open style guide 2019-01-16 10:59:05 -06:00
w0rp d1fc084b2d
Merge pull request #2209 from samzeng/patch-1
Fixed typo
2019-01-15 15:36:20 +00:00
Sam Zeng 6efa37d35b
Fixed typo 2019-01-15 23:06:51 +08:00
Pablo Acosta-Serafini 86af4be0d0 Fixed parsing of pydocstyle errors
ale#Escape function seems to prepend and append ' to the file name, which
are not present in the pydocstyle output. Having the parsing regexp match
the file name was overkill anyway, since there is an obvious 1:1
correspondence between the buffer number and the (potential) errors
reported by pydocstyle.
2019-01-14 20:36:14 -05:00
w0rp a50e049e74
Mention raco in the list of supported tools 2019-01-14 20:35:23 +00:00
Anthony Quizon d09e8bc99e Racket linting using raco (#2146) 2019-01-14 19:45:33 +00:00
w0rp c0b2090fbb
#2132 Move CreateTemporaryFileForJob calls into FormatCommand 2019-01-12 18:34:26 +00:00
hokorobi 7f176390fc Support textlint for reStructuredText (#1978)
* Support textlint for reStructuredText
* Add linter test for textlint rst
2019-01-12 14:40:03 +00:00
w0rp 56b7dca623
Fix flow tests on Windows 2019-01-12 14:36:07 +00:00
w0rp cbaa7eb3c7
Clean up bingo tests, so they pass on my machine too 2019-01-12 13:14:29 +00:00
w0rp 6644563949
#2132 Remove the need for the hidden add_newline option by tweaking the flow command 2019-01-12 13:14:29 +00:00
w0rp d8a53cc7a5
Merge pull request #2191 from davidvandebunte/fixCompDbDir
bugfix: c.vim: Pull build directory from compilation database
2019-01-10 18:59:13 +00:00
TANIGUCHI Masaya fabebb3a47 Add textlint for Asciidoc and add it to Fixers (#2193)
* Add textlint for asciidoc
* Add textlint --fix
2019-01-10 18:53:45 +00:00
w0rp 721183116e
Merge pull request #2194 from fx-carton/fix-cflags-parsing
Fix cflags parsing
2019-01-10 11:33:33 +00:00
François-Xavier Carton 7e7447bb93 Cflags: added a test case 2019-01-09 16:53:45 +01:00
François-Xavier Carton 4bbb10b46a Cflags parser: fix special chars matching algorithm 2019-01-09 16:53:36 +01:00
David VandeBunte 4f72023e16 bugfix: c.vim: Pull build directory from compilation database
The LLVM compiler database JSON already includes a directory where the
build was performed:
https://clang.llvm.org/docs/JSONCompilationDatabase.html

Prefer this directory for fixing relative paths in compiler include
arguments in ale#c#ParseCFlags.

Without this change, users cannot create a symlink to their compilation
database as suggested in the LLVM tooling setup instructions:
https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
2019-01-08 19:09:02 -06:00
w0rp f23811770a
Add briefer help tags for ALE development documentation 2019-01-08 14:40:26 +00:00
w0rp 84475ff6f1
Merge pull request #2189 from jeremija/jeremija/manual-autocomplete-wo-prefix
Manually trigger autocomplete even when prefix is ""
2019-01-08 14:27:04 +00:00
Jerko Steiner b1b05e6e66 Optimize ale#completion#Filter when prefix is "" 2019-01-08 15:10:03 +01:00
Jerko Steiner 9bcf8a2336 Manually trigger autocomplete even when prefix is "" 2019-01-08 12:57:17 +01:00
w0rp 1d7acad891
Merge pull request #2161 from guill/compile_database_perf
Improve perf for compile dbs in large projects
2019-01-08 09:29:07 +00:00
Jerko Steiner 0fcd5e79a9 Add ability to manually trigger completion menu (#2177)
* Add ability to manually trigger completion menu
* Mention :ALEComplete in completion docs
* Add test for ALEComplete
2019-01-07 17:55:55 +00:00
Jacob Segal cb0a5c7a36 Improve perf for compile dbs in large projects
When using a compilation database (compile_commands.json) in very large
projects, significant delays would occur when changing files --
particularly those that happened to be far down the db. Rather than
iterating over the whole list every time, we now build up a lookup table
based on the tail of the filename (and tail of the directory for
widening searches) and iterate over the much smaller list of compile
commands for files with the given name.

Test metrics (from compile_database_perf/test.sh) show a 90% performance
improvement -- from 25 seconds to 2.5 seconds per run.
2019-01-06 00:41:57 -08:00
Jerko Steiner 5bbe77101d Add support for bingo (#2165)
* Add support for https://github.com/saibing/bingo
* Add docs for ale-go-bingo
* Use go.mod when found
* Add test for bingo FindProjectRoot
* Simplify ale_linters#go#bingo#GetCommand
2019-01-05 19:12:55 +00:00
w0rp 4f3190daa8
Fix a test on Windows 2019-01-04 14:51:55 +00:00
w0rp 3b96ab43fb
Merge pull request #2176 from altaurog/feat/elm-tests
support tests/ with elm 0.19.0
2019-01-04 09:38:10 +00:00
Aryeh Leib Taurog 1f21eb0c42 fallback to elm if elm-tests isn’t available 2019-01-04 09:55:35 +02:00
Aryeh Leib Taurog 4a11a6337e fix: don’t use regex match
windows paths have backslashes, which are special in regex patterns
2019-01-04 09:55:35 +02:00
Aryeh Leib Taurog ba38688dff support tests/ with elm 0.19.0
With earlier elm versions, a separate package file is maintained for
tests, which when properly configured enabled the compiler to find what
it needed to compile the tests.  Under elm 0.19, test dependencies are
managed in the top-level package file, so `elm make` will fail on the
tests.  `elm-test make` is required in this case.

See https://github.com/elm-explorations/test/issues/64
2019-01-04 09:55:35 +02:00
Aryeh Leib Taurog bbf02d837e test elm-make changes to rootdir when elm.json is found
most projects will have an elm.json file (>= 0.19) or elm-package.json (< 0.19)
2019-01-04 09:55:35 +02:00
w0rp 08606b88d0
Clean up the new g:ale_shell code. Use it for Windows 2019-01-03 21:23:09 +00:00
w0rp 7919db0db5
Merge pull request #2167 from stegmanh/master
Add support for ale option to override default shell used by ale
2019-01-03 21:01:13 +00:00
w0rp 1b264b8662
Merge pull request #2168 from fx-carton/master
Fix CFLAGS & Makefile issues
2019-01-03 20:37:16 +00:00
w0rp 78724f4cd3
Fix some formatting issues 2019-01-03 20:33:59 +00:00
w0rp a1654cfb58
Merge pull request #1988 from mdtusz/pipenv-black
Add support for black usage with pipenv
2019-01-03 20:32:36 +00:00
Holden 5f613a5fd6 change ale to use value of g:ale_shell regardless of what it is 2019-01-02 19:05:51 -05:00
w0rp 1d87c844b0
Merge pull request #2173 from chaucerbao/feature/find-references-line-text
Add associated line text on ALEFindReferences results for TypeScript
2019-01-02 22:40:11 +00:00
Alvin Chan 5792bd6e29 Update FindReferences tests 2018-12-31 14:59:50 -07:00
Alvin Chan f534db1ef9 Replace `trim` with `substitute` for compatibility (Vim <8.0.1630) 2018-12-31 14:54:36 -07:00
Alvin Chan 24fda01a0e Add associated line text on ALEFindReferences results for TypeScript 2018-12-31 14:29:42 -07:00
François-Xavier Carton e5f33c6598 Add a test for cflags merging bug 2018-12-29 12:16:22 +01:00
François-Xavier Carton f7c4c403eb Fix CFLAGS parsing
Split by space instead of dash.
This prevents incorrect parsing where space-separated arguments are
merged (in particular, .c or .o files were appended to -I or -D
arguments).

Handle shell escape: quotes and escaped quotes \" and shell
substitutions are recognised. This is done by verifying that no special
character (" ' ` ()) has not a matching character.

Fixes #2049
2018-12-29 12:16:22 +01:00
Holden 8550fa6059 fix tests on windows 2018-12-28 12:51:01 -05:00
Holden 3ec20a730d address PR feedback by fixing docs and hardcoding bash to use -c on fish and pwsh environments 2018-12-28 12:35:57 -05:00
Holden c499825a0b add tests for ale_shell option 2018-12-28 11:58:55 -05:00
Miklós Tusz 48057407ec Fixup tests for auto-pipenv 2018-12-21 20:28:17 -08:00
Miklós Tusz 4bf260e953 Remove unnecessary exe check for black 2018-12-21 20:07:14 -08:00
Miklós Tusz 63e76875d5 Add test for python_black_auto_pipenv 2018-12-21 20:07:14 -08:00
Miklós Tusz 1c9ad77866 Add documentation for python_black_auto_pipenv 2018-12-21 20:07:14 -08:00
Miklós Tusz 6619e1ac53 Add auto_pipenv config for black
Added ability to set `python_black_auto_pipenv` to allow for usage
of a local pipenv black executable.
2018-12-21 20:07:14 -08:00
w0rp 73ca1e7191
Merge pull request #2150 from mvgrimes/perl-linter-data-fix
Update the perl-linter's l:pattern to catch missing errors
2018-12-20 16:22:10 +00:00
w0rp 5345a5dd81
Merge pull request #2141 from benjaminjkraft/master
Add versions of ALEGoToDefinition that open in splits
2018-12-20 16:15:57 +00:00
Ben Kraft 73a204dd00 Add versions of ALEGoToDefinition that open in splits
This is just like `:ALEGoToDefinitionInTab`, only a (v)split instead of
a tab.  Fixes #2140.
2018-12-19 18:35:56 -05:00
Mark Grimes c19f2aa302 Adds tests for perl-linter where a second file/line is included in error 2018-12-19 08:30:23 -05:00
w0rp f1ed654ca5
#2132 Change (buffer, lines) fixer functions to (buffer, done, lines) 2018-12-18 11:13:28 +00:00
w0rp 0e3778e335
Merge pull request #2153 from deltaskelta/gqlint-fix
changed gqlint to lint the file on disk
2018-12-18 10:19:59 +00:00
Jeff Willette e55d07cf6f changed gqlint to lint the file on disk
- added a cd into the direcotry containing the file in the buffer
  in order to properly check for a config file
- added command_callback tests for graphql
2018-12-18 18:59:02 +09:00
w0rp 9a3be907ea
Close #2152 - Use ale_javascript_standard_options for fixing files too 2018-12-18 09:28:55 +00:00
Mark Grimes ebab81b220 Use non-greedy matching instead of looking for the comma 2018-12-16 17:01:24 -05:00
w0rp 13060a3492
Merge pull request #2136 from hsanson/368-chktex-latex-report-errors-from-wrong-file
Fix 368 - Lacheck reports errors from input{} files.
2018-12-16 13:17:52 +00:00
Mark Grimes 38d25fc7c0 Update the perl-linter's l:pattern to catch missing errors
In some situations, errors reported by `perl -c` can have multiple
listings of "at <file> line <number>". If the l:pattern is changed to
use non-greedy matching it will also match these.

For example:
```
use strict;
use DateTime;
$asdf=1;
```

Results in:
```
Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?) at /Users/mgrimes/t.pl line 3, <DATA> line 1.
/Users/mgrimes/t.pl had compilation errors.
```

I am not 100% sure why `perl -c` generates errors with the extra "file
line <num>". It only happens in some versions of perl when certain
modules are used.
2018-12-14 17:13:49 -05:00
Horacio Sanson 5052eca5cb Add tests to lacheck linter 2018-12-11 23:44:06 +09:00
Justin Searls 2cfa09e02d Adds standardrb linter (#2133)
See: https://github.com/testdouble/standard

StandardRB is to RuboCop what StandardJS is to ESLint. This commit 
naively copies the RuboCop linter and fixer to point at the standardrb
executable. Any other adjustments are very minor (the only I can think 
of is that standardrb takes a `--fix` option instead of 
`--auto-correct`).

This raises a confusing point to me as both developer and a user: since
ale enables all linters by default, won't this run both RuboCop and 
StandardRB (the results of which will almost always be in conflict with
one another)? How does ale already solve for this for the similar case
of StandardJS and ESLint?
2018-12-10 14:02:32 -07:00
w0rp c899ff3523
Explain the .* .gitignore rule 2018-12-10 20:20:23 +00:00
w0rp 39c892eff4
#1520 - Add an :ALEDocumentation for tsserver 2018-12-10 20:08:28 +00:00
Horacio Sanson a6a8c90126 Fix 368 - Lacheck reports errors from input{} files.
This PR adds additional check to lacheck linter to exclude any warnings
related to sourced files via latex \input{} command.

Closes: #368
2018-12-10 23:39:51 +09:00
David LANDREAU c7292ce892 javac linter: fix handling of error messages containing ':' character 2018-12-09 18:22:50 +01:00
Holden 57a04701c3 Merge branch 'master' of github.com:stegmanh/ale 2018-12-07 18:05:20 -05:00
Holden cbc029b2b8 Add initial support for settings to overwrite ale shell 2018-12-07 18:04:28 -05:00
Gordon Fontenot 9226e13b31 Add support for Pod based SwiftLint (#2122)
It's common to add SwiftLint as a CocoaPod dependency, instead of as a global
binary. In this case we should use that version of SwiftLint before looking
for any others. Note that I'm also adding support for SwiftLint in ReactNative
projects here as well, where the Pods directory would be nested inside an ios
directory.
2018-12-07 15:20:58 -07:00
w0rp 3db564f774
Merge pull request #2061 from hsanson/1910-add-support-for-bibclean-fixer
Add bibclean fixer support
2018-12-06 20:26:04 +00:00
pmacosta fdd37acc1f Add support for pydocstyle linter (#2085)
The linter can correctly parse pydocstyle output with any of the following
command-line options enabled: --explain, --source, --debug, and/or
--verbose
2018-12-06 11:27:03 -07:00
Oskar Grunning 2760cf7018 refactor sasslint linter (#2077)
Previous implementation required one to have sass-lint globally. This
allows you to have it locally, override the executable and add options.
2018-12-06 11:23:31 -07:00
w0rp dc61d46e28
Merge pull request #2119 from hsanson/1994-fix-javalsp-support
Fix javalsp command.
2018-12-05 13:10:05 +00:00
Horacio Sanson 3346b200bf Fix javalsp command.
The command used to invoke the LSP process was being escaped wrong.

Also added a new option to set a different java executable and fixed the
documentation.
2018-12-05 21:53:39 +09:00
w0rp 92668b6beb
Merge pull request #2117 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2018-12-04 19:27:25 +00:00
The Gitter Badger b4bcbfcc3b Add Gitter badge 2018-12-04 19:26:17 +00:00
w0rp f4af9157e1
Make the suggestion about asking for help friendlier 2018-12-04 19:07:55 +00:00
w0rp 0d14380d8a
Do not wrap bug report lines 2018-12-04 09:42:37 +00:00
w0rp f2b353fa09
Fix a mistake with a link 2018-12-04 09:33:24 +00:00
w0rp 6f32f002e7
Revert "Merge pull request #2083 from zackhsi/scalac-until-jvm"
This reverts commit 1c89495d77, reversing
changes made to 4b4b09593b.
2018-12-03 20:39:10 +00:00
w0rp 9eda079e02
Typo 2018-12-03 20:30:24 +00:00
w0rp 146769c616
Tell people to ask for tech support outside of GitHub issues 2018-12-03 20:29:26 +00:00
Horacio Sanson 9e97a6914e Add bibclen fixer support
Closes #1910
2018-12-01 15:05:18 +09:00
Ryan 1d4f985538
Merge pull request #2110 from w0rp/lazy-clipboard
Optimize :ALEIntoToClipboard to only copy to clipboard once
2018-11-30 09:39:57 -06:00
Ryan 8176f79fa1
Merge pull request #1734 from sridhars/master
Add language server source in ALEDetail
2018-11-30 09:36:37 -06:00
Bjorn Neergaard d2b0ae8108 Merge branch 'master' into sridhars 2018-11-29 14:57:35 -07:00
Bjorn Neergaard ef641dda80 Add test for detail in lsp ReadDiagnostics 2018-11-29 14:51:01 -07:00
Bjorn Neergaard fcd5e18a99 Use single quotes to satisfy vint 2018-11-29 14:35:54 -07:00
Bjorn Neergaard 121ecf9262 Only set the unnamed register at the end of :ALEInfoToClipboard
This fixes performance problems in Neovim, where every character results
in spawning a new clipboard-tool process.

Behaviour is not similarly pathological in Vim, but it still results in
an unnecessary amount of register churn.
2018-11-29 13:48:17 -07:00
w0rp 0a384a49d3
Merge pull request #2096 from mgedmin/flake8-uses-vcols
flake8 reports visual columns
2018-11-28 09:49:31 +00:00
w0rp 7e28a61fac
Merge pull request #2104 from andys8/patch-1
Readme: Links for tsserver and cargo
2018-11-26 10:24:15 +00:00
Andy 44512bb8af
Readme: Links for tsserver and cargo 2018-11-25 16:52:32 +01:00
w0rp 51b6fa4aa2
Merge pull request #2103 from bfredl/ns
Don't hardcode the namespace id for virtual text
2018-11-25 14:05:39 +00:00
w0rp 6746cb3333
Fixing linter problems 2018-11-25 13:57:13 +00:00
Björn Linse d18511f322 Don't hardcode the namespace id for virtual text
This makes collisions with other plugins less likely.
2018-11-25 11:06:55 +01:00
lfree 2ab64514d0 php: change phpstan's --errorFormat to --error-format (#2005)
* php: change phpstan's --errorFormat to --error-format
* add version check to phpstan
2018-11-23 09:39:50 +00:00
Marius Gedminas a0baeec591 Fix unit tests 2018-11-22 12:09:45 +02:00
Marius Gedminas 9481f307fb flake8 reports visual columns
Fixes #2092.
2018-11-22 11:57:02 +02:00
w0rp ff0bd14efe
Merge pull request #2068 from m-pilia/ispc
Add linter for ispc
2018-11-21 16:44:59 +00:00
Martino Pilia 66212966dd
Add --nowrap to ispc options 2018-11-21 10:40:07 +01:00
w0rp a05a16b109
Merge pull request #2070 from meain/fixer-prettier-yaml
add yaml to registry for prettier
2018-11-19 20:22:35 +00:00
w0rp e74d43fb25
Fix #2084 - Disable mix by default, as it causes too many problems 2018-11-19 20:14:30 +00:00
w0rp 1c89495d77
Merge pull request #2083 from zackhsi/scalac-until-jvm
Continue scalac compilation until just before bytecode generation
2018-11-19 20:02:07 +00:00
w0rp 4b4b09593b
Merge pull request #2087 from m-pilia/ada
Add GCC linter for Ada
2018-11-19 19:36:32 +00:00
Martino Pilia d90673ab5b
Add GCC linter for Ada 2018-11-18 18:14:24 +01:00
Zack Hsi 1b779fbc08 Fix test 2018-11-17 13:02:16 -08:00
w0rp f538bb440a
Merge pull request #1907 from guill/compile_commands_fix
Fix bug where last C compile flag was ignored
2018-11-17 20:28:11 +00:00
Jacob Segal 1b3fa9828c Fix bug where last c flag was ignored
There is currently a check that tries to prevent c-flags that contain
'-' in them from being unintentionally split and included in the list of
commands. For example, we wouldn't want "-fno-exceptions " to appear as
"-fno" and "-exceptions ". The way this check was done was by making sure
the last character of the split string was a space.

This meant that the very last option to appear in the compile command
was ignored (as it doesn't end with a space). This fix explicitly skips
the ends-with-space check on the last option in the command-line.

This isn't the best fix. Really we should be using the same
argument-processing rules as a shell would rather than just splitting on
'-'. That's a much larger and more complicated change though.
2018-11-17 04:04:39 -08:00
Zack Hsi c25582076c Continue scalac compilation until just before bytecode generation
Previous behavior does not compile deep enough to surface errors.

See compiler phases:
https://docs.scala-lang.org/overviews/compiler-options/index.html#compilation-phases
2018-11-16 15:31:13 -08:00
w0rp 531868f759
Merge pull request #2079 from jeffkreeftmeijer/vale-asciidoc
Add Vale linter for AsciiDoc
2018-11-15 09:10:53 +00:00
Jeff Kreeftmeijer 7c73901199 Add Vale linter for AsciiDoc
Vale supports AsciiDoc. This patch adds a Vale linter for AsciiDoc
files, which is based on the existing Markdown linter.
2018-11-14 21:41:18 +01:00
w0rp dd7b2188ab
Add style highlights for virtualtext and document all of them 2018-11-14 16:44:53 +00:00
jamestthompson3 f64f9aba16 Add specific highlight groups for virtualtext (#2071) 2018-11-14 16:21:35 +00:00
w0rp 3948638dbe
Merge pull request #2069 from meain/fixer-prettier-html-tests
add tests for prettier-html
2018-11-12 18:33:16 +00:00
Abin Simon d045de2618 add yaml to registry for prettier 2018-11-12 12:43:08 +05:30
Abin Simon 1f4dbb82ec add tests for prettier-html 2018-11-12 12:28:34 +05:30
Martino Pilia 9e8f2b0840
Lint ispc on disk to solve include imprecisions 2018-11-12 00:54:24 +01:00
Martino Pilia 0b4507ed56
Add linter for ispc 2018-11-11 18:26:37 +01:00
w0rp d30da203b9
Merge pull request #2063 from languitar/better-checkstyle
Checkstyle improvements
2018-11-11 10:00:37 +00:00
w0rp 7dd460303d
Merge pull request #2060 from meain/fixer-pretty-html
Add prettier to html formatters
2018-11-11 09:57:48 +00:00
w0rp d1d5292178
Fix #2054 - Make golint configurable 2018-11-11 09:42:57 +00:00
w0rp b96105bebb
Merge pull request #2056 from luan/virtualtext
Add support for nvim's virtualtext on cursor
2018-11-11 09:17:53 +00:00
w0rp 6858b4a259
Merge pull request #2059 from jparise/test-elixir-paths
Remove test/command_callback/mix_paths/
2018-11-10 11:00:13 +00:00
w0rp 90f2875f29
Merge pull request #2053 from andreypopp/fix-ocamlformat-stdin-stdout
Make ocamlformat work without temporary files
2018-11-10 10:57:11 +00:00
w0rp f8d3ffb60e
Fix #1960 - Do not fix files on :wq 2018-11-10 10:06:56 +00:00
w0rp e4faf82cab
Enable ESLint for Vue files by default 2018-11-08 09:19:02 +00:00
Johannes Wienke 8e24a1a916 Let checkstyle only lint original files
Temporary files break checks like the one for a missing
package-info.java, as discussed in #1305.
2018-11-07 13:26:54 +01:00
Johannes Wienke 5d6b4ef73f Support older checkstyle versions
The output format used by older checkstyle versions differs from the one
of new versions. This commit adds a second parsing iteration on the
output lines with a suitable pattern to support both versions in
parallel. Due to the differences in the order of matching groups this is
hard to achieve in a single pass through the output lines.

An appropriate test case is added.
2018-11-07 13:25:48 +01:00
Luan Santos ba9b056a57
Fix info text
Removed ale_virualtext_prefix from debugging since it's not requried for
the functionality to work.
Sorted debugging info to make the list easier to navigate/diff.
2018-11-06 22:38:47 -08:00
Luan Santos 3ec09f7826
Document ale_virtualtext_delay 2018-11-06 22:36:37 -08:00
Luan Santos f58a5cba05
Move virtualtext handling to own file
This allows cursor and virtualtext to be independently autoloaded.
2018-11-06 22:31:35 -08:00
Abin Simon ed8104b6ab Add prettier to html formatters 2018-11-07 12:00:59 +05:30
Jon Parise dd7501ee48 Remove test/command_callback/mix_paths/
All of the other tests were already using equivalent fixtures under
test/command_callback/elixir_paths/, so let's use that path everywhere.
2018-11-06 14:01:12 -08:00
w0rp ad98cb7448
Merge pull request #2045 from jparise/elixir-ls-umbrella
elixir-ls now recognizes umbrella projects
2018-11-06 20:02:34 +00:00
w0rp 51341fbe36
Update the instructions for installing the tslint tsserver plugin 2018-11-06 19:57:36 +00:00
w0rp 25068de91d
Fix incorrect warning match
Co-Authored-By: luan <github@luan.sh>
2018-11-06 11:31:17 -08:00
Luan Santos c41dbe2ba9
Add support for nvim's virtualtext on cursor
- Add g:ale_virtualtext_cursor boolean to enable/disable it
- Add g:ale_virtualtext_prefix to configure what prefix to use (default:
'> ')
- Requires neovim 0.3.2's unreleased API `nvim_buf_set_virtual_text`
2018-11-05 22:45:40 -08:00
w0rp 945dd2fa26
Explain how to configure aliases better, especially for Vue 2018-11-05 13:19:24 +00:00
Andrey Popp b9fb62a4cd Make ocamlformat work without temporary files
Problem: ocamlformat is configured to format files in-place and thus go
via creating a temporary file for that. Because temporary file resides
in a different directory ocamlformat can't find `.ocamlformat`
configuration files in an original location of source files.

Solution: ocamlformat since version 0.8 can read sources on stdin and
spur result on stdout. We reconfigure ocamlformat to use a simpler
interface.
2018-11-04 20:32:56 +03:00
Jon Parise b25794e81b elixir-ls now recognizes umbrella projects
Previously, elixir-ls would treat each sub-project within an umbrella as
standalone, which isn't desirable from a language server perspective.

Added ale#handlers#elixir#FindMixUmbrellaRoot, which locates the current
project's root and then continues searching upwards for a potential
umbrella project root. This literally looks just two levels up to keep
things simple while keeping in line with Elixir project conventions.

Use this new function to determine elixir-ls's LSP project root.
2018-11-04 06:40:25 -08:00
w0rp acdc99b94d
Merge pull request #2051 from aclemons/ruumba
Add initial support for ruumba in eruby files.
2018-11-04 11:33:15 +00:00
Justin Howard 88d328739f Allow configuration of hamllint executable (#2048)
* Allow configuration of hamllint executable

The hamllint executable was hard-coded, preventing it from being
overridden. Fix the executable to be dynamic to allow custom executable
paths.
2018-11-04 10:35:21 +00:00
w0rp 9171791646
Merge pull request #2046 from tyru/fix-unmatched-quote
[Doc] Fix unmatched backquote in doc
2018-11-04 10:19:11 +00:00
w0rp 71bb62c858
Clean up a buffer variable in a test file 2018-11-04 10:15:41 +00:00
w0rp 6aab3fe209
Merge pull request #2044 from Steap/bug/1388
PHP linter: make the path to the executable configurable
2018-11-04 10:13:44 +00:00
w0rp 93180239b9
Merge pull request #2042 from jparise/elixir-ls-config
Add configuration dictionary support to elixir-ls
2018-11-04 10:10:25 +00:00
Andrew Clemons fa036ca72c Add initial support for ruumba in eruby files.
Ruumba provides RuboCop linting for ERB templates.

https://github.com/ericqweinstein/ruumba
2018-11-04 19:55:06 +13:00
tyru e3ca8831ea fix unmatched backquote in doc 2018-11-02 12:15:18 +09:00
Cyril Roelandt f34c089685 PHP linter: make the path to the executable configurable
Fixes #1388
2018-11-01 18:52:28 +01:00
Jon Parise 4bee0f1743 Add configuration dictionary support to elixir-ls
This adds generic configuration dictionary support to the elixir-ls
linter. This is useful for disabling its built-in Dialyzer support, for
example, which can improve startup time.

The configuration dictionary is a little verbose. I considered reducing
the user configuration to only the nested settings dictionary (and
having the linter implementation wrap it in the top-level `elixirLS`
dictionary), but leaving it fully configurable simplifies the code and
removes any assumptions about current or future ElixirLS behavior.
2018-10-31 10:32:48 -07:00
w0rp 4b841b5586
Fix the Windows tests 2018-10-31 16:25:04 +00:00
w0rp 5f206d900e
Merge pull request #2035 from jparise/lsp_config_callback
Add a `lsp_config_callback` linter option
2018-10-31 16:24:11 +00:00
w0rp 6212c22b5a
Add a bullet point about symbol search 2018-10-31 16:14:34 +00:00
w0rp 4ef2c81e95
Implement LSP symbol search 2018-10-31 16:13:31 +00:00
Jon Parise 2ac9e2a29e Only send LSP config updates when the dict changes
Each LSP connection now stores its configuration dictionary. It is
initially empty (`{}`) and is updated each time the LSP connection is
started. When a change is detected, the workspace/didChangeConfiguration
message is sent to the LSP servers with the updated configuration.
2018-10-31 08:42:42 -07:00
Jon Parise b5a7593577 Add a `lsp_config_callback` linter option
This is the callback-based variant of the existing `lsp_config` linter
option. It serves the same purpose but can be used when more complicated
processing is needed.

`lsp_config` and `lsp_config_callback` are mutually exclusive options;
if both an given, a linter preprocessing error will be raised.

The runtime logic has been wrapped in `ale#lsp_linter#GetConfig` for
convenience, similar to `ale#lsp_linter#GetOptions`.

This also adds documentation and an `AssertLSPConfig` test function for
completeness.
2018-10-31 08:42:42 -07:00
w0rp 20e4e3f9db
Merge pull request #2040 from leamingrad/jshint_filename
Pass the filename of the current file into jshint
2018-10-31 11:21:13 +00:00
James Owen 39fd7a0961 Add some basic callback tests for jshint 2018-10-31 11:48:52 +01:00
w0rp cdda96154e
Merge pull request #2031 from capjo/master
Do not enable all clang-tidy checks by default
2018-10-31 10:26:08 +00:00
w0rp 73f9f3da23
Merge pull request #2036 from maxhungry/fix-rubocop-fixer
Use correct exclusion flag in rubocop fixer
2018-10-31 10:15:48 +00:00
w0rp f01611464a
Tell people to write tests even more 2018-10-31 10:04:25 +00:00
James Owen f75848b32c Pass the filename of the current file into jshint 2018-10-31 10:17:55 +01:00
Max Hung be02ba4ed7 Use correct exclusion flag in rubocop fixer 2018-10-31 11:18:07 +13:00
w0rp 709788084f
Try to fix the tests on Windows 2018-10-30 20:55:35 +00:00
Andreas Hollmann ef7b4af917 Do not enable all clang-tidy checks by default 2018-10-30 11:46:53 +01:00
w0rp cae40e1c34
Fix a typo 2018-10-29 18:36:03 +00:00
w0rp caac5c93d6
#2017 Add support for display results from other sources 2018-10-29 18:28:28 +00:00
w0rp 2846e86217
#2017 Simplify lint cycles for supporting other sources later 2018-10-29 11:29:21 +00:00
w0rp 9dbebf1cb3
Merge pull request #2028 from capjo/master
Fix clazy tests
2018-10-29 09:42:29 +00:00
w0rp 70ea7a1338
Add a note about OmniSharp 2018-10-29 09:41:50 +00:00
Andreas Hollmann 4c14e6a5fd Fix clazy tests 2018-10-28 17:44:45 +01:00
w0rp 70f2873699
Merge pull request #2024 from jpowell/1580-rubocop-fixer-force-exclusions
Adds missing "s" on rubocop exclusion flag
2018-10-26 18:19:42 +01:00
Justin Powell 90048ac933 fix missing (s) on rubocop exclusion flag 2018-10-26 11:47:28 -05:00
Alexander "Ananace" Olofsson 7af33637e8 Add the dockerfile_lint linter for Dockerfiles (#1971)
* Add the dockerfile_lint linter for Dockerfiles
2018-10-26 17:34:32 +01:00
Takuya Fujiwara 34318aedf4 Add prolog swipl linter (#1979)
* add prolog/swipl linter

* use load_files/2 instead of read_term/2

Because it also checks some semantic warnings / errors
not only syntactic warnings / errors.

e.g.:
* singleton warning
* discontiguous warning
* ...

cf. http://www.swi-prolog.org/pldoc/doc_for?object=style_check/1

* support error messages with no line number

    :- module(module_name, [pred/0]).

causes

    ERROR: Exported procedure module_name:pred/0 is not defined

* add test for prolog/swipl handler

* cosmetic fixes

* detect timeout using SIGALRM

* rename g:prolog_swipl_goals to g:prolog_swipl_load

* write doc for prolog/swipl linter

* update toc and README

* fix ignore patterns
2018-10-26 17:29:17 +01:00
w0rp 3d74a4f8a6
Merge pull request #2023 from jpowell/1580-rubocop-fixer-force-exclusions
Add force exclusions flag to rubocop fixer
2018-10-26 17:16:50 +01:00
Justin Powell b7e0321890 closes #1580 add force exclusion to rubocop fixer 2018-10-26 10:40:02 -05:00
w0rp 86c035466b
Merge pull request #2022 from bengadbois/vim-plug-install-instructions
Add vim-plug installation instructions
2018-10-26 16:19:15 +01:00
Ben Gadbois 6c8e2f73f8 Add vim-plug installation instructions 2018-10-26 17:14:01 +02:00
w0rp adc914a675
Merge pull request #1999 from stevenharman/expand_filename_for_reek
Reek: --force-exclusion flag
2018-10-26 10:21:33 +01:00
Dan Aloni aa0203320b Rust checker: allow secondary spans to be ignored (#1696)
* Rust checker: allow secondary spans to be ignored
* test/handler/test_rust_handler.vader: Add tests for g:ale_rust_ignore_secondary_spans
2018-10-26 09:38:20 +01:00
w0rp 77aacf0c91
#927 Allow b:ale_linter_aliases to be set to a String 2018-10-26 09:22:52 +01:00
Steven Harman 9c3daf3a66 Respect configured excluded_paths 2018-10-25 16:29:29 -04:00
w0rp 320c74ce1a
Merge pull request #1958 from Garland-g/perl6
Add Perl6 support via 'perl6 -c'
2018-10-25 15:38:33 +01:00
w0rp 3e65e85178
Merge pull request #2016 from terryding77/master
fix: change google_java_format_* to java_google_java_format_*
2018-10-25 15:34:31 +01:00
Anthony Poon 02c0d5bcb9 Only run stack if a stack.yaml config is found (#1752)
* Only run stack if a stack.yaml config is found

It is necessary to check for a stack.yaml file to distinguish between
cabal-only projects or stack projects (which are also cabal projects
since stack is built on top of cabal).

* Test that stack is called if stack.yaml exists
2018-10-25 15:30:49 +01:00
w0rp 9bdd5771ef
Merge pull request #2018 from muglug/patch-1
Update Psalm to use LSP
2018-10-25 15:22:34 +01:00
w0rp b3829d043d
Merge pull request #2012 from paihu/fix-cdstring-win32-change-drive
Fix #2011 MS Windows, lint error when current drive and target file drive is different.
2018-10-25 14:24:56 +01:00
w0rp 68b5591299
Merge pull request #2015 from dsifford/dsifford-terraform
add terraform fmt fixer for terraform and hcl filetypes
2018-10-25 14:05:48 +01:00
Terry Ding 3ba9cad878 fix: change google_java_format_* to java_google_java_format_* for inject global variables according to doc/ale-java.txt 2018-10-24 20:10:31 +08:00
Derek P Sifford 395cabc22a fix failed test 2018-10-23 21:20:03 -04:00
Derek P Sifford 90695c5082 update README.md 2018-10-23 21:02:08 -04:00
Derek P Sifford e94a594e2e add terraform fmt fixer for terraform and hcl filetypes
See #1718
2018-10-23 20:44:31 -04:00
paihu d14db50c44 fix has('unix') equal 0 is windows. 2018-10-24 08:29:11 +09:00
paihu f4395f5b8c ale#path#CdString include ale#Escape 2018-10-23 23:20:27 +09:00
paihu bc3ccd6e04 fix indent 2018-10-22 23:42:50 +09:00
paihu 2ea83939a5 fix testcase 2018-10-22 22:59:06 +09:00
paihu 0261dd2f51 cmd.exe, LABEL must have prefix ':' but have not suffix ':' ( https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/goto ) 2018-10-22 22:58:11 +09:00
Daniel Welch 2000436dfd LSP configuration via didChangeConfiguration (#1852)
* adding LSP configuration via workspace/didChangeConfiguration
2018-10-22 13:24:46 +01:00
paihu eae3f70e75 fix CdString for MS Windows 2018-10-22 21:17:57 +09:00
Linda_pp f57ad883f2 Add support for `cargo clippy` (#2001)
* Add support for `cargo clippy`
* Add tests for cargo-clippy support
* Add an example to doc for how to configure ale_rust_cargo_use_clippy
2018-10-22 09:21:48 +01:00
Matt Brown 7fa0d3dcc4 Add tests for updated Psalm plugin 2018-10-19 16:31:12 -04:00
Matthew Brown 0ed07a9ef5
Update Psalm plugin to use LSP mode 2018-10-19 15:51:16 -04:00
w0rp 3bda132988
Merge pull request #1991 from alskdj21/ruby_solargraph_init_options
Expose ruby-solargraph's initialization options
2018-10-18 14:32:23 +01:00
ix5 b8359c1114 Allow custom executable for ansible linters (#1977)
* Allow custom executable for ansible linters
* Add ansible-lint tests
* ansible-lint: simplify linter command
* Rename linter "ansible" to "ansible_lint"
* Add ansible-lint options to documentation
* Add alias ansible-lint for ansible_lint
2018-10-18 09:19:27 +01:00
w0rp 3b38a83ae9
Tell people to turn the completion option on before loading ALE 2018-10-18 09:11:06 +01:00
Auri be21aa5cda New linter: dls (#1992)
* New linter: dls
2018-10-17 16:11:41 +01:00
w0rp d999eb1f35
#1970 Explain how to configure mouse hovering better 2018-10-15 18:01:49 +01:00
Kim Joseph S. Sadomia cc1aece1e0 Rename solargraph initialization option variable 2018-10-12 18:16:28 +08:00
Aliou Diallo b7ec11c93d Allow custom filters for the jq fixer (#1980)
* Allow the jq filters to receive custom filters.
* Update documentation.
2018-10-12 09:15:32 +01:00
Kim Joseph S. Sadomia 12409fa73d Expose ruby-solargraph initialization options 2018-10-12 13:03:06 +08:00
w0rp e5b5ce9f51
Merge pull request #1956 from jparise/elixir-ls
Add elixir-ls language server support
2018-10-11 21:43:58 +01:00
Jon Parise 7eae781291 Add elixir-ls language server support
ElixirLS (https://github.com/JakeBecker/elixir-ls) is an LSP server for
Elixir. It's distributed as a release package that can be downloaded
from https://github.com/JakeBecker/elixir-ls/releases or built locally.

The easiest way to start it is via Unix- and Win32-specific helper
scripts, so that's the basis of this command integration. Alternatively,
we could implement the contents of those platform-specific scripts in
the linter's command callback in a language-neutral way, but there isn't
any benefit to doing that aside from eliminating the platform check, and
that could prove to be too tight of a coupling going forward.
2018-10-11 08:31:12 -07:00
Linda_pp 87986520d6 Fix E523 on asynchronous truncated echo (#1987) 2018-10-11 15:01:27 +01:00
Filip Vavera 3dd2d9dedd Fix Credo message types (#1963)
* Add more Credo message types
* Add tests
2018-10-11 10:00:10 +01:00
Matteo Centenaro bf1ac8e822 FIX: use mix from the project root directory (#1954)
* FIX: use mix from the project root directory
* Move find root project function to autoloaded handlers
* add tests for #ale#handlers#elixr#FindMixProjectRoot
2018-10-10 17:19:47 +01:00
w0rp ea49cc759f
Link to my site, so people can find it easily 2018-10-05 12:08:56 +01:00
Travis Gibson adad9a21ab Fix crashes with incomplete errors 2018-10-03 14:13:34 -07:00
w0rp e984497ec9
Merge pull request #1964 from dlresende/master
Fix PMD not working with classes without package
2018-10-03 17:09:21 +01:00
Diego Lemos 607750eb02 Fix PMD not working with classes without package
PMD is currently not working properly for Java classes that use [unnamed
packages](https://docs.oracle.com/javase/specs/jls/se11/html/jls-7.html#jls-7.4.2).

Consider the following Java class that does not contain a `package`
declaration:

```java
public class App {
  String getGreeting() {
    return "Hello world.";
  }

  static void main(String... args) {
    System.out.println(new App().getGreeting());
  }
}
```

Running PMD in the command line agaist the Java class above produces an
output with empty string `""` in the `"Package"` column:

```sh
$ pmd -R category/java/bestpractices.xml -f csv -d './src/main/java/App.java'
Oct 02, 2018 9:10:39 PM net.sourceforge.pmd.PMD processFiles
WARNING: This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/pmd-6.7.0/pmd_userdocs_incremental_analysis.html
"Problem","Package","File","Priority","Line","Description","Rule set","Rule"
"1","","/Users/diego/Projects/github.com/dlresende/kata-fizz-buzz/src/main/java/App.java","2","7","System.out.println is used","Best Practices","SystemPrintln"
```

But the pmd.vim handler's current pattern refuses everything coming
from a Java class that does not have a package name (2nd column):
```vim
let l:pattern = '"\(\d\+\)",".\+","\(.\+\)","\(\d\+\)","\(\d\+\)","\(.\+\)","\(.\+\)","\(.\+\)"$'
```

The solution I am proposing is to also accept empty strings as package names.
2018-10-02 21:34:11 +01:00
w0rp ab3646862c
Update the bug reporting template 2018-10-02 11:28:13 +01:00
w0rp 5960a9ae4b
Encourage people to write tests even more 2018-10-02 11:23:23 +01:00
w0rp 04ed87c882
Merge pull request #1955 from eborden/eborden/mising_hlint_executable_var
Remove test vars that cover bug
2018-09-29 11:25:37 +01:00
Travis Gibson 2b2e766dc6 Add Perl6 support via 'perl6 -c' 2018-09-28 16:18:40 -07:00
Evan Rutledge Borden eae8ffafb8 Set global vars in hlint linter file. 2018-09-28 13:54:21 -04:00
Evan Rutledge Borden 2a56475cf7 Remove test vars that cover bug
These test vars were covering up a bug in the hlint linter
implementation. Without these vars we can see the behavior that is
exhibited in `vim` proper.
2018-09-28 11:37:40 -04:00
Evan Borden a8915d885b Add better support for Haskell stack compiler tools (#1851)
* Add better support for Haskell stack compiler tools

This commit adds support for `stack` as the executable of a tool. This
follows a pattern that has been implemented for `bundler`'s tool chain.

* Move hlint command to linter file
* Add vader test for stack exec handling
* Update ghc-mod to support stack execution

`ghc-mod` was previously broken into 2 linters.

1. ghc_mod
2. stack_ghc_mod

This additional linter is not necessary with proper support for
executable variables and `stack exec` handling.

* Support stack exec in hfmt
* Support stack in hdevtools
2018-09-28 09:05:01 +01:00
w0rp a26b3319a1
Merge pull request #1950 from yejingchen/ccls
Add ccls support for C/C++/ObjC
2018-09-28 09:02:00 +01:00
Ye Jingchen 8891b7c349 Move ccls functions to autoload/ale/handler
Tests are kept as-is.
2018-09-28 03:26:57 +08:00
w0rp fd0467f992
Merge pull request #1917 from jpsouzasilva/fix-stylelint-scss
Support options when using Stylelint with SCSS
2018-09-27 16:54:17 +01:00
Richard Marmorstein 947360f714 Add psalm linter for PHP (#1893) 2018-09-27 16:48:47 +01:00
Ye Jingchen 17676f6a6d Add missing files for ccls test 2018-09-26 23:17:19 +08:00
Ye Jingchen 626e47f5c9 Add ccls tests 2018-09-26 22:50:43 +08:00
w0rp 58ceb21cbc
Merge pull request #1908 from KtorZ/master
Allow extra options to be passed to haskell:hlint
2018-09-26 15:38:15 +01:00
Ye Jingchen 56658fd3ad Add ccls support for C/C++/ObjC 2018-09-26 20:09:37 +08:00
w0rp 143c3cd09f
#1941 Explain how to alleviate a timeoutlen Vim bug by changing settings 2018-09-25 10:17:45 +01:00
Bert JW Regeer 8e7e810db6 Bugfix: python add blank lines (#1944)
* Don't add newlines when not a control statement for Python
* Add test for accidental newline fix
* Add docstring detection to avoid adding unnecessarily newlines
* Add tests for docstring detection
2018-09-25 10:02:01 +01:00
w0rp aa5c82b171
Merge pull request #1932 from rhysd/shfmt-default-indent
shfmt: Use Vim's indent config as default indent width
2018-09-20 09:30:59 +01:00
w0rp 560749cf9e
Merge pull request #1939 from elebow/fix-typo-solargraph-docs
Fix typo in Solargraph documentation
2018-09-20 09:28:48 +01:00
w0rp 1900b76005
Fix #1938 - Set a default value for an undefined variable 2018-09-20 08:28:51 +01:00
Eddie Lebow a59f5776fa Fix typo in Solargraph documentation 2018-09-19 21:59:15 -04:00
w0rp 169a6e26b2
Merge pull request #1719 from elebow/auto-pipenv-option-for-python-linters
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
2018-09-19 19:46:13 +01:00
Martin Tournoij e82bcdb8a6 Add fixer for Go modules (#1873)
* Add fixer for Go modules
2018-09-19 19:33:23 +01:00
w0rp a6c6e24d61
#1872 Remove extra carriage returns when fixing files on Windows 2018-09-19 19:28:57 +01:00
w0rp 9d50a06d48
Merge pull request #1937 from danielwe/master
Support both old (<0.7) and new Julia versions
2018-09-19 15:40:10 +01:00
Daniel Wennberg d50e603177 Support both old (<0.7) and new Julia versions
Closes #1931
2018-09-19 07:34:11 -07:00
w0rp b278927102
Merge pull request #1924 from fenuks/prospector-url-fix
Update prospector tool URL
2018-09-19 13:24:40 +01:00
w0rp 6bbbb9456c
Merge pull request #1926 from gnustomp/master
c#ParseCFlags: don't index empty list
2018-09-19 13:22:43 +01:00
w0rp e5b920e387
Merge pull request #1934 from meunierd/solargraph-stdio
Support Solargraph stdio
2018-09-19 13:12:41 +01:00
w0rp 993f02ad80
Merge pull request #1928 from felipesere/master
To avoid blocking build tools, suspend ALE when suspending vim
2018-09-18 17:46:45 +01:00
w0rp 213a901ccd
Stop tsserver from causing errors to be rendered redundantly 2018-09-18 17:43:17 +01:00
Devon Meunier 4025030d86
Solargraph stdio 2018-09-18 11:20:29 -04:00
rhysd 532686102e shfmt: Use Vim's indent config as default indent width 2018-09-18 17:51:00 +09:00
KtorZ bd32b7c856
Add command_callback tests to cover hlint config variables 2018-09-18 08:25:49 +02:00
KtorZ d84fcf6c3c
Define custom vim global variables to pass options to hlint 2018-09-18 08:25:41 +02:00
James Ye 3c067941f1 add test for arguments with '--' 2018-09-18 10:59:26 +10:00
Felipe Sere f09e6d638f
Test that we CleanupEveryBuffer when vim supports it 2018-09-17 21:26:25 +01:00
w0rp ddb3e6d57a
Handle failing to connect to eslint_d 2018-09-17 17:32:57 +01:00
Felipe Sere cbf0568061
Join the ALECleanupGroup and ensure we don't run cleanup if ale.vim isn't loaded 2018-09-17 15:50:04 +01:00
w0rp a4a4bba884
Merge pull request #1927 from jparise/thrift-includes-default
thrift: default thrift_thrift_includes to ['.']
2018-09-17 11:21:30 +01:00
w0rp f9e99d81a4
#1794 - Handle LSP documentation content as a Dictionary 2018-09-17 11:16:46 +01:00
w0rp 1a13963f0d
Merge pull request #1925 from elebow/fix-markdown-error-in-readme-solargraph
Fix markdown error in README solargraph entry
2018-09-17 09:48:02 +01:00
w0rp 0b163ec656
Fix the Julia languagserver linter for Julia 0.7 2018-09-17 09:16:41 +01:00
Jon Parise b7fcec4d17 thrift: default thrift_thrift_includes to ['.']
In a lint context, it's useful to assume that included files sit next to
the current file by default. Users can still further customize this
configuration variable to add more include paths.
2018-09-16 08:21:18 -07:00
Felipe Sere fba4cfeae9 To avoid blocking build tools, suspend ALE when suspending vim 2018-09-16 15:57:13 +01:00
James Ye 87743faf2a c#ParseCFlags: don't index empty list 2018-09-16 22:57:43 +10:00
Eddie Lebow 24e26b419a Fix markdown error in README solargraph entry 2018-09-15 22:14:01 -04:00
Eddie Lebow dbe9352935 Add `python_auto_pipenv` config var for all python linters.
This allows a user to set one variable instead of eight.
2018-09-15 22:10:46 -04:00
Eddie Lebow 56e67c5811 Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.

Defaults to false.

I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:

diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction

" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
-    return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+    let l:cd_string = ale#path#BufferCdString(a:buffer)
+    let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+    " `pipenv --where` returns the path to the dir containing the Pipfile
+    " if in a pipenv, or some error text otherwise.
+    return strpart(l:output, 0, 18) !=# "No Pipfile present"
 endfunction

Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-09-15 22:10:46 -04:00
fenuks 21ac9bdcaf Update prospector tool url in README 2018-09-15 16:51:11 +02:00
w0rp f1f2a22228
Merge pull request #1921 from rrosenblum/ruby_linters
Fix bug with RuboCop linter when options are not set
2018-09-14 18:46:29 +01:00
jpsouzasilva 9bbea8b830 Add tests for assuring the SCSS stylelint options work 2018-09-14 13:32:42 -03:00
Ryan Rosenblum a55b8d10b0 Fix bug with RuboCop linter when options are not set 2018-09-14 12:30:28 -04:00
w0rp 0868cb769d
Merge pull request #1906 from ngavalas/autocomplete-trigger-prefix
fix non-. prefix triggers overfiltering results
2018-09-14 13:32:25 +01:00
w0rp 7f1c411b5e
Merge pull request #1850 from rrosenblum/ruby_linters
Update all Ruby linters to work consistently with bundler
2018-09-14 13:27:07 +01:00
w0rp b01470cbbc
Test for bundle paths with spaces again 2018-09-14 13:26:29 +01:00
w0rp 5c86ffd321
Return only the unescaped executables from executable callbacks 2018-09-14 13:24:59 +01:00
w0rp 43d7e8fde9
#1889 Add support for automatically previewing messages based on the cursor position 2018-09-14 12:42:26 +01:00
w0rp f380d8508e
Merge pull request #1919 from saschagrunert/patch-1
Change PCRE escape to simple escape
2018-09-14 11:41:47 +01:00
Sascha Grunert c48106f484
Adapt tests 2018-09-14 10:47:33 +02:00
Sascha Grunert 96e25d471c
Change PCRE escape to simple escape 2018-09-14 10:41:35 +02:00
jpsouzasilva 5901e1a879 Support options when using Stylelint with SCSS
Complement missing documentation
2018-09-13 08:51:33 -03:00
Ryan Rosenblum 9e09b7ca35 Update all Ruby linters to work consistently with bundler 2018-09-12 16:53:28 -04:00
Nick Gavalas b4513fc4b0 fix non-. prefix triggers overfiltering results 2018-09-12 15:47:57 -04:00
w0rp 78af99c256
Merge pull request #1905 from ngavalas/tsserver-classname-fix
Fix tsserver `className` responses
2018-09-11 16:16:18 +01:00
Nick Gavalas 44070d8a45 fix tsserver className parsing 2018-09-11 10:56:58 -04:00
w0rp 99e9417ef9
Add support for Julia Language Server (#1894) 2018-09-10 17:24:04 +01:00
w0rp bfba216e61
Merge pull request #1900 from McSwaggens/master
Fixed NASM linter from outputting junk file
2018-09-10 09:24:35 +01:00
w0rp f00435e356
Merge pull request #1899 from blueyed/typo
doc: fix typo in ale-rust.txt
2018-09-10 09:21:01 +01:00
Daniel Jones 150015d0dc Fixed NASM tests 2018-09-10 09:23:47 +10:00
Daniel Jones 8bbf1425bf Fixed NASM linter from outputting junk file 2018-09-10 08:17:44 +10:00
Daniel Hahler f516cac47c doc: fix typo in ale-rust.txt
[ci skip]
2018-09-09 23:34:27 +02:00
Bartolomeo Stellato 169e4b67d3 Added julia to the list in ale-support docs 2018-09-09 14:47:55 -04:00
Bartolomeo Stellato 6e7b7b23e5 Updated readme 2018-09-09 14:18:15 -04:00
Bartolomeo Stellato 97ed25a8bf Escape julia command + reorder table in README 2018-09-09 10:09:05 -04:00
w0rp 0948dcc435
Merge pull request #1897 from LEI/add-sqlfmt-fixer
Add support for sqlfmt
2018-09-09 11:55:42 +01:00
w0rp 395aba19c3
Merge pull request #1885 from dsifford/dsifford-fixer-uncrustify
add uncrustify fixer for several languages
2018-09-09 11:30:30 +01:00
Bartolomeo Stellato b3adf241c3 Fix other warnings 2018-09-08 16:05:34 -04:00
Bartolomeo Stellato 91bb948b90 Try to fix CI 2018-09-08 14:11:11 -04:00
LEI a97ef49c51
Add support for sqlfmt 2018-09-08 01:34:10 +02:00
Derek P Sifford 6e4dccc0e0 really fix lint errors 2018-09-07 15:28:51 -04:00
w0rp 0ae4ea23c8
#1888 Support names with minuses in Clojure and Lisp 2018-09-07 19:27:42 +01:00
Bartolomeo Stellato 68ac4d1095 Fix julia escaping + minor edits 2018-09-07 14:13:44 -04:00
Bartolomeo Stellato f64f0bb48c Added tests 2018-09-07 13:16:22 -04:00
Bartolomeo Stellato df72c5f1c1 Added various files to integrate julia. Still not working. 2018-09-07 11:11:29 -04:00
Derek P Sifford 9ba2d209a8 fix lint test failures 2018-09-06 21:59:03 -04:00
w0rp e0fe97e0a8
Merge pull request #1883 from hsanson/add-solargraph-yml-to-root-path-search
Add solargraph.yml file as root path search file.
2018-09-06 20:34:34 +01:00
Sascha Grunert 7b62a15739 Add golangci-lint (#1890) 2018-09-06 20:31:12 +01:00
w0rp 580bd36773
Fix #1800 - Enable non-blocking writes where available 2018-09-06 20:04:35 +01:00
w0rp 7086769289
#1891 Fix the go-langserver tests 2018-09-06 17:05:05 +01:00
w0rp f1d5bcbf98
Merge pull request #1870 from hsanson/1822-add-go-langserver-support
Fix #1822 - support go-langserver lsp.
2018-09-06 14:50:00 +01:00
w0rp f8beaa9e3e
Fix #1866 - Handle empty output from Perl 2018-09-06 09:23:36 +01:00
Horacio Sanson a9333c2866 Fix #1822 - support go-langserver lsp. 2018-09-06 13:46:59 +09:00
Derek P Sifford 0ed4a5bbcc add uncrustify fixer for several languages 2018-09-04 20:39:32 -04:00
Horacio Sanson 044c762c85 Add solargraph.yml file as root path search file.
Solargraph allows to set configuration options by creating a
.solargraph.yml file at the root of the project using it. Therfore this
file is a good canditate for finding ruby projects root paths.

Initial discussion:
  https://github.com/w0rp/ale/issues/1874#issuecomment-418316168
2018-09-05 07:12:04 +09:00
w0rp d476578a40
Improve ALE project style checking
* The project style linter now runs while you type.
* Now the scripts for checking the project require blank lines.
* Many style issues have been found and fixed.
2018-09-04 16:51:18 +01:00
w0rp 8f2e1c393f
Merge pull request #1871 from Ophirr33/master
added sbtserver linter
2018-09-04 11:22:57 +01:00
w0rp 43b04d4e5b
Fix the dart language server command and cover it with tests 2018-09-04 11:15:59 +01:00
w0rp 87f125ddcf
Merge pull request #1882 from jacobmischka/master
Replace removed function in dart#language_server
2018-09-04 11:12:44 +01:00
Jacob Mischka 24486fa628
Replace removed function
Replaces removed `ale_linters#dart#language_server#GetExecutable`.

Fixes #1881
2018-09-03 19:23:03 -05:00
w0rp fddbfdef12
#1875 Do not lint and so on when an operator is pending 2018-09-03 13:59:56 +01:00
w0rp a746ea2bfc
#1875 - Do not echo cursor messages when keys are pending 2018-09-03 11:41:54 +01:00
w0rp c1f0956d9b
Merge pull request #1869 from Steap/feature/gitlint-ignore-whitespace
gitcommit: fully implement warn_about_trailing_whitespace
2018-09-03 11:27:19 +01:00
Ty Coghlan 3d016f1697 Changed sbtserver to just work off of the address variable 2018-09-01 21:03:29 -04:00
Ty Coghlan 8e3bf10592 added sbtserver linter 2018-08-30 22:10:38 -04:00
Bartolomeo Stellato 8bf5d144ed Started adding julia languageserver 2018-08-30 15:40:04 -04:00
Cyril Roelandt 244c5a8ce5 gitcommit: fully implement warn_about_trailing_whitespace
Fixes #1761
2018-08-30 03:42:44 +02:00
w0rp ea01cc708b
Merge pull request #1865 from TheLocehiliosan/puppet-options
Support options for puppet parser validate
2018-08-29 14:22:01 +01:00
Tim Byrne ed26ddc09c
Always use --color=false when validating puppet
Colorized output is difficult for ALE to parse.
2018-08-29 07:15:03 -05:00
w0rp ee3142b601
Merge pull request #1866 from Steap/feature/xmllint-fixer
Add support for xmllint as a fixer.
2018-08-28 23:36:00 +01:00
w0rp 79f02fce69
Merge pull request #1856 from sbl/ocamlformat
add ocamlformat support
2018-08-28 23:28:30 +01:00
w0rp d4ce201cc2
Merge pull request #1849 from hsanson/1848-add-support-for-java-lsp
Add vscode-java-language-server linter
2018-08-28 22:53:11 +01:00
Cyril Roelandt cc5ad6491f Add support for xmllint as a fixer. 2018-08-28 23:43:52 +02:00
w0rp 09e43ab16b
Merge pull request #1847 from hsanson/1846-support-solargraph-lsp
1846 support solargraph lsp
2018-08-28 21:52:18 +01:00
w0rp 339930ad68
Fix #1859 - Make the connection ID available on the connection object 2018-08-28 10:18:37 +01:00
w0rp b6112aedc3
Merge pull request #1861 from dimbleby/goto-definition-column
Fix out-by-one error in column on goto-definition
2018-08-28 10:11:44 +01:00
Tim Byrne 6212d9a515
Update TOC for ale-puppet-puppet 2018-08-27 13:12:56 -05:00
Tim Byrne 192f211a0e
Support options for puppet parser validate
It can be necessary to pass options to the puppet parser validation. The
most glaring example of this is when using Puppet 3, with the
`parser = future` option enabled. This update allows adding
`--parser=future` to the options passed to Puppet.
2018-08-27 12:59:38 -05:00
David Hotham aef11cc0d2 Fix out-by-one error in column on goto-definition
Fixes #1860
2018-08-27 13:53:40 +01:00
Horacio Sanson 1980245b94 Add solargraph LSP linter. 2018-08-27 10:58:17 +09:00
Horacio Sanson 261c29c3d0 Add vader test and fix command callback. 2018-08-26 22:11:36 +09:00
Horacio Sanson 228aee71a5 Add java lsp linter to documentation 2018-08-26 22:11:04 +09:00
sbl b7169c33e7 fix tests 2018-08-26 13:59:55 +02:00
sbl aa015ec4db add ocamlformat support 2018-08-26 13:47:56 +02:00
w0rp 3c85c7ef65
Sort the HTML documentation sections 2018-08-24 13:24:42 +01:00
w0rp adc038f327
Merge pull request #1839 from filipekiss/feature/stylelint-inline-css
Add Stylelint as HTML Linter
2018-08-24 13:20:37 +01:00
w0rp c4eca7c417
Use one LSP connection per project 2018-08-24 13:16:58 +01:00
Filipe Kiss c253fb72e3
📚 Add html stylelint to TOC 2018-08-24 08:43:19 -03:00
fenuks 9d7c48038c
Add clazy as cpp linter 2018-08-24 10:52:33 +01:00
w0rp 08d141edfb
Fix #1844 - Make the kotlin languageserver linter work again 2018-08-24 10:41:33 +01:00
w0rp 1f26fc4013
Merge pull request #1841 from dabbeg/fix-importjs-fixer
importjs fixer not reading correct executable variable name
2018-08-24 10:31:18 +01:00
Davíð Guðni f526fc68d1 importjs fixer not reading correct executable variable name 2018-08-24 09:04:17 +00:00
Horacio Sanson 3afff5a24c Add vscode-java-language-server linter 2018-08-24 16:28:15 +09:00
Evan Borden 707b539969 Add hlint refactoring as a fixer (#1836) 2018-08-23 23:23:54 +01:00
Evan Borden 2600524274 Add stylish-haskell as a fixer (#1837)
* Add stylish-haskell as a fixer

`stylish-haskell` is a common formatting tool for the haskell toolchain.
It is not as advanced as `brittany` or `hindent`, but it is commonly
used for formatting of imports and data declarations. This adds it as a
fixer in ALE.
2018-08-23 23:14:59 +01:00
w0rp 81d0eccfab
Merge pull request #1835 from barreyra/master
Enabling clangd for cpp, objc and objcpp
2018-08-23 22:54:11 +01:00
w0rp 7c10249c52
Merge pull request #1820 from SuRaMoN/master
Added phpcs options support as described in #257
2018-08-23 22:42:45 +01:00
w0rp c2f7b379ee
Merge pull request #1842 from kjagiello/patch-1
Fix case typo in the documentation
2018-08-23 22:34:12 +01:00
w0rp 774c02552f
Merge pull request #1840 from Carpetsmoker/gopath
Remove "go env" from gobuild linter
2018-08-23 22:33:01 +01:00
Krzysztof Jagiełło aba4160553
Fix case typo in the documentation 2018-08-23 20:24:47 +02:00
Bruno R. Barreyra 795122a042 Enabling clangd for cpp, objc and objcpp 2018-08-23 05:58:06 +02:00
Martin Tournoij 18ec66bd21
Remove "go env" from gobuild linter
I see no reason to do this? It is just setting the environment to what
it already is?

It was originally added in #297, but that entire PR is not a great idea
in the first place; that PR (together with #270) tried to make the Go do
non-standard and non-supported stuff like compiling packages outside of
GOPATH.

That's not something that works well (I tried), so was eventually
removed in #465, but these "go env" calls remained, for no reason in
particular, as far as I can think of.

This will improve on #1834; you will now no longer get a confusing error
(but still won't get a meaningful error; need to think how to do that).
2018-08-23 00:42:19 +01:00
Filipe Kiss 935a132d8f
📚 Add docs for html stylelint 2018-08-22 19:00:42 -03:00
Filipe Kiss b78ee18898
Add html stylelint test 2018-08-22 19:00:42 -03:00
Filipe Kiss 4cd20b821f
Add html stylelint linter 2018-08-22 19:00:41 -03:00
w0rp a366d325a7
Merge pull request #1815 from fredemmott/lsp-related-information
If present, use new-ish LSP 'relatedInformation' field for :ALEDetail
2018-08-20 16:59:21 +01:00
matthias f82ab76833 Added and fixed tests 2018-08-18 20:59:35 +02:00
w0rp 61a0716837
Use &l:equalprg so local options do not override global ones 2018-08-17 10:10:49 +01:00
matthias 02fdfcda58 Added phpcs options support as described in #257 2018-08-16 16:44:41 +02:00
w0rp ad8b260519
Fix #1816 - Fix a type error in the initialize message handler 2018-08-16 14:19:12 +01:00
w0rp faaa11567a
Merge pull request #1818 from tyru/add-go-govet-options
Add ale_go_govet_options variable
2018-08-16 14:10:21 +01:00
tyru 88ffdb4736 feat: add ale_go_govet_options variable 2018-08-16 11:36:46 +09:00
Fred Emmott 4923d48d53
Correct related information line numbers from 0-based to 1-based 2018-08-15 14:46:57 -07:00
Fred Emmott 764da48c57
Test file was the wrong way around 2018-08-15 14:40:51 -07:00
Fred Emmott c467db3ed9
Better formatting 2018-08-15 14:31:30 -07:00
Fred Emmott 484a70f0c0
Use new-ish LSP 'relatedInformation' field for :ALEDetail 2018-08-15 14:19:32 -07:00
w0rp 9cdd8b67b2
Stop creating closure function in global scope by using partials instead 2018-08-15 00:20:47 +01:00
w0rp 5323f000aa
Explain * for fixers in the README better 2018-08-13 11:38:43 +01:00
w0rp 04b25c8ee2
Merge pull request #1809 from nrhodes91/readme-global-fixers
Update README with the `*` ft option for the fixers object
2018-08-13 11:33:56 +01:00
w0rp 4179177830
Try again 2018-08-13 11:31:54 +01:00
w0rp a034364994
#1808 Try to explain the color scheme for the example GIF 2018-08-13 11:31:32 +01:00
Nick Rhodes cc114e2d0a Include info about `*` being a fallback
The `*` filetype is just fallback, and will be overridden by specific
filetype matches.
2018-08-12 10:10:39 +01:00
w0rp a88a6d5285
Merge pull request #1806 from jimenezrick/fix-rustc-linter
Fix #1684: Use the correct flag name in rustc linter
2018-08-12 09:41:36 +01:00
Nick Rhodes c898d5d130 Update README with the `*` ft option for the fixers object
It wasn't immediately obvious that the `g:ale_fixers` cannot be a list,
and would allow the use of `*` to match all filetypes. I was hoping to
add a bit more detail to the README to make this clearer.
2018-08-12 08:03:53 +01:00
Ricardo Catalinas Jiménez db003a4361 Fix #1684: Use the correct flag name in rustc linter
The rust compiler renamed the option '-Z no-trans' to '-Z no-codegen'.

https://github.com/rust-lang/rust-enhanced/issues/281
2018-08-10 21:50:52 +01:00
w0rp 6167f75628
Merge pull request #1802 from flybayer/fix-prettier-d
Don't use error output from prettier_d for fixing files
2018-08-10 18:28:38 +01:00
w0rp a56e801567
Merge pull request #1793 from kodemeister/cquery
Use .cquery file to detect the project root
2018-08-10 18:23:55 +01:00
w0rp e9086dd55c
Revert "#1459 Always run ESLint in the directory of the file being checked"
This reverts commit 634bf73f52.
2018-08-10 11:49:17 +01:00
Brandon Bayer 63c66dc5d2 fix: Don't use error output from prettier_d for fixing files 2018-08-09 12:56:53 -04:00
w0rp 634bf73f52
#1459 Always run ESLint in the directory of the file being checked 2018-08-09 08:51:27 +01:00
kodemeister 0702e4699e Add blank lines to conform the coding standards 2018-08-09 09:06:30 +06:00
kodemeister cc84c19451 Add C/C++ tests for cquery LSP linter 2018-08-09 09:02:16 +06:00
w0rp fc94fd4deb
Use lambdas for LSP message callbacks, which are easier to manage 2018-08-08 20:08:51 +01:00
Peter Benjamin 8faa11752c Add prettier as a YAML option (#1789)
* Add prettier as a yaml fixer

* Sort yaml fixers alphabetically

* Add prettier to doc/ale.txt

* Add ale-yaml-prettier

* Add ale-yaml-prettier to the TOC
2018-08-08 18:48:28 +01:00
w0rp 7179f92e44
#925 Tell people not to use the tslint linter 2018-08-08 11:17:32 +01:00
w0rp 1a4456cf2a
Merge pull request #1797 from bradlarsen/master
Additionally adjust the jumplist with line numbers when opening a new file
2018-08-07 21:57:12 +01:00
Bradford Larsen 8a9b28daf9 Update tests in response to changes in #1797. 2018-08-07 16:51:23 -04:00
Bradford Larsen 6f2d868baf Update tests in response to changes in #1797. 2018-08-07 16:41:12 -04:00
Bradford Larsen 023ade872e Adjust the jumplist with line numbers too when opening a new file
This further addresses Issue #1758.
2018-08-07 16:10:36 -04:00
kodemeister 212e3b0b2f Use .cquery file to detect the project root 2018-08-07 01:39:04 +06:00
w0rp 5f5540c574
Merge pull request #1787 from polyzen/doc-lsp-completions
doc: LSP can provide completions
2018-08-06 10:18:05 +01:00
Daniel M. Capella 5ed99734bd
doc: LSP can provide completions 2018-08-05 01:42:16 -04:00
w0rp 03973c0d09
Explicitly disable ALE for NeoVim versions below 0.2.0 2018-08-04 07:52:34 +01:00
w0rp fa30d90221
Merge pull request #1783 from dimbleby/yang-lsp
Add support for yang-lsp
2018-08-03 21:52:48 +01:00
David Hotham d0e3302253 Add support for yang-lsp 2018-08-03 21:13:48 +01:00
w0rp 209cd54783
Fix #1781 - Fix me breaking the tsserver linter 2018-08-03 17:22:09 +01:00
w0rp fefb8efff8
Merge pull request #1778 from fredemmott/hhast-perf
Tell HHAST to only look at open files
2018-08-03 09:12:12 +01:00
w0rp 41178425ab
Fix the Windows tests 2018-08-03 01:00:39 +01:00
w0rp 73d8c3b80a
Only run the custom ALE linting script if it's in runtimepath 2018-08-03 00:56:49 +01:00
w0rp 65880fec78
Add a linter for checking ALE code itself 2018-08-03 00:42:15 +01:00
w0rp 217284360d
Simplify the code for most linters and tests with closures 2018-08-02 23:44:12 +01:00
Fred Emmott e3c81911d6
Tell HHAST to only look at open files
Given ALE only cares about open files, this has no observable change,
except for significantly reduced resource usage.
2018-08-02 14:23:03 -07:00
w0rp 9ef266d050
Merge pull request #1770 from fredemmott/hack
Split Hack out from PHP, modernize
2018-08-02 21:58:57 +01:00
Fred Emmott a728f074f7
Disable HHAST by default
it executes $PROJECT/vendor/bin/hhast, so that's not a good idea.
2018-08-02 13:50:56 -07:00
w0rp 94270402cb
Fall back on flags for other C/C++ files in the same directory 2018-08-02 21:48:56 +01:00
w0rp ccbdfcd76f
Include the error in the detailed error message in the GCC handler 2018-08-02 21:45:16 +01:00
Fred Emmott de6cd961a8
Suggested changes 2018-08-02 12:59:04 -07:00
Luxed 6b3086237a Add Haskell IDE Engine (hie) support (#1735)
* Adding support for haskell-ide-engine
* Work with the current directory if no stack.yaml file is found
* Added Cabal file detection, updated documentation and added tests
* Updated help
2018-08-02 20:24:58 +01:00
Paul Reimer cb8ad9fbd8 Javascript prettier filetype detect fix (#1769)
Support fixing YAML and HTML files with prettier for files without file extensions.
2018-08-02 20:20:19 +01:00
Fred Emmott e6bd4373f9
coding style 2018-08-02 11:44:17 -07:00
w0rp 649934230b
Fix the failing tsserver test 2018-08-02 19:32:57 +01:00
Fred Emmott 5ff4e27e17
Update suggested filetypes for hackfmt 2018-08-02 11:28:57 -07:00
Fred Emmott 238201805d
Split Hack out from PHP, modernize
fixes #1738

- Replace previous `hh_client` usage with LSP client
- Add `HHAST` linter
- Split Hack from PHP: Hack is increasingly diverging from PHP:
  - Hack tools do not understand PHP
  - Most PHP tools do not handle Hack code well (including vim's syntax
    highightling files)
  - http://github.com/hhvm/vim-hack now sets filetype to `hack`
2018-08-02 11:28:56 -07:00
w0rp 5f024eda09
Merge pull request #1771 from fredemmott/lsp
Show LSP diagnostic codes for `%code%` in message formats
2018-08-02 19:22:45 +01:00
Fred Emmott 04362c746d
Add test for LSP code of -1 2018-08-02 09:30:22 -07:00
Fred Emmott e722841fa3
Improved documentation for `code` loclist item field 2018-08-02 09:24:45 -07:00
Fred Emmott 2768bf15ba
Handle LSP codes for `%code%` in message formats
fixes #1767
2018-08-02 09:06:48 -07:00
w0rp 589c8dbd94
Merge pull request #1776 from tmc/master
python: add lookup path for flake8 config
2018-08-02 13:01:04 +01:00
Travis Cline 2ac9e454d6
python: add lookup path for flake8 config 2018-08-01 20:07:11 -07:00
w0rp 3aa5e0f9dc
Add a type check for the error data from LSP servers 2018-08-01 23:01:30 +01:00
w0rp c1fee3f23a
Merge pull request #1774 from polyzen/rust-runtime-docs
doc/rust: rust.vim distributed w/ Vim>=8.0.0501
2018-08-01 21:02:41 +01:00
w0rp 9a389b564c
Merge pull request #1775 from polyzen/patch-1
contrib: Fix link to ale-development.txt
2018-08-01 21:02:06 +01:00
Daniel M. Capella 3e8ae65278
contrib: Fix link to ale-development.txt 2018-08-01 18:13:07 +00:00
Daniel M. Capella ab5e44249d
doc/rust: rust.vim distributed w/ Vim>=8.0.0501
3c2881dc11
2018-08-01 12:54:47 -04:00
w0rp 399a0d3c98
#1700 - Mention how to work around the completeopt bug in the documentation 2018-07-31 20:34:37 +01:00
w0rp 16d0c52d24
Indicate that a C compiler failed due to problems in a header file 2018-07-30 20:09:43 +01:00
w0rp 1e6b1d9be2
Try to fix the C parsing test on Windows 2018-07-29 19:30:12 +01:00
w0rp ac4bac8ea4
Add support for parsing compile_commands.json files for C compilers 2018-07-29 19:24:27 +01:00
w0rp a7b8cb4fe3
Mention v:t_TYPE variables in the developer documentation 2018-07-27 09:18:09 +01:00
w0rp daab1a08db
#1700 - Try using a 0ms timer showing the completion menu 2018-07-26 23:08:38 +01:00
w0rp f8e61ff907
Merge pull request #1762 from actionless/vulture-doc
mark `vulture` as file linter
2018-07-26 14:51:16 +01:00
actionless eb38c4b3f1 fix(linters: python): mark as lint_file 2018-07-26 14:45:28 +02:00
actionless c2cfe2326d doc: mark `vulture` as file linter 2018-07-26 14:41:13 +02:00
Yauhen Kirylau 8517e901ff Add support for 'vulture' for Python 2018-07-26 08:41:27 +01:00
w0rp 79ffdde267
Merge pull request #1757 from jtalowell/master
Providing cquery support for C files
2018-07-25 21:07:19 +01:00
w0rp c52fffcd47
Merge pull request #1760 from morrifeldman/patch-1
Fix joker finding .joker file in project root
2018-07-25 21:05:45 +01:00
morrifeldman 845e588b71
Fix joker finding .joker file
Add --working-dir option so joker can find a .joker file in the project root directory.
2018-07-25 15:53:02 -04:00
w0rp 0012c78b02
#1700 - Temporarily change completion options when the feedkeys() keybind is fired 2018-07-25 20:13:59 +01:00
w0rp 4ed35f7247
Fix #1758 - Set marks before going to definitions 2018-07-25 19:43:25 +01:00
w0rp c4cb1c7050
Merge pull request #1539 from JonnyRa/jump-list-fix
set marks to add to jump list
2018-07-25 19:41:00 +01:00
jtalowell c57b031876 Providing cquery support for C files 2018-07-25 14:23:13 +10:00
w0rp 06132954b1
Switch to v:t_ variables for type checks 2018-07-25 01:27:28 +01:00
w0rp 9f8c37e17c
Ignore a shellcheck warning for custom linting rules 2018-07-25 00:41:26 +01:00
sridhars 4446cf15be
Merge pull request #1 from w0rp/master
update
2018-07-24 16:42:26 -05:00
w0rp 3418574770
Update the developer documentation 2018-07-24 10:11:14 +01:00
w0rp d368f090ae
#1754 Require snake_case names for linters in the codebase 2018-07-24 10:05:44 +01:00
w0rp 95be2bf1ff
Try Vim 8.0 and 8.1 in separate jobs 2018-07-23 22:37:53 +01:00
w0rp d7d54d09da
Try 3 builds on Travis CI 2018-07-23 22:33:03 +01:00
w0rp 338c233710
Split Vim and Neovim tests into separate builds 2018-07-23 22:28:22 +01:00
w0rp 9ade656661
Just remove the .git directory test for now 2018-07-23 22:22:19 +01:00
w0rp 44397dd6db
Skip the one failing test on Windows 2018-07-23 22:21:13 +01:00
w0rp 2a861dfd40
Make the test C import path test fail less 2018-07-23 22:03:28 +01:00
w0rp d9579dbbe9
Get tests to pass in Vim 8.1 2018-07-23 20:41:48 +01:00
w0rp 11339ca730
Merge pull request #1745 from sharils/master
Work around hot-reloading issue again
2018-07-23 15:04:55 +01:00
sharils e3749c4a75
Fix autoload for phoenix
When dializer isn't a dependency, mix dialyzer recompiles the whole
project because it's not possible to know if this command dialyzer exist
or not until recompilation is done. Then the timestamps of the project
is messed up which results in broken hot-loading. In this case, mix help
dialyzer would return zero which prevents compilation of the whole
project since dialyzer isn't installed, it's help manual doesn't exist.

When dialyzer is a dependency, mix dialyzer would just run the command.
In this case, mix help dialyzer would return 1 which allows mix dialyzer
to run.
2018-07-23 21:43:59 +08:00
w0rp f6d18a0b10
Skip tests for Vim 8.1 for now 2018-07-23 10:45:22 +01:00
w0rp 7bf3a749d0
#1751 Handle LSP completion results without the 'kind' attribute 2018-07-23 10:21:09 +01:00
w0rp 3e4db9ed5c
Make the completion events test fail less 2018-07-22 22:42:41 +01:00
w0rp 0e71e8b465
Update the Dockerfile to test with a newer version of Vimt too 2018-07-22 22:35:49 +01:00
w0rp 846bfb47b2
Remove the redundant fix_buffer_data vars and filename variables 2018-07-22 22:31:46 +01:00
w0rp 81a8c77d20
#1692 - Only send completion requests to the first server supporting them 2018-07-22 21:14:56 +01:00
w0rp 9c849da8c4
Merge pull request #1751 from melentye/master
Add Clangd language server support for C
2018-07-22 20:55:01 +01:00
Andrey Melentyev 9b4963847d Add Clangd language server support for C 2018-07-22 21:22:38 +02:00
w0rp 6dc737cda1
Check LSP capabilities before using them 2018-07-22 19:04:55 +01:00
w0rp 899b61c5cc
Merge pull request #1750 from kylef/kylef/apib-tmp
Make drafter linter use stdin instead of writing to tmp file
2018-07-22 17:07:47 +01:00
Kyle Fuller f937b98e27 Make drafter linter use stdin instead of writing to tmp file
Writing to a tmp file is unnecessary as drafter will use stdin if a path
is not provided.
2018-07-22 16:32:39 +01:00
w0rp baa44bb3a7
Merge pull request #1742 from typetetris/master
Add cabal-ghc linter
2018-07-22 14:12:23 +01:00
w0rp 8980591937
Move README.md back 2018-07-22 12:16:56 +01:00
w0rp 8062d6207e
Revert "Update the tests to check README.md in the new location"
This reverts commit 6c10be8992.
2018-07-22 12:16:42 +01:00
w0rp 6c10be8992
Update the tests to check README.md in the new location 2018-07-22 12:15:15 +01:00
w0rp 014c924630
Move GitHub files to the .github directory 2018-07-22 12:10:35 +01:00
w0rp 04fbea6e80
Merge pull request #1736 from unpairedbracket/master
Add support for Fortran language server by @hansec
2018-07-20 21:05:24 +01:00
w0rp 0d37aaac7a
Fix #1631 - Disable balloon support for terminals by default 2018-07-20 16:10:25 +01:00
Eric Wolf ac6bc6d0ae Add cabal-ghc linter
cabal-ghc calls ghc via cabal exec and so ghc has access to packages
in cabal sandboxes for example
2018-07-20 16:48:27 +02:00
Ben Spiers ad986a8d82 Add the .fortls file necessary for tests to work (defying .gitignore) 2018-07-19 22:37:06 +01:00
Ben Spiers e8bea510df Add documentation and testing for fortls 2018-07-19 22:27:47 +01:00
w0rp 61a5880747
Capture server capabilities from LSP servers 2018-07-19 21:15:05 +01:00
Ben Spiers 324838adae Add support for Fortran language server by @hansec 2018-07-19 18:47:37 +01:00
w0rp 27f1915745
Capitalize Language Server Protocol 2018-07-19 17:06:39 +01:00
w0rp dfa38ff0dd
Make LSP support more prominent in the README 2018-07-19 17:00:29 +01:00
Sridhar Srinivasan 0da4c6e4ad Add language server source in ALEDetail (2) 2018-07-18 22:12:56 -05:00
Sridhar Srinivasan 0c4606651f Add language server source in ALEDetail 2018-07-18 21:44:05 -05:00
w0rp 5453e0e1a4
Fix #1708 - Don't modify linters or register fixers in the sandbox 2018-07-17 21:39:50 +01:00
w0rp 7952ebe77e
#1700 - Don't send <C-x><C-o> for completion in Insert mode 2018-07-17 19:39:45 +01:00
w0rp a01fab2ee6
Fix #1619 - Rewrite lint on enter events so they behave better 2018-07-17 00:18:34 +01:00
w0rp 37df1f8ceb
#1700 - Stop handling completion results if you leave insert mode 2018-07-16 17:57:07 +01:00
w0rp aa54c10bae
Try to make tests pass on Windows again 2018-07-16 14:18:50 +01:00
w0rp 2a081e81db
Try and make the temporary file test fail less on Windows 2018-07-16 14:03:08 +01:00
w0rp f235c4b3b9
Make NeoVim 0.3 tests fail a bit less 2018-07-16 13:46:44 +01:00
w0rp 8b707b4cdc
Add a missing ToC entry for remark-lint 2018-07-16 13:34:30 +01:00
w0rp b413e03b69
Merge pull request #1730 from watagashi/local-remark-lint-with-new-test
Support remark-lint installed locally with new test
2018-07-16 13:32:26 +01:00
Takashi WADA dbf051e62b remark-lint without saving to disk 2018-07-16 18:33:22 +09:00
Takashi WADA f369aa65a2 Support remark-lint installed locally 2018-07-16 18:33:21 +09:00
w0rp fcd62342d5
Only temporarily replace TMPDIR if it's defined to be an empty string 2018-07-16 08:45:55 +01:00
w0rp 6e1a5d4189
Stop the no loclist clearing test from failing in NeoVim 0.3 2018-07-15 23:19:11 +01:00
w0rp b2e2bbd042
unlet $TMPDIR too, where we can 2018-07-15 23:04:50 +01:00
w0rp d9e12cb047
Re-run history tests, which can fail randomly 2018-07-15 21:20:56 +01:00
w0rp d3ed1e52ba
Fix #1687 - Parse highlights when verbose > 0 2018-07-15 21:01:00 +01:00
w0rp 72f002de94
Update the Python documentation 2018-07-15 19:26:45 +01:00
w0rp 8141ced0d0
Merge pull request #1724 from randrej/master
Pipenv virtualenv and project path detection
2018-07-15 19:22:48 +01:00
MTDL9 5df735555c Add kotlin language server support (#1725)
* Add kotlin languageserver linter definition
* Added kotlin languageserver references in docs, fix missing !! on other linters
* Added Vader tests for root path detection in Kotlin Language Server
2018-07-15 18:54:18 +01:00
w0rp a42999a639
Massively reduce the amount of code needed for linter tests 2018-07-15 18:28:28 +01:00
Andrej Radovic 976c048e6e Detect Python proj. roots by Pipfile
"Pipfile" and "Pipfile.lock" files are also often located in Python module or
package directories and their presence is an okay heuristic for finding project
roots.
2018-07-14 13:26:50 +02:00
Andrej Radovic 870e75eb64 Added the default local virtualenv name for Pipenv.
Pipenv doesn't do local virtualenvs by default, it uses a special local
directory to store them all.

However, if you run Pipenv with the PIPENV_VENV_IN_PROJECT environment variable
set to 1, it creates the virtual environment in the root of the project, under
the name ".venv". This is why I've added this as a possible virtualenv dir
name.
2018-07-14 13:24:46 +02:00
w0rp 5155a35a80
Retry the smoke test on Windows too 2018-07-13 09:53:07 +01:00
w0rp a782e06223
Handle linter callback functions being unknown or deleted 2018-07-13 09:47:26 +01:00
w0rp 6d6cd6663e
Merge pull request #1720 from MTDL9/fix-error-response-string-data
Fix E712 error in ale#lsp#response#GetErrorMessage when receiving string primitives in the error.data field
2018-07-13 09:30:54 +01:00
MTDL9 021f59b3f4 Support strings in data field of error responses 2018-07-13 06:42:28 +02:00
w0rp d22b9bf1a6
Try to start the NeoVim 0.3 tests more times 2018-07-12 14:02:38 +01:00
w0rp ac0abc7c1f
Fix #1716 - Replace tempdir() with a wrapper to preserve TMPDIR 2018-07-12 13:05:59 +01:00
w0rp 6ef31073dd
Remove an unused variable 2018-07-12 09:21:28 +01:00
w0rp 0de3d24338
Try the smoke test a few times over in NeoVim 0.3, which fails randomly 2018-07-11 13:46:13 +01:00
w0rp c9a6b04dc7
Update the sandbox test now that functions can be defined in the sandbox 2018-07-11 13:36:59 +01:00
w0rp c1a2aa27f3
Merge pull request #1697 from ananace/add-puppet-languageserver
puppet: Add puppet-languageserver linter
2018-07-07 12:08:14 +01:00
w0rp 4999ad7e78
Add an AssertLinter command for tests 2018-07-06 22:46:36 +01:00
w0rp 344e0fec97
Fix tests on Windows 2018-07-06 20:52:47 +01:00
w0rp 6b20c906b3
Merge pull request #1703 from jamestthompson3/master
Add flow-language-server
2018-07-06 20:44:32 +01:00
jamestthompson3 eda3878a6c Add flow-language-server 2018-07-06 21:24:19 +03:00
w0rp cb8643ce74
Remove an outdated note from the documentation 2018-07-06 08:20:48 +01:00
w0rp 1e9b36cdbf
Fix tests on Windows 2018-07-06 08:15:54 +01:00
w0rp 0dd356aa52
Fix the broken tests 2018-07-06 01:00:30 +01:00
w0rp d5b4f6f7e7
Fix command formatting for LSP linters 2018-07-05 21:48:47 +01:00
w0rp da692b2e2d
Support formatting escaped executable names into commands with %e 2018-07-05 20:56:31 +01:00
Alexander Olofsson f78db619d4 Clean up root detection for puppet languageserver 2018-07-05 21:35:51 +02:00
Alexander Olofsson 9ca133feb0 Start of vader tests for puppet root detection 2018-07-05 21:25:03 +02:00
w0rp f002c2c9f0
Merge pull request #1699 from ananace/add-vue-vls
vue: Add the Vue 'vls' Language Server (#1296)
2018-07-05 19:08:20 +01:00
Alexander Olofsson fd42e8e935 vue: Add the vls language server linter 2018-07-05 14:04:20 +02:00
w0rp d49daeb816
Merge pull request #1698 from dsifford/dsifford-isort-options
add options variable to isort
2018-07-05 09:25:16 +01:00
w0rp b8591e1034
Fix the doctag alignment 2018-07-05 09:24:57 +01:00
Derek P Sifford 6dc69b2144 address code review issues 2018-07-04 21:16:57 -04:00
w0rp 14025c725f
Optimise ale#Set slightly 2018-07-05 00:40:15 +01:00
w0rp 13a8f9c061
Optimise ale#Var a little 2018-07-04 23:54:14 +01:00
Derek P Sifford 3251d95a91 add options variable to isort 2018-07-04 13:01:16 -04:00
Alexander Olofsson 42ae06a288
puppet: Add puppet-languageserver linter 2018-07-04 15:08:25 +02:00
w0rp 9ddf1b6a05
Make the language option for LSP linters optional 2018-07-04 13:12:58 +01:00
w0rp 00a3859304
Fix how Docker images are pulled for developers 2018-07-04 09:36:37 +01:00
w0rp ca7fa31c61
Close #1690 - Respect the preview setting for completeopt 2018-07-04 08:52:18 +01:00
w0rp db85b931ec
Remove deprecated code for the 2.0 release 2018-07-04 08:36:34 +01:00
w0rp 602e7fa00f
#1524 Avoid loading cursor code until engine code has been loaded 2018-07-03 21:14:00 +01:00
w0rp e10e0934ab
Automatically retry running Vader tests so Travis CI will fail less 2018-07-03 20:50:56 +01:00
w0rp 1d8b326f62
Revert "Add a failing test to test re-running tests in AppVeyor"
This reverts commit 1565859eae.
2018-07-03 19:59:40 +01:00
w0rp 1565859eae
Add a failing test to test re-running tests in AppVeyor 2018-07-03 19:56:37 +01:00
w0rp 7ce919e690
Re-run Windows tests when they fail at least once 2018-07-03 19:53:40 +01:00
w0rp 25a03dcea1
Use the latest Docker image for tests 2018-07-03 19:21:58 +01:00
w0rp 73d3030cf1
Merge pull request #1691 from dsifford/dsifford-python-pyre
add pyre lsp linter to python linters
2018-07-03 08:31:01 +01:00
w0rp 4987946175
Enable verbose test output, to figure out why NeoVim 0.3 randomly fails 2018-07-03 01:52:18 +01:00
w0rp e46474ac0a
Close #830 - Implement LSP connections via TCP sockets 2018-07-03 01:41:46 +01:00
w0rp 5aba55bb86
#830 Make the LSP socket code so far use the new socket API 2018-07-03 00:30:26 +01:00
w0rp 01c68fedd6
#830 Implement a socket wrapper API for use with LSP connections 2018-07-02 23:49:47 +01:00
Derek P Sifford 20ed48352f add dummy pyre binary and executable 2018-07-02 18:49:12 -04:00
Derek P Sifford 09a53fb363 add command_callback test 2018-07-02 18:23:42 -04:00
w0rp b637b35ea8
Delete misplaced issue template files 2018-07-01 20:51:34 +01:00
w0rp ce7d648c7c Update issue templates 2018-07-01 20:50:50 +01:00
w0rp 8ac43b1936 Update issue templates 2018-07-01 20:50:29 +01:00
w0rp 1c5c4a4c8e
Split the issue template into multiple files 2018-07-01 20:41:52 +01:00
w0rp 059c5cfca4
Fix a false positive linting issue 2018-07-01 20:37:32 +01:00
Derek P Sifford 23394bf4a5 add pyre to table in doc/ale.txt 2018-07-01 15:14:13 -04:00
Derek P Sifford ea6d720fec add pyre lsp linter to python linters 2018-07-01 14:59:49 -04:00
w0rp 2a78401066
Close #1685 - Move developer documentation to a help file 2018-07-01 19:56:24 +01:00
w0rp d456ac19ca
Fix a typo in the documentation 2018-07-01 19:56:24 +01:00
Govind KP 9d98e6db0c Added dartfmt fixer (#1683)
* Added dartfmt to Fixers
* Added dartfmt specific documentation
2018-07-01 13:55:41 +01:00
w0rp 06f61eeeb8
Respect ale_warn_about_trailing_whitespace for yamllint 2018-07-01 13:49:40 +01:00
w0rp e5e14de9ae
Capture error codes for yamlllint 2018-07-01 13:15:12 +01:00
w0rp fee5107d43
Add tests for the yamllint handler 2018-07-01 12:50:46 +01:00
w0rp cd8dd099d8
Switch back to running everything in one build, which is twice as fast 2018-07-01 12:22:29 +01:00
w0rp 857a07f36a
Try running tests in parallel again 2018-07-01 12:18:42 +01:00
w0rp 26aa0cf358
Try splitting up the build into separate jobs 2018-07-01 12:07:54 +01:00
w0rp 3c5b6d1825
Run Vint and custom checks together with just --linters-only 2018-07-01 12:06:59 +01:00
w0rp ccfed164bc
Revert "Try adding Docker caching for Travis CI"
This reverts commit 1990efdba7.
2018-07-01 11:55:07 +01:00
w0rp 1487c8daa0
Make highlight tests pass more in Neovim 0.3 2018-07-01 11:52:02 +01:00
w0rp 1990efdba7
Try adding Docker caching for Travis CI 2018-07-01 11:38:07 +01:00
w0rp b88bf6ecba
Fix #1412 - Use --stdin-filename for newer reek versions 2018-07-01 10:21:59 +01:00
w0rp ee81351a63
Move design goals to online documentation 2018-06-28 16:20:30 +01:00
w0rp 0b7a29d73b
Disable non-Vader tests when targeting Vader tests 2018-06-28 14:00:12 +01:00
w0rp fc041ae090
Make a test which can fail randomly synchronous instead 2018-06-28 13:59:52 +01:00
w0rp d581fca35e
Get tests running and passing with NeoVim 0.2 and 0.3 2018-06-28 13:53:49 +01:00
w0rp 8b407ed0e7
Try NeoVim 0.2.1, as 0.2.0 is way too slow 2018-06-28 12:07:22 +01:00
w0rp 51a14a4ba8
Update Dockerfile to test NeoVim 0.2 and 0.3, with a newer Vint version 2018-06-28 11:29:20 +01:00
Dan Aloni d9e139ae23 Rust Cargo linter: Improve workspace support (#1679)
* Rust Cargo linter: Improve workspace support

When using Cargo workspaces [1], there is a 'Cargo.toml' directory in a
top level directory, listing all the crates in the project. If we are
currently editing one of the crates, 'cargo build' should execute in
that directory for that crate's separate `Cargo.toml`, otherwise Cargo
may spend more time possibly rebuilding the entire workspace, and maybe
failing on one of the other crates, instead of succeeding on the current.

[1] https://doc.rust-lang.org/book/second-edition/ch14-03-cargo-workspaces.html
2018-06-27 22:36:02 +01:00
w0rp 980aa35566
Merge pull request #1675 from nicopauss/master
Improve pyrex cython linter.
2018-06-27 21:39:36 +01:00
w0rp b047271051
Merge pull request #1682 from fennerm/fix_prospector_e474
Fix prospector empty string error
2018-06-27 21:34:28 +01:00
Fenner Macrae 1ca2334846 Fix prospector empty string error
Prospector linter is raising error when no warnings are present in file
(#1680). Copied fix from #779.
2018-06-26 16:58:34 -07:00
Nicolas Pauss 4d935ff32a Add test_pyrex_cython_command_callback.vader
Add common callback tests to check if executable and options are well
configurable.
2018-06-25 22:14:43 +02:00
w0rp 66820ed452
Merge pull request #1641 from docwhat/pr/add-bash-lsp
sh: add bash-language-server linter
2018-06-25 17:03:15 +01:00
Nicolas Pauss d05936a489 Handle cython warning with custom handle and remove '--warning-errors'.
Add a custom handler to support cython warning format.
Remove '--warning-errors' to keep previous behaviour.
2018-06-25 17:33:53 +02:00
Christian Höltje 49d995a521 sh: add bash-language-server linter 2018-06-25 11:21:53 -04:00
Nicolas Pauss bedd30ee11 Improve pyrex cython linter.
Like many other linters, use variables for the executable and options
used by the linter.
By default, the linter now report every warnings as errors with
`--warning-errors`.
Also add include directory and set working directory to file directory.
2018-06-25 10:28:59 +02:00
w0rp 620951b6d3
Close #1453 #1172 - Add ale_linters_ignore for ignoring linter results 2018-06-24 21:16:45 +01:00
w0rp 755f1a4ccf
Merge pull request #1673 from meain/fixer-tidy
Add fixer tidy for HTML
2018-06-23 22:51:30 +01:00
Abin Simon 17c1aefb5b Add fixer tidy for HTML
Add tests for tidy HTML fixer
2018-06-23 22:59:13 +05:30
w0rp 0f377251dd
#1674 - Alias verilog_systemverilog to verilog by default 2018-06-23 18:20:39 +01:00
w0rp 935740cf93
Close #1590 - Automatically close previews for hover 2018-06-21 23:02:36 +01:00
w0rp 8bca073763
Fix #1661 - Do not use :edit when jumping inside of a file 2018-06-21 21:20:54 +01:00
w0rp 22533f2c1f
Close #1522 - Show suggested fixers in :ALEInfo 2018-06-21 02:26:41 +01:00
w0rp 69eb2fe86a
Close #1417 - Support wildcard filetypes for fixers 2018-06-21 01:21:11 +01:00
w0rp 34755eecdd
#1398 document the detail key 2018-06-20 23:10:01 +01:00
w0rp 90dfe8e2a4
Merge pull request #1665 from ashemedai/master
Make CloudFormation linter work again with latest version
2018-06-20 22:51:55 +01:00
w0rp 11f303f853
Merge pull request #1618 from colbydehart/master
[new linter] Add mix linter for elixir
2018-06-20 22:47:56 +01:00
w0rp b8be25adb4
Remove redundant spaces. 2018-06-20 22:44:56 +01:00
w0rp d7efb13203
Try to fix the tests on Windows 2018-06-20 22:41:19 +01:00
Jeroen Ruigrok van der Werven f14e3bb109 Update test to match update to linter
Also make lnum and col proper strings, since that is how it is matched
by the regexp, ALE handles the conversion to number.
2018-06-20 15:29:26 +02:00
Jeroen Ruigrok van der Werven b7db095221 Make CloudFormation linter work again with latest
- Fix regexp
- Get rid of +0 since ALE does a str2nr() on lnum and col
- Put all matches in numerical order for easier maintenance
2018-06-20 14:59:51 +02:00
w0rp 0e1528ec34
Set up most of the autocmd events in one group 2018-06-20 13:35:57 +01:00
w0rp 9674132933
Remove CallWithCooldown functions to save on time 2018-06-20 08:34:42 +01:00
w0rp 82ea36576c
Move ClockMilliseconds to events, so fewer files are loaded some times 2018-06-19 20:53:49 +01:00
w0rp fd261d7a17
Move the initialization of augroups to then events file 2018-06-19 20:31:58 +01:00
w0rp 3a5887df2c
Remove a redundant variable in tests 2018-06-19 20:12:49 +01:00
w0rp e306e5cdb0
Avoid calling ALE cleanup code if ALE never tried to check a buffer 2018-06-19 20:12:33 +01:00
Alvin Chan b8a1038a41 Set `--parser` option in Prettier's fixer (#1620)
* Set `--parser` option in Prettier's fixer
* Add expected `--parser` option to tests
* Disable Prettier `--parser` detection if file extension exists
* Manually default Prettier `--parser` to "babylon"
* Add `--parser` test for TypeScript
* Add tests for Prettier `--parser`
* Add JSON5 to the suggested fixer for Prettier
2018-06-18 22:40:57 +01:00
w0rp 43ce8d7610
Merge pull request #1653 from chaucerbao/feature/js-tsserver-support
Add TSServer support for JavaScript files
2018-06-17 22:14:12 +01:00
w0rp 24fe195311
Merge pull request #1650 from yasuhiroki/support-cfn-python-lint
Add linter for AWS CloudFormation template file
2018-06-17 20:39:07 +01:00
w0rp 49a5d657ee
Tell people that there's no cost for LSP support if they don't need it 2018-06-15 10:24:09 +01:00
w0rp bda89506ba
Lazy-load LSP linters, and check b:changedtick before notifying about changes 2018-06-15 10:01:28 +01:00
Alvin Chan bd4da116ee Add TSServer support for JavaScript files 2018-06-13 17:37:20 -07:00
yasuhiroki eabf5d55d6 Add end_lnum and end_col in cfn_python_lint handler 2018-06-13 09:11:14 +09:00
P M f1b72218c3 Add support for qmlfmt fixer (#1651)
* Add support for qmlfmt fixer
2018-06-12 19:38:16 +01:00
w0rp 5283faa511
Try speeding up Travis builds with a generic environment 2018-06-12 19:31:44 +01:00
w0rp 87455a2ef4
Add a test for handling missing detail keys for LSP completion 2018-06-12 19:31:08 +01:00
w0rp d9746a4572
Merge pull request #1638 from ssiegel/use-vanilla-rscript
Use --vanilla switch for Rscript
2018-06-12 19:01:45 +01:00
yasuhiroki ae25d71fa8 Add linter for AWS CloudFormation template file 2018-06-12 15:11:53 +09:00
w0rp 22a9dcd03e
Merge pull request #1640 from docwhat/pr/lsp-handle-missing-details
lsp: handle missing "detail" key
2018-06-11 21:33:49 +01:00
Christian Höltje fd7456fce0 lsp: handle missing "detail" key 2018-06-07 13:43:08 -04:00
Colby Dehart 864818a385 WIP cd to project path 2018-06-07 11:47:57 -05:00
Colby Dehart f0f569f14a added test for command callback 2018-06-07 10:09:08 -05:00
Stefan Siegel 42192c1593 Adapt test to also use Rscript --vanilla 2018-06-07 15:56:14 +02:00
Stefan Siegel 252097bee0 Use --vanilla switch for Rscript
This prevents possibly bad interference with the user's R environment,
e.g. by an auto-activating packrat.
2018-06-07 15:06:09 +02:00
w0rp 10a9177b6b
Merge pull request #1636 from zed0/master
#1635 - Use the project base rather than its parent for cquery
2018-06-07 07:23:44 +01:00
Ben Falconer d1be72f438 #1635 - Use the project base rather than its parent for cquery 2018-06-07 00:12:38 +01:00
w0rp 67753de531
Merge pull request #1632 from zed0/master
Add the cquery LSP
2018-06-06 21:31:36 +01:00
Ben Falconer 20db9ab719 Add the cquery LSP #1475 #1594 2018-06-06 17:58:47 +01:00
Ben Falconer 641c0c797b Pass rootUri to LSPs in addition to rootPath 2018-06-06 17:53:36 +01:00
Ben Falconer 1a4b08539b Allow initialization options to be passed to language servers 2018-06-06 17:53:36 +01:00
w0rp c49ea1a5e3
Merge pull request #1629 from elebow/pipenv-executable-python-tools
Allow all Python linter executables to be set to `pipenv`.
2018-06-05 08:32:45 +01:00
w0rp 3a6a92283e
Merge pull request #1628 from rmorabia/patch-1
Readme Typo: TypeSript -> TypeScript
2018-06-05 07:12:53 +01:00
Eddie Lebow ca88e67af0 Allow all Python linter executables to be set to `pipenv`.
It appends ` run {linter_name}`, analogously to the Ruby linters when
the executable is set to `bundle`
2018-06-05 00:33:26 -04:00
Radhika Morabia b3da52d38d
Typo: TypeSript -> TypeScript 2018-06-04 20:22:53 -07:00
w0rp 5addd3abef
Merge pull request #1627 from budziq/master
Added linting of tests and examples for rust cargo linter
2018-06-04 13:33:08 +01:00
Michał Budzyński e272207114 Allow linting rust tests and examples with cargo 2018-06-04 11:08:49 +02:00
w0rp 4ec661b305
Merge pull request #1623 from zoonfafer/scalafmt-fixer
Add 'scalafmt' fixer for Scala files
2018-06-03 19:12:09 +01:00
Jeffrey Lau 03d14324ea doc/scalafmt: Remove wrong bits on initial "enabledness" of fixers 2018-06-04 02:05:19 +08:00
w0rp a8bbf49a31
Merge pull request #1625 from elebow/flake8-pipenv-run
Allow flake8 executable to be set to `pipenv`.
2018-06-03 18:52:15 +01:00
w0rp 0db12702f3
Respect warn_about_trailing_whitespace for gitlint 2018-06-03 10:46:39 +01:00
Eddie Lebow dd642b117c Allow flake8 executable to be set to `pipenv`.
It appends ` run flake8`, analogously to the Ruby tools when the
executable is set to `bundle`
2018-06-02 21:49:12 -04:00
Jeffrey Lau 77d0ac58ed Add 'scalafmt' fixer for Scala files
closes https://github.com/w0rp/ale/issues/1299
2018-06-03 04:40:52 +08:00
Colby Dehart 81739be0a0 handled temp file and env variable correctly; added tests 2018-06-02 13:03:56 -04:00
w0rp 786fc0a62f
Merge pull request #1617 from luitzifa/master
Fix for puppet version >= 5.4.0
2018-06-02 12:36:24 +01:00
w0rp 014d27c882
#1621 - Tolerate SetOptions calls when ALE is loaded in a weird way 2018-06-01 21:03:22 +01:00
Colby Dehart d760558007 added mix build path env var to the mix compile 2018-06-01 11:56:47 -04:00
w0rp fae9167083
Fix LSP message handling when the handler doesn't get strings, somehow 2018-06-01 14:49:13 +01:00
w0rp 201f8519d9
Update the gitcommit documentation with more examples 2018-06-01 14:22:23 +01:00
w0rp 6a7e00d9ac
Handle definition responses without files 2018-06-01 14:15:32 +01:00
w0rp 10e1545630
Mention g:ale_linters_explicit in the README 2018-05-30 21:15:00 +01:00
w0rp 970b62756e
Fix #1610 - Encourage the use of ftplugin files more 2018-05-30 21:10:37 +01:00
w0rp db64571b4c
Fix #1523 - Document completion_filter 2018-05-30 20:44:09 +01:00
w0rp c8b77fd4b8
Fix a typo in the LSP linter documentation 2018-05-30 20:23:57 +01:00
w0rp bd92616e2a
Fix #1219 - Mention FindProjectRoot behavior for Python in the documentation 2018-05-30 20:09:33 +01:00
w0rp f95bc00bd6
Clean up grammar for hover documentation a little 2018-05-30 19:44:01 +01:00
w0rp 106d439f56
Merge pull request #1589 from gagbo/balloon_doc
Documentation : document the mouseover magic
2018-05-30 19:31:41 +01:00
Magnus Ottenklinger 801c12a881 Add mix linter for elixir 2018-05-30 10:38:14 -04:00
Daniel Kraemer 3a1d21e5dd Fix for puppet version 5.4.0
i don't know of any version lower than 5.4.0
2018-05-29 08:55:08 +02:00
w0rp 3014d85325
Encourage people to use NeoVim 0.2.0 or above in the README. 2018-05-28 20:20:05 +01:00
w0rp f84411f3f1
Remove a test for a deprecated variable that seems to trip up Travis 2018-05-28 20:08:27 +01:00
w0rp 191967cfee
#1587 - Add deprecation warnings for old linter options 2018-05-28 19:52:27 +01:00
w0rp c0a279f967
Indicate things to be removed in version 2.0 2018-05-28 19:39:49 +01:00
w0rp f2837b5802
#1524 - Define global variables where they are needed 2018-05-28 19:19:20 +01:00
w0rp cae194d1bd
#1524 Replace ale#Set with let in the main file 2018-05-28 17:57:58 +01:00
w0rp 18509195f5
#1524 Do not try to check buffers with empty filetypes 2018-05-28 17:38:14 +01:00
w0rp ce89d93e1c
Remove a now defunct test 2018-05-28 17:11:21 +01:00
w0rp e49e7d52bc
#1524 Remove the plugin conflict warnings 2018-05-28 16:47:32 +01:00
w0rp 8a659b7cc6
Fix #1566 - Add g:ale_python_flake8_change_directory 2018-05-28 16:34:54 +01:00
w0rp d9717147bf
Close #1559 - Report errors from LSP servers in :ALEInfo 2018-05-28 16:24:15 +01:00
w0rp 3c55cb087d
Close #1553 - Support some tsserver completion for strings 2018-05-28 15:16:15 +01:00
w0rp ef1ec5341f
Fix #1568 - Filter LSP completion results with the prefixes 2018-05-28 14:45:07 +01:00
w0rp cd0dc0a227
Fix #1611 - Fix perlcritic escaping on Windows 2018-05-28 12:51:06 +01:00
w0rp eaf35bc611
Merge pull request #1562 from haginaga/support_phan_client
Add support phan_client for php
2018-05-28 12:41:13 +01:00
haginaga ae8dd39760 Fix an incorrect argument of ale#Var in ale_linters#php#phan#Handle 2018-05-27 22:45:43 +09:00
haginaga feab494286 Fix code style issues and refactor to use ale#Var 2018-05-27 22:21:02 +09:00
w0rp 29a9c9a255
Merge pull request #1564 from aliou/ad-alefix-fixer-cmdline-completion
Use the command line to filter ALEFix's command line completion.
2018-05-26 21:34:29 +01:00
w0rp 6fce8ddc5a
#1600 Alias vimwiki to markdown 2018-05-26 11:41:52 +01:00
w0rp b67c9a83b2
Merge pull request #1574 from hecrj/elm-0.19
Support Elm 0.19
2018-05-26 09:19:30 +01:00
Héctor Ramón Jiménez 7fd0fd514b Fix multiline indentation 2018-05-25 22:22:47 +02:00
w0rp 51a063be31
Move the sasslint handlers to one location 2018-05-25 20:59:35 +01:00
w0rp 8d49da1f1c
Merge pull request #1573 from zed0/master
Run sass-lint from the target's directory
2018-05-25 20:48:16 +01:00
w0rp d0f579c5fc
Merge pull request #1575 from tsuburin/enable_dmd_warnings
Enable warnings of dmd command
2018-05-25 19:38:40 +01:00
w0rp d8d13ef264
Do not echo messages to the echo line for mouse movements unless the user says so 2018-05-17 16:23:29 +01:00
Gerry Agbobada 1258b032e6 Documentation : Add mention of mouseover in README 2018-05-17 11:06:37 +02:00
Gerry Agbobada e5ad9076b3 Documentation : document the mouseover magic
This first try is focused on fitting the information in existing
paragraphs
2018-05-17 10:57:04 +02:00
Gerry Agbobada 3a3c244723 TUI / GUI tooltip with content from ALEHover (#1556)
* Guard the ballooneval settings

* Mark main objectives to do to get nice Hover

* Make tweaks to make the tooltip work - See " XXX: comments

* Guard balloon_show call

* Use return instead of finish for functions

* ale#hover#show : Add optional arguments to specify arbtirary position

This change is requested to be able to call the function with mouse
position to enable hover information in vim's balloon

* ale#ballon#Disable : Remove feature guards

* ale#balloon : Show 'ALEHover' output on balloon if no diagnostic found

* ale#hover#HandleLSPResponse : remove the check for cursor position

This check prevented the 'ALEHover in balloon' feature, since mouse
position is almost never cursor position.

* ale#balloon#MessageForPos : Change the return of balloonexpr

balloonexpr evaluation now works even without balloon_show for basic
diagnostics, leaving the balloon_show call to ale#hover#Show, which can
then feature guard the call to avoid errors

* ale#hover#Response : Feature guard balloon_show calls

* ale#hover : always display 'Hover' information in messages

Also add a small comment to warn readers the different outputs the
ale#hover#Show will write to

* {LSP,TS}Response : use only variables from the Response

It is clearer that we only rely on l:options to get the relevant data to
build the LSP Response string

* hover#ShowDetails : fix an issue where not having focus broke balloons

The issue was caused by not using a buffer-specific version of getline()
to cap the value of the column sent in the message to LSP. Therefore a
cursor on column 10 in an inactive window could send a message with
column=0, if the active window had a buffer with too few lines

* {LSP,TS}Response : Remove redundant checks for balloon_show call

With the upcoming change in ale_set_balloons default value (see Pull
Request w0rp/ale#1565), this check will be useless

* balloonexpr? : Add a flag to separate hover#Show() calls

The goal of this flag is to make `:ALEHover` calls not pop a balloon
under the cursor, since the user has probably no interest in their
cursor while typing the command

The flag is a default argument which is overridden only in ballonexpr
call of ale#hover#Show, and stays set in the hover_map until the
callback for the LSP handles it.

There are no automated tests for this feature right now, and the nature
of the addition (one optional argument in the API) should make it
transparent to existing tests.

Since the differentiation is now possible, the check for moved cursor
has been put back in ale#hover#HandleLSPResponse

* ale#hover#hover_map : Protect accesses to hover_map

Using get() is safer than trying to access directly with ., as the tests
show.

* Raise timeout to try to get Appveyor happy

* Review : Fix comments

* Review : pass the optional argument 'called_from_balloonexpr' in a Dict

This optional dictionary has documentation just before the function
using it, ale#hover#Show, and allows easier extension in the future.
2018-05-16 21:23:48 +01:00
w0rp c1da7866d0
Fix #1584 - Make duplicate msgfmt messages easier to navigate 2018-05-15 18:01:49 +01:00
Héctor Ramón Jiménez b071f1a795 Make Elm linter backwards compatible with Elm 0.18 2018-05-15 17:06:52 +02:00
Ben Falconer 8a1099bb59 Run sass-lint from the target's directory 2018-05-15 14:36:31 +01:00
w0rp c23acb00e2
Merge pull request #1565 from rhysd/improve-balloon-support-detection
Improve g:ale_set_balloons default value
2018-05-15 13:16:33 +01:00
w0rp 4a76cb0dd5
Update the issue template to tell you where to find command callback tests 2018-05-15 13:14:28 +01:00
Héctor Ramón Jiménez 115952fae3 Show Elm.Kernel as location when `report.path` is `null` in a general problem 2018-05-12 20:27:33 +02:00
tsuburin 0c472c2244 Added "-wi" to the dmd command to endable warning messages. 2018-05-12 15:03:35 +09:00
Héctor Ramón Jiménez c3f61c391b Use `message` as `text` instead of `title`
`title` does not contain much information which forces to use :ALEDetail most of the time
2018-05-12 04:16:14 +02:00
Héctor Ramón Jiménez 089a07c6a6 Update ale-elm doc 2018-05-11 20:14:00 +02:00
Héctor Ramón Jiménez 2f40da76e6 Test global problems and imported module errors 2018-05-11 20:07:28 +02:00
Héctor Ramón Jiménez d40f447931 Upgrade Elm linter to support 0.19 error reports 2018-05-11 19:15:40 +02:00
rhysd 168569b8b0 Fix condition to test a balloon feature 2018-05-11 19:07:16 +09:00
rhysd 57f0454a55 Improve g:ale_set_balloons default value 2018-05-11 17:46:40 +09:00
Aliou Diallo 199fcd48ac
Use the command line to filter ALEFix's command line completion. 2018-05-10 16:15:08 +02:00
w0rp 38c66d33fe
Merge pull request #1563 from IngoHeimbach/fix/gcc-fatal-error
Fatal GCC errors are handled as errors not warnings
2018-05-09 09:14:38 +01:00
Ingo Heimbach 5fe74c7dc8 Fatal GCC errors are handled as errors not warnings 2018-05-09 09:01:41 +02:00
w0rp f7ecf3f47a
Merge pull request #1555 from BobuSumisu/nasm-linter
Added NASM assembly linter
2018-05-08 19:02:17 +01:00
w0rp 7541a40859
#852 Update the REAME to mention %...code...% 2018-05-08 18:32:18 +01:00
w0rp 9023987fe0
Merge pull request #1552 from a-marquez/master
Add XO fixer
2018-05-08 17:53:12 +01:00
haginaga 230656e678 Fix to follow the Google VimScript Style Guide 2018-05-08 23:47:35 +09:00
haginaga ffa6fd4bed Fix to follow the Google VimScript Style Guide 2018-05-08 23:35:14 +09:00
haginaga eb3ab87569 Modify to be able to use phan_client without g:ale_php_phan_executable 2018-05-08 23:25:11 +09:00
haginaga 8cee39c614 (close w0rp/ale#1561) Add support phan_client for php 2018-05-08 14:19:47 +09:00
Øyvind Ingvaldsen 3bc07b482b Fixed handle test for Windows
Needed to add correct separator to test data.
2018-05-04 23:04:45 +02:00
Øyvind Ingvaldsen df8c45ed55 smallfix 2018-05-04 22:33:08 +02:00
Øyvind Ingvaldsen 27144eee8c Added NASM linter
Added NASM linter (for nasm filetype).
2018-05-04 21:44:32 +02:00
w0rp 726a768464
Merge pull request #1550 from deivid-rodriguez/bundle_option_for_mdl
Add bundle option to mdl
2018-05-03 22:20:39 +01:00
w0rp 7c0219efcc
#1503 Call setline() after `d`, in case there are folds at the end of the file 2018-05-03 22:14:29 +01:00
w0rp 6495fac820
Tell people to install prettier-eslint-cli instead 2018-05-03 19:48:15 +01:00
w0rp e2c33f2f6c
Add g:ale_completion_excluded_words for completion filtering 2018-05-03 11:17:41 +01:00
a-marquez 14dc05f36b Add XO fixer to fixers registry 2018-05-02 18:26:46 -04:00
a-marquez 12d79894a4 Add fixer definition for XO 2018-05-02 18:26:13 -04:00
w0rp e59cd6b7c0
Make the features ALE supports clearer in the README 2018-05-02 13:38:52 +01:00
David Rodríguez f11637b62b Add bundle option to mdl 2018-05-01 19:49:45 -03:00
Bjorn Neergaard ae85695543 Update run-tests to make use of /usr/bin/env (#1548)
* Update run-tests to make use of /usr/bin/env

* Update run-vint

* Update run-vader-tests

* Update custom-linting-rules

* Update custom-checks

* Update check-toc

* Update check-supported-tools-tables
2018-05-01 13:18:03 +01:00
w0rp 3331f6c8f4
Merge pull request #1543 from vancluever/f-add-JobStartedAutoCmd
Add ALEJobStarted User autocommand event
2018-04-29 20:16:59 +01:00
Chris Marchesi b81bc8d481
A couple of more doc fixes
* Update section 5.viii in the README with ALEJobStarted and re-format
the example.
* Add an extra line after documentation update to ensure consistency
with the rest of the doc.
2018-04-28 15:10:59 -07:00
Chris Marchesi 11780e1d3d
Add some tests for IsCheckingBuffer
Adding a couple of tests to demonstrate how IsCheckingBuffer behaves
during specific autocommand hooks:

* At ALELintPre, no linters have actually executed yet, hence
IsCheckingBuffer should be returning false.
* ALEJobStarted, fires as early as reasonably possible after a job has
successfully started, and hence hooking into IsCheckingBuffer here
should return true.

This distinction is important when using these two events during things
like statusline refreshes, namely for "linter running" indicators.
2018-04-28 14:50:20 -07:00
Chris Marchesi 129eb96561
Fix tests by setting proper link tag in doc for ALEJobStarted 2018-04-27 22:32:21 -07:00
Chris Marchesi 9da015f74f
Add test for ALEJobStarted 2018-04-27 22:00:50 -07:00
Chris Marchesi b7996803c9
Add ALEJobStarted User autocommand event
The ALELintPre and ALELintPost autocommand events are currently being
used by lightline-ale to refresh the status line and check the linter
status for a current buffer. One of the plugin's checks looks to see if
linters are currently running, via ale#engine#IsCheckingBuffer(). This
currently only works partially in certain situations. In my particular
case, working with Go files, this only seems to function properly when a
file is initially opened. Saving a file does not correctly update the
status.

This seems to be due to the fact that ALELintPre actually runs before
any jobs are carried out, making it plausible that hooking into
ALELintPre for the purpose of checking to see if there are any currently
running linters for a buffer is unreliable as it would be prone to
pretty obvious race conditions.

This adds a new User autocommand, ALEJobStarted, that gets fired at the
start of every new job that is successfully run. This allows a better
point to hook into checking the linter status of a buffer using
ale#engine#IsCheckingBuffer() by ensuring that at least one job has
started by the time IsCheckingBuffer is run.
2018-04-27 15:40:02 -07:00
w0rp 6ab3fdc4d0
Close #1521 - Allow the language to be set with simple strings for LSP linters 2018-04-27 22:52:11 +01:00
w0rp d1d705cc84
Merge pull request #1533 from inducer/master
flake8: Move to the buffer's directory before running flake8 command
2018-04-27 21:39:04 +01:00
w0rp 4a63a90d0d
Merge pull request #1540 from maximbaz/fix-docs-ale-go
Fix typos in "lint package" options in docs/ale-go
2018-04-27 19:23:34 +01:00
Maxim Baz 04b54f5c17
Fix typos in "lint package" options in docs/ale-go 2018-04-27 19:49:33 +02:00
Jonny Ramsden cf174d3b9b set marks to add to jump list 2018-04-27 17:18:18 +01:00
Andreas Kloeckner 603e61ad71 flake8: Move to the buffer's directory before running flake8 command 2018-04-26 18:53:44 -05:00
w0rp d8d09c2048
Close #1428 Implement LSP hover-like functionality for tsserver too 2018-04-26 21:54:11 +01:00
w0rp e6fe2d86b8
Add an American English tag for behaviour too 2018-04-24 21:56:34 +01:00
w0rp 41c0b837ae
#1278 Allow linters to be defined pretty much anywhere 2018-04-24 21:48:33 +01:00
w0rp ebbf7d0353
#1428 Show multiline hover messages, and document the new command 2018-04-24 21:03:06 +01:00
w0rp 93a046a78f
#1236 Explain how to use Vim jumps 2018-04-23 21:18:58 +01:00
w0rp 7d6a303592
Move autocmd commands out of the toggle file, to improve load times 2018-04-23 10:16:48 +01:00
w0rp ef130c4428
#1428 Start implementing LSP hover support 2018-04-22 22:00:25 +01:00
w0rp 0b3ee11546
Fix a typo 2018-04-22 20:32:39 +01:00
w0rp 286abd12d3
Add support for finding references using LSP servers or tsserver 2018-04-22 19:49:30 +01:00
w0rp 5a365e7926
Merge pull request #1517 from kfly8/perltidy-fixer
Added perltidy fixer
2018-04-22 18:02:19 +01:00
w0rp 87ad4dfbe7
Implement a preview window for selecting locations to open 2018-04-22 15:53:01 +01:00
w0rp d8a673515a
Close #1162 - Implement completion support with LSP servers 2018-04-22 12:28:19 +01:00
Kenta, Kobayashi 498be478be add perltidy fixer 2018-04-21 22:09:38 +09:00
w0rp 20241c87ef
Merge pull request #1511 from elebow/add-cucumber-checker
Add `cucumber` checker for Cucumber files
2018-04-21 09:23:07 +01:00
Eddie Lebow 1e6651e0a0 Add cucumber checker for cucumber files
For now, it only detects undefined steps. The nearest `features` dir
above the buffer file is loaded, so step definitions should be found
correctly.

Tested only with Cucumber for Ruby, but it should work for any cucumber
that follows a substantially similar directory structure.
2018-04-20 22:54:29 -04:00
w0rp 63bbb38c0c
Merge pull request #1510 from fenuks/issue-1471
Support passing fixers names to ALEFix as arguments
2018-04-20 21:38:11 +01:00
fenuks 6f6d35c0bd Add information that ALEFix can now accept arguments 2018-04-18 02:28:17 +02:00
fenuks f16384f323 Add tests for ALEFix commandline parameters 2018-04-18 02:13:24 +02:00
fenuks a591b191db Make ALEFix support arguments 2018-04-18 02:13:24 +02:00
w0rp f9ba3d924f
Fix #1507 - Add an option for disabling switching directories for pylint 2018-04-17 13:30:30 +01:00
w0rp fb720251bf
Close #1504 - Add an option for removing --respect-pragma for flow 2018-04-15 12:25:15 +01:00
w0rp 60917c9005
Revert "#1277 Try to get eslint_d to run the right version of eslint"
This reverts commit 56c7957a75.
2018-04-13 21:02:56 +01:00
w0rp f5f3424fcf
#1501 Pass the buffer number from BufWritePost on to ale#fix#Fix 2018-04-13 20:59:05 +01:00
w0rp 56c7957a75
#1277 Try to get eslint_d to run the right version of eslint 2018-04-13 20:49:03 +01:00
w0rp a0aa9aa9b7
Fix #1495 - Fall back to /bin/sh when shell=pwsh 2018-04-12 21:01:35 +01:00
w0rp 0cd8e8630b
#1497 Tolerate important ALE variables being undefined for some reason when viewing buffers like git commits 2018-04-12 20:31:45 +01:00
w0rp 3401a4e8ea
Merge pull request #1498 from Eyenseo/master
Fix rust rls linter argument
2018-04-12 20:01:00 +01:00
eyenseo 6c93cded64 Fix rust rls linter toolchain argument
This removes the argument if the specified toolchain is empty.
As far as I can tell there is no +nighly (or similar) option [1] leading to
the termination of the server. But since people needed this option and
have yet to complain about it it stays the default for now.

[1] https://github.com/rust-lang-nursery/rls/blob/master/src/main.rs#L87
2018-04-12 20:42:38 +02:00
w0rp f064ba48f5
Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
w0rp 3f0e1cd05d Fix #1492 - Make pylint error parsing work on Windows 2018-04-10 15:18:16 +01:00
w0rp 9d00695249 #1486 - Default exit_code to 1, if it isn't set. 2018-04-10 09:57:21 +01:00
w0rp da9a005c60 Fix #1490 - Rename the g++ linter to gcc, and add an alias for the old name 2018-04-10 09:31:22 +01:00
w0rp 697fd4ac75
Merge pull request #1488 from languitar/pmd
Add support for the java PMD linter
2018-04-09 19:22:14 +01:00
w0rp 719b790574
Close #542 - Add an option for disabling running locally installed executables by default 2018-04-09 19:11:20 +01:00
w0rp 3a47413286
Merge pull request #1487 from rhysd/fix-1472
pylint: Move to the buffer's directory before running pylint command
2018-04-09 18:14:42 +01:00
Johannes Wienke 49c4bfde14 Add support for the java PMD linter 2018-04-09 17:48:00 +02:00
rhysd 4903b966a7 pylint: Move to the buffer's directory before running pylint command (Fix #1472) 2018-04-09 16:43:10 +09:00
w0rp 2f2dcb8444
Close #1476 - Make the javac executable configurable 2018-04-08 20:35:06 +01:00
w0rp 7cf3ddf6c4
Close #1439 - Add an :ALEInfoToFile command 2018-04-08 19:04:07 +01:00
w0rp 1123669839
Close #1315 - Make the vint executable configurable 2018-04-08 18:10:00 +01:00
aspidiets f9ae58849a
Fix #1424 - Make the brittany fixer work 2018-04-08 17:38:43 +01:00
w0rp 91d7e81ebc
Fix #605 - Support `vcol: 1` for multi-byte character positions 2018-04-08 17:17:46 +01:00
Adriaan Zonnenberg 121e806423 Add g:ale_php_cs_fixer_options variable (#1477)
* Add g:ale_php_cs_fixer_options variable

* Fix test
2018-04-07 23:53:03 +02:00
w0rp bb775e4e22
Fix #1479 - Respect g:hdevtools_options for hdevtools 2018-04-07 22:50:31 +01:00
Jack Evans c5d3af04fc Added support for Python black fixer (#1451) 2018-04-06 11:08:25 +02:00
P M 85a2a00826 Integration of qmlfmt linting tool (#1462)
* Add first qmlfmt support

* Add GetCommand() function

- pass --error/-e option

* Add handle unittest

- fix pattern regex
- store col as integer

* Update docs

* Add command callback unit test
2018-04-05 21:09:41 +02:00
Nils Leuzinger 912f632bf5 Add fsc linter for Scala (#1452)
* Add fsc as a Scala linter

* Pull reused code into `autoload/ale/` directory

* Include fsc into the README

* Add unit test for testing the scala handler

* Add unit test for scala's fsc linter

* Rename scala unit tests for clarity

* Fix typo in README

* Fix typos in doc/ale.txt

* Fix author headline

* Put methods for fsc commands back into fsc.vim

* Move command_callback tests to correct location

* Rewrite handler test so it actually tests handler

* Clarify description of test in test_scala_handler
2018-04-05 21:04:11 +02:00
w0rp a2acdecbc2
Merge pull request #1455 from Christian-Gibbons/flawfinder_cpp_severity_fix
Fix Flawfinder for C++
2018-04-05 15:00:08 +01:00
w0rp 8baab691e9
Merge pull request #1429 from stewy33/master
Add support for Mercury language using mmc as a linter.
2018-04-05 12:34:45 +01:00
christian-gibbons f1d56a343e Flawfinder for C++:
Fix missing variable causing flawfinder to fail for c++
2018-03-28 14:09:03 +00:00
w0rp 95ec9bb780
#1167 Use the make -n parsing for C++ compilers, and document the new option 2018-03-27 19:24:22 +01:00
w0rp 018831d601
Merge pull request #1434 from roel0/master
Automatically determine build flags by parsing `make -n` output #1167
2018-03-27 09:55:43 +01:00
roel0 dfb3e194d7 Extended unit tests + simplified parsing algoritme #1167 2018-03-27 10:18:24 +02:00
w0rp 27c5faeafe Use the --stdin-filename option for textlint, so configuration files will be discovered better 2018-03-26 10:35:10 +01:00
w0rp 8e9ae59e5e Fix paths for running tests on Windows 2018-03-26 09:58:48 +01:00
w0rp 8b34a4bf6b Fix config and executable issues with the textlint linter 2018-03-26 09:55:18 +01:00
w0rp 45c5fe7f43 Fix a typo in the documentation 2018-03-26 09:19:58 +01:00
Stewy Slocum 8d4852a127 add documentation on mmc linter 2018-03-25 13:43:51 -04:00
Stewy Slocum 84952918cc add support for mercury language using mmc as linter 2018-03-25 13:33:24 -04:00
w0rp 164c711b3d
Fix #1404 - Do not show balloons when g:ale_set_balloons is 0. Add b:ale_set_balloons 2018-03-25 12:57:08 +01:00
P M 107516c757 Add basic qmllint support (#1419)
* Add basic qmllint support

* Use temp file, remove superfluous error code key, adjust author info

* Add qmllint handler parse test
2018-03-25 11:55:59 +01:00
w0rp d14558da32
Merge pull request #1448 from yasuhiroki/support-textlint-plaintext
Support textlint for plaintext
2018-03-24 13:19:38 +00:00
yasuhiroki 562862073f Update document for textlint 2018-03-24 16:04:47 +09:00
yasuhiroki 1d33d2cacf Support textlint for plaintext without textlintrc 2018-03-24 14:40:44 +09:00
w0rp dbf530e87f Fix #1373 - Fix a bug with Fish errors not being handled on Linux 2018-03-23 12:17:54 +00:00
w0rp ec5750f57b
Merge pull request #1441 from adrigzr/bugfix-1207-remark-lint-ranges
Handle ranges for the remark linter #1207
2018-03-22 15:20:25 +00:00
w0rp c525f49f09 Fit documentation to the column size in ale-cs.txt 2018-03-22 15:18:41 +00:00
w0rp 722607b866
Merge pull request #1442 from Crysikrend/master
Added the word 'find' as it was missing in docs/ale-cs.txt
2018-03-22 15:17:56 +00:00
Ashley Smith 7a87520ba5 Added the word 'find' as it was missing in docs/ale-cs.txt 2018-03-22 14:20:45 +00:00
Adrián González Rus 87217ae347 fix: Handle ranges for the remark linter #1207 2018-03-22 11:47:16 +01:00
roel0 cf62ef7b07 Fixed windows compatibility unit tests #1167 2018-03-21 20:56:29 +01:00
roel0 69237a7e57 Added additional unit tests + adapted review comments #1167 2018-03-21 20:44:35 +01:00
w0rp 0678eb1f45
Merge pull request #1409 from x1024/patch-1
Add new FAQ item for g:ale_list_window_size
2018-03-21 17:41:55 +00:00
w0rp b769b67b2f
Update the table of content for the new FAQ entry. 2018-03-21 17:41:24 +00:00
w0rp ca2472a460
Merge pull request #1438 from lepistone/doc-timers
doc: fix misspelled feature name
2018-03-21 17:35:34 +00:00
Leonardo Pistone f0325d7322 doc: fix misspelled feature name 2018-03-21 17:02:43 +01:00
w0rp c0279de661
Merge pull request #1436 from bmihelac/fix-1435-msgfmt-output-stdout
fix: po msgfmt output to stdout (#1435)
2018-03-21 10:56:31 +00:00
Bojan Mihelac 763fcb8512 fix: po msgfmt output to stdout (#1435) 2018-03-21 09:21:20 +01:00
roel0 7593e20377 Fix failing unit tests for windows 2018-03-21 07:37:32 +01:00
roel0 18d0aeb1a0 * Shell commands should by called async with the help of a command chain
* The makefile parser unit test should only test the cflag parser itself
#1167
2018-03-20 21:49:31 +01:00
w0rp 64c95d4881
Merge remote-tracking branch 'tylucaskelley/master' 2018-03-20 20:27:50 +00:00
w0rp 57a93cbc04
Merge pull request #1433 from benpaxton-hf/lint-whole-package
Lint whole package for gosimple and gotype
2018-03-20 20:17:43 +00:00
Ben Paxton 6452c5e2f0 Use govet handler for gosimple, gotype, staticcheck 2018-03-20 14:19:48 +00:00
roel0 38953c4626 Clang parser shoud fallback on old method if parsing fails #1167 2018-03-20 12:37:53 +01:00
roel0 3fb7efa2c6 Added some unit tests and fixed some linting errors for automatic makefile parsing in C #1167 2018-03-20 11:56:46 +01:00
roel0 c47b5fd4b8 Automatically determine build flags by parsing 'make -n' output #1167 2018-03-19 21:56:18 +01:00
Ben Paxton 0cb3e36554 Lint whole package for gosimple and gotype
Fixes #936
2018-03-19 15:52:42 +00:00
w0rp 43e8f47e6e
#1431 Normalize paths when checking for temporary paths on Windows 2018-03-18 20:39:50 +00:00
INOUE Yosuke 68b9399d4c handle multibyte string when linting text with redpen (#1416)
* handle multibyte string when linting text with redpen

* fix error when no string is provided, fix test's expect value

* remove ambiguious `==` operator
2018-03-18 18:12:47 +00:00
w0rp 434f22e44a
Merge pull request #1415 from fohte/fixer-rufo
Add rufo fixer for Ruby files
2018-03-18 17:42:07 +00:00
w0rp 440502dc93
Clean up the mix format command and tests 2018-03-18 17:40:34 +00:00
w0rp 92612a9eab
Merge pull request #1410 from fribmendes/frm/mix_format_options
Allow passing options to mix_format
2018-03-18 17:36:33 +00:00
Hideaki Tokida 1b1e53ef61 add textlint support for markdown (#1383) 2018-03-18 17:28:26 +00:00
w0rp c112ee9dff
Fix #1392 - Only check files on disk for gotype 2018-03-18 17:16:13 +00:00
w0rp bdd8d2399f
#416 Escape the tslint command 2018-03-18 16:48:28 +00:00
w0rp b08fdd16b8
Merge pull request #1248 from Carpetsmoker/autocmd-fixer
Add ALEFixPre and ALEFixPost events
2018-03-18 16:37:16 +00:00
Martin Tournoij 302f69e933
Add ALEFixPre and ALEFixPost events
To run autocmd before and after every fix cycle.

Fixes #623 (`ALELintPre` was added in #1203).
2018-03-17 18:24:38 +00:00
Anthony DeDominic 92e6e4d1ba Fix awk linter and security concerns. (#1411)
* Fixed (g)awk linter

 * Made it secure, albeit less useful.
 * Added gawk handler; the cpplint one was not working?
 * Added gawk handler test.
 * added warning to gawk handler.
 * added gawk command callback test
 * added comment about --source

* added back optional commandline option
2018-03-14 17:46:57 +00:00
Hayato Kawai 7e1a9a9810
Add rufo fixer for ruby files 2018-03-11 13:33:57 +09:00
w0rp 05d39bc1a9
Merge pull request #1395 from gfontenot/gfontenot/fix-elm-format-name
Fix elm-format fixer name
2018-03-10 10:51:27 +00:00
Christian-Gibbons b586eba4a4 Handle flawfinder severity level (#1400)
* Handle flawfinder severity level
* Reverted code allowing Flawfinder to piggyback off of gcc's format handler
* Gave Flawfinder its own format handler and made requested changes.
2018-03-10 10:44:55 +00:00
Fernando Mendes 6320ce6674 Allow passing options to mix_format 2018-03-08 15:29:10 +00:00
Gordon Fontenot 9258c73680
Fix elm-format fixer name
Support for elm-format as a fixer has existed since Sept 2017, but it's not
easy to discover because the fixer was named `format`. This breaks the
convention of the other fixers that use the full name in the registry.

I've gone ahead and fixed this discrepancy, but I left the existing registry
entry in place. We should move people towards using `elm-format` as the fixer
name, but I'd hate to break existing setups.
2018-03-08 09:19:12 -06:00
x x 1995afa855 Add new FAQ item for g:ale_list_window_size 2018-03-08 12:17:29 +02:00
w0rp 0a0535546f Add a command for stopping all LSP clients 2018-03-06 10:23:55 +00:00
w0rp b7363bef7d
Update the licence year. 2018-03-04 11:50:39 +00:00
Ty-Lucas Kelley 32091fb8ad add test for markdownlint hander 2018-03-03 19:32:32 -05:00
Ty-Lucas Kelley c572cfd2d2 add vim README.md to readme 2018-03-03 19:17:31 -05:00
Ty-Lucas Kelley 2a575ca551 add basic support for markdownlint 2018-03-03 19:16:41 -05:00
w0rp 193a4b9336
Satisfy my own checks 2018-03-03 18:13:57 +00:00
w0rp f476c28b29
Add deprecation warnings for old NeoVim versions and old functions 2018-03-03 17:50:09 +00:00
w0rp 08cfd5f90c
Close #1379 - Increment b:ale_linted when a buffer is checked 2018-03-03 16:22:56 +00:00
w0rp 565ffa0dc5 Use the configured mdl executable, escape it in the command, and add test for it 2018-03-03 13:27:19 +00:00
w0rp 857723e7d5
Merge pull request #1377 from joshleeb/markdown-mdl-options
Add options for markdown_mdl linter
2018-03-03 13:16:27 +00:00
Olaf Alders 8a77290553 [WIP] Begin to distinguish between Perl warnings and errors (#933)
* If a Perl script compiles, there are only warnings and no errors

* Let the first Perl error or warning win.

Take the following example:

***

sub foo {
    my $thing;

***

This might have the following messages when we compile it:

Missing right curly or square bracket at warning.pl line 7, at end of
line
syntax error at warning.pl line 7, at EOF
warning.pl had compilation errors.

With the current behaviour, we just get a "syntax error" message, which
isn't all that helpful.  With this patch we get "Missing right curly or
square bracket".

* Fix variable scope and pattern matching syntax

* Use named variable to enhance clarity when matching Perl output

* Add more tests for Perl linter

* Remove unnecessary parens

* Simplify check for pattern match
2018-03-02 21:04:52 +00:00
w0rp b6bf6ecdbc Try to fix it again 2018-03-02 20:57:55 +00:00
w0rp 540952ca8e Try to fix a test which is failing on Windows 2018-03-02 20:47:21 +00:00
w0rp ad7ffe2875
Merge pull request #1390 from jdeniau/jd-feat-phpCsFixer
add php-cs-fixer to list of fixers
2018-03-02 20:40:31 +00:00
w0rp 2c2c7ceb1d Fix #1384 - Handle warnings and suggestions for tsserver 2018-03-02 20:33:45 +00:00
Andrew Crites acbe527e15 Option to open lists vertically (#1381)
* Add configuration option to open lists vertically

* Add tests, clean up vertical list config

* Vertical list option cleanup

* Use is# for tests
* Order properties in documentation alphabetically
2018-03-02 20:22:29 +00:00
w0rp 2096562899 Make updating linter results slightly faster when the list is empty 2018-03-02 12:10:27 +00:00
Julien Deniau fbbb8c17d9 add php-cs-fixer to list of fixers 2018-03-01 15:48:47 +01:00
w0rp 1d0690f6d7
Merge pull request #1387 from oalders/oalders-perl-docs
Explain in more detail why perl checks are disabled by default
2018-02-28 15:42:04 +00:00
Olaf Alders aea5de282e Explain in more detail why perl checks are disabled by default 2018-02-28 10:26:44 -05:00
w0rp f64db199f1 Fix a typo in the documentation 2018-02-26 17:04:54 +00:00
Josh Leeb-du Toit 7e20d9c639 Add options for markdown_mdl linter 2018-02-26 20:10:55 +11:00
w0rp 7ec684206c
Merge pull request #1376 from zchee/doc-cpp-duplicate-tag
doc/cpp: fix duplicate ale_cpp_flawfinder_executable help tag
2018-02-25 15:09:52 +00:00
Koichi Shiraishi b15706d9a9
doc/cpp: fix duplicate ale_cpp_flawfinder_executable help tag
both of 'g:' prefix.
2018-02-26 00:04:56 +09:00
w0rp d86371cd29
Merge pull request #1375 from zchee/doc-c-duplicate-tag
doc/c: fix duplicate ale_c_flawfinder_executable help tag
2018-02-25 14:39:49 +00:00
Koichi Shiraishi cfa3e6a924
doc/c: fix duplicate ale_c_flawfinder_executable help tag 2018-02-25 23:31:38 +09:00
Christian-Gibbons 82f8a04e18 New linter: Flawfinder (#1361)
* Flawfinder support added for C and C++

A minor modification to gcc handler was made to support flawfinder's
single-line output format that does not have a space following the
colon denoting the warning level.  gcc handler still passes its
Vader tests after this modification.

* Documentation fixes

* Revert documentation regression

* Added Flawfinder to table of contents

* Removed trailing whitespace

* Follow ALE conventions better

Added additional documentation and Vader tests
2018-02-25 14:11:04 +00:00
w0rp 478a2883a6 #1363 Make ale#engine#IsCheckingBuffer part of the public API 2018-02-25 12:57:54 +00:00
w0rp 0ddf16194d Fix #1306 - Tell users how to automatically close the loclist window in the documentation 2018-02-25 12:43:20 +00:00
w0rp 0292e5a458
Merge pull request #1371 from idbrii/fix-unity-example
Add Unity project path to Unity example in docs
2018-02-25 12:22:58 +00:00
w0rp b6ccd60dd0
Merge pull request #1351 from svanharmelen/f-issue-936
This fixes issue #936 by linting the whole package
2018-02-25 11:54:05 +00:00
w0rp b5209d31e8 go vet can only check files now 2018-02-25 11:53:36 +00:00
John Eikenberry 4941bd8d0e Fix #1358, fix #1369 - Lint the package on save for go vet instead 2018-02-25 11:39:45 +00:00
David Briscoe 8b304f77b7 Add Unity project path to Unity example in docs
For Ale to recognize the symbols in your project, you need to point it
at where Unity builds your assemblies. Add this path to the example.
2018-02-23 14:52:25 -08:00
Sander van Harmelen ab5257c344 This fixes issue #936 by linting the whole package 2018-02-20 16:11:35 +01:00
w0rp 89f8d3e456 Fix #1336 - Print a friendly message when using invalid function names for fixers 2018-02-18 10:13:30 +00:00
w0rp 5915a0ee39 Escape the ponyc executable 2018-02-18 10:06:40 +00:00
w0rp 608b6dafd4
Merge pull request #1343 from kevinkjt2000/ponyc
Add Support for Ponylang
2018-02-18 09:48:35 +00:00
w0rp 5972b97223 #476 Make F401 a warning and E112 a syntax error 2018-02-18 09:44:04 +00:00
w0rp fcb7932d7d
Merge pull request #1345 from dfalling/fix-reason-help-title
Fix Reason help title in README.md
2018-02-13 18:51:33 +00:00
Dennis Falling f979da54d4 Fix reason help reference
`ale-integration-reason-merlin` doesn't exist, changed to
`ale-reasonml-ols`
2018-02-12 22:52:39 -05:00
Kevin Tindall 716b46e10d
functional pony linter 2018-02-10 13:17:53 -06:00
w0rp a3329ef3fc
Merge pull request #1333 from fennerm/master
Fix the lintr::lint_package command
2018-02-06 09:46:22 +00:00
Fenner Macrae c2ab885384 Removed trailing whitespaces 2018-02-05 11:33:23 -08:00
Fenner Macrae 5dc884b24d Fixed lintr::lint_package command 2018-02-05 09:54:15 -08:00
w0rp 91b7a75afb
Merge pull request #1332 from fennerm/master
Add lint_package support to lintr
2018-02-05 09:15:48 +00:00
Fenner Macrae dda132c1a2 Add lint_package support to lintr 2018-02-04 10:57:52 -08:00
w0rp 33b3331b04 #1206 Add support for setting options for gobuild, and escape paths better 2018-02-04 13:55:09 +00:00
w0rp 0f822b063c Fix #1330 - Find isort configs better by changing the working directory 2018-02-04 13:16:44 +00:00
w0rp 31e0f48d62
Merge pull request #1326 from michaelquinn32/patch-1
Call lintr library before linting
2018-02-04 11:38:05 +00:00
w0rp 7c4decf804
Merge pull request #1329 from blyoa/prettier-vue
Add prettier fixer support to vue
2018-02-02 13:23:42 +00:00
Michael Quinn b13f290390 Update formatting and tests. 2018-01-31 18:06:35 -08:00
blyoa 23db293bdf Add prettier fixer support to vue 2018-02-01 02:30:02 +09:00
w0rp 52fe924a13
Merge pull request #1308 from lorenzo/patch-1
Improving hadolint checker
2018-01-30 16:04:44 +00:00
Michael Quinn bb095df25e
Call lintr library before linting
This solves namespace issues related to the objects used to set linting options.
2018-01-29 20:18:14 -08:00
Jose Lorenzo Rodriguez 4df87eaadd
Added tests for hadolint 2018-01-29 22:21:50 +01:00
w0rp c589e3d57d
Merge pull request #1322 from datanoise/master
fixed rust errors parsing
2018-01-29 13:54:50 +00:00
Kent Sibilev 863fb60695 updated rust handler test case 2018-01-28 18:35:46 -05:00
w0rp 1832240cff
Merge pull request #1321 from butlerx/feature/po
add po support with proselint, writegood, msgfmt and alex
2018-01-28 12:49:18 +00:00
w0rp 65fc5d11c7 Fix #1038 - Automatically detect and use htmlhint configuration files 2018-01-28 12:44:42 +00:00
w0rp 7ef55a8615 #1303 jq isn't a Node program 2018-01-28 11:51:20 +00:00
Kent Sibilev ea60fcea39 fixed rust errors parsing
use correct column values instead of absolute byte positions
2018-01-27 16:15:29 -05:00
butlerx 9dad25778f
add po support with proselint, writegood, msgfmt and alex 2018-01-27 12:17:15 +00:00
w0rp bc63325881
Merge pull request #1311 from butlerx/update/prettier-md
add prettier support for graphql
2018-01-26 17:30:00 +00:00
w0rp 34e6368610 #1316 Mention that the quickfix list option shouldn't be used with :cfdo 2018-01-25 14:54:39 +00:00
w0rp dffc162dd6
Merge pull request #1313 from rhysd/fixjson-local-install
fixjson: Add support for local installation
2018-01-25 10:29:51 +00:00
rhysd ef898fa303 fixjson: Add support for local installation 2018-01-25 07:21:25 +09:00
butlerx be47e37bbc
add prettier support for graphql 2018-01-24 15:25:25 +00:00
w0rp 9849c79ff7
Merge pull request #1157 from elebow/eruby-add-erubi-linter
[eruby] Add erubi linter
2018-01-24 10:40:57 +00:00
rhysd b28a6ddbe4 Support fixing JSON files with fixjson 2018-01-24 10:36:31 +00:00
Rafael Rinaldi d562d53102 Add jq as a JSON fixer 2018-01-24 10:12:29 +00:00
José Lorenzo Rodríguez dd413a4732
Improving hadolint checker
- Displaying dockerfile parse errors instead of silently failing
- Adding error detail with link to the docs
2018-01-23 22:46:59 +01:00
Fran Casas 038789f0ed Add Elixir linter for dialyxir (#1257)
* Add Elixir linter for dialyxir

* Update doc/ale.txt with dialyxir

* Keep elixir tools alphabetically ordered in README

* Add a missing entry for dialyxir to the main documentation file.
2018-01-22 12:21:07 +00:00
w0rp acf9c92ab4
Merge pull request #1301 from dezza/patch-2
Fix #1246 - Newer ESLint outputs to stderr
2018-01-20 14:41:09 +00:00
Christoffer Aasted 7cd25181b2
Fix #1246 - Newer ESLint outputs to stderr
I think Vader test still applies for this one.
2018-01-20 03:20:13 +01:00
w0rp 1d3b542031
Merge pull request #1266 from sharils/patch-1
Work around hot-reloading issue
2018-01-19 17:18:49 +00:00
w0rp 8675bfc4ab
Merge pull request #1287 from rhysd/prettier-markdown
Enable prettier to format markdown files
2018-01-19 17:16:00 +00:00
w0rp 7b50b3ec82
Merge pull request #1272 from Codezerker/master
Add a luac linter for Lua
2018-01-19 17:10:29 +00:00
w0rp a5ec4143d2 Fix the didSave tests so they work in NeoVim 0.1.7, and do not send the message for tsserver 2018-01-19 16:50:04 +00:00
Rafael Lerm 042dec059a Send didSave message to LSP-based linters (#1295)
* Also send didSave to LSP linters.
* Add tests for messages sent to LSP linters.
2018-01-19 16:40:55 +00:00
w0rp eddda2f8b5 Fix a command wrapper test on Windows 2018-01-17 18:11:20 +00:00
w0rp 045c92ed65 Fix #1298 - Escape commands for PowerShell 2018-01-17 18:08:17 +00:00
Eddie Lebow aa29c91cdc [eruby] Add erubi linter
Erubi is yet another parser for eRuby. This is the default parser in
Rails as of version 5.1. It supports some additional syntax with similar
behavior to Rails' extensions to the language, though incompatible.
Rails currently still recommends their own syntax, so GetCommand still
has to do the translation introduced in
https://github.com/w0rp/ale/pull/1114 .

Erubi does not supply an executable—It is intended to be invoked only
from within a Ruby program. In this case, a one-liner on the command
line.
2018-01-16 00:38:35 -05:00
rhysd 13c839cf16 Enable prettier to format markdown files 2018-01-15 11:28:56 +09:00
w0rp f6af75aac4
Merge pull request #1268 from bbannier/master
Make it possible to inject flags of protoc invocation.
2018-01-12 20:43:43 +00:00
w0rp e18aba1d7e
Merge pull request #1270 from kevinkjt2000/test-ghc-options
test for ghc options
2018-01-12 12:11:33 +00:00
w0rp 5005871644
Merge pull request #1256 from jonatanolofsson/master
Fix #1255: Move extra clang-check args to before user options
2018-01-12 12:09:30 +00:00
w0rp 65fa901ef0
Merge pull request #1275 from ipetkov/cargo-features
Teach ALE about cargo features and add some configuration options
2018-01-12 12:04:26 +00:00
w0rp ba1540a545 Show only the master status for AppVeyor 2018-01-12 08:55:31 +00:00
Ivan Petkov 2ef45ab745
Teach ALE about cargo features and add some configuration options
* When working on rust/cargo projects of varying sizes, it may be useful
to either build all possible features (i.e. lint all possible
conditionally compiled code), or even turn off other features for a
quicker edit-lint cycle (e.g. for large projects with large build times)
* Added a g:ale_rust_cargo_default_feature_behavior flag for instructing
cargo to not build any features at all (via `--no-default-features`),
building default features (via no extra flags), or building all possible
features (via `--all-features`)
* Also added a g:ale_rust_cargo_include_features flag for including
arbitrary features to be checked by cargo. When coupled with
g:ale_rust_cargo_default_feature_behavior this allows for full
customization of what features are checked and which ones are ignored
2018-01-11 19:24:44 -08:00
w0rp adba2bd919 Allow syntax errors for mypy to be ignored 2018-01-11 16:43:10 +00:00
sharils 29acafdaf4
Work around hot-reloading issue
See https://github.com/phoenixframework/phoenix/issues/1165 for more detail
2018-01-10 20:53:02 +08:00
jiangzhi.xie 547716eabb Fix the doc style for ale-lua 2018-01-08 23:39:04 +08:00
jiangzhi.xie 112fcf7dd5 Add a luac linter for Lua 2018-01-08 23:32:02 +08:00
w0rp 68d4a2216c
Fix a syntax error in a test 2018-01-08 13:28:01 +00:00
Kevin Tindall ff388bbcd5
test for ghc options 2018-01-07 11:41:06 -06:00
Benjamin Bannier b5a5cdf920 Make it possible to inject flags of protoc invocation.
Typically proto files depend on and make use of proto definitions in
other files. When invoking protoc user can supply paths to inspect for
dependencies.

This patch makes it possible to configure flags passed to protoc. This
makes it e.g., possible to change include paths of the linter's protoc
invocation.
2018-01-07 17:56:56 +01:00
Benjamin Bannier eecbacb742 Removed unneeded `SetDirectory` call in proto handler test.
The test already handled arbitrary paths reasonably well, but setting
the directory interfered via leakage with others tests for some reason.

This patch removes the call to `SetDirectory` in the fixture setup and
the subsequent cleanup in the teardown as they are not required.
2018-01-07 17:54:21 +01:00
w0rp f1747901cc
Merge pull request #1262 from rhysd/avoid-old-tidy
html: Avoid old tidy on macOS
2018-01-07 16:02:49 +00:00
Jelte Fennema b6d1c41925 Go: Add gotype support (#1099) 2018-01-07 12:11:01 +00:00
w0rp c9d66b861b Show more ALE variables in ALEInfo 2018-01-07 12:01:20 +00:00
rhysd 7a1a534305 Explain /usr/bin/tidy is ignored on macOS and how to install the latest tidy 2018-01-06 20:00:36 +09:00
rhysd 401b964e9c html: Avoid old tidy on macOS
On macOS, Apple's command line toolchain installs very old `tidy`
command (It was released on 31 Oct 2006). It does not consider new specs
such as HTML5 so we should avoid it.
2018-01-03 01:50:31 +09:00
Jonatan Olofsson ff8d4c5286 Fix #1255: Move extra clang-check args to before user options 2018-01-02 16:09:38 +01:00
w0rp 5285b0b332
Merge pull request #1260 from kevinkjt2000/add-ghc-options
haskell_ghc_options are now added to the ghc command
2018-01-02 14:05:40 +00:00
w0rp e98a3899da
Merge pull request #1254 from bkhl/master
Don't use temporary file for rustfmt fixer
2018-01-02 13:36:20 +00:00
w0rp 80342b119a
Merge pull request #1252 from nthapaliya/fish-shell-linter
Fish shell linter
2018-01-02 13:32:59 +00:00
w0rp d9a3722e06 Merge branch 'add-fountain-proselint-support' 2018-01-02 13:23:00 +00:00
w0rp 1e34210f9a Fix some bad indentation 2018-01-02 13:22:40 +00:00
Kevin Tindall 681c35169f
add ghc entry to the ToC 2018-01-01 22:33:43 -06:00
Kevin Tindall d8f71c46da
haskell_ghc_options are now added to the ghc command 2018-01-01 22:21:21 -06:00
Björn Lindström b0eaddadc9 Don't use temporary file for rustfmt fixer
rustfmt normally acts on a file in place, and applies configuration
from rustfmt.toml files according to the path of the file.

Using a temporary file for rustfmt breaks this functionality, so
removing the '%t' from the rustfmt command.
2017-12-27 23:12:57 +07:00
Niraj Thapaliya 3b0c67e42c Add handler test 2017-12-26 14:10:28 -06:00
Niraj Thapaliya c90b45c559 Edit README and help 2017-12-26 14:10:28 -06:00
Niraj Thapaliya e2d3dca486 Support for fish file linting 2017-12-26 12:25:17 -06:00
w0rp c165c7c5d1 Fix #1251 - Handle an empty list in the line callback when NeoVim crashes 2017-12-26 18:15:59 +00:00
w0rp 48cae6afc4
Merge pull request #1250 from yaryabu/patch-1
Fix c# documentation variable typo
2017-12-26 18:09:38 +00:00
Yaroslav Ryabukha 0548cf9177
Fix c# documentation variable typo 2017-12-25 16:40:25 +03:00
Jansen Mitchell 4d4d2d8122 Add four spaces, not tabs. 2017-12-20 22:53:03 -06:00
Jansen Mitchell 2c9c5dec1e Add Fountain with proselint info to ale.txt. Add Fountain online documentation. 2017-12-20 12:39:10 -06:00
w0rp e43e7065da Fix #1115 - Add support for wrapping all commands with an option 2017-12-20 12:20:38 +00:00
w0rp 2495744fc3 Fix the gitlint test 2017-12-20 10:49:23 +00:00
w0rp 87ffc9b55c Make the error codes configurable for gitlint 2017-12-20 10:46:08 +00:00
Nick Diego Yamane d4b43d23f4 Add support for linting git commit message files (#1233) 2017-12-20 10:10:07 +00:00
Jansen Mitchell 537d162ee7 Add Fountain and linter support information to README. 2017-12-19 21:57:25 -06:00
Jansen Mitchell 4b56b91ac8 Add support for Fountain with proselint. 2017-12-19 20:27:12 -06:00
w0rp 1568bf8128 Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
w0rp 73f61514c9 Fix #1031 - Make the rust flags configurable 2017-12-19 18:10:29 +00:00
w0rp cc8e5502c8 Fix #1240 - Parse line and column numbers for fatal embertemplatelint errors 2017-12-19 17:42:51 +00:00
w0rp 0ad2547997 Fix mcsc paths and escaping for Windows 2017-12-19 17:34:34 +00:00
w0rp 647c798eb7 Fix #1226 - Update the mcsc documentation to make it clearer how to use it 2017-12-19 16:54:46 +00:00
w0rp f74e22b938 Clean up ALE linter buffer data when buffers are deleted, not unloaded 2017-12-19 15:35:57 +00:00
w0rp d2bea5c310 Allow the cursor messages to be disabled while Vim is running 2017-12-19 14:43:24 +00:00
w0rp a7d51afda5
Merge pull request #1221 from JelteF/patch-1
Fix erb linter for puppet style erb templates
2017-12-19 14:09:00 +00:00
Jelte Fennema 532594839c erb: fix tests 2017-12-19 13:21:30 +01:00
w0rp 2cacba5758 Fix #1228 - Reset the cursor if echoing a message moves it 2017-12-19 12:06:08 +00:00
w0rp 91090f1af8
Merge pull request #1239 from languitar/vale-suggestion
Missing warning level 'suggestion' for vale
2017-12-18 23:36:13 +00:00
Johannes Wienke 79aaec5a99 Missing warning level 'suggestion' for vale
Vale can also, optionally, raise suggestions. These weren't covered yet.
2017-12-18 17:10:57 +01:00
w0rp 5577d567d1
Merge pull request #1238 from languitar/alex-from-file
Make alex a file linter
2017-12-18 15:28:27 +00:00
Johannes Wienke 1e574ed5f7 Make alex a file linter
alex does not find its configuration file when using temporary files for
input.
2017-12-18 15:26:52 +01:00
w0rp fdaac9bd78 Fix #1210 - Fix a Windows path issue which broke TSLint 2017-12-18 13:27:59 +00:00
w0rp 31241e9ed8 Get the TSLint tempname test running on Windows 2017-12-18 12:01:05 +00:00
w0rp e0c3cbd16f Remove some now redundant echo code 2017-12-18 11:22:24 +00:00
w0rp 8afd9a70a6 #1212 Fix some echo cursor flashing by only echoing once all linters are finished. 2017-12-18 11:14:10 +00:00
w0rp e4821c7f2f Indicate that 4.2.0 is no longer strictly required for prettier-eslint, and add links for prettier-eslint and prettier-standard 2017-12-18 10:37:21 +00:00
w0rp af7eb2b979 Sort the list of supported tools and add vale to more languages 2017-12-18 10:28:49 +00:00
Johannes Wienke 1626fce1c9 Enable the vale linter also for further markup languages (#1230)
* Enable the vale linter also for LaTeX
* Enable the vale linter for rst files
2017-12-18 10:15:00 +00:00
w0rp fdde8af894
Merge pull request #1232 from languitar/vale-json
Use JSON output with vale
2017-12-18 10:11:57 +00:00
w0rp 30c5bb3772
Merge pull request #1237 from danpker/add-python-venv-folder
Add python venv folder
2017-12-18 09:54:32 +00:00
Daniel Parker 938c150880 Update docs 2017-12-18 09:44:02 +00:00
Daniel Parker d3cf02ecda Add support for Vritual Env folder called venv 2017-12-18 09:33:11 +00:00
w0rp 65a99c1615
Merge pull request #1235 from nickdiego/master
Fix typos in flake8 test messages
2017-12-17 21:51:21 +00:00
Nick Diego Yamane ad1aee0b89 Fix typos in flake8 test messages
Signed-off-by: Nick Diego Yamane <nick.diego@gmail.com>
2017-12-17 16:45:57 -04:00
Johannes Wienke 96b90b45db Use JSON output with vale
Switches all vale instances to JSON output and provides an appropriate
handler for that. Without JSON, no end_col is provided and text
highlighting only catches the first character of every result.
2017-12-17 16:49:57 +01:00
w0rp c4956657dc
Merge pull request #1220 from languitar/linter-alex
Add a linter for alex
2017-12-17 13:11:49 +00:00
w0rp fc151d7b30
Merge pull request #1222 from srathbone/master
Fix PHP linter to support PHP 7.2 lint output
2017-12-17 12:41:28 +00:00
w0rp 55e09a4a2d Look for mypy.ini to find Python project roots too 2017-12-17 12:38:50 +00:00
w0rp 7e793c9d71 Fix a typo 2017-12-17 12:36:07 +00:00
w0rp 09d3ecc49b Clean up some doc formatting 2017-12-17 12:11:30 +00:00
w0rp 7284270120 Fix some right margin alignment 2017-12-17 12:10:07 +00:00
w0rp c8ee402cce
Merge pull request #1203 from Carpetsmoker/autocmd-start
Add ALEStartLint autocmd
2017-12-17 12:06:57 +00:00
w0rp a22def45b9
Merge pull request #1209 from butlerx/java-fixer
add google-java-format fixer
2017-12-17 12:00:52 +00:00
w0rp e06f2ded9d
Update ale.txt 2017-12-17 11:58:05 +00:00
Stephen Rathbone 78d1f5f5df Fix PHP linter to support PHP 7.2 lint output 2017-12-13 21:23:18 +00:00
Jelte Fennema e7eb272714
Fix erb linter for puppet style erb scripts 2017-12-13 14:59:59 +01:00
Johannes Wienke 0d046f5f01 Add a vader test for the message handler 2017-12-13 14:37:49 +01:00
Johannes Wienke 55ca96bd83 Add a linter for alex
https://github.com/wooorm/alex

Enabled for text-like file formats and documented in README and doc.
2017-12-13 14:37:42 +01:00
w0rp d2a6d9a915 Fix #1216 - Suppress trailing whitespace warings for ansible-lint when the option is set 2017-12-13 11:14:31 +00:00
Martin Tournoij 4825cce1cc
Run before lint cycle, rename autocmds 2017-12-10 13:10:52 +00:00
w0rp 7a88a3605c Disable a test on Windows for now, because Windows is stupid 2017-12-10 10:12:26 +00:00
w0rp 9152effa9f Get the new test to pass on Windows 2017-12-10 10:07:04 +00:00
w0rp cebe7c3918 Fix #1210 - Do not report this file as a temporary file in the quickfix list for TSLint 2017-12-10 09:58:33 +00:00
butlerx 0700c2d900
add google-java-format fixer 2017-12-09 14:25:35 +00:00
w0rp fcfd1025cc
Merge pull request #1198 from Carpetsmoker/goimports
goimports fixer doesn't work for vendored libraries
2017-12-08 13:09:22 +00:00
w0rp 2d3d6d3a10 Ask for the first two lines for :version in the issue template 2017-12-08 13:07:32 +00:00
Martin Tournoij 92f20b0e51
goimports fixer doesn't work for vendored libraries
In Go you can "vendor" packages by putting them in the `vendor/`
directory for a project. Adding the `-srcdir` argument makes `goimports`
pick up these packages, in addition to what you have in GOPATH.

Without this, `goimports` is not very useful, since most projects vendor
their packages.
2017-12-08 12:49:02 +00:00
w0rp 7d932a239c Fix #1205 Do not add line highlights if the groups do not exist 2017-12-07 23:25:17 +00:00
w0rp b6efb5649e Run tests in parallel 2017-12-07 20:07:45 +00:00
w0rp 7a71186d62
Merge pull request #1174 from eborden/eborden/add-brittany-for-haskell-formatting
Add brittany for Haskell formatting
2017-12-07 19:15:33 +00:00
w0rp fbc8ac9553
Update ale.txt 2017-12-07 19:01:13 +00:00
w0rp c6fc9cdb7b
Merge pull request #1192 from fvictorio/add-solhint-support
Add solhint support
2017-12-07 18:50:33 +00:00
w0rp 63ecc8341d Fix #1202 - Do not use --all-targets by default, because it doesn't work some of the time. 2017-12-07 18:47:01 +00:00
Martin Tournoij d6bf13502a
Add ALEStartLint autocmd
This grew out of my work in #1193; to ensure the statusline was being
updated I had to add:

    fun! s:redraw(timer)
        redrawstatus
    endfun

    augroup ALEProgress
        autocmd!
        autocmd BufWritePost * call timer_start(100, function('s:redraw'))
        autocmd User ALELint redrawstatus
    augroup end

Which kind of works, but is ugly. With this, I can replace the
`BufWritePost` with:

    autocmd User ALEStartLint redrawstatus

Which is much better, IMHO.

Actually, this patch actually replaces adding a function, since you can
do:

    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint hi Statusline ctermfg=darkgrey
        autocmd User ALELint      hi Statusline ctermfg=NONE
    augroup end

or:

    let s:ale_running = 0
    let l:stl .= '%{s:ale_running ? "[linting]" : ""}'
    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint let s:ale_running = 1 | redrawstatus
        autocmd User ALELint      let s:ale_running = 0 | redrawstatus
    augroup end

Both seem to work very well in my testing.

No need to `ale#Statusline#IsRunning()` anymore, I think?
2017-12-07 16:14:20 +00:00
w0rp 0e57ca3df3 Include the operating system in the issue template 2017-12-07 13:24:23 +00:00
w0rp 440ef30b79 Update the issue template 2017-12-07 13:23:17 +00:00
Evan Rutledge Borden f66837818a Update doc/ale.txt to include brittany. 2017-12-05 15:04:02 -05:00
Franco Victorio 85e0bd3314 Extract error code from message 2017-12-05 16:02:15 -03:00
Jeff Willette e2a8f759d8 Added option for `gometalinter` to lint package (#1156)
* Added option for `gometalinter` to lint package
* added tests for the `gometalinter` command
* changed gometalinter commands to use BufferCdString
2017-12-04 18:42:36 +00:00
Franco Victorio 57e1b03435 Add test for solhint handler 2017-12-04 14:23:46 -03:00
Franco Victorio 3e1bd8d922 Update documentation 2017-12-04 14:23:34 -03:00
Franco Victorio 0d627d4613 Add solhint support 2017-12-04 14:23:23 -03:00
w0rp 159733c459
Merge pull request #1191 from deltaskelta/add-importjs-fixer
added importjs fixer
2017-12-04 16:14:20 +00:00
Jeff Willette fba3c57872 added importjs fixer
- added tests for fixer functions
- added docs
2017-12-05 00:37:31 +09:00
w0rp 2f9869de44 Escape the perl executable, and cover the callbacks with tests 2017-12-02 20:47:01 +00:00
w0rp a4f8506227 Fix #1186 - Disable checking code with perl by default 2017-12-02 20:43:47 +00:00
w0rp acd1260339 Revert "Fix #1186 - Use -w by default for Perl, which does not execute code"
This reverts commit f5fc746d00.
2017-12-02 20:38:28 +00:00
Dave Wongillies 2bd966c5cc Puppet: allow for when parser doesn't supply column for errors (#1182)
* puppet: add test for puppet parser validate

* puppet: handle where parser validate doesn't supply the column

* puppet: add test for when parser validate doesn't supply column

* Fix puppet regex to handle Windows paths
2017-12-02 12:29:17 +00:00
w0rp f5fc746d00 Fix #1186 - Use -w by default for Perl, which does not execute code 2017-12-02 12:26:44 +00:00
w0rp 83760a0952
Merge pull request #1188 from ejsexton82/master
Fixed Command String for phpcbf Fixer
2017-12-02 12:25:13 +00:00
E.J. Sexton 122fdfd329 Fixed command string for phpcbf fixer 2017-12-02 09:27:18 +01:00
w0rp 6650c9a901 Break up the rest of the test script code into smaller files 2017-12-01 18:06:09 +00:00
w0rp 499c154272 Move the Bash code for running Vader tests to its own file 2017-12-01 17:50:24 +00:00
Sven-Hendrik Haase 51b127a4fd Add glslls (#1179)
* Add glslls-based LSP linter
* Make logfile configureable
2017-12-01 17:36:44 +00:00
w0rp 6053f764bd Make toggling work when pattern options are enabled 2017-12-01 17:12:19 +00:00
Carlos Coêlho daee4a4722 Add prospector for checking Python code (#1183) 2017-12-01 17:04:30 +00:00
E.J. Sexton 6b3927820b Fixed command string for phpcbf fixer 2017-12-01 14:55:34 +01:00
w0rp 948035e13d
Merge pull request #1185 from svenstaro/patch-1
Delete unnecessary unlets
2017-12-01 09:19:57 +00:00
Sven-Hendrik Haase 0406af4484
Delete unnecessary unlets
I'm not even sure why these were here.
2017-12-01 03:03:10 +01:00
w0rp a990188e27 Fix #1176 - Add an option for caching failing executable checks 2017-11-30 10:34:51 +00:00
w0rp fd261264d7 Escape the filename for finddir 2017-11-30 10:25:32 +00:00
w0rp c977bb2d05
Merge pull request #1181 from lgalke/tsserver-in-cygwin
[WIP] Finding tsserver inside cygwin
2017-11-30 09:46:24 +00:00
Lukas Galke 5d65980c42 fnameescape when searching nearest file 2017-11-30 00:33:13 +01:00
w0rp 6503b85d3d Fix #1178 - Don't use the output from eslint_d for fixing files when the output is an error message 2017-11-29 10:08:54 +00:00
Evan Rutledge Borden edb3a0c5e4 Add brittany for Haskell formatting
`brittany` is one of the options for Haskell source formatting. This
adds the necessary fixer files and documentation to support `brittany`
in `ALE`.
2017-11-28 17:58:13 -05:00
w0rp a43ada93e4 Allow warnings about trailing whitespace to be disabled for pycodestyle, and cover the flake8 code with tests 2017-11-28 10:12:49 +00:00
w0rp 0ab689db0a Allow warnings about trailing blank lines to be hidden for flake8 and pycodestyle 2017-11-28 10:08:34 +00:00
w0rp 4e821e64c7 Fix #1168 - Make the ruby linter executable configurable 2017-11-28 09:48:35 +00:00
w0rp bba6b4c23c
Merge pull request #1169 from benjie/master
Add support for linting GraphQL with ESLint
2017-11-27 18:20:39 +00:00
Benjie Gillam b0114deabc Reference the JS ESLint options 2017-11-27 15:57:17 +00:00
Benjie Gillam 09f9c21f1b Fix typo 2017-11-27 15:55:57 +00:00
Benjie Gillam e84ee4332f Add support for linting GraphQL with ESLint 2017-11-27 14:41:49 +00:00
w0rp d4ea0423a2 Fix go to definition tests on Windows 2017-11-26 23:20:21 +00:00
w0rp f311a46f79 Add go to definition to the README 2017-11-26 23:12:13 +00:00
w0rp 17f93b16ab Test go to definition tests on Windows 2017-11-26 23:08:38 +00:00
w0rp 17574e2fe1 Document go to definition support and put that and completion in an LSP section 2017-11-26 23:02:51 +00:00
w0rp 21b460bb1d Implement go to defintion for LSP linters 2017-11-26 22:27:08 +00:00
w0rp 01318b6930 Compress one line 2017-11-26 21:30:26 +00:00
w0rp c07b3b9bfc Fix #1166 - Add an option for the rls toolchain 2017-11-26 18:47:30 +00:00
w0rp ae7cd2c090 Fix #918 - Save prettier details for Haskell linters 2017-11-26 18:24:10 +00:00
w0rp 8254e507d6 #1162 Get LSP completions working reasonably well 2017-11-26 13:01:01 +00:00
w0rp b1a6abdda6 #1162 Add unfinished experimental code for supporting LSP completion, clean up the tests, and make the completion cancelling better 2017-11-26 12:24:18 +00:00
w0rp 2e50aadd56
Merge pull request #1165 from Carpetsmoker/blackhole
Delete to black hole register in fixer
2017-11-25 11:42:12 +00:00
Martin Tournoij 7dfe690b0b
Delete to black hole register in fixer
Otherwise it'll be in "" and "0, which is an unexpected side-effect
IMHO.
2017-11-25 03:36:36 +00:00
w0rp f99b027cc6 Fix the JSON fixer post-processor test harder on Windows 2017-11-22 23:45:51 +00:00
w0rp 5160f814d9 Fix #988 - Support --fix-dry-run for ESLint by processing the JSON output 2017-11-22 23:23:14 +00:00
w0rp 6318a08e08 Fix a fixer test on Windows 2017-11-22 22:50:27 +00:00
w0rp 8dd542bed0 Fix lambda and funcref chain values 2017-11-22 22:39:43 +00:00
w0rp d07b5b71a4 Add support for post-processing fixer output 2017-11-22 22:32:53 +00:00
w0rp fbfde6968a Fix a typo 2017-11-22 17:44:21 +00:00
w0rp 9857e0a4b7 Fix the eslint_d fixer tests for Windows 2017-11-22 17:25:37 +00:00
w0rp 6e65998ca7 #988 Take --fix-dry-run away again, because it is dumb 2017-11-22 17:01:50 +00:00
w0rp b5ec1a5fd0 Fix #988 - Support --fix-dry-run for ESLint where available, and --fix-to-stdout for eslint_d 2017-11-22 16:51:04 +00:00
w0rp 91fe749d03 Fix a bug with resetting pattern options when ALE is enabled again 2017-11-22 16:39:05 +00:00
w0rp 5d2ab192cf Support fixer aliases, and make prettier-eslint and prettier-standard just work 2017-11-22 15:31:39 +00:00
w0rp 5ed6f66f77 Reorganise the ALEFix tests 2017-11-22 14:55:08 +00:00
w0rp 4b4762697c #1095 Use --stdin-filepath where available for prettier-eslint 2017-11-22 14:46:14 +00:00
w0rp 382cb4d538 Fix a fixer test on Windows 2017-11-22 14:06:37 +00:00
w0rp 520541cd2d #1095 - Use --stdin-filepath for prettier, where available 2017-11-22 13:46:11 +00:00
w0rp 3f70f1cbf1 Disable piping buffer data into commands for fixing files where needed 2017-11-22 13:01:13 +00:00
w0rp e7865d2f94 Fix the empty echo fixer test on Windows 2017-11-22 12:41:16 +00:00
w0rp 074a011b08 Make fixing ignore empty output better 2017-11-22 12:01:21 +00:00
w0rp 796fb651d6 Fix the Windows tests for pyls 2017-11-22 00:42:39 +00:00
w0rp 52f3ad7c75 Escape the pyls executable in the command, and support running virtualenv pyls executables 2017-11-21 23:51:18 +00:00
w0rp e6fb32b792 Remove a Unicode character Vint complains about 2017-11-21 16:39:05 +00:00
w0rp 8be85c2997 Use some default regex for completion support in other filetypes 2017-11-21 16:18:08 +00:00
w0rp 3ef98f42bd Fix #783 - Do not run Flow with home directory configuration files by default 2017-11-21 14:37:01 +00:00
w0rp ac7f69063d #1151 - Overhaul the foodcritic linter for checking files on disk 2017-11-21 13:38:33 +00:00
w0rp ce2986cfa5
Merge pull request #1158 from rhysd/redpen-error-code
redpen: Use 'code' key to show validator
2017-11-21 12:33:19 +00:00
rhysd d465b71362 redpen: use 'code' key to show validator
instead of embedding it into text
2017-11-21 15:49:04 +09:00
w0rp 7ea3aba5e5 Quietly add go to definition support for tsserver 2017-11-21 00:21:45 +00:00
w0rp 5a3a695586
Merge pull request #1154 from deltaskelta/add-filename-key-for-gobuild
Added filename key for `go build` linter
2017-11-20 20:58:43 +00:00
w0rp c9e203e620 Fix #859 Include test and jaxb Java source paths when available 2017-11-20 18:54:57 +00:00
Jeff Willette b9f02ffb27 Added filename key for `go build` linter
- Re: f224ce8a37

- The issues that prompted the above commit which reverted changes made to `go build` and
`gometalinter` seemed to suggest that the main issue was with gometalinter and that
changes should be put into different commits so they are independent of each other

- This commit reinstates the changes to the `go build` linter which seem to be uncontested
and it also seems absolutely necessary to show errors from all files in the package which
may have caused a build failure.
2017-11-20 23:50:14 +09:00
Shogo NAMEKI f20e5a4cf0 Add `drafter` for checking API Blueprint files (#1152) 2017-11-20 10:57:13 +00:00
w0rp f224ce8a37 Revert "Show problems from other files for gobuild and gometalinter"
This reverts commit e721f851b4.
2017-11-20 10:43:45 +00:00
w0rp 9420c411bd #1149 Fix conversion from URIs to filenames on Windows 2017-11-20 00:02:33 +00:00
w0rp 597507e519 Make the message formats configurable with buffer local variables 2017-11-19 23:44:09 +00:00
w0rp 0cb8130d0e Stop the completion tests from failing randomly 2017-11-19 23:09:20 +00:00
w0rp cc04a7aaa0 Make the iverilog tests match the other tests 2017-11-19 23:06:12 +00:00
RedBug312 1afe2992e2 Make options configurable for iverilog (#1143) 2017-11-19 22:59:17 +00:00
w0rp 344add6a28 Fix a typo 2017-11-19 13:57:04 +00:00
w0rp 151f9f857c Add an FAQ entry explaining how to configure ALE for different buffers. 2017-11-19 13:56:09 +00:00
w0rp 62904d39ee #852 - Capture error codes for tflint 2017-11-19 13:37:56 +00:00
w0rp fa7f0e2b85 #852 - Capture error codes for swiftlint 2017-11-19 13:33:20 +00:00
w0rp b16c82f2f1 #852 - Capture error codes for swaglint 2017-11-19 12:46:06 +00:00
w0rp d7a60ade77 #852 - Capture error codes for stylelint 2017-11-19 12:30:20 +00:00
w0rp 01b2971d04 #852 - Capture error codes for slim-lint 2017-11-19 01:08:20 +00:00
w0rp 7123f7236b #852 - Capture error codes for reek 2017-11-19 00:54:09 +00:00
w0rp c012563984 #852 - Capture error codes for nimcheck 2017-11-19 00:38:00 +00:00
w0rp 3c8f3221df #852 - Capture error codes for mcs and mcsc 2017-11-19 00:19:09 +00:00
w0rp 40e26f0bc2 #852 - Capture error codes for luacheck 2017-11-19 00:02:35 +00:00
w0rp 41cb174f3a #852 - Capture error codes for jscs 2017-11-18 23:55:47 +00:00
w0rp cefc5dc5b8 #852 - Capture error codes for csslint 2017-11-18 23:15:23 +00:00
w0rp 2b50e68c7e Add an FAQ entry explaining how to configure C or C++ projects 2017-11-18 18:59:03 +00:00
w0rp 7455e2e97d #852 - Capture error codes for checkstyle 2017-11-18 18:29:12 +00:00
w0rp 49ccfb1a00 Fix #516 - Add support for pyflakes for Python 2017-11-17 18:11:28 +00:00
w0rp 0e96d4576a
Merge pull request #1142 from rhysd/redpen-ext
* redpen support for asciidoc, reST, LaTeX and Re:VIEW
* redpen: fix start column
* add redpen as text linter
2017-11-17 16:34:01 +00:00
w0rp 5635b3c864 Fix #741 - Set highlights for entire lines when signs are disabled 2017-11-17 14:29:57 +00:00
Thomas van der Burgt 22ec81e1de add ale_asm_gcc_executable option (#1138)
* add ale_asm_gcc_executable option
* add Vader tests for asm gcc linter command callbacks
2017-11-17 10:02:30 +00:00
w0rp a139b387c8
Merge pull request #1141 from elebow/eruby-fix-command-file-redir
erb, erubis: Redirect file into first command.
2017-11-17 09:27:40 +00:00
rhysd 79f15b0e30 add redpen as text linter 2017-11-17 16:43:16 +09:00
rhysd ca345ffb62 redpen: fix start column 2017-11-17 15:34:07 +09:00
rhysd 44cd07d39c redpen support for asciidoc, reST, LaTeX and Re:VIEW 2017-11-17 15:34:07 +09:00
Eddie Lebow b390c69642 erb, erubis: Redirect file into first command.
The previous version relied on a zsh-specific behavior where
`<filename` after a pipe could redirect to the first command. This
is the standard way to do it.
2017-11-16 23:10:25 -05:00
w0rp 1f4f19cbd4
Merge pull request #1133 from nicwest/linter-clj-joker
add joker handler for clojure
2017-11-16 11:06:27 +00:00
w0rp 3ddb858881
Merge pull request #1137 from rhysd/redpen
Add Redpen support
2017-11-16 10:44:52 +00:00
rhysd e232ea07c2 redpen: fix trailing comma in test data 2017-11-16 19:42:51 +09:00
rhysd f1314b285c redpen: support end_lnum and end_col if possible 2017-11-16 19:28:30 +09:00
w0rp f90a2d5474
Merge pull request #1114 from elebow/eruby-strip-rails-flavoring
Strip Rails flavoring from eRuby when in a Rails project. Fixes #580.
2017-11-16 10:19:32 +00:00
w0rp ee07be5f59
Merge pull request #1135 from aurieh/master
Capture error codes for checkmake
2017-11-16 10:15:37 +00:00
rhysd c9c52ef370 add tests and doc for redpen support 2017-11-16 18:40:10 +09:00
w0rp 71d34fc0c6 Fix #1132 - Parse react error codes again for ESLint 2017-11-16 09:34:24 +00:00
rhysd 981cb95d80 add redpen support 2017-11-16 18:12:08 +09:00
aurieh 7565a45b6f Modify vader tests for d585123 2017-11-16 01:01:59 +02:00
aurieh d585123d64 #852 Capture error codes for checkmake 2017-11-16 00:58:33 +02:00
Nic West eda20d0585 add joker handler for clojure
Adds new linter for clojure using joker

https://github.com/candid82/joker

fixes #975
ref #544 #1040
2017-11-15 22:23:46 +00:00
w0rp 1d65e5692f #852 Capture error codes for pycodestyle, and consider every code except E999 to be style errors or warnings 2017-11-15 17:47:24 +00:00
w0rp cf538c3a58 #852 Capture error codes for pylint, throw away the msgid values 2017-11-15 17:35:34 +00:00
w0rp 08f4f8f0fc #852 Capture error codes for shellcheck 2017-11-15 17:26:52 +00:00
w0rp b14377915b Clean up tests to stop people copy and pasting the wrong examples 2017-11-15 17:21:17 +00:00
Jeff Willette e721f851b4 Show problems from other files for gobuild and gometalinter
* Added filename keys to gobuild and gometalinter
* Removed skipping files not in current package
* Removed `--include` for gometalinter
* Fixed the tests
2017-11-15 16:34:30 +00:00
w0rp 290ed4885b Fix #1131 - Capture both output streams for golint 2017-11-15 16:24:29 +00:00
w0rp e12e5c912c Complain about stray echo lines in the codebase 2017-11-15 12:00:13 +00:00
w0rp 38bc489604
Merge pull request #1130 from deltaskelta/patch-1
fix goimports typo in registry
2017-11-15 11:35:51 +00:00
w0rp 8f80708da6 #852 - Capture error codes for cpplint 2017-11-15 11:28:16 +00:00
w0rp ff5c6b0509 #852 - Capture error codes for ansible-lint 2017-11-15 10:11:32 +00:00
w0rp 37f2f70439 Update the documentation for GetLoclist 2017-11-15 09:16:36 +00:00
Jeff Willette a36129eab0
fix goimports typo in registry 2017-11-15 09:40:40 +09:00
w0rp 48be035da8 Update the documentation for :ALEDetail 2017-11-14 23:29:48 +00:00
w0rp d48506f9c1 Fix #757 - Show :ALEDetail messages in a window 2017-11-14 23:25:01 +00:00
w0rp 6b2c61a5cc Fix #1128 - Add g:ale_linters_explicit for only enabling linters explicitly 2017-11-14 19:55:46 +00:00
w0rp 2e9cd978a2
Merge pull request #1129 from aliou/rubocop-cop-as-error-code
#852 - Capture error codes for Rubocop
2017-11-14 18:16:22 +00:00
w0rp 48eb362fca Add tests for the goimports fixer commands 2017-11-14 17:46:40 +00:00
Jeff Willette 20a01404f3 Added support for goimports fixer (#1123)
* Added support for goimports fixer
* added test and executable check
* fixed test assertions to reflect executable check
2017-11-14 17:37:22 +00:00
Aliou Diallo 425482116e
#852 - Capture error codes for Rubocop 2017-11-14 17:50:15 +01:00
w0rp 16e7dc2371 Fix #1069 Support formatting the loclist messages with g:ale_loclist_msg_format 2017-11-14 10:28:36 +00:00
w0rp d8f9aef84a #852 - Capture error codes for flake8 2017-11-14 09:41:29 +00:00
w0rp 037aaae593 #852 - Capture error codes for TSLint 2017-11-13 23:36:15 +00:00
w0rp fea708cff3 #852 Pass on error codes in the loclist corrections 2017-11-13 23:34:00 +00:00
w0rp 8a3a2da87e #852 Capture error codes for ESLint 2017-11-13 23:23:06 +00:00
w0rp 764a33b1c9 Fix #1124 - Handle stack-build errors with leading spaces 2017-11-13 22:47:19 +00:00
w0rp 6c112dd1cc Fix #1122 - Handle notes for shellcheck errors again, and use type 'I' for notes 2017-11-13 16:08:09 +00:00
w0rp a5f7f51c9a #1121 Tell people how to lint when leaving insert mode with Ctrl+C 2017-11-13 10:27:25 +00:00
Eddie Lebow ad7ea36307 [eruby] Add GetCommand to erubis linter
GetCommand conditionally adds a filter (implemented as inline Ruby code
in the command line) to transform some of the problematic
Rails-specific eRuby syntax. Specifically, <%= tags are replaced with
<%.

This does not reduce the effectiveness of the linter, because the
transformed code is still evaluated.

This solution was suggested by @rgo at
https://github.com/w0rp/ale/issues/580#issuecomment-337676607.
2017-11-12 23:33:34 -05:00
Eddie Lebow ea7f68226e [eruby] Add GetCommand to erb linter
GetCommand conditionally adds a filter (implemented as inline Ruby code
in the command line) to transform some of the problematic
Rails-specific eRuby syntax. Specifically, <%= tags are replaced with
<%.

This does not reduce the effectiveness of the linter, because the
transformed code is still evaluated.

This solution was suggested by @rgo at
https://github.com/w0rp/ale/issues/580#issuecomment-337676607.
2017-11-12 23:33:30 -05:00
Eddie Lebow e9e29e003c [eruby] Rename `erubylint` → `erb` to match tool name 2017-11-12 23:33:22 -05:00
w0rp 584e0bc7f2 #852 Support formatting echo messages with error codes. No linters set the `code` key yet 2017-11-13 00:47:34 +00:00
w0rp 70623ca8a7 Add support for showing Info severities in echoed messages 2017-11-12 23:19:26 +00:00
w0rp 7d056b0839 Update the documentation for the echo message format, so it makes more sense 2017-11-12 23:01:11 +00:00
w0rp e7b9befaa6 Sort some linter entries alphabetically 2017-11-12 12:11:15 +00:00
w0rp 3c34848e02 Fix #510 Support checking LESS files with stylelint 2017-11-12 12:09:19 +00:00
w0rp 5b3094558b Merge branch 'zanona-less-lessc-linter' 2017-11-12 11:35:14 +00:00
w0rp 7edcb2210b Show problems from other files for lessc 2017-11-12 11:35:01 +00:00
w0rp cd5da50531 Add tests for the command and executable callbacks, and make them use local node_modulse esxecutables like other linters 2017-11-12 11:25:24 +00:00
Michael Jungo 3aff1df961 Add tests for ocaml-language-server callbacks 2017-11-12 10:56:53 +00:00
w0rp d20e3bc71c #1108 Support setting b:ale_linter_aliases to a List 2017-11-12 10:56:53 +00:00
w0rp b98387d0fa #1108 Support using Lists and 'all' for b:ale_linters 2017-11-12 10:56:53 +00:00
w0rp 099df0af52 #1108 Support selecting fixers with Lists 2017-11-12 10:56:53 +00:00
Eddie Lebow 365d023d0e perlcritic: all issues are warnings
Perlcritic is a style checker, not a syntax validator.

This change was originally proposed by @RsrchBoy in
https://github.com/w0rp/ale/pull/784.
2017-11-12 10:56:53 +00:00
Michael Jungo 5df6ce6bb8 Remove id from LSP notifications 2017-11-12 10:56:53 +00:00
Michael Jungo 39107a48b9 Add ocaml-language-server for OCaml and ReasonML 2017-11-12 10:56:53 +00:00
w0rp 8e0d1f57c6 Fix a typo 2017-11-12 10:56:53 +00:00
w0rp 555743a2ba #1095 Cache the sorting of patterns for g:ale_pattern_options 2017-11-12 10:56:53 +00:00
w0rp 8cd1ccff84 #1095 Apply all patterns for g:ale_pattern_options, instead of just the first match 2017-11-12 10:56:53 +00:00
jnduli 6c60ca24c1 Add rstcheck linter to check for errors in restructured text (#1090) 2017-11-12 10:56:53 +00:00
Florian Beeres 52b6024997 Handle flow extra errors (#946)
Show more information for Flow errors with :ALEDetail
2017-11-12 10:56:53 +00:00
w0rp 4952e2f143 #1098 Add protoc-gen-lint to the list of supported tools 2017-11-12 10:56:53 +00:00
Jeff Willette 8bc44ed585 Added support for linting of proto files (#1098)
* Added support for linting of proto files
* Added function to get the proper protoc command
2017-11-12 10:56:53 +00:00
w0rp a8c5e0f4dc Simplfy semver handling and share the semver version cache across everything 2017-11-12 10:56:53 +00:00
wuqiong4945 911b6d8f71 add 'output_stream': 'stderr', let golint work 2017-11-12 10:56:53 +00:00
w0rp 0741612db7
Merge pull request #1113 from jungomi/ols-tests
Add tests for ocaml-language-server callbacks
2017-11-12 10:26:36 +00:00
Michael Jungo cb3a25f276 Add tests for ocaml-language-server callbacks 2017-11-12 02:06:28 +01:00
w0rp 27e2f53ac9 #1108 Support setting b:ale_linter_aliases to a List 2017-11-12 00:11:50 +00:00
w0rp ae08f80ead #1108 Support using Lists and 'all' for b:ale_linters 2017-11-11 23:55:11 +00:00
w0rp 3111c6c1ca
Merge pull request #1111 from elebow/perlcritic-only-warnings
Perlcritic: All issues are warnings
2017-11-11 23:47:11 +00:00
w0rp f6ac8a9eb9 #1108 Support selecting fixers with Lists 2017-11-11 23:04:08 +00:00
Eddie Lebow 4d44996af6 perlcritic: all issues are warnings
Perlcritic is a style checker, not a syntax validator.

This change was originally proposed by @RsrchBoy in
https://github.com/w0rp/ale/pull/784.
2017-11-11 17:46:21 -05:00
w0rp b789b9eaad
Merge pull request #1110 from jungomi/ocaml-language-server
* Add ocaml-language-server for OCaml and ReasonML
* Remove id from LSP notifications
2017-11-11 22:13:09 +00:00
Michael Jungo fb00acf734 Remove id from LSP notifications 2017-11-11 19:28:24 +01:00
Michael Jungo f8fec369e5 Add ocaml-language-server for OCaml and ReasonML 2017-11-11 19:27:41 +01:00
w0rp 9e7c493e7e Fix a typo 2017-11-11 14:27:53 +00:00
w0rp bac02c9d81 #1095 Cache the sorting of patterns for g:ale_pattern_options 2017-11-11 14:26:54 +00:00
w0rp 8c1d6eda81 #1095 Apply all patterns for g:ale_pattern_options, instead of just the first match 2017-11-11 13:44:12 +00:00
jnduli 6c014a25e8 Add rstcheck linter to check for errors in restructured text (#1090) 2017-11-11 12:10:17 +00:00
Florian Beeres 1ddc3eec6d Handle flow extra errors (#946)
Show more information for Flow errors with :ALEDetail
2017-11-11 12:07:08 +00:00
w0rp bb271859ef #1098 Add protoc-gen-lint to the list of supported tools 2017-11-10 09:45:07 +00:00
Jeff Willette 27780cbb23 Added support for linting of proto files (#1098)
* Added support for linting of proto files
* Added function to get the proper protoc command
2017-11-10 09:37:23 +00:00
w0rp d425b8a18a Simplfy semver handling and share the semver version cache across everything 2017-11-09 23:42:54 +00:00
Marcus Zanona 1ad7d5e6ca Remove unnecessary cat command from less#lessc 2017-11-09 19:52:08 -02:00
Marcus Zanona 4bc31fcd18 Fix imported files path lookup on less#lessc linter
Ale saves a temporary file (%t) which does not share the same path as
the original file, breaking import statements with relative URLs.
This fix sends content to `lessc` over stdin and adds
the current file (%s) as one of the included paths, so statements like
`@import '../utils' will correctly resolve based on the current file path.
2017-11-09 13:46:03 -02:00
Marcus Zanona 7ed82ab712 Adjust author info on less#lessc linter 2017-11-09 13:40:24 -02:00
Marcus Zanona decf8188bc Adjust formatting on less#lessc linter 2017-11-09 13:39:38 -02:00
w0rp c1fa88e78c
Merge pull request #1105 from wuqiong4945/master
add 'output_stream': 'stderr', let golint work
2017-11-09 13:33:10 +00:00
wuqiong4945 bcc215c4e0
add 'output_stream': 'stderr', let golint work 2017-11-09 21:14:29 +08:00
Marcus Zanona 732d8e3ed6 Add support for linting less files with lessc 2017-11-09 10:39:39 -02:00
w0rp 8ef8a35462 Fix #1101 - Ignore no-implicit-dependencies errors until TSLint supports checking via stdin properly 2017-11-09 10:32:41 +00:00
Auri 8a4cf923a8 Add PyLS linter (#1097)
* Support PyLS (python language server)
* Replace pyls#GetProjectRoot and add more config types to ale#python#FindProjectRoot
2017-11-08 17:58:56 +00:00
w0rp 86e8074017
Merge pull request #1093 from ttaylorr/master
ale_linters: add 'dafny' linter
2017-11-08 17:36:22 +00:00
Taylor Blau da8012971a ale_linters/dafny: lint only saved files 2017-11-08 09:28:24 -08:00
Taylor Blau 105251c1de README: denote that 'Dafny' linter checks files 2017-11-07 22:18:49 -08:00
Taylor Blau 248a5eb2f6 ale_linters: add 'dafny' linter 2017-11-07 22:11:49 -08:00
w0rp 1bf894f48c Fix #1086 - Implement command chaining for fixers 2017-11-07 23:20:14 +00:00
w0rp d97924b698 Tell users when a fixer does not exist, and make the no fixers message softer 2017-11-07 19:47:20 +00:00
w0rp e4cd371621
Merge pull request #1063 from aurieh/master
Add dart LSP (resolves #1006)
2017-11-07 11:54:00 +00:00
aurieh 3a57e4d151 Update doc and README for Dart LSP 2017-11-07 10:55:43 +02:00
aurieh b5254e9760 Add dart LSP (resolves #1006) 2017-11-07 10:55:43 +02:00
w0rp 8e71f82f8f #1006 Fix raw message handling for LSP support in NeoVim 2017-11-06 22:46:32 +00:00
w0rp 3cbf716d72
Merge pull request #1087 from duleorlovic/master
Add example for changing highlight color
2017-11-06 21:15:12 +00:00
Dusan Orlovic 89832884c9
Add example for changing highlight color
Added example on how to actually change the color.
Related to #1077
2017-11-06 14:17:38 +01:00
w0rp fa7d041c26 Fix #1085 - Add a final newline character to tsserver and LSP messages 2017-11-05 21:41:53 +00:00
w0rp 3c8e6ed51c Modify the shmft tests so they won't mess with your settings 2017-11-05 21:31:41 +00:00
Simon Bugert 716b22d524 Add shfmt fixer for sh files (#1083)
* Add shfmt fixer for sh files
* Add tests for shfmt fixer
2017-11-05 21:24:41 +00:00
David Sierra DiazGranados 7086586b17 Add executable option for phpmd linter (resolves #1076) (#1078)
* Add executable option for phpmd linter (resolves #1076)
* Add test for phpmd executable option
2017-11-05 18:53:12 +00:00
w0rp 7b5108d934 Fix #626 - Automatically use `cargo check` and `cargo check --all-targets` for cargo versions that are new enough 2017-11-05 18:37:44 +00:00
w0rp caed406e16 Fix #1062 - Use <nomodeline> for the ALELint autocmd, so we don not mess with folds, etc. 2017-11-05 17:34:36 +00:00
w0rp 34674e088d Fix #1061 - Handle the filenames returned by javac 2017-11-05 15:33:31 +00:00
w0rp d851f399c0 Fix #1058 - Ignore all errors with bad calls to jobstop() in NeoVim 2017-11-04 10:54:28 +00:00
w0rp 9c0a5635df #1081 Remove the ale#python#IsExecutable function 2017-11-04 10:46:19 +00:00
w0rp 9010458581 #1081 Use executable() for Python executables on Windows, and rename the test files to .exe so they will pass the executable() check 2017-11-04 10:41:08 +00:00
w0rp c26e5e277e Fix #491 - Only set -x for shellcheck for versions which support the option 2017-11-03 22:08:26 +00:00
Antoine Reilles 54f44c2d0f windows compatible warning match pattern for erlc (#1071)
* windows compatible warning match pattern for erlc
2017-11-03 18:56:34 +00:00
w0rp 1752ad9ad1 #1074 #1077 Add highlight configuration to the FAQ 2017-11-02 10:39:40 +00:00
w0rp a09db595f1
Merge pull request #1072 from drrcknlsn/master
Prevent logging of errors in the php linter.
2017-11-01 20:56:10 +00:00
Derrick Nelson a786e01127 Prevent logging of errors in the php linter. 2017-10-31 20:02:59 -04:00
w0rp 3115d2025a
Merge pull request #1068 from maximbaz/patch-1
Put info about lightline-ale in README.md (fixes #1065)
2017-10-31 13:03:02 +00:00
w0rp 9cd0d75c4f Fix #936 - Check the actual files for gosimple and staticcheck 2017-10-31 13:01:01 +00:00
Maxim Baz 0ed639a116
Put info about lightline-ale in README.md (fixes #1065) 2017-10-31 13:26:12 +01:00
w0rp 50f7ad3552 #857 - Add b:ale_fix_on_save for controlling fixing on save for specific buffers 2017-10-30 22:19:57 +00:00
w0rp 1575b3d7dd
Merge pull request #1059 from ahmedelgabri/reason-refmt
refmt fixer for ReasonML
2017-10-30 11:30:13 +00:00
Ahmed El Gabri 634eb1920c
refmt fixer for ReasonML 2017-10-29 21:48:28 +01:00
w0rp daecbad543 Fix #719 - Add ALEReset and ALEResetBuffer for removing problems for all buffers or one buffer 2017-10-29 17:03:29 +00:00
w0rp 1aa737cdc9 #817 - Document the buffer toggling options, and define plug mappings for everything 2017-10-29 10:55:02 +00:00
w0rp 5fc2b98b73 #817 Add commands for toggling ALE for only the current buffer 2017-10-28 19:36:16 +01:00
w0rp ea3a8e3c62 #817 Move code for toggling ALE to its own file 2017-10-28 15:41:14 +01:00
w0rp 6e681d9066 Fix #971 - Add an option for turning errors about missing eslint config files off. 2017-10-28 12:11:33 +01:00
w0rp 0e848b608c
Merge pull request #1053 from SamHowie/hackfmt
Add hackfmt fixer
2017-10-27 23:36:16 +01:00
Sam Howie 36898436b5 Add hackfmt fixer 2017-10-27 13:42:55 -07:00
w0rp 73b8181ce6 #1054 - Prevent ALE from adding the after directory to runtimepath too much 2017-10-27 11:38:01 +01:00
w0rp d4d939bea9 Fix #1039 - Only check the file on disk for dartanalyzer 2017-10-26 23:31:07 +01:00
w0rp 6490d3a5e6 Fix #1041 - Do not request completions shortly after CompleteDone 2017-10-26 23:18:12 +01:00
w0rp 33c2c20e66 Fix #1051 - Support ash and dash for shellcheck and the sh linter 2017-10-26 21:21:42 +01:00
w0rp 3ac92ea529 Fix #1048 - Do not lint files named "." 2017-10-26 20:29:33 +01:00
w0rp 3ab069c9bd Merge pull request #1052 from natw/tflint-no-stdin
don't use stdin with tflint
2017-10-26 20:25:55 +01:00
Nathaniel Williams 22e8050639 don't use stdin with tflint 2017-10-26 14:14:28 -05:00
Nathaniel Williams e4456a4e0e Add tflint fot Terraform 2017-10-26 19:37:04 +01:00
w0rp 6ed456f99c Merge pull request #1009 from sirbrillig/add/phpcs-include-code-option
phpcs: include sniff code in message
2017-10-26 17:49:46 +01:00
Payton Swick 40f5e54198 Add test for phpcs error code 2017-10-26 12:22:34 -04:00
Payton Swick aca66a54a5 Include sniff code in message 2017-10-26 12:22:08 -04:00
w0rp f15c8f4127 #1049 Do not modify runtimepath if the conflict warnings are disabled 2017-10-26 12:26:16 +01:00
w0rp 0702cb59b7 Fix #1045 - Handle both output streams for Cargo 2017-10-26 10:03:10 +01:00
w0rp 5917de565d Fix #491 - Use -x for shellcheck for checking files with sourced files 2017-10-26 00:48:51 +01:00
w0rp 2f5b94e07d Remove redundant code for the GCC handler, and fix bugs with errors for - not being parsed 2017-10-26 00:09:26 +01:00
w0rp da365134b5 Fix an exception with notes with no previous message 2017-10-25 23:43:09 +01:00
w0rp 7eb16836d0 Fix indentation for the haml-lint file 2017-10-25 23:07:38 +01:00
w0rp f38ced1e4c Merge pull request #1047 from thenoseman/linter-hamllint_autodetect_config
[PR: hamllint] auto-detect .rubocop.yml and .haml-lint.yml when using haml-lint
2017-10-25 23:01:49 +01:00
w0rp 4af7219078 Make one of the sign tests work in all locales 2017-10-25 22:35:21 +01:00
Gerry Agbobada 25d2af0b25 Handle multiple files localtion lists with gcc handler (#1034)
Handle multiple files in the GCC handler.
2017-10-25 22:29:36 +01:00
Frank Schumacher b0b91ba897 force add test fixtures for hamllint 2017-10-25 21:35:24 +02:00
Frank Schumacher 45ed37a5d9 auto-detect .rubocop.yml and .haml-lint.yml
Based on path to current file
2017-10-25 20:46:16 +02:00
w0rp 960ae62aaa Make the sign placement test pass more often by using another shell 2017-10-25 01:11:46 +01:00
w0rp 680672117f Make the highlight placement test pass more often by using another shell 2017-10-25 01:05:48 +01:00
w0rp 5029078df3 Set better highlights for write-good 2017-10-25 00:58:16 +01:00
w0rp 94bdabb8c3 Merge pull request #1044 from sumnerevans/mail-linters
#955 Add vale linter for mail files
2017-10-25 00:40:59 +01:00
w0rp eec529ad9d Fix the write-good tests on Windows 2017-10-25 00:39:23 +01:00
Sumner Evans 7ac07a30b8 Fix #643 - Add support for write-good for many languages 2017-10-25 00:28:06 +01:00
Sumner Evans 780844ad73
#955 add documentation 2017-10-24 17:14:42 -06:00
Sumner Evans db769fb060
#995 add vale linter for mail files 2017-10-24 17:01:40 -06:00
w0rp 1a5ef969a5 Merge branch 'aurieh-master' 2017-10-24 22:45:30 +01:00
Su Shangjun d644dc797f example for 'rcfile' on ale_python_pylint_options
Two hyphens instead of one will enable the option `rcfile`.
2017-10-24 22:43:54 +01:00
aurieh b401772d23 Add Vader tests 2017-10-25 00:39:54 +03:00
Christopher Swingley 1c56bebd7c proselint for mail files (#1037)
Add proselint for mail files
2017-10-24 22:34:38 +01:00
w0rp fe729dab58 Merge pull request #1030 from grddev/run-tests-osx
Update test scripts to work on OS X
2017-10-24 22:30:42 +01:00
Zack Kourouma 07dad64acb adds fixer support for hfmt (#1027)
Add support for fixing Haskell with hfmt
2017-10-24 22:29:04 +01:00
Diego Oliveira b172cd8b17 Add phan as a linter for php files (#1026)
Add phan for checking PHP code
2017-10-24 22:25:02 +01:00
w0rp c248885e57 Merge pull request #1025 from kfox/add-rustfmt-fixer
add rustfmt fixer
2017-10-24 22:20:03 +01:00
w0rp 0e4dd95e5d Merge pull request #1017 from carakan/elixir_format
`mix format` new fixer for elixir lang
2017-10-24 22:13:04 +01:00
w0rp 5a91f7e19f Merge pull request #1043 from fengdasuk19/fengdasuk19-pylint-rcfile
example for 'rcfile' on ale_python_pylint_options
2017-10-24 22:06:38 +01:00
Su Shangjun c96e7402ba example for 'rcfile' on ale_python_pylint_options
Two hyphens instead of one will enable the option `rcfile`.
2017-10-24 08:11:56 -05:00
aurieh f0a0aef33d Update doc/ale.txt & README.md 2017-10-24 15:09:56 +03:00
aurieh 4884e33f8b Add checkmake (resolves #866) 2017-10-24 15:03:47 +03:00
w0rp be5c7a09ce Add a badge for AppVeyor, and remove some trailing spaces from the README 2017-10-23 23:21:50 +01:00
w0rp b952dda386 Get all tests to pass on Windows 2017-10-23 23:09:40 +01:00
w0rp 231398dddc Get more of the tests to pass on Windows 2017-10-23 01:26:31 +01:00
Carlos Ramos be1377f6d7 add basic documentation for elixir mix 2017-10-22 19:44:44 -04:00
Carlos Ramos 3212278c91 fix test's and delete unused code 2017-10-22 19:20:38 -04:00
Carlos Ramos 43653ef548 new fixer elixir mix format
(only available in elixir > 1.6)
2017-10-22 19:20:38 -04:00
w0rp c4579e1809 Merge pull request #1032 from diegoholiveira/tests_phpmd
Fix the regex of phpmd
2017-10-22 18:02:44 +01:00
Diego Oliveira 5b986ce5d3 Fix the regex of phpmd 2017-10-22 14:56:09 -02:00
w0rp 0b0cbfa80a Merge pull request #1022 from 0x6a62/fix-typos
Fix typo
2017-10-22 17:00:16 +01:00
Gustav Munkby ed93cd1494 Update test scripts to work on OS X
There were a couple of issues
 - `paste` requires a file argument
 - `mktemp` requires a pattern argument
 - `sort` doesn't support `-h`, but `-n` is enough for sorting on numbers, and `-s` was introduced to perform a stable sort instead.

The main issues were that BSD `sed` does not support:
 - Alternation (`\|`) - solved by splitting to multiple patterns
 - Bound shortcuts (`x\+`, `x\?`) - solved by replacing with `xx*` and `x\{0,1\}` respectively
 - Lower-casing (`\L`) - solved by piping through `tr` instead (this will lowercase everything and not only the integration names, but I assumed that wasn't too much of an issue, as a portable alternative for the selective downcasing would be much more involved).
2017-10-22 10:42:36 +02:00
Kelly Fox 35031a0b8a add rustfmt fixer 2017-10-21 12:31:49 -05:00
jb 841acf725c Fix typo 2017-10-21 08:16:59 -04:00
w0rp 3878be9977 Merge pull request #1018 from zkourouma/master
Pretter fixer support for Less filetype
2017-10-21 11:31:15 +01:00
Zack Kourouma b43ed6baf5 add doc file for less 2017-10-20 18:30:34 -07:00
Zack Kourouma e023e7a2fe add prettier fixer support for 'less' filetype 2017-10-20 18:29:57 -07:00
w0rp 346c91fb6b Merge pull request #1012 from gosukiwi/patch-1
Add instructions for setting up Lightline
2017-10-20 00:13:02 +01:00
Federico Ramirez a97afd3380 Add instructions for setting up Lightline 2017-10-19 13:39:49 -03:00
w0rp 658ec4b10e Merge pull request #1010 from rhysd/markdown-remark-lint
add support for remark-lint
2017-10-19 11:27:25 +01:00
rhysd 4339af2bb6 add support for remark-lint 2017-10-19 18:17:04 +09:00
w0rp 5292d2f349 Get more tests to pass on Windows 2017-10-18 23:42:51 +01:00
w0rp 81d993086e #904 - Allow linting to run on save a second after :q fails 2017-10-17 00:37:29 +01:00
w0rp 5946a128c3 Merge pull request #1001 from carakan/tslint_fixer
new tslint fixer for typescript
2017-10-16 23:42:28 +01:00
Carlos Ramos 8a8879a28f fix test't 2017-10-16 12:08:10 -04:00
Carlos Ramos 07ebfbeef0 Add new fixer tslint for typescript, fixes #932 2017-10-16 00:53:17 -04:00
w0rp a790077136 Merge pull request #998 from svanharmelen/b-fix-734
Fix #734 - Use the correct buffer for the filetype blacklist and such
2017-10-15 10:57:21 +01:00
Sander van Harmelen 090f8a8f38 Fix issue #734
Fixes #734

The main issue was not consitently using the correct buffer.
2017-10-15 11:35:33 +02:00
w0rp 90d4fb139c #977 Complain about the lack of configuration files for scalastyle in such a way that users will be directed towards getting it to work 2017-10-15 00:20:43 +01:00
w0rp 515dcdef29 Fix some Scala documentation grammar and spacing 2017-10-14 23:47:47 +01:00
w0rp d090dec8b4 Rename the Scala documentation file 2017-10-14 23:41:05 +01:00
w0rp ef495ba32d #904 Do not run linters on :wq or :x 2017-10-14 23:22:13 +01:00
w0rp 010ebc2459 Fix a spelling mistake 2017-10-14 22:00:53 +01:00
w0rp b2e6d0dff8 Rename the autocmd test file, as I can never remember the old name 2017-10-14 21:31:44 +01:00
w0rp 69d6ff6020 #904 Do less processing when newer NeoVim versions are exiting 2017-10-14 19:22:19 +01:00
w0rp 40e69794eb Make the getcmdwintype() check ever-so-slightly faster 2017-10-14 17:31:58 +01:00
w0rp d8ea83e344 Clean up the test variable 2017-10-14 17:27:05 +01:00
w0rp 8eb41dc94c Fix the test for doing nothing for CtrlPFunky buffers 2017-10-14 17:24:29 +01:00
w0rp 6fd10f80de Cut down on the time for the CtrlPFunky check, by first checking if the command exists 2017-10-14 17:11:30 +01:00
w0rp 5204f2dbc2 Break up ShouldDoNothing checks into separate lines, so it's possible to profile them 2017-10-14 16:51:12 +01:00
Jay Thomas 618074a053 Add editorconfig (#997)
Add editorconfig
2017-10-14 15:55:33 +01:00
w0rp 663fe75d0f #965 - Make the cursor echo delay configurable 2017-10-12 23:25:41 +01:00
w0rp e71c4a8bea #965 - Support limiting the number of signs ALE will set 2017-10-12 23:04:54 +01:00
w0rp dded246aba Merge pull request #968 from adriaanzon/luacheck-whitespace
Luacheck: Respect warn_about_trailing_whitespace option
2017-10-12 22:06:48 +01:00
Adriaan Zonnenberg 221cb0f8cf Add some extra tests for luacheck whitespace warnings 2017-10-12 22:59:45 +02:00
w0rp 3ddbe48d84 Merge pull request #993 from butlerx/patch-1
Fix xmllint link
2017-10-12 19:06:00 +01:00
Cian Butler d8a638f38a Fix xmllint link
fix link to xmllint
2017-10-12 10:49:15 +01:00
Carlos Ramos 844354cfed Add new fixer: TrimWhitespace (#991)
add a new fixer: trim_whitespace
2017-10-12 09:27:24 +01:00
w0rp 02c8793c53 #965 Check ale#ShouldDoNothing() less and such often, for better performance 2017-10-11 23:51:41 +01:00
w0rp be547a0111 Merge pull request #990 from monokrome/master
Use $VIRTUAL_ENV environment variable when present.
2017-10-11 22:18:22 +01:00
Bailey Stoner 620ec32da1
Add a test to ensure $VIRTUAL_ENV is respected. 2017-10-11 13:42:38 -07:00
Bailey Stoner 3859ac0c9b
Use $VIRTUAL_ENV environment variable when present. 2017-10-10 14:21:04 -07:00
Linda_pp 70177480ba Add llc integration for LLVM IR (#979)
Check LLVM IR with llc
2017-10-10 10:13:09 +01:00
w0rp a809c4fa3a Get more random tests to pass on Windows 2017-10-08 23:26:50 +01:00
w0rp 65aa88a7d5 Merge pull request #981 from Kazark/fix-elm-win32
Fix Elm linter for Windows (resolves #980)
2017-10-08 15:33:34 +01:00
Keith Pinson f21f52343d Fix Elm linter for Windows (resolves #980)
Looks like elm-make only respects /dev/null, even on Windows. The person
who wrote this linter maybe did not test it on Windows, and wrote the
code in the way you would expect to be solid by using NUL on Windows.
However it seems elm-make is not actually making use of /dev/null but
rather using it as a form of flag. Ironically this seems to be what is
already described in the comments; I added some clarification.
2017-10-06 17:26:50 -04:00
w0rp 47577564a2 Get more command callback tests to pass on Windows 2017-10-05 22:31:09 +01:00
w0rp 25045641fb Merge pull request #974 from odinuge/prettier_config
Add all possible config files for prettier
2017-10-04 11:38:28 +01:00
Odin Ugedal a300014396
Add all possible config files for prettier
Prettier uses cosmiconfig, and therefore it is possible to add different
extensions to the config file. More information can be found here:
https://github.com/prettier/prettier#configuration-file.
2017-10-04 12:30:42 +02:00
aliou e376f0ae44 gofmt fixer for Go (#970)
Add a gofmt fixer for golang.
2017-10-03 18:54:35 +01:00
w0rp 3ab414de1a Fix #964 - Remove signs when multiple signs end up on a single line 2017-10-03 10:00:16 +01:00
w0rp 7392f808c0 Merge pull request #972 from rhysd/fix-typo
Fix typos
2017-10-03 07:41:44 +01:00
rhysd 753592ca66 Fix typos 2017-10-03 01:11:54 +09:00
w0rp e0bd490ed9 Get tslint and xmllint command callback tests to pass in Windows 2017-10-01 21:23:42 +01:00
w0rp 54a08c5f8c Add a Scripts dir for tests on Windows 2017-10-01 20:26:18 +01:00
w0rp 5091e2de45 Get fixer tests to work on Windows 2017-10-01 20:23:41 +01:00
w0rp 638ca42082 Use local versions of yapf on Windows, and get the callback tests to pass 2017-10-01 18:47:54 +01:00
w0rp 4634b1be93 Fix Flow and Idris tests for Windows 2017-10-01 18:41:41 +01:00
w0rp 5731616cd2 Get the mcsc handler tests to pass on Windows 2017-10-01 17:36:47 +01:00
w0rp c76f721b59 Merge pull request #969 from rosmanov/master
Added g:ale_php_phpstan_configuration option
2017-09-30 18:05:43 +01:00
Ruslan Osmanov a640d3b022 Added g:ale_php_phpstan_configuration option 2017-09-30 23:36:10 +07:00
Adriaan Zonnenberg 1d1b5155e6 Luacheck: Respect warn_about_trailing_whitespace option
See http://luacheck.readthedocs.io/en/stable/warnings.html, warnings
611 to 614.
2017-09-30 16:38:10 +02:00
w0rp c989ef0fc6 Fix an issue with the check-supported-tools-tables script 2017-09-28 13:32:02 +01:00
w0rp 9fc01bd246 Merge pull request #952 from hernot/master
Add mcsc for checking C# code.
2017-09-28 13:29:55 +01:00
Xristoph Hintermüller 8f6044b8b6 Implemented review recommendations
Implements suggestions and recommendations suggested by the first review
of the "Advance C# linter based on mcs -t:module (#952)" pull request.

- Clarifies and simplifies description of linters and options
- Added links to help file and marked the mcsc linter as to be run only
  when file in buffer is saved or loaded.
- Added comments to the mcsc.vim file to clarify code
- removed type checks considered not necessary be reviewer.
- addresses findings by vader
- removed call to getcwd and cd in vim script
- handler expands file names relative to route of source tree into
  absolute pathes. Fixes errors not being marked when vim is started
  from subdirectory of source tree.
- implements tests for mcs.vim and mcsc.vim linter
2017-09-27 13:21:05 +02:00
w0rp 49b6805b09 Merge pull request #951 from rzane/eslint-fix-config-option
ESLint --config option causes it to not detect node_modules?
2017-09-25 21:38:55 +01:00
Xristoph Hintermüller 0be77c60c5 Added advanced c-sharp linter
The existing c-charp linter used the --syntax check mode of the mono mcs
compiler only. The new mcsc linter tries to compile the files located in
a directory tree located bejond the specified source directory or the
current one if no source is explicitly specified. The resulting module
target is placed in a temporary file managed by ale.
2017-09-25 13:13:21 +02:00
Xristoph Hintermüller cde50f1091 Added advanced c-sharp linter
The existing c-charp linter used the --syntax check mode of the mono mcs
compiler only. The new mcsc linter tries to compile the files located in
a directory tree located bejond the specified source directory or the
current one if no source is explicitly specified. The resulting module
target is placed in a temporary file managed by ale.
2017-09-25 12:54:50 +02:00
Ray Zane cb56cbb714 There seems to be a bug in eslint that causes the `--config` option to
not detect node_modules correctly. The `-c` option, however, works fine.
2017-09-24 13:57:18 -04:00
w0rp 2bd352370f Merge pull request #949 from TheLocehiliosan/shellcheck-option-order
Move dialect setting before user options (shellcheck)
2017-09-23 12:01:33 +01:00
Tim Byrne 3910b025b2
Move dialect setting before user options (shellcheck) 2017-09-22 17:04:00 -05:00
w0rp 70fdeb7c22 Merge pull request #942 from doits/fix_slim_typo
fix typo `RUBUCOP` --> `RUBOCOP` for slim lint
2017-09-18 15:52:13 +01:00
Markus Doits 5a1ebdb633
fix typo `RUBUCOP` --> `RUBOCOP` for slim lint
this actually makes 6ebd8f355c work
2017-09-18 12:29:20 +02:00
w0rp 8bc66cff39 Merge pull request #903 from doits/slimlint_directory
Pass the rubocop configuration file to slim-lint.
2017-09-16 17:28:00 +01:00
Markus Doits 6ebd8f355c
slimlint: Search for .rubocop.yml and use it
This fixes slim-lint not honoring a `.rubocop.yml` in the file's or
parent directory. Due to the way slim-lint calls rubocop, it requires
the special `SLIM_LINT_RUBUCOP_CONF` env var to pick up the
`.rubocop.yml` if it is not run on the real file (which is the case
here).

See https://github.com/sds/slim-lint/blob/master/lib/slim_lint/linter/README.md#rubocop
2017-09-15 18:56:59 +02:00
w0rp a59d1ddbf3 Make temporary file detection work on just about all platforms 2017-09-14 00:11:17 +01:00
w0rp 71c2e65d64 Fix a mistake in the flow tests 2017-09-14 00:10:47 +01:00
w0rp 52c933cd72 Report problems in other files for brakeman, and get the tests to pass on Windows 2017-09-13 23:33:13 +01:00
w0rp 3d2bddf4af Get some more random tests to pass on Windows 2017-09-13 23:30:39 +01:00
w0rp 677263f115 Merge pull request #929 from jdsutherland/solium-solidity-linter
Add solidity linter: solium
2017-09-13 20:32:28 +01:00
Jeff Sutherland 7302bedc5e Add solidity linter: solium 2017-09-14 01:59:22 +07:00
w0rp 91df9ba2c0 Fix #924 - Make changing the sign column color work again 2017-09-12 21:17:54 +01:00
w0rp 4e9420d1f5 Fix #921 - Capture both output streams for gosimple and staticcheck 2017-09-12 19:53:23 +01:00
w0rp e2271b769c Ban getcwd() from the codebase, as it causes problems 2017-09-12 09:36:16 +01:00
w0rp 7f42aedaec Use the same function for finding the ESLint config for eslint --fix and prettier-eslint 2017-09-12 09:20:31 +01:00
w0rp 661ed6e40b Fix #923 Use package.json as a last resort for eslint --fix 2017-09-12 09:10:37 +01:00
w0rp a7614d9502 Get more tests to pass on Windows 2017-09-11 22:25:15 +01:00
w0rp 8eb99c3cec Fix #922 - Prefer nearer ESLint configuration files with lower precedence filenames for eslint --fix 2017-09-11 21:53:45 +01:00
w0rp b6a487ccf9 Fix some random test issues for Windows 2017-09-11 00:47:27 +01:00
w0rp cb8a140141 Require function! to be used instead of function 2017-09-11 00:47:10 +01:00
w0rp e19a81cb09 Fix #920 - Shut up about E776 2017-09-10 20:13:35 +01:00
w0rp 65e6e50bf8 Explain the table of contents script better, and simplify it a bit 2017-09-10 19:52:01 +01:00
w0rp 9d24cc4047 Fix numerous issues with integration documentation tags and the table of contents, and add a script to check for theses issues 2017-09-10 19:42:45 +01:00
w0rp c4ad92e458 Move scripts for tests into the test directory, and do not export the Batch script for running tests 2017-09-10 13:19:08 +01:00
Clément DOUIN 18a7d32c4c Elm local install support (#915)
* Add Elm support for npm local installation
2017-09-10 12:58:42 +01:00
w0rp c11d2ae375 Fix an SML variable init bug, and get the SML cm file tests to pass on Windows 2017-09-10 00:20:05 +01:00
w0rp 1a52a2b880 Get the TSLint handler tests to pass on Windows 2017-09-10 00:06:31 +01:00
w0rp 18f4d5a6da Simplify some Rust handler code, and get the Rust handler tests passing on Windows 2017-09-10 00:06:31 +01:00
Clément DOUIN f3da8f45c1 Add elm-format as a new fixer (#916)
* Add elm-format as a new fixer
2017-09-09 21:30:20 +01:00
w0rp b3a9a0e3e8 Fix some path issues, and get lsp dir tests passing on Windows 2017-09-09 18:39:56 +01:00
w0rp 8055a03067 execute the `set encoding` test setting to get Vint to shut up 2017-09-09 18:22:59 +01:00
w0rp f238e15f10 Fix more random Windows test issues 2017-09-09 18:03:34 +01:00
w0rp 574cb11594 #917 Cover the old _args option for flake8 with a test, just in case 2017-09-09 13:28:46 +01:00
w0rp d9bdbd5a58 Add a Batch script for running tests on Windows 2017-09-08 22:15:39 +01:00
w0rp a33b3f189d Switch the AppVeyor clone directory to C:\testplugin 2017-09-08 21:54:43 +01:00
w0rp 26195efa0b Get some more random tests to work on Windows 2017-09-08 21:51:49 +01:00
w0rp 1c5253b928 Fix the smoke_test.vader file on Windows 2017-09-08 21:38:51 +01:00
w0rp 89cc8ca314 Fix #912 - Close lists automatically when g:ale_open_list is set to 'on_save' again 2017-09-08 20:10:11 +01:00
Sven-Hendrik Haase ff28836616 Add GLSL linter using glslang (#914)
* Add a glslang linter for GLSL
2017-09-08 11:06:47 +01:00
BlahGeek 73d031d7ea Add cuda nvcc linter (#874)
* add cuda nvcc linter
2017-09-07 19:23:58 +01:00
w0rp 555d23c035 Now remove the version command and the dummy file 2017-09-07 00:00:00 +01:00
w0rp 8198c2b63c Add a blank file for testing AppVeyor 2017-09-06 23:57:01 +01:00
w0rp b8963f21bf Now try to cache Vim and Vader for AppVeyor CI 2017-09-06 23:55:58 +01:00
w0rp 9474a9d319 Fix some PowerShell stderr BS 2017-09-06 23:52:57 +01:00
w0rp 963e16870b Try and set up Vader only if needed too 2017-09-06 23:47:51 +01:00
w0rp 02aad45aa6 Fix some PowerShell syntax errors 2017-09-06 23:45:12 +01:00
w0rp 59fd98b8b2 Try and set up AppVeyor so it will only download Vim if the directory is not there 2017-09-06 23:43:49 +01:00
w0rp fbc846b4ba Try and get AppVeyor to run a single test 2017-09-06 23:28:39 +01:00
w0rp dd77b6eac5 Set up Vim runtime files in AppVeyor too 2017-09-06 22:53:39 +01:00
w0rp e951056e7b Try and set up Vader in AppVeyor 2017-09-06 20:03:37 +01:00
w0rp 2be39d3e1c Try again 2017-09-06 19:56:56 +01:00
w0rp 2b34cf098a Try different things for the Vim executable path 2017-09-06 19:55:45 +01:00
w0rp 9821b2c414 Disable builds for AppVeyor 2017-09-06 19:53:53 +01:00
w0rp 6661ff9794 Use absolute paths for the unzipping part in AppVeyor 2017-09-06 19:50:51 +01:00
w0rp a9823cbfd5 Try to download and unpack a Vim console binary for AppVeyor 2017-09-06 19:47:11 +01:00
Peter Renström 03f1c1e81b Add 'prettier' fixer support to TypeScript, CSS, SCSS and JSON (#910)
* Add prettier fixer support for typescript

* Add prettier fixer support for css and scss

* Add prettier fixer support for json

* Use getbufvar() to get &filetype
2017-09-06 15:21:26 +01:00
w0rp c277cdef8c Add an option for ignoring the output of TSLint if a file contains a single blank line 2017-09-06 11:17:21 +01:00
w0rp ad1bd424fa Run installation steps in install instead for AppVeyor 2017-09-06 10:14:25 +01:00
w0rp a170cc806a Do not mess with newlines for git config 2017-09-05 23:13:33 +01:00
w0rp 22a0cd6e05 Try and get appveyor to clone the repo by using a clone depth 2017-09-05 23:00:42 +01:00
w0rp a21a75c19e Fix the .mak file name 2017-09-05 22:34:31 +01:00
w0rp 8595fcdeb9 Try and get nmake to work in AppVeyor 2017-09-05 22:32:34 +01:00
w0rp 5239ef9c83 Try and set up appveyor for building Vim 2017-09-05 22:26:14 +01:00
ode79 edfe65a22c Fix OCaml helptag name to match readme. (#909)
* Fix an OCaml help tag in the README
2017-09-05 13:50:03 +01:00
w0rp e53debe000 Fix #907 - Stop LSP integration breaking with empty string keys in NeoVim 2017-09-04 00:15:13 +01:00
w0rp c2f547b6e3 Merge branch 'support-lintr-options' 2017-09-03 23:37:04 +01:00
w0rp 984c4f0658 Document the new lintr option 2017-09-03 23:36:58 +01:00
w0rp 1ea5400e8d Test lintr options configuration 2017-09-03 23:29:12 +01:00
Alex Axthelm b60a7224ab allow options to be set for `lintr` 2017-09-03 23:14:26 +01:00
Alex Axthelm 29ffd5134f Allow for lintr options 2017-09-03 23:14:26 +01:00
w0rp 6833e01f23 #894 - Replace ugly temporary filenames for Haskell problems with the buffer's basename 2017-09-03 21:53:48 +01:00
w0rp 0aa8640d07 Fix a typo 2017-09-03 20:14:42 +01:00
w0rp e235e5a6a5 Make the grammar a little better for the g:ale_type_map option 2017-09-03 20:12:54 +01:00
Jake Zimmerman 63e8946fc8 Detect and use CM files for smlnj (#884)
* Detect and use CM files for smlnj

* Split into two checkers

- one for CM projects
- one for single SML files

* Fix some typos

* Fix error caught by writing tests

We want to actually use `glob` to search in paths upwards from us.
(Previously we were just searching in the current directory every time!)

* Fix errors from former test run

* Write tests for GetCmFile and GetExecutableSmlnj

* Typo in 'smlnj/' fixture filenames
2017-09-03 19:56:14 +01:00
w0rp c7fbcb3c02 Fix #899 - Make the quickfix and loclist windows close again 2017-09-03 19:44:00 +01:00
w0rp d482b8e3b7 Fix #891 - Do not check ctrlp-funky windows 2017-09-03 18:24:43 +01:00
w0rp f9b43a566c #505 - Do not lint files on enter if the option for linting when the filetype changed is on 2017-09-02 16:57:01 +01:00
w0rp 52eff3bd83 Log commands that are run for ALEFix for ALEInfo 2017-08-31 16:46:40 +01:00
w0rp 7c2a5052a8 Fix #895 - Run Node.js scripts with node.exe instead of node on Windows 2017-08-31 13:12:24 +01:00
w0rp 1d86a724f2 Merge branch 'fix-prettier-eslint-fixer' 2017-08-30 22:49:55 +01:00
w0rp f36f38c960 Cover the prettier-eslint changes with tests, and fix some problems 2017-08-30 22:49:46 +01:00
w0rp 301d30229b Fix doc tag alignment 2017-08-30 22:23:59 +01:00
Pavel Pertsev 05ce86ea33 Add prettier-eslint legacy option 2017-08-30 22:21:45 +01:00
Pavel Pertsev 6e423a94cd Fix docs for prettier-eslint ver 2017-08-30 22:20:35 +01:00
Pavel Pertsev c09f8f5764 Passthrough eslint config to prettier-eslint 2017-08-30 22:17:16 +01:00
w0rp 33278f0fce Merge branch 'c-clang-tidy' 2017-08-30 22:11:51 +01:00
w0rp 9958a8d32e Add tests for the c version of clang-tidy 2017-08-30 22:11:04 +01:00
w0rp ed9cdca127 Merge remote-tracking branch 'randrej/master' into c-clang-tidy 2017-08-30 22:08:41 +01:00
w0rp fca77266bd Complain about badly aligned documentation on Travis CI, and fix some existing problems 2017-08-30 21:56:43 +01:00
w0rp 688212130d Fix the tag alignment for the tslint documentation 2017-08-30 21:29:19 +01:00
w0rp 3bde390c58 Merge branch 'tslint-rules' 2017-08-30 21:27:34 +01:00
w0rp 0cdb653c9c Cover the tslint rules option with a test 2017-08-30 21:27:28 +01:00
w0rp 40dca63891 Merge remote-tracking branch 'jclem/master' into tslint-rules 2017-08-30 21:21:03 +01:00
w0rp b8f5a4923c Merge pull request #892 from jparise/thrift
Add a linter for Apache Thrift IDL files
2017-08-30 19:46:17 +01:00
Jon Parise f4c5d29c64 Add a linter for Apache Thrift IDL files
This linter works by invoking the `thrift` compiler with the buffer
contents and reporting any parser and code generation issues.

The handler rolls its own output-matching loop because we have the
(unfortunate) requirement of handling error output that spans multiple
lines.

Unit tests cover both the command callback and handler, and there is
initial documentation for all of the option variables.
2017-08-30 11:08:06 -07:00
w0rp c7536fb4fd Merge pull request #889 from bb010g/patch-1
Gradle support for javac
2017-08-30 10:26:27 +01:00
w0rp 3152e5c207 Fix #888 - Disable pycodestyle by default 2017-08-30 09:13:49 +01:00
Brayden Banks d08d2dac79 Gradle support for javac
Based off of #745.
2017-08-29 15:39:23 -07:00
w0rp 8264e265a8 Make the check-supported-tools-tables script work on more machines 2017-08-29 17:00:09 +01:00
w0rp ec178b0b3b Add a missing scriptencoding line 2017-08-29 16:57:08 +01:00
aliou b36882e72e Add support for prettier configuration file. (#886)
* Add support for prettier configuration file.

As of version 1.6.0, prettier allows passing a `--config` argument with
a path to a configuration file.

* Add test prettier configuration file.

* Add option to use local prettier configuration.

* Add description for new prettier option.

* Also check if the config is present before using it.
2017-08-29 16:05:19 +01:00
w0rp 87fb72346a Merge pull request #885 from morhetz/add-prettier-d-fixer
Add prettier_d fixer path
2017-08-29 11:12:23 +01:00
Pavel Pertsev 2a238fda9e Add prettier_d fixer path 2017-08-29 11:46:53 +03:00
w0rp 54900d5216 Do not export the check-supported-tools-tables script 2017-08-28 22:17:03 +01:00
w0rp 22db934db9 Do not bother using hyperlinks for the table notes, which looks better 2017-08-28 22:12:41 +01:00
w0rp 4a0735a195 Add spaces before exclamation mark markers, which reads better 2017-08-28 22:10:33 +01:00
w0rp 0827cb5483 Use two exclamation marks for marking lint file linters, which are easier to see and click 2017-08-28 22:08:55 +01:00
w0rp 8e3c1dbd11 Fix - #883 Document linting behavior better, sync up the lists of supported tools, andautomatically demand that they stay in sync 2017-08-28 22:05:12 +01:00
w0rp b031531e79 #869 - Detect the shell dialect from the hashbang for shellcheck 2017-08-28 19:16:23 +01:00
w0rp 73ec83d055 Handle jobstart() returning -1 in the NeoVim 0.2.0, just in case 2017-08-28 15:25:18 +01:00
w0rp 908e94622e #868 - Prefer cmd.js files for executing standard 2017-08-26 18:11:27 +01:00
w0rp b9cf450684 Set the end column for some Vint problems 2017-08-26 17:23:20 +01:00
w0rp e13651c16d Fix #825 - Downgrade signs when problems change 2017-08-26 16:38:27 +01:00
w0rp cdd1ddffdb Fix #876 - Save history in a separate buffer variable so history works when linting is disabled 2017-08-25 22:22:26 +01:00
Michael 8f8d015dae Add pycodestyle Python linter support (#872)
Add a pycodestyle linter
2017-08-25 12:46:56 +01:00
Peter Renström 4bea50b82f Add clang-format fixer for C/C++ (#873)
* Add clang-format fixer for C/C++

* Document clang-format options

* Refer ale-cpp-clangformat to ale-c-clangformat
2017-08-24 22:49:43 +01:00
w0rp 623fdf212c Include executable checks in ALEInfo 2017-08-23 21:41:29 +01:00
w0rp 0507503aa7 #653 Set loclists better when taking data from previous buffers 2017-08-22 22:45:55 +01:00
w0rp 80c7fbcefe Remove some redundant eslint test code 2017-08-22 21:40:00 +01:00
Eric Stern 2f19cf874b Suppress warning about .eslintignore'd file (#836)
* Suppress warning about .eslintignore'd file

* Fix slightly ironic lint error

* Lock error suppression behind a variable; add docs and tests
2017-08-22 21:35:09 +01:00
w0rp 1a524ca63e #653 - Always set loclist or quickfix in a timer callback, which prevents errors E924, E925, and E926 2017-08-22 21:19:36 +01:00
w0rp 47a8ebc8b9 Prevent .swp files from causing the tests to hang in Vim 8 2017-08-22 21:08:32 +01:00
w0rp 9d3bda4441 Merge pull request #865 from jez/erubis-linter
Add erubis linter
2017-08-22 10:33:08 +01:00
Jake Zimmerman b356d56448 Add erubis linter
This linter works largely the same as the existing `erubylint` linter,
except it works with `erubis` instead of `erb` as the driving command.
2017-08-21 13:51:42 -07:00
w0rp a3299bf03a Fix #864 - Use the user's configured executable for phpstan for executable() checks 2017-08-21 18:42:18 +01:00
w0rp cc02eb8a5a #653 Show errors from other files for mypy 2017-08-20 17:43:42 +01:00
w0rp 456378cb53 #653 - Jump to the position which Vim does not jump to for moving from quickfix/loclist items to other buffers 2017-08-20 15:59:27 +01:00
w0rp 47e681529b Merge pull request #862 from notomo/add-phpcbf-fixer
add phpcbf fixer
2017-08-20 13:42:03 +01:00
w0rp 4c6b58f70c Fix some indentation 2017-08-20 13:37:21 +01:00
Michiel Westerbeek d646ebda72 Added new linter for GraphQL: gqlint (#863)
* Added new linter for GraphQL: GQLint

* added help-files
2017-08-20 13:36:46 +01:00
w0rp c7193e775e #653 Document the automatic error prompt closing behaviour 2017-08-20 13:35:27 +01:00
w0rp 753cf5da95 #653 - Automatically accept annoying loclist and quickfix errors from Vim 2017-08-20 13:27:18 +01:00
tmn-o3 5a9a365aed add phpcbf fixer 2017-08-20 05:47:21 +00:00
w0rp e5d0a17694 #653 - Explain the new `filename` key support in the documentation 2017-08-20 00:16:28 +01:00
w0rp 7112776d1b #653 Update tslint to set the filename key for problems in other files 2017-08-20 00:05:15 +01:00
w0rp fb0adc602e #653 Treat temporary filenames as being for the current buffer 2017-08-19 21:18:27 +01:00
w0rp 9d6883561c #653 Set problems from other buffers when buffers are first checked 2017-08-19 20:15:46 +01:00
Dmitri Vereshchagin b2d3764a18 Syntaxerl linter feature check (#861)
* Add feature check for SyntaxErl linter

* Escape SyntaxErl executable path in commands
2017-08-19 18:54:23 +01:00
w0rp 20e64fbae0 #860 Only enable the new option for setting the original filename for SyntaxErl if an option is on in ALE 2017-08-19 15:48:29 +01:00
w0rp f8de08faf0 Merge pull request #860 from dmitrivereshchagin/update-syntaxerl-linter
Add original filename to SyntaxErl command
2017-08-19 15:37:06 +01:00
Dmitri Vereshchagin 18cb9a725d Add original filename to SyntaxErl command 2017-08-19 17:18:48 +03:00
Dmitri Vereshchagin e9e1bec772 Update SyntaxErl linter tests 2017-08-19 17:18:48 +03:00
w0rp fb0c931b2d Update the documentation to mention the new behaviour for quickfix 2017-08-19 14:35:01 +01:00
w0rp 5c839c4825 #653 Collect items for quickfix from all buffers, and de-duplicate them. Set filename items in quickfix and loclist. 2017-08-19 14:28:51 +01:00
w0rp 9c6e25d8d8 Stress the need for tests even further 2017-08-19 13:14:53 +01:00
w0rp be4347084e Increase the default maximum completion suggestions to a more useful but safe level, and filter before requesting details, which is faster 2017-08-18 22:34:18 +01:00
w0rp 8cc7cd3aa1 Change the completeopt setting just before showing suggestions too, which works better 2017-08-18 21:06:21 +01:00
w0rp 41c4f3431c Fix #858 - Fix the stack ghc-mod command 2017-08-18 19:33:23 +01:00
w0rp 2560cdd56e Update the summary in the README for fixing and completion support 2017-08-18 00:13:08 +01:00
w0rp 2365fd2948 Document completion support for ALE, and expand the fixer documentation a little 2017-08-18 00:08:58 +01:00
w0rp 0a282eb76a Automatically adjust the completion options when using completion while you type 2017-08-17 23:06:02 +01:00
w0rp 342e83db60 Include the ruleName for errors in tslint problems 2017-08-16 10:37:36 +01:00
w0rp 17a76a7403 Cover completion with more tests 2017-08-16 00:45:46 +01:00
w0rp 797b03b35e Change the help file heading for clarification 2017-08-14 23:52:13 +01:00
w0rp 5af82312fb Set up one BufEnter event used for everything, and add tests for linting when the filetype changes 2017-08-14 23:31:54 +01:00
w0rp 1680f7af63 Fix a bug where the sign column was not closed some of the time, etc. 2017-08-14 10:00:46 +01:00
w0rp 79701f6f20 #653 Skip filetype keys in g:ale_buffer_info during cleanup 2017-08-13 22:27:01 +01:00
w0rp 2d02de33d4 #653 - Filter items based on the buffer number for signs 2017-08-13 16:30:46 +01:00
w0rp ea124c49d0 Cover filtering out items from other buffers for highlights 2017-08-13 16:04:17 +01:00
w0rp a5d7bb449b Merge pull request #846 from voanhduy1512/ghc-mod
Make ghc-mod linter check current buffer
2017-08-13 15:30:46 +01:00
Vo Anh Duy 626568d66d Make ghc-mod be awared of cabal file
Right now ghc-mod linter check temp file instead of current buffer,
which cause the problem that it can't detect cabal file and raise
missing package error.

To fix that we need to run ghc-mod check with actual path of the current
file and with ghc-mod option `--map-file` to redirect temp file source
code to actual one
2017-08-13 20:49:26 +08:00
w0rp ae6cecabb6 #653 Filter items based on the buffer number for problem counts 2017-08-13 13:24:10 +01:00
w0rp f67fc43d9b Simplify the loclist jumping code a little 2017-08-13 13:06:22 +01:00
w0rp c6d11f4281 #653 - Filter out other buffers for loclist jumping 2017-08-13 13:02:59 +01:00
w0rp b6f0b17eaf Merge pull request #848 from ilex/master
Fix bug with ALEPrevious for blank lines.
2017-08-13 11:02:55 +01:00
ilex bc548b2ef9 Fix bug with ALEPrevious for blank lines.
ALEPrevious (as well as ALEPreviousWrap) does not work if there is an
error in empty line like 'W391: blank line at end of file' in python.
2017-08-13 11:56:41 +03:00
w0rp e6b6146731 #653 - Fix loclist jumping so it works with buffer numbers 2017-08-12 14:49:02 +01:00
w0rp b300b0646d Fix a failing test 2017-08-12 14:45:22 +01:00
w0rp c14886e479 #653 - Include the buffer number in sorting of items 2017-08-12 14:37:56 +01:00
w0rp c52a4910bf #653 - Update the loclist binary search to work with buffer numbers, to filter out items for other buffers 2017-08-12 14:27:47 +01:00
w0rp 7614560a6e #468 - Do not try to echo things for a while if something goes wrong 2017-08-12 10:47:06 +01:00
w0rp 8e9130d66e Use a shorter default completion delay, which works better 2017-08-11 10:50:59 +01:00
w0rp 78b9ae0f1c Add a fix function for breaking up long Python lines, which is hidden for now 2017-08-11 10:31:25 +01:00
w0rp d5ae3201a4 Ban !=# and !=? from the codebase 2017-08-11 00:31:42 +01:00
w0rp b1462ac66c #653 - Pass on filenames for loclist items 2017-08-10 23:08:40 +01:00
Scott Bonds 322910dc0b Add linter for Idris (#838)
* Add linter for Idris

* Fix parsing warnings and column ranges in Idris linter

* Make Idris linter configurable. Fix help tag.
2017-08-10 21:09:58 +01:00
w0rp dcf7cbe366 Merge pull request #842 from gfontenot/gf-swiftformat
Add support for SwiftFormat as a fixer
2017-08-10 21:06:55 +01:00
w0rp 34aa3437e0 Pass extra rubocop options in the middle instead, and fix the Vader test so it can be run multiple times in Vim 2017-08-10 14:57:30 +01:00
Miguel Palhas 0c26e8945c Rubocop fixer now uses g:ale_ruby_rubocop_options (#841)
* Rubocop fixer now uses g:ale_ruby_rubocop_options

* Adds spec
2017-08-10 14:52:54 +01:00
w0rp 9ae2df1958 Automatically check for invalid help tag references, and fix some existing documentation issues 2017-08-10 10:45:12 +01:00
w0rp 7dee9da0f2 Fix documentation for the PHP langserver options 2017-08-10 10:28:42 +01:00
w0rp 2dcd2ee4da Fix some broken tag links 2017-08-10 10:14:42 +01:00
w0rp b9f31621e4 Move --format=default in the flake8 command to the return value, and remove extra spaces in the tests 2017-08-10 09:58:32 +01:00
w0rp abcf2909e6 Merge pull request #837 from matthewgrossman/master
Default flake8 to --format=default
2017-08-10 09:56:39 +01:00
Gordon Fontenot 4709e67627
Add support for SwiftFormat as a fixer
SwiftFormat is a tool that can be used to format Swift files. This commit adds
support for using SwiftFormat as a fixer from ALE. It looks for executables in
the Pods directory, then the Pods directory for a React Native project, then
finally falls back to the globally installed instance if neither of those were
found.

https://github.com/nicklockwood/SwiftFormat
2017-08-09 12:41:21 -05:00
Gordon Fontenot 2b546a50dc
Fix link for SwiftLint 2017-08-09 12:26:13 -05:00
Matthew Grossman fe95fcd357 Default flake8 to --format=default 2017-08-09 10:05:56 -07:00
w0rp 670858f774 Fix #468 - Add a cool down period for when things go wrong 2017-08-09 00:05:55 +01:00
w0rp ac8cc6d991 Document the extra optional argument for ale#Queue 2017-08-08 23:52:28 +01:00
w0rp 16772298ab Simplify some comparisons 2017-08-08 08:43:51 +01:00
w0rp a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp 5010ddc28f Fix #833 - Do not open windows on save when the option is off 2017-08-08 07:29:10 +01:00
w0rp 16cfedf04a Fix #271 - Add the ability to open the quickfix or loclist windows only after saving a file 2017-08-08 00:46:42 +01:00
w0rp 2edea15358 Fix the resetting of selections and annotate it 2017-08-07 22:08:35 +01:00
Adrian Kocis c18451fba9 added missing visual reselection after quick/location list update (#788)
Reset visual selection after opening loclist or quickfix windows
2017-08-07 21:57:59 +01:00
w0rp 2c4700ab7f #517 - Document arguments for defining LSP linters 2017-08-07 13:31:29 +01:00
w0rp 39ebb431b6 Document the PHP langserver integration 2017-08-07 13:08:51 +01:00
w0rp f7d7abe5b2 Document the rls linter 2017-08-07 13:00:17 +01:00
w0rp 2d608b9329 The default for ale_rust_cargo_use_check was wrong in the documentation 2017-08-07 09:41:52 +01:00
Andrej Radovic e4a6da936d Fixed helptag alignment. 2017-08-06 13:15:02 +02:00
Andrej Radovic 70cd1d5a57 Fixed the comments, left only the doc URL 2017-08-06 13:14:09 +02:00
w0rp 593cafa18b Fix #823 - Write Windows files with CRLF 2017-08-05 20:17:25 +01:00
w0rp 747d4fe80b Stop writing a test file in real world usage in some cases 2017-08-05 19:51:38 +01:00
Andrej Radovic a767578d44 Added clang-tidy for C, too.
A limited number of clang-tidy checks can be used with C, too. I pretty much
copied and refactored the C++ clang-tidy linter, and added some documentation
about C-compatible checks.
2017-08-05 16:42:28 +02:00
w0rp 666cfc6ee2 Fix the completion start position regex matching being off by one 2017-08-04 16:15:48 +01:00
w0rp 9ac74c44fe Tell Vim omnicompletion that tsserver matches are case-insensitive 2017-08-04 13:35:02 +01:00
w0rp d1023e9c2c Merge pull request #821 from verbitan/nagelfar
Add Tcl nagelfar linter
2017-08-03 23:40:09 +01:00
w0rp 09d50ebe31 Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to `rls` 2017-08-02 23:21:30 +01:00
Nick James a3d2fb5688 Add Tcl nagelfar linter 2017-08-02 23:05:19 +01:00
w0rp 617582c5d3 Use g: for the PHP Vader tests 2017-08-02 22:36:53 +01:00
w0rp 6e07cf5b12 Cover the PHP language server functions with Vader tests 2017-08-02 22:34:09 +01:00
w0rp 1356cf8e01 #517 Enable the PHP language server 2017-08-02 19:44:00 +01:00
w0rp db531171ac Merge pull request #820 from junegunn/rubocop-cop-name
Rubocop: Show cop name
2017-08-02 18:37:31 +01:00
w0rp d6557b2c5c Fix indentation and a typo in the gometalinter documentation 2017-08-02 18:36:53 +01:00
w0rp ad4c7f92cf Merge pull request #819 from deltaskelta/doc-#816
added gometalinter docs - Fix for #816
2017-08-02 18:34:56 +01:00
Junegunn Choi bc1cf285c2
Rubocop: Show cop name 2017-08-02 13:55:54 +09:00
Jeff Willette 7eb84242ee added gometalinter docs - Fix for #816 2017-08-02 13:34:24 +09:00
w0rp 35913d9ce7 Cover the SaveEvent function with a test 2017-08-01 00:42:22 +01:00
w0rp a4ffd2f37c #734 - Use the buffer number from the events for entering buffers and saving buffers for checking buffers 2017-08-01 00:03:24 +01:00
w0rp ec82530247 #734 - Do not clear file linter results when no buffers are run 2017-07-31 22:36:30 +01:00
w0rp 7c32ef104b Merge pull request #813 from mahmost/stylelint-fixer
Add stylelint fixer
2017-07-31 12:30:18 +01:00
Mahmoud Mostafa eaeb71993f Add stylelint fixer 2017-07-31 02:54:59 +02:00
w0rp 79d4935ccf Cover special LSP initialize response handling with Vader tests 2017-07-30 23:53:46 +01:00
w0rp 2c252c0f12 #517 - Get the Rust language server working in a basic way 2017-07-30 23:34:58 +01:00
w0rp 6000d956f0 When servers never send an initialize response, but instead just publish diagnostics straight away, handle that as an initialize response 2017-07-30 22:18:19 +01:00
w0rp 5810d7faa0 Add some error message handling for LSP, for test purposes 2017-07-30 22:17:29 +01:00
w0rp 84af543907 Fix some bugs so the PHP language server will show errors at least once 2017-07-30 14:42:00 +01:00
w0rp 63b9d9e9df Fix #798 - Handle syntax errors for tsserver 2017-07-27 13:24:32 +01:00
w0rp fa33faad9e #810 - Handle output which is not JSON in many linters 2017-07-27 00:45:25 +01:00
w0rp db4d68eae7 Add a fuzzy JSON decoding function for ignoring json_decode errors for linters 2017-07-27 00:06:15 +01:00
w0rp ded1bc14df #810 Ignore output which isn't JSON for brakeman 2017-07-26 23:17:46 +01:00
w0rp 810e884dbe Remove channel logging 2017-07-26 10:45:21 +01:00
w0rp fbf59fd4ce Check the active_linter_list only for running linters 2017-07-26 10:44:27 +01:00
w0rp cfdb41f4d2 Remove a redundant check for tsserver 2017-07-26 10:44:07 +01:00
w0rp e6f527f954 Merge branch 'lsp-stdio-support' 2017-07-26 10:37:50 +01:00
w0rp cd860e3e8d #517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters 2017-07-26 10:37:37 +01:00
w0rp 86297a7c65 Fix #804 - Do not run scalac for sbt files 2017-07-26 10:29:46 +01:00
w0rp e45c16d9bb Fix #796 - Ignore errors for closing the last window 2017-07-24 09:30:41 +01:00
w0rp e0c014ab8c Disable completion in the Vader test if we temporarily enable it 2017-07-24 09:23:53 +01:00
w0rp b4d23d700b Set the g:ale_completion_enabled option when completion is enabled or disabled 2017-07-24 09:22:29 +01:00
w0rp d1424de1f9 Merge pull request #799 from takano-akio/hdevtools-options
Make executable and options configurable for hdevtools
2017-07-24 09:15:16 +01:00
Takano Akio 8ab632e6f2 Make executable and options configurable for hdevtools 2017-07-24 05:50:09 +00:00
w0rp a0059cfe03 Fix #795 - Handle GCC errors without column numbers 2017-07-23 00:39:59 +01:00
w0rp 12217480f9 Merge pull request #781 from sumnerevans/standard-fixer
Added fixer for Standard linter
2017-07-22 19:33:42 +01:00
w0rp c1998b170c Update the PR template to stress the need for tests even more. 2017-07-22 19:31:48 +01:00
w0rp 78e37dabb7 Fix #794 - Filter out any preceding lines of Flow output which aren't JSON 2017-07-22 19:21:30 +01:00
Jonathan Clem 6d732b9fb4 Remove trailing whitespace in tslint.vim 2017-07-21 16:09:45 -04:00
Jonathan Clem 710c3ee3d2 Use the tslint_rules_option variable 2017-07-21 15:59:16 -04:00
Jonathan Clem 3bb75a6fde Document g:ale_typescript_tslint_rules_dir 2017-07-21 15:55:55 -04:00
Jonathan Clem 8ea9044667 Add myself to authors for tslint.vim 2017-07-21 15:54:28 -04:00
Jonathan Clem cddb26558f Add tslint support for rules directory option 2017-07-21 15:52:51 -04:00
Sumner Evans f3fec6685e
added tests for Standard.js 2017-07-21 11:47:41 -06:00
w0rp ee6dabcc4e Don't mess with compleopt for each completion, as it doesn't work 2017-07-21 14:55:32 +01:00
w0rp af6830a722 Merge pull request #789 from tmsc4zht/fix_typo_in_doc_ale-go
fix typo in doc/ale-go
2017-07-21 09:33:27 +01:00
Rei MOCHIZUKI ce845e51f2 fix typo in doc/ale-go 2017-07-21 09:36:40 +09:00
w0rp 87616c5e91 #782 - Do not set the build directory for clang-tidy for header files, which does not work 2017-07-20 14:52:24 +01:00
w0rp 7d1fde292d Update the installation notes for the standard package management sysytem so helptag generation will actually work 2017-07-20 13:45:28 +01:00
w0rp a5f754a5e0 Fix #786 - Only set --no-local-style for yapf if a configuration file is detected 2017-07-20 11:07:07 +01:00
Sumner Evans ca83f11bee
added fixer for Standard 2017-07-19 14:50:33 -06:00
w0rp f133ce96f8 Fix heading levels 2017-07-19 13:37:40 +01:00
w0rp cbdf10a129 Fix #573 - Update the README to recommend installing via the built-in package system 2017-07-19 13:36:30 +01:00
w0rp 0b50ebb0f0 Fix #779 - Handle empty output for tslint 2017-07-19 10:26:03 +01:00
w0rp 235fc90e22 Fix #308 - Check Dart files with dartanalyzer 2017-07-18 23:57:33 +01:00
w0rp aa94d0902a Fix #710 - Show hlint suggestions as info items, and include end line and column numbers 2017-07-18 13:14:02 +01:00
w0rp 5a6ffc2804 Add a missing test file 2017-07-18 12:34:22 +01:00
w0rp 0931e99ea4 Fix #775 - Run eslint.js via node on Windows for eslint --fix 2017-07-18 12:28:20 +01:00
w0rp a8a4df05e6 Fix #776 - Do not add ; echo for Windows for Flow 2017-07-18 11:46:59 +01:00
Matthew Turland da410caff8 Add yaml swaglint linter (#771)
* Add yaml swaglint linter
2017-07-17 20:28:21 +01:00
w0rp a6cc492a99 Limit the suggestions only after filtering them 2017-07-17 17:39:11 +01:00
w0rp 27feab7e3a Filter the completion results by the prefix we used 2017-07-17 15:31:32 +01:00
w0rp eab77b7072 #703 Add arguments to avoid generating plist files if no build directory is detected for clang-check 2017-07-17 10:19:08 +01:00
w0rp 3b1bc2bd13 Fix another executable callback typo 2017-07-17 00:19:33 +01:00
w0rp 92918fd841 Fix an executable_callback typo 2017-07-17 00:18:43 +01:00
w0rp 23ea62d40a #711 - Make the cpplint executable configurable 2017-07-17 00:17:59 +01:00
w0rp 3352a6c9df #711 - Make the clangtidy executable configurable 2017-07-17 00:07:18 +01:00
w0rp fe70742bb9 #711 - Make the clangcheck executable configurable 2017-07-16 23:35:10 +01:00
w0rp 9e83878900 #711 - Make the gcc executables configurable 2017-07-16 22:41:15 +01:00
w0rp 58717e05a3 #711 - Make the cppcheck executables configurable 2017-07-16 22:11:43 +01:00
w0rp 54ff573174 #711 - Make the clang executables configurable 2017-07-16 21:37:10 +01:00
w0rp bd5ff5b1e5 Merge pull request #774 from dmitrivereshchagin/syntaxerl-linter
Add SyntaxErl linter
2017-07-16 15:06:55 +01:00
Ardis 7d174b0056 Added phpstan linter for php. (#772)
* Added phpstan linter for php.
2017-07-16 15:04:25 +01:00
Dmitri Vereshchagin 1aea6a34ff Add SyntaxErl linter
These changes add [SyntaxErl][1] integration.  SyntaxErl is a syntax
checker tool for Erlang.

[1]: https://github.com/ten0s/syntaxerl
2017-07-16 15:35:21 +03:00
w0rp 4fa66ab627 Fix #560 #763 - Silence errors for setting signs, and do nothing for dirvish 2017-07-16 01:15:07 +01:00
w0rp 15c48650e7 #739 - Document the end_col and end_lnum keys for the loclist format 2017-07-16 00:40:20 +01:00
w0rp cad9fc19c6 Fix #773 - Do not clear the loclist when closing the loclist window 2017-07-15 18:44:45 +01:00
w0rp 507e32e91c #764 - Update the documentation to mention how to echo messages with the ALELint autocmd 2017-07-14 00:33:12 +01:00
w0rp 5afbc9b701 Simplify the tests for the ALELint autocmd command 2017-07-14 00:33:12 +01:00
Kevin Kays 4c50aec79c Add scalastyle linter (#766)
* Add support for scalastyle

* Add scalastyle docs

* scalastyle support for column numbers

* off by one column

* Add tests for scalastyle command and handler

* update readme for scalastyle

* allow full scalastyle options instead of just config file

* fix indentation

* allow scalastyle config file in parent directories by a couple names.

* check for missing match args with empty

* remove echo

* use a for loop
2017-07-13 23:41:01 +01:00
w0rp 4c6c5bf84f #697 - Remove highlights more thoroughly 2017-07-13 23:27:02 +01:00
w0rp b50ae96413 #769 Ignore stderr output and output without JSON we can read for rubocop 2017-07-13 22:47:43 +01:00
w0rp f7f6f6541d Make tsserver completion more reliable, but not quite ready for documentation yet 2017-07-13 11:59:33 +01:00
w0rp bc97735b6d Merge pull request #767 from elebow/rubocop-handle-empty-files-output
Rubocop: handle empty 'files' array in output
2017-07-13 09:41:36 +01:00
Eddie Lebow dcbb0ffee5 Rubocop: handle empty 'files' array in output
The handler previously assumed there would be at least one entry in the
'files' array in the output JSON. It looks like this in the normal case:

  "files":[{"path":"app/models/image.rb","offenses":[]}]

But if RuboCop's config excludes the specified input files, causing no
files to be linted, the output is emptier:

  "files":[]

This change causes the handler to treat that case correctly, and also
exit early if the reported offense_count is zero.
2017-07-12 19:53:58 -04:00
w0rp 5885954197 Fix #760 - Report problems with configuration files for rubocop 2017-07-12 22:41:06 +01:00
Eddie Lebow bc32e24203 Add rails_best_practices handler (resolves #655) (#751)
* Move FindRailsRoot() to more general location

* Add rails_best_practices handler (resolves #655)

* Update documentation for rails_best_practices

Also add brakeman to *ale* documentation.

* rails_best_practices: allow overriding the executable

* rails_best_practices: format help correctly

* rails_best_practices: capture tool output on Windows
2017-07-12 10:43:47 +01:00
w0rp 400580e4e8 Merge pull request #762 from bugant/fix-function-doc-for-FindProjectRoot
Fix docs for FindProjectRoot function
2017-07-12 09:23:14 +01:00
w0rp 9e0d7a9d8c Merge pull request #761 from svanharmelen/f-improve-regex
Fixup #756 (gometalinter)
2017-07-12 09:22:34 +01:00
Matteo Centenaro ff80b23ee1 Fix docs for FindProjectRoot function 2017-07-12 10:00:42 +02:00
Sander van Harmelen b2be833744 Fixup #756
The real fix was not using absolute paths anymore (so not expanding with the `:p` option). The regex was correct and should at least include the `^` character to make sure the string starts with the given path/filename and not references the path/filename in some error description.
2017-07-12 09:51:44 +02:00
w0rp 340c0bbac5 #756 Escape the paths used for the --include parameter for gometalinter, which uses RE2 2017-07-11 23:47:21 +01:00
w0rp d12e990f73 Merge pull request #759 from julianandrews/docs-typo-fix
Fix documentation typo
2017-07-11 23:18:48 +01:00
Julian Andrews bbabdd0043 Fix documentation typo 2017-07-11 16:14:18 -06:00
w0rp a96cc92edf Merge pull request #756 from svanharmelen/b-gometalinter
Make gometalinter work again
2017-07-11 23:13:28 +01:00
w0rp 7b73204f25 Fix #747 - Lint and fix files after they have been been written to disk, not during writing them 2017-07-11 22:19:26 +01:00
Matteo Centenaro 505d114a68 Look for ini file to spot python project root (#755)
* Look for ini file to spot project root

When looking for the project root folder it would be better
to check for some well-known init file instead of __init__.py.
Indeed, with python3 it is now possible to have namespace modules
where intermediate dirs are not required to include the __init__.py file.

* Break if statement conditions over several lines

* Add blank lines for the if block

* Add test for FindProjectRoot

* Typo: missing / for MANIFEST.in

* Fix test for non-namespace package

* Add more test cases
2017-07-11 21:57:37 +01:00
Sander van Harmelen 5c7b55edec Make gometalinter work again
They changed their logic to use related paths instead of absoluut paths (see [here](a04df08be5 (diff-04424ed7c660c10495a54e8d11be89eaR253)))

This fixes the linter by also using relative paths…
2017-07-11 17:13:04 +02:00
Jake Zimmerman 768f761017 Prefer --fast for stack-build (#754)
* Vim scripts shouldn't have hyphens

Especially not ones that will be autoloaded. You can't have a hyphen in
a function name, so autoloading functions based on filename will fail.

* Add g:haskell_stack_build_options, default: --fast

If we're going to use the --fast option, we may as well go the whole 9
yards and let the user configure the 'stack build' flags.

* Create documentation for stack-build options
2017-07-11 13:05:13 +01:00
w0rp 05d3bb12dd Merge pull request #752 from elebow/brakeman-cleanup-unused-cache-var
Brakeman: Remove unused cache var from tests
2017-07-11 11:36:50 +01:00
Eddie Lebow 78e0029488 Fix comment typo 2017-07-11 01:30:28 -04:00
Eddie Lebow eb79b52a9a Brakeman: Remove unused cache var from tests 2017-07-11 01:30:06 -04:00
Michael Pardo d787050fa8 Kotlin and general Gradle support. (#745) 2017-07-10 23:03:36 +01:00
w0rp 29d0a20dc3 Fix the flow command tests so they will run on my machine 2017-07-10 21:44:51 +01:00
w0rp 751d965265 Fix #749 - Use /bin/sh when the shell is fish 2017-07-10 21:35:35 +01:00
w0rp b44f6053d1 Fix #730 - Lint files on save even when nothing was fixed 2017-07-10 13:40:22 +01:00
w0rp 82dd80c692 Fix #746 - Keep highlights from other plugins when buffers are hidden 2017-07-10 00:02:49 +01:00
w0rp 6a84605c57 Make every test set filenames and switch directories in the same way, and fix some missing escaping for the rubocop linter 2017-07-09 22:43:31 +01:00
Jake Zimmerman b50a7318fb Add new Haskell linter (#742)
* Add stack-build linter for Haskell

The stack-build linter works better than the other two linters when
you're working with an entire Haskell project. It builds the project
entirely and reports any errors.

The other two Haskell GHC linters only work on single files, which can
result in spurious errors (for example, not being able to find imports).

* Document all available Haskell linters

* Split GHC checkers into separate files
2017-07-09 22:39:33 +01:00
w0rp 47ff514878 Fix some indentation 2017-07-09 15:50:36 +01:00
w0rp 025f3407d6 Simplify ale_linters#ruby#rubocop#GetType 2017-07-09 15:50:12 +01:00
Eddie Lebow ab0e76dbd5 Use rubocop's JSON output format (resolves #339) (#738)
* Use rubocop's JSON output format (resolves #339)

Rubocop's emacs formatter seems to have changed format in some
not-so-ancient version. The JSON formatter should provide a more stable
interface than parsing lines with a regex.

The JSON formatter was introduced in mid-2013, so it should be safe to
assume available in any reasonably-modern environment. The oldest
currently-supported version of ruby (according to ruby-lang.org) was
not supported by rubocop until 2014.

* Rubocop: Use global function for GetType

* Rubocop: Use scope prefix in GetType

* Rubocop: Update command_callback test

* Rubocop: add end_col to Handle
2017-07-09 15:48:04 +01:00
w0rp 836a2cfe3b Fix issues with running individual tests, and get the Vim tests to run on certain machines again 2017-07-09 14:58:21 +01:00
w0rp c67d3b7e60 Merge pull request #743 from jez/fix-ghc-mod
Correctly resolve temp files on macOS
2017-07-09 13:56:21 +01:00
Jacob Zimmerman a70591fa76
Correctly resolve temp files on macOS
On macOS, the `$TMPDIR` is in `/var`. However, `/var -> /private/var`.
This means that fully resolved temp filenames weren't always getting
checked against the proper prefix.

This was affecting some of the Haskell plugins, though I'm sure it could
have affected any program that resolved past the generated `$TMPDIR/foo`
and wound up at a different filename.
2017-07-09 02:16:46 -05:00
w0rp ab47011ef2 Support setting settings with g:ale_pattern_options 2017-07-09 00:10:28 +01:00
w0rp 1b55e5edab Fix a syntax error in an example 2017-07-08 22:52:34 +01:00
Andrew Vimmer 4fd5bf81be Added missing statement about `<Plug>(ale_toggle)` mapping to the documentation (#740)
* Added missing statement about a `<Plug>` mapping.

* Fixed logical mistake related to "option calling".

* Rectified article usage according to a request.
2017-07-08 22:10:23 +01:00
Jonathan Boudreau 7def00d5a9 Use different reporter to support older versions of jscs (#737)
* Use different reporter to support older versions of jscs

* Add test and make more consistent with other code

* Add documentation for jscs

* Add more test coverage
2017-07-08 18:37:21 +01:00
w0rp dd5806662a Document how to install yamllint 2017-07-08 14:42:39 +01:00
w0rp 996732d5a6 Document the virtualenv directories variable in the main file instead 2017-07-08 14:30:12 +01:00
w0rp fdc7166c3c Use equal signs for language documentation sections 2017-07-08 14:17:26 +01:00
w0rp f9aa7d3b9a Update the license year 2017-07-08 13:50:10 +01:00
w0rp 8eb4f95766 #697 - Clear all highlights every time items are set again, and refactor most things. Clear errors when linters are removed 2017-07-07 23:47:41 +01:00
daa84 46225f3bb1 Fix windows path check on rust linter (#736)
* Fix rust linter on windows

* Add windows path test

* Use ale#path#IsBufferPath to compare paths

* Fix errors
2017-07-07 17:03:17 +01:00
w0rp d9a7364dae #710 - Fix a parsing bug caused by the last fix 2017-07-07 10:59:00 +01:00
w0rp 7ce960ae51 Fix #735 - Support old versions of Flow by only adding --respect-pragma for supported versions 2017-07-07 10:47:09 +01:00
w0rp 130928590b #710 - Show warnings as warnings for ghc 2017-07-07 00:28:22 +01:00
w0rp 8315c0e337 Make the executable for gometalinter configurable 2017-07-07 00:10:30 +01:00
w0rp 854066e849 #732 - Use the configuration files when fixing files with rubocop 2017-07-06 22:58:14 +01:00
w0rp b43413916d Initialize rubocop variables in one place 2017-07-06 22:47:07 +01:00
w0rp 5859050d29 Fix some bad indentation 2017-07-06 10:51:05 +01:00
Gregory Einfrank af02fb5183 Add ale_fix_on_save and ale_fixers to debug output (#731)
* Add ale_fix_on_save and ale_fixers to debug output

* Fix test by adding new ale-fix vars
2017-07-06 09:27:09 +01:00
w0rp 871ce1c8f5 Correct a comment 2017-07-05 15:52:39 +01:00
w0rp 1bd9b0fbe2 #729 - Use a wrapper for simplify to fix // problems on Windows 2017-07-05 15:51:31 +01:00
w0rp a04e73ddbc #729 - Support running Python programs from virtualenv for Windows 2017-07-05 13:07:55 +01:00
w0rp 1b8450e7a0 #729 Fix // in virtualenv paths 2017-07-05 12:56:08 +01:00
w0rp 35093e8f0d Merge pull request #727 from andrew-vimmer/broken-links
Fixed broken link in the CONTRIBUTING.md
2017-07-05 10:15:25 +01:00
Wil Thomason 6ab92af181 Correctly pass options to cpplint (#728)
* Fix option passing to cpplint
2017-07-05 10:14:43 +01:00
User e134eca694 Updated the link to `handlers.vim` file after it was broken into several
files with a03121f5b0.
2017-07-04 22:11:49 +03:00
w0rp 18fef18ab1 Remove the issue template note about the log_output option, now it's on by default. 2017-07-04 00:19:43 +01:00
w0rp 7b7a275902 Store the output of commands by default so I don't have to ask people to turn it on any more. 2017-07-04 00:17:13 +01:00
w0rp bb293b297c Fix #216 - Filter out errors for other files for ansible-lint 2017-07-03 23:16:39 +01:00
w0rp a1cf7f67a1 Fix #182 - Add support for lintr 2017-07-03 22:34:30 +01:00
w0rp 638eb1f000 Merge pull request #722 from RsrchBoy/travis-against-all-branches
Drop "only master branch" travis restriction
2017-07-03 20:33:43 +01:00
w0rp 84b280b881 Fix #178 - Check Stylus files with stylelint 2017-07-03 16:57:39 +01:00
Chris Weyl def4466671
Drop "only master branch" travis restriction 2017-07-03 10:54:47 -05:00
w0rp 160b9548ee Add a function for fixing the alignment of Vim help tags 2017-07-03 16:51:34 +01:00
w0rp fd6f05c9ea Report exceptions thrown for stylelint 2017-07-03 16:13:10 +01:00
Chris Weyl 5a3cfbbdf5 Allow `hadolint` linter to run via docker image (#720)
* Add documentation for hadolint (doc/ale-hadolint.txt)

* Allow `hadolint` linter to run via docker image

These changes enable the `hadolint` linter to run via the author's
docker image, if present.   Three modes are supported:

 * never use docker;
 * always use docker; and
 * use docker as a failback.
2017-07-03 15:37:32 +01:00
w0rp 51f256e897 Remove the need for pointless callbacks for LSP linters 2017-07-02 13:25:36 +01:00
w0rp 857ca941d2 Support an 'stdio' type for linter defintions, and require a command for LSP connections via programs 2017-07-02 13:17:24 +01:00
w0rp b731bd77ab Get automatic completion with tsserver to work 2017-07-02 10:58:18 +01:00
w0rp 5b731f761f Refactor LSP jobs to use a uniform ID value 2017-07-02 10:58:18 +01:00
w0rp 9f21e45156 Add some experimental completion code for tsserver 2017-07-02 10:58:18 +01:00
w0rp 0d8be55c51 Merge pull request #712 from RsrchBoy/perlcritic/more-explicit-profiles-doc
Be more explicit about the effect of `g:..._perlcritic_profile = ''`
2017-07-02 00:47:18 +01:00
Ryan 2330837747 Adjust output of `luacheck` linter to include error code (#717)
* linters/lua/luacheck: Show error code in message
2017-07-02 00:20:59 +01:00
w0rp b2e730fb5e Merge pull request #716 from sobrinho/master
Fix brakeman handler when there is no output
2017-07-01 15:43:04 +01:00
Gabriel Sobrinho 29746d492e
Fix brakeman handler when there is no output 2017-07-01 11:18:21 -03:00
Chris Weyl 64c6cbee48 Be more explicit about the effect of `g:..._perlcritic_profile = ''`
Just to prevent any confusion, the documentation now explicitly states
that setting `g:ale_perl_perlcritic_profile` to an empty string merely
disables passing an explicit profile to `perlcritic` and does not cause
`--no-profile` to be set.
2017-06-30 10:14:17 -05:00
Chris Weyl 3f1cab3e7e Add profile, other options to the perlcritic linter (#675)
* Add profile, other options to the perlcritic linter
2017-06-29 13:08:51 +01:00
w0rp 411c6b5e9f Fix #707 - Fix some duplicate tags, and add some code to check for them 2017-06-29 12:55:00 +01:00
w0rp 518f99b480 Fix #706 - Skip fixers with jobs that return empty output, in case they have failed 2017-06-29 12:00:32 +01:00
w0rp 79e8e063af Make pug-lint detect node_modules executables, and add options for pug-lint like the other linters 2017-06-29 11:40:03 +01:00
Tarik Graba 01ecf2a75f Adds an option to pass additional arguments to the verilog/verilator … (#698)
* Adds an option to pass additional arguments to the verilog/verilator linter

The new otion is g:ale_verilog_verilator_options
+ doc

* Spell check verilog linter doc file

* Add entries to the verilog linters in the doc table of content

* Vader test for verilog/verilator linter args option verilog_verilator_options
2017-06-29 09:15:52 +01:00
Adam Stankiewicz 7eec1f2efc Add prettier-standard support (#702)
* Add prettier-standard support

* Update ale-javascript.txt

Remove a duplicated header line.
2017-06-28 16:35:19 +01:00
w0rp 8846a8860f Use a new window for the ALEFixSuggest command, and document it better 2017-06-28 16:20:05 +01:00
Alexander "Ace" Olofsson f883d4d4fd Add puppet-lint fixer (#701)
* Add puppet-lint fixer

* Add vader test for puppetlint fixer

* Ensure puppetlint variables are initialized
2017-06-28 15:27:02 +01:00
w0rp f984c5fb83 Merge pull request #699 from jwoudenberg/master
Elm linter shows full error ranges
2017-06-27 22:24:48 +01:00
Jasper Woudenberg 72161b82ef Elm linter shows full error ranges 2017-06-27 20:16:29 +02:00
1987 changed files with 90870 additions and 9178 deletions

48
.appveyor.yml Normal file
View File

@ -0,0 +1,48 @@
---
# Disabling building for AppVeyor. We are just testing things.
build: false
clone_depth: 10
# Use the directory C:\testplugin so test directories will mostly work.
clone_folder: C:\testplugin
branches:
only:
- master
- /v\d+\.\d+\.(x|\d+)/
# Cache the vim and vader directories between builds.
cache:
- C:\vim -> .appveyor.yml
- C:\vader -> .appveyor.yml
init:
# Stop git from changing newlines
- git config --global core.autocrlf input
# NOTE: If you change the Vim or Vader versions here, please also update the
# instructions for running tests on Windows in ale-development.txt
install:
# Download and unpack Vim
- ps: >-
if (!(Test-Path -Path C:\vim)){
Add-Type -A System.IO.Compression.FileSystem
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip `
-OutFile C:\vim.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip `
-OutFile C:\rt.zip
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
}
# Clone Vader and check out the commit we want
- ps: >-
if (!(Test-Path -Path C:\vader)){
git clone https://github.com/junegunn/vader.vim C:\vader 2> $null
cd C:\vader
git checkout -qf c6243dd81c98350df4dec608fa972df98fa2a3af 2> $null
}
test_script:
- cd C:\testplugin
- 'C:\vim\vim\vim80\vim.exe -u test\vimrc "+Vader!
test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*.vader"'

14
.editorconfig Normal file
View File

@ -0,0 +1,14 @@
# EditorConfig is awesome: http://EditorConfig.org
# Top-most EditorConfig file
root = true
# Match and apply these rules for all file
# types you open in your code editor
[*]
# Unix-style newlines
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

3
.gitattributes vendored
View File

@ -2,11 +2,12 @@
/CODE_OF_CONDUCT.md export-ignore
/CONTRIBUTING.md export-ignore
/Dockerfile export-ignore
/ISSUE_TEMPLATE export-ignore
/ISSUE_TEMPLATE.md export-ignore
/Makefile export-ignore
/PULL_REQUEST_TEMPLATE.md export-ignore
/README.md export-ignore
/custom-checks export-ignore
/img export-ignore
/run-tests export-ignore
/run-tests.bat export-ignore
/test export-ignore

25
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,25 @@
## Guidelines
Have fun, and work on whatever floats your boat. Take It Easy :tm:.
For help with contributing to ALE, see `:help ale-development` in Vim, or view
the help file online [here](/doc/ale-development.txt).
## Creating Issues
Before creating any issues, please look through the current list of issues and
pull requests, and ensure that the issue hasn't already been reported. If an
issue has already been reported, but you have some new insight, please add
a comment to the existing issue.
Please read the FAQ in the README before creating any issues. A feature
you desire may already exist and be documented, or the FAQ might explain
how to solve a problem you have already.
Please try and describe any issues reported with as much detail as you can
provide about your Vim version, the linter you were trying to run, your
operating system, or any other information you think might be helpful.
Please describe your issue in clear, grammatically correct, and easy to
understand English. You are more likely to see an issue resolved if others
can understand you.

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: Ask for Help
url: https://github.com/dense-analysis/ale/discussions/new?category=q-a-ask-for-help-with-problems
about: Ask for Help in ALE Discussions

48
.github/ISSUE_TEMPLATE/report-a-bug.md vendored Normal file
View File

@ -0,0 +1,48 @@
---
name: Report a bug
labels: bug
about: Report a bug with ALE.
---
<!--
This is the template for reporting ALE bugs. Make sure you try updating ALE
to a more recent version before reporting a bug. Look through existing bug
reports for similar issues before reporting a new one. Don't leave comments
about new bugs in the comment section for old issues.
Make sure to try disabling other plugins and trying to repeat your bug before
reporting it in ALE. Some times problems can arise when two plugins are used
together, but often your issues might be problems with other plugins.
-->
## Information
**VIM version**
<!-- Paste just the first two lines of :version here. -->
Operating System: <!-- Describe your operating system version. -->
## What went wrong
<!-- Describe what went wrong here. Be specific. -->
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](https://vi.stackexchange.com/) or perhaps on [Reddit](https://www.reddit.com/r/vim/) instead. The GitHub issue tracker should be used for reporting bugs or asking for new features.
## Reproducing the bug
<!-- Write a list of steps below. -->
1. I did this.
2. Then this happened.
### :ALEInfo
<details>
<summary>Expand</summary>
<!-- Paste the output of :ALEInfo here. Try :ALEInfoToClipboard -->
<!-- Make sure to run :ALEInfo from the buffer where the bug occurred. -->
<!-- Read the output. You might figure out what went wrong yourself. -->
</details>

View File

@ -0,0 +1,21 @@
---
name: Suggest a new linter or fixer
labels: new tool
about: Suggest a new tool ALE can officially integrate with.
---
<!--
Write "Add support for foobar" as the issue title, or similar.
Fill out the details below.
-->
**Name:** foobar
**URL:** https://foo.bar.com
<!--
Write a description of the tool, and add any other information you think might
be helpful. Consider creating a pull request to add support for the tool
yourself.
-->

View File

@ -0,0 +1,8 @@
---
name: Suggest an improvement
labels: enhancement
about: Suggest some way to improve ALE, or add a new feature.
---
<!-- There's no fixed format for feature requests. Just add your thoughts. -->

13
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,13 @@
<!--
Before creating a pull request, do the following.
* Read the Contributing guide linked above first.
* Read the documentation that comes with ALE with `:help ale-dev`.
Have fun!
-->
Where are the tests? Have you added tests? Have you updated the tests? Read the
comment above and the documentation referenced in it first. Write tests!
Seriously, read `:help ale-dev` and write tests.

17
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,17 @@
---
# This configuration closes stale PRs after 56 + 7 days.
# That's 8 weeks until stale bot complains, and a week until it closes a PR.
# Issues in ALE are never, ever stale. They are either resolved or not.
only: pulls
daysUntilStale: 56
daysUntilClose: 7
exemptLabels: []
staleLabel: stale
markComment: >
This pull request has been automatically marked as stale because it has not
been updated recently. Make sure to write tests and document your changes.
See `:help ale-dev` for information on writing tests.
If your pull request is good to merge, bother w0rp or another maintainer
again, and get them to merge it.
closeComment: false

37
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,37 @@
---
name: CI
on: # yamllint disable-line rule:truthy
push:
branches: [ master ] # yamllint disable-line rule:brackets
tags:
- v[0-9]+.[0-9]+.x
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
branches: [ master ] # yamllint disable-line rule:brackets
jobs:
build_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build docker run image
shell: bash
env:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASS: ${{ secrets.DOCKER_HUB_PASS }}
run: ./run-tests --build-image
test_ale:
needs: build_image
runs-on: ubuntu-latest
strategy:
matrix:
vim-version:
- '--vim-80-only'
- '--vim-82-only'
- '--neovim-02-only'
- '--neovim-07-only'
- '--linters-only'
steps:
- uses: actions/checkout@v2
- name: Run tests
run: ./run-tests -v ${{ matrix.vim-version }}

13
.gitignore vendored
View File

@ -1,5 +1,12 @@
/init.vim
/doc/tags
.*
!.editorconfig
*.obj
*.pyc
# Ignore all hidden files everywhere.
# Use `git add -f` to add hidden files.
.*
/doc/tags
/init.vim
/test/ale-info-test-file
/vader_output
__pycache__
tags

View File

@ -1,10 +0,0 @@
---
sudo: required
services:
- docker
branches:
only:
- master
language: python
script: |
./run-tests

5
.vintrc.yaml Normal file
View File

@ -0,0 +1,5 @@
policies:
# Disable a violation that is thrown randomly for reasons I still
# do not understand.
ProhibitMissingScriptEncoding:
enabled: false

View File

@ -1,173 +0,0 @@
# Contributing to ALE
1. [Guidelines](#guidelines)
2. [Creating Issues](#issues)
3. [Creating Pull Requests](#pull-requests)
1. [Adding a New Linter](#adding-a-new-linter)
2. [Adding New Options](#adding-new-options)
4. [Writing Documentation](#writing-documentation)
1. [Documenting New Linters](#documenting-new-linters)
2. [Editing the Online Documentation](#editing-online-documentation)
3. [Documenting Linter Options](#documenting-linter-options)
5. [In Case of Busses](#in-case-of-busses)
<a name="guidelines"></a>
## 1. Guidelines
Have fun, and work on whatever floats your boat. Take It Easy :tm:.
Don't forget to **write documentation** for whatever it is you are doing.
See the ["Writing Documentation"](#writing-documentation) section.
Remember to write Vader tests for most of the code you write. You can look at
existing Vader tests in the `test` directory for examples.
When writing code, follow the [Google Vimscript Style
Guide](https://google.github.io/styleguide/vimscriptguide.xml), and run `vint
-s` on your files to check for most of what the guide mentions and more. If you
install this plugin (ALE) and install [Vint](https://github.com/Kuniwak/vint), it
will check your code while you type.
<a name="issues"></a>
## 2. Creating Issues
Before creating any issues, please look through the current list of issues and
pull requests, and ensure that the issue hasn't already been reported. If an
issue has already been reported, but you have some new insight, please add
a comment to the existing issue.
Please read the FAQ in the README before creating any issues. A feature
you desire may already exist and be documented, or the FAQ might explain
how to solve a problem you have already.
Please try and describe any issues reported with as much detail as you can
provide about your Vim version, the linter you were trying to run, your
operating system, or any other information you think might be helpful.
Please describe your issue in clear, grammatically correct, and easy to
understand English. You are more likely to see an issue resolved if others
can understand you.
<a name="pull-requests"></a>
## 3. 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 for 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>
```
<a name="adding-a-new-linter"></a>
### 3.i. Adding a New Linter
If you add a new linter, look for existing handlers first in the
[handlers.vim](autoload/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](autoload/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 should be sorted
alphabetically in the table and list.
<a name="adding-new-options"></a>
### 3.ii. Adding New Options
If you add new options to the plugin, make sure to document those new options
in the [README.md](README.md) file, and also in the [help file](doc/ale.txt).
Follow the format of other options in each. Global options should appear in the
README file, and in the relevant section in the help file. Options specific
to a particular linter should appear in the section for that linter.
Linter options for customizing general argument lists should be named
`g:ale_<filetype>_<linter>_options`, so that all linters can have similar
global variable names.
Any options for linters should be set to some default value so it is always
easy to see what the default is with `:echo g:ale...`.
<a name="writing-documentation"></a>
## 4. Writing Documentation
If you are adding new linters, changing the API, adding new options, etc., you
_must_ write some documentation describing it in the `doc/ale.txt` file. New
linters _must_ be added to the `README.md` file too, so other users can get a
quick overview of the supported tools.
<a name="documenting-new-linters"></a>
### 4.i Documenting New Linters
If you add a new linter to the project, edit the table in the `README.md` file,
and edit the list of linters at the top of the `doc/ale.txt` file. The linters
should be sorted vertically in lexicographic (alphabetical) order by the
programming language name or filetype, and the tools for each language should
be sorted in lexicographic order horizontally. Sorting in this manner is a fair
manner of presenting all of the information in an easy to scan way, without
giving some unfair preference to any particular tool or language.
<a name="editing-online-documentation"></a>
### 4.ii Editing the Online Documentation
The "online documentation" file used for this project lives in `doc/ale.txt`.
This is the file used for generating `:help` text inside Vim itself. There are
some guidlines to follow for this file.
1. Keep all text within a column size of 79 characters, inclusive.
2. Open a section with 79 `=` or `-` characters, for headings and subheadings.
3. Sections should have a _single_ blank line before or after.
4. Between descriptions of variables/functions/commands, use _two_ blank lines.
5. Up-indent the description of a variable/function/command by two spaces.
6. Place tags at the ends of lines, with the final characters on column 79.
All of the tags should line up perfectly on the same column as you scan
down through the document.
7. Keep the table of contents balanced so the longest tag link ends on column
79, and so all links line up perfectly on their first character, on the
left.
<a name="documenting-linter-options"></a>
### 4.iii Documenting Linter Options
For documenting new linter options, please add a new sub-section under the
"Linter Specific Options" section describing all of the global options added
for each linter, and what the default values of the options are. All global
options for linters should be set to some default value. This will allow users
to look up the default value easily by typing `:echo g:ale_...`.
<a name="in-case-of-busses"></a>
## 5. In Case of Busses
Should the principal author of the ALE project and all collaborators with the
required access needed to properly administrate the project on GitHub or any
other website either perish or disappear, whether by tragic traffic accident
or government adduction, etc., action should be taken to ensure that the
project continues. If no one is left to administer the project where it is
hosted, please fork the project and nominate someone capable to administer it.
Preferably, in such an event, a single fork of the project will replace the
original, and life will go on, except the life of whoever vanished, because
then they will probably be dead.
Should w0rp suddenly disappear, then he was probably killed in a traffic
accident, or the government finally decided to kill him and make it look like
suicide. In the latter event, please subvert said government and restore
order to the universe, and ensure peace for mankind.

View File

@ -1,18 +1,27 @@
FROM tweekmonster/vim-testbed:latest
FROM testbed/vim:20
RUN install_vim -tag v8.0.0027 -build \
-tag neovim:v0.1.7 -build
-tag v8.2.4693 -build \
-tag neovim:v0.2.0 -build \
-tag neovim:v0.7.0 -build
ENV PACKAGES="\
bash \
git \
python \
py-pip \
python2 \
python3 \
py3-pip \
grep \
sed \
"
RUN apk --update add $PACKAGES && \
rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
RUN pip install vim-vint==0.3.9
RUN pip install vim-vint==0.3.21
RUN git clone https://github.com/junegunn/vader.vim vader && \
cd vader && git checkout c6243dd81c98350df4dec608fa972df98fa2a3af
ARG GIT_VERSION
LABEL Version=${GIT_VERSION}
LABEL Name=denseanalysis/ale

View File

@ -1,12 +0,0 @@
<!--
READ THIS FIRST: If you are experiencing any bug whatsoever dealing with
the output of linters, please use `let g:ale_history_log_output = 1` before
pasting output. It will capture the output of commands that are run.
For bugs, paste output from your clipboard after running :ALEInfoToClipboard
here. If that doesn't work for some reason, try running :ALEInfo and copying
the output from that here instead. If everything is broken, run around in
circles and scream.
Whatever the case, describe the your issue here.
-->

View File

@ -1,4 +1,4 @@
Copyright (c) 2016, w0rp <devw0rp@gmail.com>
Copyright (c) 2016-2020, w0rp <devw0rp@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -1,17 +0,0 @@
<!--
When creating new pull requests, please consider the following.
* Read the Contributing guide linked above first.
* If you are adding a new linter, remember to update the README.md file and
doc/ale.txt first.
* If you add or modify a function for converting error lines into loclist items
that ALE can work with, please add Vader tests for them. Look at existing
tests in the test/handler directory, etc.
* If you add or modify a function for computing a command line string for
running a command, please add Vader tests for that.
* Generally try and cover anything with Vader tests, although some things just
can't be tested with Vader, or at least they can be hard to test. Consider
breaking up your code so that some parts can be tested, and generally open up
a discussion about it.
* Have fun!
-->

813
README.md

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Follow-up checks for the plugin: warn about conflicting plugins.
" A flag for ensuring that this is not run more than one time.
if exists('g:loaded_ale_after')
finish
endif
" Set the flag so this file is not run more than one time.
let g:loaded_ale_after = 1
" Check if the flag is available and set to 0 to disable checking for and
" emitting conflicting plugin warnings.
if exists('g:ale_emit_conflict_warnings') && !g:ale_emit_conflict_warnings
finish
endif
" Conflicting Plugins Checks
function! s:GetConflictingPluginWarning(plugin_name) abort
return 'ALE conflicts with ' . a:plugin_name
\ . '. Uninstall it, or disable this warning with '
\ . '`let g:ale_emit_conflict_warnings = 0` in your vimrc file, '
\ . '*before* plugins are loaded.'
endfunction
if exists('g:loaded_syntastic_plugin')
throw s:GetConflictingPluginWarning('Syntastic')
endif
if exists('g:loaded_neomake')
throw s:GetConflictingPluginWarning('Neomake')
endif
if exists('g:loaded_validator_plugin')
throw s:GetConflictingPluginWarning('Validator')
endif

26
ale_linters/ada/adals.vim Normal file
View File

@ -0,0 +1,26 @@
" Author: Bartek Jasicki http://github.com/thindil
" Description: Support for Ada Language Server
call ale#Set('ada_adals_executable', 'ada_language_server')
call ale#Set('ada_adals_project', 'default.gpr')
call ale#Set('ada_adals_encoding', 'utf-8')
function! ale_linters#ada#adals#GetAdaLSConfig(buffer) abort
return {
\ 'ada.projectFile': ale#Var(a:buffer, 'ada_adals_project'),
\ 'ada.defaultCharset': ale#Var(a:buffer, 'ada_adals_encoding')
\}
endfunction
function! ale_linters#ada#adals#GetRootDirectory(buffer) abort
return fnamemodify(bufname(a:buffer), ':p:h')
endfunction
call ale#linter#Define('ada', {
\ 'name': 'adals',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'ada_adals_executable')},
\ 'command': '%e',
\ 'project_root': function('ale_linters#ada#adals#GetRootDirectory'),
\ 'lsp_config': function('ale_linters#ada#adals#GetAdaLSConfig')
\})

View File

@ -0,0 +1,5 @@
scriptencoding utf-8
" Author: David Houston <houstdav000>
" Description: cspell support for Ada files.
call ale#handlers#cspell#DefineLinter('ada')

54
ale_linters/ada/gcc.vim Normal file
View File

@ -0,0 +1,54 @@
" Author: Martino Pilia <martino.pilia@gmail.com>
" Description: Lint Ada files with GCC
call ale#Set('ada_gcc_executable', 'gcc')
" -gnatwa: activate most optional warnings
" -gnatq: try semantic analysis even if syntax errors have been found
call ale#Set('ada_gcc_options', '-gnatwa -gnatq')
function! ale_linters#ada#gcc#GetCommand(buffer) abort
" Build a suitable output file name. The output file is specified because
" the .ali file may be created even if no code generation is attempted.
" The output file name must match the source file name (except for the
" extension), so here we cannot use the null file as output.
let l:tmp_dir = fnamemodify(ale#command#CreateDirectory(a:buffer), ':p')
let l:out_file = l:tmp_dir . fnamemodify(bufname(a:buffer), ':t:r') . '.o'
" -gnatc: Check syntax and semantics only (no code generation attempted)
return '%e -x ada -c -gnatc'
\ . ' -o ' . ale#Escape(l:out_file)
\ . ' -I %s:h'
\ . ale#Pad(ale#Var(a:buffer, 'ada_gcc_options'))
\ . ' %t'
endfunction
" For the message format please refer to:
" https://gcc.gnu.org/onlinedocs/gnat_ugn/Output-and-Error-Message-Control.html
" https://gcc.gnu.org/onlinedocs/gnat_ugn/Warning-Message-Control.html
function! ale_linters#ada#gcc#Handle(buffer, lines) abort
" Error format: <filename>:<lnum>:<col>: <text>
" Warning format: <filename>:<lnum>:<col>: warning: <text>
let l:re = '\v(.+):([0-9]+):([0-9]+):\s+(warning:)?\s*(.+)\s*'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:re)
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': str2nr(l:match[2]),
\ 'col': str2nr(l:match[3]),
\ 'type': l:match[4] is# 'warning:' ? 'W' : 'E',
\ 'text': l:match[5],
\})
endfor
return l:output
endfunction
call ale#linter#Define('ada', {
\ 'name': 'gcc',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'ada_gcc_executable')},
\ 'command': function('ale_linters#ada#gcc#GetCommand'),
\ 'callback': 'ale_linters#ada#gcc#Handle',
\})

View File

@ -1,7 +1,13 @@
" Author: Bjorn Neergaard <bjorn@neersighted.com>
" Authors: Bjorn Neergaard <bjorn@neersighted.com>, Vytautas Macionis <vytautas.macionis@manomail.de>
" Description: ansible-lint for ansible-yaml files
function! ale_linters#ansible#ansible_lint#Handle(buffer, lines) abort
call ale#Set('ansible_ansible_lint_executable', 'ansible-lint')
function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'ansible_ansible_lint_executable')
endfunction
function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
for l:line in a:lines[:10]
if match(l:line, '^Traceback') >= 0
return [{
@ -12,37 +18,111 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, lines) abort
endif
endfor
" Matches patterns line the following:
"
" test.yml:35: [EANSIBLE0002] Trailing whitespace
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?: \[?([[:alnum:]]+)\]? (.*)$'
let l:version_group = ale#semver#GTE(a:version, [6, 0, 0]) ? '>=6.0.0' :
\ ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' :
\ '<5.0.0'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[3]
if '>=6.0.0' is# l:version_group
let l:error_codes = { 'blocker': 'E', 'critical': 'E', 'major': 'W', 'minor': 'W', 'info': 'I' }
let l:linter_issues = json_decode(join(a:lines, ''))
if (l:code ==# 'EANSIBLE002')
\ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
" Skip warnings for trailing whitespace if the option is off.
continue
endif
for l:issue in l:linter_issues
if ale#path#IsBufferPath(a:buffer, l:issue.location.path)
call add(l:output, {
\ 'lnum': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.line :
\ l:issue.location.lines.begin,
\ 'col': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.column : 0,
\ 'text': l:issue.check_name,
\ 'detail': l:issue.description,
\ 'code': l:issue.severity,
\ 'type': l:error_codes[l:issue.severity],
\})
endif
endfor
endif
let l:item = {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'text': l:code . ': ' . l:match[4],
\ 'type': l:code[:0] ==# 'E' ? 'E' : 'W',
\}
if '>=5.0.0' is# l:version_group
" Matches patterns line the following:
" test.yml:3:148: syntax-check 'var' is not a valid attribute for a Play
" roles/test/tasks/test.yml:8: [package-latest] [VERY_LOW] Package installs should not use latest
" D:\test\tasks\test.yml:8: [package-latest] [VERY_LOW] package installs should not use latest
let l:pattern = '\v^(%([a-zA-Z]:)?[^:]+):(\d+):%((\d+):)? %(\[([-[:alnum:]]+)\]) %(\[([_[:alnum:]]+)\]) (.*)$'
let l:error_codes = { 'VERY_HIGH': 'E', 'HIGH': 'E', 'MEDIUM': 'W', 'LOW': 'W', 'VERY_LOW': 'W', 'INFO': 'I' }
call add(l:output, l:item)
endfor
for l:match in ale#util#GetMatches(a:lines, l:pattern)
if ale#path#IsBufferPath(a:buffer, l:match[1])
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'text': l:match[6],
\ 'code': l:match[4],
\ 'type': l:error_codes[l:match[5]],
\})
endif
endfor
endif
if '<5.0.0' is# l:version_group
" Matches patterns line the following:
" test.yml:35: [EANSIBLE0002] Trailing whitespace
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?: \[?([[:alnum:]]+)\]? (.*)$'
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[4]
if l:code is# 'EANSIBLE0002'
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
" Skip warnings for trailing whitespace if the option is off.
continue
endif
if ale#path#IsBufferPath(a:buffer, l:match[1])
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'text': l:match[5],
\ 'code': l:code,
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W',
\})
endif
endfor
endif
return l:output
endfunction
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
let l:commands = {
\ '>=6.0.0': '%e --nocolor -f json -x yaml %s',
\ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s',
\ '<5.0.0': '%e --nocolor -p %t'
\}
let l:command = ale#semver#GTE(a:version, [6, 0]) ? l:commands['>=6.0.0'] :
\ ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] :
\ l:commands['<5.0.0']
return l:command
endfunction
call ale#linter#Define('ansible', {
\ 'name': 'ansible',
\ 'executable': 'ansible',
\ 'command': 'ansible-lint -p %t',
\ 'callback': 'ale_linters#ansible#ansible_lint#Handle',
\ 'name': 'ansible_lint',
\ 'aliases': ['ansible', 'ansible-lint'],
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'),
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
\ buffer,
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer),
\ '%e --version',
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
\ )},
\ 'lint_file': 1,
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
\ buffer,
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer),
\ '%e --version',
\ {buffer, version -> ale_linters#ansible#ansible_lint#Handle(
\ buffer,
\ l:version,
\ lines)},
\ )},
\})

View File

@ -0,0 +1,38 @@
" Author: nametake https://nametake.github.io
" Description: apiblueprint parser
function! ale_linters#apiblueprint#drafter#HandleErrors(buffer, lines) abort
" Matches patterns line the following:
"
" warning: (3) unable to parse response signature, expected 'response [<HTTP status code>] [(<media type>)]'; line 4, column 3k - line 4, column 22
" warning: (10) message-body asset is expected to be a pre-formatted code block, separate it by a newline and indent every of its line by 12 spaces or 3 tabs; line 30, column 5 - line 30, column 9; line 31, column 9 - line 31, column 14; line 32, column 9 - line 32, column 14
let l:pattern = '\(^.*\): (\d\+) \(.\{-\}\); line \(\d\+\), column \(\d\+\) - line \d\+, column \d\+\(.*; line \d\+, column \d\+ - line \(\d\+\), column \(\d\+\)\)\{-\}$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines[2:], l:pattern)
let l:item = {
\ 'type': l:match[1] is# 'warning' ? 'W' : 'E',
\ 'text': l:match[2],
\ 'lnum': l:match[3] + 0,
\ 'col': l:match[4] + 0,
\}
if l:match[5] isnot# ''
let l:item.end_lnum = l:match[6] + 0
let l:item.end_col = l:match[7] + 0
endif
call add(l:output, l:item)
endfor
return l:output
endfunction
call ale#linter#Define('apiblueprint', {
\ 'name': 'drafter',
\ 'output_stream': 'stderr',
\ 'executable': 'drafter',
\ 'command': 'drafter --use-line-num --validate',
\ 'callback': 'ale_linters#apiblueprint#drafter#HandleErrors',
\})

View File

@ -0,0 +1,12 @@
" Author: Leo <thinkabit.ukim@gmail.com>
" Description: apkbuild-lint from atools linter for APKBUILDs
call ale#Set('apkbuild_apkbuild_lint_executable', 'apkbuild-lint')
call ale#linter#Define('apkbuild', {
\ 'name': 'apkbuild_lint',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'apkbuild_apkbuild_lint_executable')},
\ 'command': '%e %t',
\ 'callback': 'ale#handlers#atools#Handle',
\})

View File

@ -0,0 +1,12 @@
" Author: Leo <thinkabit.ukim@gmail.com>
" Description: secfixes-check from atools linter for APKBUILDs
call ale#Set('apkbuild_secfixes_check_executable', 'secfixes-check')
call ale#linter#Define('apkbuild', {
\ 'name': 'secfixes_check',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'apkbuild_secfixes_check_executable')},
\ 'command': '%e %t',
\ 'callback': 'ale#handlers#atools#Handle',
\})

View File

@ -0,0 +1,4 @@
" Author: Johannes Wienke <languitar@semipol.de>
" Description: alex for asciidoc files
call ale#handlers#alex#DefineLinter('asciidoc', '--text')

View File

@ -0,0 +1,5 @@
scriptencoding utf-8
" Author: David Houston <houstdav000>
" Description: cspell support for ASCIIDoc files.
call ale#handlers#cspell#DefineLinter('asciidoc')

View File

@ -0,0 +1,5 @@
" Author: Horacio Sanson (hsanson [ät] gmail.com)
" Description: languagetool for asciidoc files, copied from markdown.
call ale#handlers#languagetool#DefineLinter('asciidoc')

View File

@ -0,0 +1,9 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)
call ale#linter#Define('asciidoc', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f asciidoc -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})

View File

@ -0,0 +1,9 @@
" Author: TANIGUCHI Masaya <ta2gch@gmail.com>
" Description: textlint for AsciiDoc files
call ale#linter#Define('asciidoc', {
\ 'name': 'textlint',
\ 'executable': function('ale#handlers#textlint#GetExecutable'),
\ 'command': function('ale#handlers#textlint#GetCommand'),
\ 'callback': 'ale#handlers#textlint#HandleTextlintOutput',
\})

View File

@ -0,0 +1,9 @@
" Author: Jeff Kreeftmeijer https://github.com/jeffkreeftmeijer
" Description: vale for AsciiDoc files
call ale#linter#Define('asciidoc', {
\ 'name': 'vale',
\ 'executable': 'vale',
\ 'command': 'vale --output=line %t',
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})

View File

@ -0,0 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for AsciiDoc files
call ale#handlers#writegood#DefineLinter('asciidoc')

View File

@ -1,12 +1,16 @@
" Author: Lucas Kolstad <lkolstad@uw.edu>
" Description: gcc linter for asm files
let g:ale_asm_gcc_options = get(g:, 'ale_asm_gcc_options', '-Wall')
call ale#Set('asm_gcc_executable', 'gcc')
call ale#Set('asm_gcc_options', '-Wall')
function! ale_linters#asm#gcc#GetCommand(buffer) abort
return 'gcc -x assembler -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ' ' . ale#Var(a:buffer, 'asm_gcc_options') . ' -'
" `-o /dev/null` or `-o null` is needed to catch all errors,
" -fsyntax-only doesn't catch everything.
return '%e -x assembler'
\ . ' -o ' . g:ale#util#nul_file
\ . '-iquote %s:h'
\ . ' ' . ale#Var(a:buffer, 'asm_gcc_options') . ' -'
endfunction
function! ale_linters#asm#gcc#Handle(buffer, lines) abort
@ -27,7 +31,7 @@ endfunction
call ale#linter#Define('asm', {
\ 'name': 'gcc',
\ 'output_stream': 'stderr',
\ 'executable': 'gcc',
\ 'command_callback': 'ale_linters#asm#gcc#GetCommand',
\ 'executable': {b -> ale#Var(b, 'asm_gcc_executable')},
\ 'command': function('ale_linters#asm#gcc#GetCommand'),
\ 'callback': 'ale_linters#asm#gcc#Handle',
\})

36
ale_linters/avra/avra.vim Normal file
View File

@ -0,0 +1,36 @@
" Author: Utkarsh Verma <utkarshverma@protonmail.com>
" Description: AVRA linter for avra syntax.
call ale#Set('avra_avra_executable', 'avra')
call ale#Set('avra_avra_options', '')
function! ale_linters#avra#avra#GetCommand(buffer) abort
return '%e'
\ . ' %t'
\ . ale#Pad(ale#Var(a:buffer, 'avra_avra_options'))
\ . ' -o ' . g:ale#util#nul_file
endfunction
function! ale_linters#avra#avra#Handle(buffer, lines) abort
" Note that we treat 'fatal' as errors.
let l:pattern = '^\S\+(\(\d\+\))\s\+:\s\+\(\S\+\)\s\+:\s\+\(.\+\)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'type': l:match[2] =~? 'Error' ? 'E' : 'W',
\ 'text': l:match[3],
\})
endfor
return l:output
endfunction
call ale#linter#Define('avra', {
\ 'name': 'avra',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'avra_avra_executable')},
\ 'command': function('ale_linters#avra#avra#GetCommand'),
\ 'callback': 'ale_linters#avra#avra#Handle',
\})

View File

@ -1,26 +1,23 @@
" Author: kmarc <korondi.mark@gmail.com>
" Description: This file adds support for using GNU awk with sripts.
let g:ale_awk_gawk_executable =
\ get(g:, 'ale_awk_gawk_executable', 'gawk')
let g:ale_awk_gawk_options =
\ get(g:, 'ale_awk_gawk_options', '')
function! ale_linters#awk#gawk#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'awk_gawk_executable')
endfunction
call ale#Set('awk_gawk_executable', 'gawk')
call ale#Set('awk_gawk_options', '')
function! ale_linters#awk#gawk#GetCommand(buffer) abort
return ale_linters#awk#gawk#GetExecutable(a:buffer)
\ . ' ' . ale#Var(a:buffer, 'awk_gawk_options')
\ . ' ' . '-f %t --lint /dev/null'
" note the --source 'BEGIN ...' is to prevent
" gawk from attempting to execute the body of the script
" it is linting.
return '%e --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
\ . ' --lint'
\ . ale#Pad(ale#Var(a:buffer, 'awk_gawk_options'))
\ . ' -f %t /dev/null'
endfunction
call ale#linter#Define('awk', {
\ 'name': 'gawk',
\ 'executable_callback': 'ale_linters#awk#gawk#GetExecutable',
\ 'command_callback': 'ale_linters#awk#gawk#GetCommand',
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'executable': {b -> ale#Var(b, 'awk_gawk_executable')},
\ 'command': function('ale_linters#awk#gawk#GetCommand'),
\ 'callback': 'ale#handlers#gawk#HandleGawkFormat',
\ 'output_stream': 'both'
\})

View File

@ -0,0 +1,4 @@
" Author: Ian2020 <https://github.com/Ian2020>
" Description: shellcheck linter for bats scripts.
call ale#handlers#shellcheck#DefineLinter('bats')

View File

@ -0,0 +1,80 @@
" Author: Horacio Sanson - https://github.com/hsanson
" Description: Support for bibclean linter for BibTeX files.
call ale#Set('bib_bibclean_executable', 'bibclean')
function! ale_linters#bib#bibclean#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'bib_bibclean_executable')
return ale#Escape(l:executable) . ' -file-position '
endfunction
function! ale_linters#bib#bibclean#get_type(str) abort
if a:str is# '??'
return 'E'
else
return 'W'
endif
endfunction
function! ale_linters#bib#bibclean#match_msg(line) abort
" Legacy message pattern works for bibclean <= v2.11.4. If empty, try
" the new message pattern for bibtex > v2.11.4
let l:matches_legacy = matchlist(a:line, '^\(.*\) "stdin", line \(\d\+\): \(.*\)$')
return ! empty(l:matches_legacy) ? l:matches_legacy
\ : matchlist(a:line, '^\(.*\) stdin:\(\d\+\):\(.*\)$')
endfunction
function! ale_linters#bib#bibclean#match_entry(line) abort
return matchlist(a:line, 'Entry input byte=.* line=\(.*\) column=\(.*\) output .*$')
endfunction
function! ale_linters#bib#bibclean#match_value(line) abort
return matchlist(a:line, 'Value input byte=.* line=\(.*\) column=\(.*\) output .*$')
endfunction
function! ale_linters#bib#bibclean#Handle(buffer, lines) abort
let l:output = []
let l:type = 'E'
let l:msg = ''
for l:line in a:lines
if empty(l:msg)
let l:mlist = ale_linters#bib#bibclean#match_msg(l:line)
if !empty(l:mlist)
let l:msg = l:mlist[3]
let l:type = ale_linters#bib#bibclean#get_type(l:mlist[1])
endif
else
if l:type is# 'E'
let l:mlist = ale_linters#bib#bibclean#match_entry(l:line)
else
let l:mlist = ale_linters#bib#bibclean#match_value(l:line)
endif
if !empty(l:mlist)
call add(l:output, {
\ 'lnum': l:mlist[1],
\ 'col': l:mlist[2],
\ 'text': l:msg,
\ 'type': l:type
\})
let l:msg = ''
endif
endif
endfor
return l:output
endfunction
call ale#linter#Define('bib', {
\ 'name': 'bibclean',
\ 'executable': {b -> ale#Var(b, 'bib_bibclean_executable')},
\ 'command': function('ale_linters#bib#bibclean#GetCommand'),
\ 'output_stream': 'stderr',
\ 'callback': 'ale_linters#bib#bibclean#Handle',
\})

View File

@ -0,0 +1,47 @@
" Author: offa
" Description: oelint-adv for BitBake files
call ale#Set('bitbake_oelint_adv_executable', 'oelint-adv')
call ale#Set('bitbake_oelint_adv_options', '')
call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg')
function! ale_linters#bitbake#oelint_adv#Command(buffer) abort
let l:config_file = ale#path#FindNearestFile(a:buffer,
\ ale#Var(a:buffer, 'bitbake_oelint_adv_config'))
return ((!empty(l:config_file))
\ ? 'OELINT_CONFIG=' . ale#Escape(l:config_file) . ' '
\ : '')
\ . '%e --quiet '
\ . ale#Pad(ale#Var(a:buffer, 'bitbake_oelint_adv_options')) . '%s'
endfunction
function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort
let l:pattern = '\v^(.+):(.+):(.+):(.+):(.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': str2nr(l:match[2]),
\ 'type': l:match[3] is# 'error'
\ ? 'E' : (l:match[3] is# 'warning' ? 'W' : 'I'),
\ 'text': StripAnsiCodes(l:match[5]),
\ 'code': l:match[4]
\ })
endfor
return l:output
endfunction
function! StripAnsiCodes(line) abort
return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g')
endfunction
call ale#linter#Define('bitbake', {
\ 'name': 'oelint_adv',
\ 'output_stream': 'both',
\ 'executable': {b -> ale#Var(b, 'bitbake_oelint_adv_executable')},
\ 'cwd': '%s:h',
\ 'command': function('ale_linters#bitbake#oelint_adv#Command'),
\ 'callback': 'ale_linters#bitbake#oelint_adv#Handle',
\ })

53
ale_linters/c/cc.vim Normal file
View File

@ -0,0 +1,53 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: A C compiler linter for C files with gcc/clang, etc.
call ale#Set('c_cc_executable', '<auto>')
call ale#Set('c_cc_options', '-std=c11 -Wall')
function! ale_linters#c#cc#GetExecutable(buffer) abort
let l:executable = ale#Var(a:buffer, 'c_cc_executable')
" Default to either clang or gcc.
if l:executable is# '<auto>'
if ale#engine#IsExecutable(a:buffer, 'clang')
let l:executable = 'clang'
else
let l:executable = 'gcc'
endif
endif
return l:executable
endfunction
function! ale_linters#c#cc#GetCommand(buffer, output) abort
let l:cflags = ale#c#GetCFlags(a:buffer, a:output)
let l:ale_flags = ale#Var(a:buffer, 'c_cc_options')
if l:cflags =~# '-std='
let l:ale_flags = substitute(
\ l:ale_flags,
\ '-std=\(c\|gnu\)[0-9]\{2\}',
\ '',
\ 'g')
endif
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
"
" `-o /dev/null` or `-o null` is needed to catch all errors,
" -fsyntax-only doesn't catch everything.
return '%e -S -x c'
\ . ' -o ' . g:ale#util#nul_file
\ . ' -iquote %s:h'
\ . ale#Pad(l:cflags)
\ . ale#Pad(l:ale_flags) . ' -'
endfunction
call ale#linter#Define('c', {
\ 'name': 'cc',
\ 'aliases': ['gcc', 'clang'],
\ 'output_stream': 'stderr',
\ 'executable': function('ale_linters#c#cc#GetExecutable'),
\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#c#cc#GetCommand'))},
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

15
ale_linters/c/ccls.vim Normal file
View File

@ -0,0 +1,15 @@
" Author: Ye Jingchen <ye.jingchen@gmail.com>, Ben Falconer <ben@falconers.me.uk>, jtalowell <jtalowell@protonmail.com>
" Description: A language server for C
call ale#Set('c_ccls_executable', 'ccls')
call ale#Set('c_ccls_init_options', {})
call ale#Set('c_build_dir', '')
call ale#linter#Define('c', {
\ 'name': 'ccls',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'c_ccls_executable')},
\ 'command': '%e',
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'c_ccls_init_options')},
\})

View File

@ -1,29 +0,0 @@
" Author: Masahiro H https://github.com/mshr-h
" Description: clang linter for c files
" Set this option to change the Clang options for warnings for C.
if !exists('g:ale_c_clang_options')
" let g:ale_c_clang_options = '-Wall'
" let g:ale_c_clang_options = '-std=c99 -Wall'
" c11 compatible
let g:ale_c_clang_options = '-std=c11 -Wall'
endif
function! ale_linters#c#clang#GetCommand(buffer) abort
let l:paths = ale#c#FindLocalHeaderPaths(a:buffer)
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return 'clang -S -x c -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . ale#c#IncludeOptions(l:paths)
\ . ale#Var(a:buffer, 'c_clang_options') . ' -'
endfunction
call ale#linter#Define('c', {
\ 'name': 'clang',
\ 'output_stream': 'stderr',
\ 'executable': 'clang',
\ 'command_callback': 'ale_linters#c#clang#GetCommand',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\})

22
ale_linters/c/clangd.vim Normal file
View File

@ -0,0 +1,22 @@
" Author: Andrey Melentyev <andrey.melentyev@protonmail.com>
" Description: Clangd language server
call ale#Set('c_clangd_executable', 'clangd')
call ale#Set('c_clangd_options', '')
call ale#Set('c_build_dir', '')
function! ale_linters#c#clangd#GetCommand(buffer) abort
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
return '%e'
\ . ale#Pad(ale#Var(a:buffer, 'c_clangd_options'))
\ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '')
endfunction
call ale#linter#Define('c', {
\ 'name': 'clangd',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'c_clangd_executable')},
\ 'command': function('ale_linters#c#clangd#GetCommand'),
\ 'project_root': function('ale#c#FindProjectRoot'),
\})

View File

@ -0,0 +1,52 @@
" Author: vdeurzen <tim@kompiler.org>, w0rp <devw0rp@gmail.com>,
" gagbo <gagbobada@gmail.com>, Andrej Radovic <r.andrej@gmail.com>
" Description: clang-tidy linter for c files
call ale#Set('c_clangtidy_executable', 'clang-tidy')
" Set this option to check the checks clang-tidy will apply.
" The number of checks that can be applied to C files is limited in contrast to
" C++
"
" Consult the check list in clang-tidy's documentation:
" http://clang.llvm.org/extra/clang-tidy/checks/list.html
call ale#Set('c_clangtidy_checks', [])
" Set this option to manually set some options for clang-tidy to use as compile
" flags.
" This will disable compile_commands.json detection.
call ale#Set('c_clangtidy_options', '')
" Set this option to manually set options for clang-tidy directly.
call ale#Set('c_clangtidy_extra_options', '')
call ale#Set('c_build_dir', '')
function! ale_linters#c#clangtidy#GetCommand(buffer, output) abort
let l:checks = join(ale#Var(a:buffer, 'c_clangtidy_checks'), ',')
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
let l:options = ''
" Get the extra options if we couldn't find a build directory.
if empty(l:build_dir)
let l:options = ale#Var(a:buffer, 'c_clangtidy_options')
let l:cflags = ale#c#GetCFlags(a:buffer, a:output)
let l:options .= !empty(l:options) ? ale#Pad(l:cflags) : l:cflags
endif
" Get the options to pass directly to clang-tidy
let l:extra_options = ale#Var(a:buffer, 'c_clangtidy_extra_options')
return '%e'
\ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '')
\ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '')
\ . ' %s'
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '')
\ . (!empty(l:options) ? ' -- ' . l:options : '')
endfunction
call ale#linter#Define('c', {
\ 'name': 'clangtidy',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'c_clangtidy_executable')},
\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#c#clangtidy#GetCommand'))},
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'lint_file': 1,
\})

View File

@ -1,34 +1,29 @@
" Author: Bart Libert <bart.libert@gmail.com>
" Description: cppcheck linter for c files
" Set this option to change the cppcheck options
let g:ale_c_cppcheck_options = get(g:, 'ale_c_cppcheck_options', '--enable=style')
call ale#Set('c_cppcheck_executable', 'cppcheck')
call ale#Set('c_cppcheck_options', '--enable=style')
function! ale_linters#c#cppcheck#GetCommand(buffer) abort
" Search upwards from the file for compile_commands.json.
"
" If we find it, we'll `cd` to where the compile_commands.json file is,
" then use the file to set up import paths, etc.
let l:compile_commmands_path = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
let l:cd_command = !empty(l:compile_commmands_path)
\ ? ale#path#CdString(fnamemodify(l:compile_commmands_path, ':h'))
\ : ''
let l:compile_commands_option = !empty(l:compile_commmands_path)
\ ? '--project=compile_commands.json '
let l:compile_commands_option = ale#handlers#cppcheck#GetCompileCommandsOptions(a:buffer)
let l:buffer_path_include = empty(l:compile_commands_option)
\ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer)
\ : ''
let l:template = ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}')
return l:cd_command
\ . 'cppcheck -q --language=c '
\ . l:compile_commands_option
\ . ale#Var(a:buffer, 'c_cppcheck_options')
return '%e -q --language=c'
\ . l:template
\ . ale#Pad(l:compile_commands_option)
\ . ale#Pad(ale#Var(a:buffer, 'c_cppcheck_options'))
\ . l:buffer_path_include
\ . ' %t'
endfunction
call ale#linter#Define('c', {
\ 'name': 'cppcheck',
\ 'output_stream': 'both',
\ 'executable': 'cppcheck',
\ 'command_callback': 'ale_linters#c#cppcheck#GetCommand',
\ 'executable': {b -> ale#Var(b, 'c_cppcheck_executable')},
\ 'cwd': function('ale#handlers#cppcheck#GetCwd'),
\ 'command': function('ale_linters#c#cppcheck#GetCommand'),
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
\})

20
ale_linters/c/cpplint.vim Normal file
View File

@ -0,0 +1,20 @@
" Author: Justin Huang <justin.y.huang@live.com>
" Description: cpplint for c files
call ale#Set('c_cpplint_executable', 'cpplint')
call ale#Set('c_cpplint_options', '')
function! ale_linters#c#cpplint#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'c_cpplint_options')
return '%e' . ale#Pad(l:options) . ' %s'
endfunction
call ale#linter#Define('c', {
\ 'name': 'cpplint',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'c_cpplint_executable')},
\ 'command': function('ale_linters#c#cpplint#GetCommand'),
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'lint_file': 1,
\})

30
ale_linters/c/cquery.vim Normal file
View File

@ -0,0 +1,30 @@
" Author: Ben Falconer <ben@falconers.me.uk>, jtalowell <jtalowell@protonmail.com>
" Description: A language server for C
call ale#Set('c_cquery_executable', 'cquery')
call ale#Set('c_cquery_cache_directory', expand('~/.cache/cquery'))
function! ale_linters#c#cquery#GetProjectRoot(buffer) abort
" Try to find cquery configuration files first.
let l:config = ale#path#FindNearestFile(a:buffer, '.cquery')
if !empty(l:config)
return fnamemodify(l:config, ':h')
endif
" Fall back on default project root detection.
return ale#c#FindProjectRoot(a:buffer)
endfunction
function! ale_linters#c#cquery#GetInitializationOptions(buffer) abort
return {'cacheDirectory': ale#Var(a:buffer, 'c_cquery_cache_directory')}
endfunction
call ale#linter#Define('c', {
\ 'name': 'cquery',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'c_cquery_executable')},
\ 'command': '%e',
\ 'project_root': function('ale_linters#c#cquery#GetProjectRoot'),
\ 'initialization_options': function('ale_linters#c#cquery#GetInitializationOptions'),
\})

5
ale_linters/c/cspell.vim Normal file
View File

@ -0,0 +1,5 @@
scriptencoding utf-8
" Author: David Houston <houstdav000>
" Description: cspell support for C files.
call ale#handlers#cspell#DefineLinter('c')

View File

@ -0,0 +1,25 @@
" Author: Christian Gibbons <cgibbons@gmu.edu>
" Description: flawfinder linter for c files
call ale#Set('c_flawfinder_executable', 'flawfinder')
call ale#Set('c_flawfinder_options', '')
call ale#Set('c_flawfinder_minlevel', 1)
call ale#Set('c_flawfinder_error_severity', 6)
function! ale_linters#c#flawfinder#GetCommand(buffer) abort
" Set the minimum vulnerability level for flawfinder to bother with
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'c_flawfinder_minlevel')
return '%e -CDQS'
\ . ale#Pad(ale#Var(a:buffer, 'c_flawfinder_options'))
\ . l:minlevel
\ . ' %t'
endfunction
call ale#linter#Define('c', {
\ 'name': 'flawfinder',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'c_flawfinder_executable')},
\ 'command': function('ale_linters#c#flawfinder#GetCommand'),
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
\})

View File

@ -1,29 +0,0 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: gcc linter for c files
" Set this option to change the GCC options for warnings for C.
if !exists('g:ale_c_gcc_options')
" let g:ale_c_gcc_options = '-Wall'
" let g:ale_c_gcc_options = '-std=c99 -Wall'
" c11 compatible
let g:ale_c_gcc_options = '-std=c11 -Wall'
endif
function! ale_linters#c#gcc#GetCommand(buffer) abort
let l:paths = ale#c#FindLocalHeaderPaths(a:buffer)
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return 'gcc -S -x c -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . ale#c#IncludeOptions(l:paths)
\ . ale#Var(a:buffer, 'c_gcc_options') . ' -'
endfunction
call ale#linter#Define('c', {
\ 'name': 'gcc',
\ 'output_stream': 'stderr',
\ 'executable': 'gcc',
\ 'command_callback': 'ale_linters#c#gcc#GetCommand',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\})

View File

@ -0,0 +1,37 @@
" Author: 0xHyoga <0xHyoga@gmx.com>
" Description: Report starknet-compile errors in cairo code
call ale#Set('cairo_starknet_executable', 'starknet-compile')
call ale#Set('cairo_starknet_options', '')
function! ale_linters#cairo#starknet#Handle(buffer, lines) abort
" Error always on the first line
" e.g ex01.cairo:20:6: Could not find module 'contracts.utils.ex00_base'. Searched in the following paths:
let l:pattern = '\v\.cairo:(\d+):(\d+):+ (.*)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': str2nr(l:match[1]),
\ 'col': str2nr(l:match[2]),
\ 'type': 'E',
\ 'text': l:match[3],
\})
endfor
return l:output
endfunction
function! ale_linters#cairo#starknet#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'cairo_starknet_executable')
return l:executable . ale#Pad(ale#Var(a:buffer, 'cairo_starknet_options')) . ' %s'
endfunction
call ale#linter#Define('cairo', {
\ 'name': 'starknet',
\ 'executable': {b -> ale#Var(b, 'cairo_starknet_executable')},
\ 'command': function('ale_linters#cairo#starknet#GetCommand'),
\ 'callback': 'ale_linters#cairo#starknet#Handle',
\ 'output_stream': 'stderr',
\})

View File

@ -0,0 +1,54 @@
" Author: Raphael Hoegger - https://github.com/pfuender
" Description: Cookstyle (RuboCop based), a code style analyzer for Ruby files
call ale#Set('chef_cookstyle_executable', 'cookstyle')
call ale#Set('chef_cookstyle_options', '')
function! ale_linters#chef#cookstyle#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'chef_cookstyle_options')
return '%e' . ale#Pad(escape(l:options, '~')) . ' --force-exclusion --format json --stdin ' . ' %s'
endfunction
function! ale_linters#chef#cookstyle#Handle(buffer, lines) abort
if len(a:lines) == 0
return []
endif
let l:errors = ale#util#FuzzyJSONDecode(a:lines[0], {})
if !has_key(l:errors, 'summary')
\|| l:errors['summary']['offense_count'] == 0
\|| empty(l:errors['files'])
return []
endif
let l:output = []
for l:error in l:errors['files'][0]['offenses']
let l:start_col = str2nr(l:error['location']['start_column'])
let l:end_col = str2nr(l:error['location']['last_column'])
if !l:end_col
let l:end_col = l:start_col + 1
endif
call add(l:output, {
\ 'lnum': str2nr(l:error['location']['line']),
\ 'col': l:start_col,
\ 'end_col': l:end_col,
\ 'code': l:error['cop_name'],
\ 'text': l:error['message'],
\ 'type': l:error['severity'] is? 'convention' ? 'W' : 'E',
\})
endfor
return l:output
endfunction
call ale#linter#Define('chef', {
\ 'name': 'cookstyle',
\ 'executable': {b -> ale#Var(b, 'chef_cookstyle_executable')},
\ 'command': function('ale_linters#chef#cookstyle#GetCommand'),
\ 'callback': 'ale_linters#chef#cookstyle#Handle',
\})

View File

@ -1,24 +1,30 @@
" Author: Edward Larkey <edwlarkey@mac.com>
" Author: Jose Junior <jose.junior@gmail.com>
" Author: w0rp <devw0rp@gmail.com>
" Description: This file adds the foodcritic linter for Chef files.
" Support options!
let g:ale_chef_foodcritic_options = get(g:, 'ale_chef_foodcritic_options', '')
let g:ale_chef_foodcritic_executable = get(g:, 'ale_chef_foodcritic_executable', 'foodcritic')
call ale#Set('chef_foodcritic_executable', 'foodcritic')
call ale#Set('chef_foodcritic_options', '')
function! ale_linters#chef#foodcritic#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'chef_foodcritic_options')
return '%e' . ale#Pad(escape(l:options, '~')) . ' %s'
endfunction
function! ale_linters#chef#foodcritic#Handle(buffer, lines) abort
" Matches patterns line the following:
"
" FC002: Avoid string interpolation where not required: httpd.rb:13
let l:pattern = '^\(.\+:\s.\+\):\s\(.\+\):\(\d\+\)$'
let l:pattern = '\v([^:]+): (.+): ([a-zA-Z]?:?[^:]+):(\d+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:text = l:match[1]
call add(l:output, {
\ 'lnum': l:match[3] + 0,
\ 'text': l:text,
\ 'code': l:match[1],
\ 'text': l:match[2],
\ 'filename': l:match[3],
\ 'lnum': l:match[4] + 0,
\ 'type': 'W',
\})
endfor
@ -26,17 +32,10 @@ function! ale_linters#chef#foodcritic#Handle(buffer, lines) abort
return l:output
endfunction
function! ale_linters#chef#foodcritic#GetCommand(buffer) abort
return printf('%s %s %%t',
\ ale#Var(a:buffer, 'chef_foodcritic_executable'),
\ escape(ale#Var(a:buffer, 'chef_foodcritic_options'), '~')
\)
endfunction
call ale#linter#Define('chef', {
\ 'name': 'foodcritic',
\ 'executable': 'foodcritic',
\ 'command_callback': 'ale_linters#chef#foodcritic#GetCommand',
\ 'executable': {b -> ale#Var(b, 'chef_foodcritic_executable')},
\ 'command': function('ale_linters#chef#foodcritic#GetCommand'),
\ 'callback': 'ale_linters#chef#foodcritic#Handle',
\ 'lint_file': 1,
\})

View File

@ -0,0 +1,46 @@
" Author: Masashi Iizuka <liquidz.uo@gmail.com>
" Description: linter for clojure using clj-kondo https://github.com/borkdude/clj-kondo
call ale#Set('clojure_clj_kondo_options', '--cache')
function! ale_linters#clojure#clj_kondo#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'clojure_clj_kondo_options')
let l:command = 'clj-kondo'
\ . ale#Pad(l:options)
\ . ' --lint %t'
return l:command
endfunction
function! ale_linters#clojure#clj_kondo#HandleCljKondoFormat(buffer, lines) abort
" output format
" <filename>:<line>:<column>: <issue type>: <message>
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+)?:(\d+)?:? ((Exception|error|warning): ?(.+))$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:type = 'E'
if l:match[4] is? 'warning'
let l:type = 'W'
endif
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'text': l:match[3],
\ 'type': l:type,
\})
endfor
return l:output
endfunction
call ale#linter#Define('clojure', {
\ 'name': 'clj-kondo',
\ 'output_stream': 'stdout',
\ 'executable': 'clj-kondo',
\ 'command': function('ale_linters#clojure#clj_kondo#GetCommand'),
\ 'callback': 'ale_linters#clojure#clj_kondo#HandleCljKondoFormat',
\})

View File

@ -0,0 +1,34 @@
" Author: Nic West <nicwest@mailbox.org>
" Description: linter for clojure using joker https://github.com/candid82/joker
function! ale_linters#clojure#joker#HandleJokerFormat(buffer, lines) abort
" output format
" <filename>:<line>:<column>: <issue type>: <message>
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):? ((Read error|Parse error|Parse warning|Exception): ?(.+))$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:type = 'E'
if l:match[4] is? 'Parse warning'
let l:type = 'W'
endif
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'text': l:match[3],
\ 'type': l:type,
\})
endfor
return l:output
endfunction
call ale#linter#Define('clojure', {
\ 'name': 'joker',
\ 'output_stream': 'stderr',
\ 'executable': 'joker',
\ 'command': 'joker --working-dir %s --lint %t',
\ 'callback': 'ale_linters#clojure#joker#HandleJokerFormat',
\})

View File

@ -0,0 +1,36 @@
" Author: Yasuhiro Kiyota <yasuhiroki.duck@gmail.com>
" Description: Support cfn-python-lint for AWS Cloudformation template file
function! ale_linters#cloudformation#cfn_python_lint#Handle(buffer, lines) abort
" Matches patterns line the following:
"
" sample.template.yaml:96:7:96:15:E3012:Property Resources/Sample/Properties/FromPort should be of type Integer
let l:pattern = '\v^(.*):(\d+):(\d+):(\d+):(\d+):([[:alnum:]]+):(.*)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[6]
if ale#path#IsBufferPath(a:buffer, l:match[1])
call add(l:output, {
\ 'lnum': l:match[2],
\ 'col': l:match[3],
\ 'end_lnum': l:match[4],
\ 'end_col': l:match[5],
\ 'code': l:code,
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W',
\ 'text': l:match[7]
\})
endif
endfor
return l:output
endfunction
call ale#linter#Define('cloudformation', {
\ 'name': 'cloudformation',
\ 'aliases': ['cfn-lint'],
\ 'executable': 'cfn-lint',
\ 'command': 'cfn-lint --template %t --format parseable',
\ 'callback': 'ale_linters#cloudformation#cfn_python_lint#Handle',
\})

View File

@ -0,0 +1,43 @@
" Author: Carl Smedstad <carl.smedstad at protonmail dot com>
" Description: cmake-lint for cmake files
let g:ale_cmake_cmake_lint_executable =
\ get(g:, 'ale_cmake_cmake_lint_executable', 'cmake-lint')
let g:ale_cmake_cmake_lint_options =
\ get(g:, 'ale_cmake_cmake_lint_options', '')
function! ale_linters#cmake#cmake_lint#Executable(buffer) abort
return ale#Var(a:buffer, 'cmake_cmake_lint_executable')
endfunction
function! ale_linters#cmake#cmake_lint#Command(buffer) abort
let l:executable = ale_linters#cmake#cmake_lint#Executable(a:buffer)
let l:options = ale#Var(a:buffer, 'cmake_cmake_lint_options')
return ale#Escape(l:executable) . ' ' . l:options . ' %t'
endfunction
function! ale_linters#cmake#cmake_lint#Handle(buffer, lines) abort
let l:pattern = '\v^[^:]+:(\d+),?(\d+)?:\s\[([A-Z]\d+)\]\s(.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'type': 'W',
\ 'code': l:match[3],
\ 'text': l:match[4],
\})
endfor
return l:output
endfunction
call ale#linter#Define('cmake', {
\ 'name': 'cmake_lint',
\ 'executable': function('ale_linters#cmake#cmake_lint#Executable'),
\ 'command': function('ale_linters#cmake#cmake_lint#Command'),
\ 'callback': 'ale_linters#cmake#cmake_lint#Handle',
\})

View File

@ -18,7 +18,7 @@ endfunction
call ale#linter#Define('cmake', {
\ 'name': 'cmakelint',
\ 'executable_callback': 'ale_linters#cmake#cmakelint#Executable',
\ 'command_callback': 'ale_linters#cmake#cmakelint#Command',
\ 'executable': function('ale_linters#cmake#cmakelint#Executable'),
\ 'command': function('ale_linters#cmake#cmakelint#Command'),
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})

View File

@ -16,8 +16,8 @@ endfunction
call ale#linter#Define('coffee', {
\ 'name': 'coffee',
\ 'executable_callback': 'ale_linters#coffee#coffee#GetExecutable',
\ 'command_callback': 'ale_linters#coffee#coffee#GetCommand',
\ 'executable': function('ale_linters#coffee#coffee#GetExecutable'),
\ 'command': function('ale_linters#coffee#coffee#GetCommand'),
\ 'output_stream': 'stderr',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\})

View File

@ -27,7 +27,7 @@ function! ale_linters#coffee#coffeelint#Handle(buffer, lines) abort
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': str2nr(l:match[1]),
\ 'type': l:match[3] ==# 'error' ? 'E' : 'W',
\ 'type': l:match[3] is# 'error' ? 'E' : 'W',
\ 'text': l:match[4],
\})
endfor
@ -37,7 +37,7 @@ endfunction
call ale#linter#Define('coffee', {
\ 'name': 'coffeelint',
\ 'executable_callback': 'ale_linters#coffee#coffeelint#GetExecutable',
\ 'command_callback': 'ale_linters#coffee#coffeelint#GetCommand',
\ 'executable': function('ale_linters#coffee#coffeelint#GetExecutable'),
\ 'command': function('ale_linters#coffee#coffeelint#GetCommand'),
\ 'callback': 'ale_linters#coffee#coffeelint#Handle',
\})

53
ale_linters/cpp/cc.vim Normal file
View File

@ -0,0 +1,53 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: A C++ compiler linter for C++ files with gcc/clang, etc.
call ale#Set('cpp_cc_executable', '<auto>')
call ale#Set('cpp_cc_options', '-std=c++14 -Wall')
function! ale_linters#cpp#cc#GetExecutable(buffer) abort
let l:executable = ale#Var(a:buffer, 'cpp_cc_executable')
" Default to either clang++ or gcc.
if l:executable is# '<auto>'
if ale#engine#IsExecutable(a:buffer, 'clang++')
let l:executable = 'clang++'
else
let l:executable = 'gcc'
endif
endif
return l:executable
endfunction
function! ale_linters#cpp#cc#GetCommand(buffer, output) abort
let l:cflags = ale#c#GetCFlags(a:buffer, a:output)
let l:ale_flags = ale#Var(a:buffer, 'cpp_cc_options')
if l:cflags =~# '-std='
let l:ale_flags = substitute(
\ l:ale_flags,
\ '-std=\(c\|gnu\)++[0-9]\{2\}',
\ '',
\ 'g')
endif
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
"
" `-o /dev/null` or `-o null` is needed to catch all errors,
" -fsyntax-only doesn't catch everything.
return '%e -S -x c++'
\ . ' -o ' . g:ale#util#nul_file
\ . ' -iquote %s:h'
\ . ale#Pad(l:cflags)
\ . ale#Pad(l:ale_flags) . ' -'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'cc',
\ 'aliases': ['gcc', 'clang', 'g++', 'clang++'],
\ 'output_stream': 'stderr',
\ 'executable': function('ale_linters#cpp#cc#GetExecutable'),
\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#cpp#cc#GetCommand'))},
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

15
ale_linters/cpp/ccls.vim Normal file
View File

@ -0,0 +1,15 @@
" Author: Ye Jingchen <ye.jingchen@gmail.com>, Ben Falconer <ben@falconers.me.uk>, jtalowell <jtalowell@protonmail.com>
" Description: A language server for C++
call ale#Set('cpp_ccls_executable', 'ccls')
call ale#Set('cpp_ccls_init_options', {})
call ale#Set('c_build_dir', '')
call ale#linter#Define('cpp', {
\ 'name': 'ccls',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'cpp_ccls_executable')},
\ 'command': '%e',
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
\ 'initialization_options': {b -> ale#handlers#ccls#GetInitOpts(b, 'cpp_ccls_init_options')},
\})

View File

@ -1,26 +0,0 @@
" Author: Tomota Nakamura <https://github.com/tomotanakamura>
" Description: clang linter for cpp files
" Set this option to change the Clang options for warnings for CPP.
if !exists('g:ale_cpp_clang_options')
let g:ale_cpp_clang_options = '-std=c++14 -Wall'
endif
function! ale_linters#cpp#clang#GetCommand(buffer) abort
let l:paths = ale#c#FindLocalHeaderPaths(a:buffer)
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return 'clang++ -S -x c++ -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . ale#c#IncludeOptions(l:paths)
\ . ale#Var(a:buffer, 'cpp_clang_options') . ' -'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'clang',
\ 'output_stream': 'stderr',
\ 'executable': 'clang++',
\ 'command_callback': 'ale_linters#cpp#clang#GetCommand',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\})

View File

@ -1,37 +1,35 @@
" Author: gagbo <gagbobada@gmail.com>
" Description: clang-check linter for cpp files
" Set this option to manually set some options for clang-check.
let g:ale_cpp_clangcheck_options = get(g:, 'ale_cpp_clangcheck_options', '')
" Set this option to manually point to the build directory for clang-tidy.
" This will disable all the other clangtidy_options, since compilation
" flags are contained in the json
let g:ale_c_build_dir = get(g:, 'ale_c_build_dir', '')
call ale#Set('cpp_clangcheck_executable', 'clang-check')
call ale#Set('cpp_clangcheck_options', '')
call ale#Set('c_build_dir', '')
function! ale_linters#cpp#clangcheck#GetCommand(buffer) abort
let l:user_options = ale#Var(a:buffer, 'cpp_clangcheck_options')
let l:extra_options = !empty(l:user_options)
\ ? l:user_options
\ : ''
" Try to find compilation database to link automatically
let l:user_build_dir = ale#Var(a:buffer, 'c_build_dir')
if empty(l:user_build_dir)
let l:user_build_dir = ale#c#FindCompileCommands(a:buffer)
endif
let l:build_options = !empty(l:user_build_dir)
\ ? ' -p ' . ale#Escape(l:user_build_dir)
\ : ''
let l:build_dir = ale#Var(a:buffer, 'c_build_dir')
return 'clang-check -analyze ' . '%s' . l:extra_options . l:build_options
if empty(l:build_dir)
let [l:root, l:json_file] = ale#c#FindCompileCommands(a:buffer)
let l:build_dir = ale#path#Dirname(l:json_file)
endif
" The extra arguments in the command are used to prevent .plist files from
" being generated. These are only added if no build directory can be
" detected.
return '%e -analyze %s'
\ . (empty(l:build_dir) ? ' --extra-arg=-Xclang --extra-arg=-analyzer-output=text --extra-arg=-fno-color-diagnostics': '')
\ . ale#Pad(l:user_options)
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '')
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'clangcheck',
\ 'output_stream': 'stderr',
\ 'executable': 'clang-check',
\ 'command_callback': 'ale_linters#cpp#clangcheck#GetCommand',
\ 'executable': {b -> ale#Var(b, 'cpp_clangcheck_executable')},
\ 'command': function('ale_linters#cpp#clangcheck#GetCommand'),
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'lint_file': 1,
\})

View File

@ -0,0 +1,22 @@
" Author: Andrey Melentyev <andrey.melentyev@protonmail.com>
" Description: Clangd language server
call ale#Set('cpp_clangd_executable', 'clangd')
call ale#Set('cpp_clangd_options', '')
call ale#Set('c_build_dir', '')
function! ale_linters#cpp#clangd#GetCommand(buffer) abort
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
return '%e'
\ . ale#Pad(ale#Var(a:buffer, 'cpp_clangd_options'))
\ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '')
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'clangd',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'cpp_clangd_executable')},
\ 'command': function('ale_linters#cpp#clangd#GetCommand'),
\ 'project_root': function('ale#c#FindProjectRoot'),
\})

View File

@ -2,52 +2,52 @@
" gagbo <gagbobada@gmail.com>
" Description: clang-tidy linter for cpp files
call ale#Set('cpp_clangtidy_executable', 'clang-tidy')
" Set this option to check the checks clang-tidy will apply.
let g:ale_cpp_clangtidy_checks = get(g:, 'ale_cpp_clangtidy_checks', ['*'])
" Set this option to manually set some options for clang-tidy.
call ale#Set('cpp_clangtidy_checks', [])
" Set this option to manually set some options for clang-tidy to use as compile
" flags.
" This will disable compile_commands.json detection.
let g:ale_cpp_clangtidy_options = get(g:, 'ale_cpp_clangtidy_options', '')
call ale#Set('cpp_clangtidy_options', '')
" Set this option to manually set options for clang-tidy directly.
call ale#Set('cpp_clangtidy_extra_options', '')
call ale#Set('c_build_dir', '')
" Set this option to manually point to the build directory for clang-tidy.
" This will disable all the other clangtidy_options, since compilation
" flags are contained in the json
let g:ale_c_build_dir = get(g:, 'ale_c_build_dir', '')
function! ale_linters#cpp#clangtidy#GetCommand(buffer, output) abort
let l:checks = join(ale#Var(a:buffer, 'cpp_clangtidy_checks'), ',')
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
let l:options = ''
" Get the extra options if we couldn't find a build directory.
if empty(l:build_dir)
let l:options = ale#Var(a:buffer, 'cpp_clangtidy_options')
let l:cflags = ale#c#GetCFlags(a:buffer, a:output)
let l:options .= !empty(l:options) ? ale#Pad(l:cflags) : l:cflags
function! ale_linters#cpp#clangtidy#GetCommand(buffer) abort
let l:check_list = ale#Var(a:buffer, 'cpp_clangtidy_checks')
let l:check_option = !empty(l:check_list)
\ ? '-checks=' . ale#Escape(join(l:check_list, ',')) . ' '
\ : ''
let l:user_options = ale#Var(a:buffer, 'cpp_clangtidy_options')
let l:user_build_dir = ale#Var(a:buffer, 'c_build_dir')
" c_build_dir has the priority if defined
if empty(l:user_build_dir)
let l:user_build_dir = ale#c#FindCompileCommands(a:buffer)
" Tell clang-tidy a .h header with a C++ filetype in Vim is a C++ file
" only when compile-commands.json file is not there. Adding these
" flags makes clang-tidy completely ignore compile commmands.
if expand('#' . a:buffer) =~# '\.h$'
let l:options .= !empty(l:options) ? ' -x c++' : '-x c++'
endif
endif
" We check again if user_builddir stayed empty after the
" c_build_dir_names check
" If we found the compilation database we override the value of
" l:extra_options
if empty(l:user_build_dir)
let l:extra_options = !empty(l:user_options)
\ ? ' -- ' . l:user_options
\ : ''
else
let l:extra_options = ' -p ' . ale#Escape(l:user_build_dir)
endif
" Get the options to pass directly to clang-tidy
let l:extra_options = ale#Var(a:buffer, 'cpp_clangtidy_extra_options')
return 'clang-tidy ' . l:check_option . '%s' . l:extra_options
return '%e'
\ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '')
\ . (!empty(l:extra_options) ? ' ' . ale#Escape(l:extra_options) : '')
\ . ' %s'
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '')
\ . (!empty(l:options) ? ' -- ' . l:options : '')
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'clangtidy',
\ 'output_stream': 'stdout',
\ 'executable': 'clang-tidy',
\ 'command_callback': 'ale_linters#cpp#clangtidy#GetCommand',
\ 'executable': {b -> ale#Var(b, 'cpp_clangtidy_executable')},
\ 'command': {b -> ale#c#RunMakeCommand(b, function('ale_linters#cpp#clangtidy#GetCommand'))},
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'lint_file': 1,
\})

32
ale_linters/cpp/clazy.vim Normal file
View File

@ -0,0 +1,32 @@
" Description: clazy linter for cpp files (clang-based and Qt-oriented)
call ale#Set('cpp_clazy_executable', 'clazy-standalone')
" Set this option to check the checks clazy will apply.
call ale#Set('cpp_clazy_checks', ['level1'])
" Set this option to manually set some options for clazy.
" This will disable compile_commands.json detection.
call ale#Set('cpp_clazy_options', '')
call ale#Set('c_build_dir', '')
function! ale_linters#cpp#clazy#GetCommand(buffer) abort
let l:checks = join(ale#Var(a:buffer, 'cpp_clazy_checks'), ',')
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
" Get the extra options if we couldn't find a build directory.
let l:options = ale#Var(a:buffer, 'cpp_clazy_options')
return '%e'
\ . (!empty(l:checks) ? ' -checks=' . ale#Escape(l:checks) : '')
\ . (!empty(l:build_dir) ? ' -p ' . ale#Escape(l:build_dir) : '')
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' %s'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'clazy',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'cpp_clazy_executable')},
\ 'command': function('ale_linters#cpp#clazy#GetCommand'),
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'lint_file': 1,
\})

View File

@ -1,34 +1,29 @@
" Author: Bart Libert <bart.libert@gmail.com>
" Description: cppcheck linter for cpp files
" Set this option to change the cppcheck options
let g:ale_cpp_cppcheck_options = get(g:, 'ale_cpp_cppcheck_options', '--enable=style')
call ale#Set('cpp_cppcheck_executable', 'cppcheck')
call ale#Set('cpp_cppcheck_options', '--enable=style')
function! ale_linters#cpp#cppcheck#GetCommand(buffer) abort
" Search upwards from the file for compile_commands.json.
"
" If we find it, we'll `cd` to where the compile_commands.json file is,
" then use the file to set up import paths, etc.
let l:compile_commmands_path = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
let l:cd_command = !empty(l:compile_commmands_path)
\ ? ale#path#CdString(fnamemodify(l:compile_commmands_path, ':h'))
\ : ''
let l:compile_commands_option = !empty(l:compile_commmands_path)
\ ? '--project=compile_commands.json '
let l:compile_commands_option = ale#handlers#cppcheck#GetCompileCommandsOptions(a:buffer)
let l:buffer_path_include = empty(l:compile_commands_option)
\ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer)
\ : ''
let l:template = ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}')
return l:cd_command
\ . 'cppcheck -q --language=c++ '
\ . l:compile_commands_option
\ . ale#Var(a:buffer, 'cpp_cppcheck_options')
return '%e -q --language=c++'
\ . l:template
\ . ale#Pad(l:compile_commands_option)
\ . ale#Pad(ale#Var(a:buffer, 'cpp_cppcheck_options'))
\ . l:buffer_path_include
\ . ' %t'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'cppcheck',
\ 'output_stream': 'both',
\ 'executable': 'cppcheck',
\ 'command_callback': 'ale_linters#cpp#cppcheck#GetCommand',
\ 'executable': {b -> ale#Var(b, 'cpp_cppcheck_executable')},
\ 'cwd': function('ale#handlers#cppcheck#GetCwd'),
\ 'command': function('ale_linters#cpp#cppcheck#GetCommand'),
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
\})

View File

@ -1,15 +1,20 @@
" Author: Dawid Kurek https://github.com/dawikur
" Description: cpplint for cpp files
if !exists('g:ale_cpp_cpplint_options')
let g:ale_cpp_cpplint_options = ''
endif
call ale#Set('cpp_cpplint_executable', 'cpplint')
call ale#Set('cpp_cpplint_options', '')
function! ale_linters#cpp#cpplint#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'cpp_cpplint_options')
return '%e' . ale#Pad(l:options) . ' %s'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'cpplint',
\ 'output_stream': 'stderr',
\ 'executable': 'cpplint',
\ 'command': 'cpplint %s',
\ 'executable': {b -> ale#Var(b, 'cpp_cpplint_executable')},
\ 'command': function('ale_linters#cpp#cpplint#GetCommand'),
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'lint_file': 1,
\})

View File

@ -0,0 +1,30 @@
" Author: Ben Falconer <ben@falconers.me.uk>
" Description: A language server for C++
call ale#Set('cpp_cquery_executable', 'cquery')
call ale#Set('cpp_cquery_cache_directory', expand('~/.cache/cquery'))
function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort
" Try to find cquery configuration files first.
let l:config = ale#path#FindNearestFile(a:buffer, '.cquery')
if !empty(l:config)
return fnamemodify(l:config, ':h')
endif
" Fall back on default project root detection.
return ale#c#FindProjectRoot(a:buffer)
endfunction
function! ale_linters#cpp#cquery#GetInitializationOptions(buffer) abort
return {'cacheDirectory': ale#Var(a:buffer, 'cpp_cquery_cache_directory')}
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'cquery',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'cpp_cquery_executable')},
\ 'command': '%e',
\ 'project_root': function('ale_linters#cpp#cquery#GetProjectRoot'),
\ 'initialization_options': function('ale_linters#cpp#cquery#GetInitializationOptions'),
\})

View File

@ -0,0 +1,5 @@
scriptencoding utf-8
" Author: David Houston <houstdav000>
" Description: cspell support for C++ files.
call ale#handlers#cspell#DefineLinter('cpp')

View File

@ -0,0 +1,25 @@
" Author: Christian Gibbons <cgibbons@gmu.edu>
" Description: flawfinder linter for c++ files
call ale#Set('cpp_flawfinder_executable', 'flawfinder')
call ale#Set('cpp_flawfinder_options', '')
call ale#Set('cpp_flawfinder_minlevel', 1)
call ale#Set('c_flawfinder_error_severity', 6)
function! ale_linters#cpp#flawfinder#GetCommand(buffer) abort
" Set the minimum vulnerability level for flawfinder to bother with
let l:minlevel = ' --minlevel=' . ale#Var(a:buffer, 'cpp_flawfinder_minlevel')
return '%e -CDQS'
\ . ale#Var(a:buffer, 'cpp_flawfinder_options')
\ . l:minlevel
\ . ' %t'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'flawfinder',
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'cpp_flawfinder_executable')},
\ 'command': function('ale_linters#cpp#flawfinder#GetCommand'),
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
\})

View File

@ -1,36 +0,0 @@
" Author: geam <mdelage@student.42.fr>
" Description: gcc linter for cpp files
" Set this option to change the GCC options for warnings for C.
if !exists('g:ale_cpp_gcc_options')
let s:version = ale#handlers#gcc#ParseGCCVersion(systemlist('gcc --version'))
if !empty(s:version) && ale#semver#GreaterOrEqual(s:version, [4, 9, 0])
" Use c++14 support in 4.9 and above.
let g:ale_cpp_gcc_options = '-std=c++14 -Wall'
else
" Use c++1y in older versions.
let g:ale_cpp_gcc_options = '-std=c++1y -Wall'
endif
unlet! s:version
endif
function! ale_linters#cpp#gcc#GetCommand(buffer) abort
let l:paths = ale#c#FindLocalHeaderPaths(a:buffer)
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return 'gcc -S -x c++ -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . ale#c#IncludeOptions(l:paths)
\ . ale#Var(a:buffer, 'cpp_gcc_options') . ' -'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'g++',
\ 'output_stream': 'stderr',
\ 'executable': 'g++',
\ 'command_callback': 'ale_linters#cpp#gcc#GetCommand',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\})

View File

@ -0,0 +1,57 @@
" Author: Harrison Bachrach - https://github.com/HarrisonB
" Description: Ameba, a linter for crystal files
call ale#Set('crystal_ameba_executable', 'bin/ameba')
function! ale_linters#crystal#ameba#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'crystal_ameba_executable')
return ale#Escape(l:executable)
\ . ' --format json '
\ . ale#Escape(expand('#' . a:buffer . ':p'))
endfunction
" Handle output from ameba
function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
if len(a:lines) == 0
return []
endif
let l:errors = ale#util#FuzzyJSONDecode(a:lines[0], {})
if !has_key(l:errors, 'summary')
\|| l:errors['summary']['issues_count'] == 0
\|| empty(l:errors['sources'])
return []
endif
let l:output = []
for l:error in l:errors['sources'][0]['issues']
let l:start_col = str2nr(l:error['location']['column'])
let l:end_col = str2nr(l:error['end_location']['column'])
if !l:end_col
let l:end_col = l:start_col + 1
endif
call add(l:output, {
\ 'lnum': str2nr(l:error['location']['line']),
\ 'col': l:start_col,
\ 'end_col': l:end_col,
\ 'code': l:error['rule_name'],
\ 'text': l:error['message'],
\ 'type': 'W',
\})
endfor
return l:output
endfunction
call ale#linter#Define('crystal', {
\ 'name': 'ameba',
\ 'executable': {b -> ale#Var(b, 'crystal_ameba_executable')},
\ 'command': function('ale_linters#crystal#ameba#GetCommand'),
\ 'callback': 'ale_linters#crystal#ameba#HandleAmebaOutput',
\ 'lint_file': 1,
\})

View File

@ -4,31 +4,25 @@
function! ale_linters#crystal#crystal#Handle(buffer, lines) abort
let l:output = []
let l:lines = join(a:lines, '')
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
if !has_key(l:error, 'file')
continue
endif
if !empty(l:lines)
let l:errors = json_decode(l:lines)
for l:error in l:errors
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': l:error.line + 0,
\ 'col': l:error.column + 0,
\ 'text': l:error.message,
\ 'type': 'E',
\})
endfor
endif
call add(l:output, {
\ 'lnum': l:error.line + 0,
\ 'col': l:error.column + 0,
\ 'text': l:error.message,
\})
endfor
return l:output
endfunction
function! ale_linters#crystal#crystal#GetCommand(buffer) abort
let l:crystal_cmd = 'crystal build -f json --no-codegen --no-color -o '
let l:crystal_cmd .= ale#Escape(g:ale#util#nul_file)
let l:crystal_cmd .= ' %s'
return l:crystal_cmd
return 'crystal build -f json --no-codegen --no-color -o '
\ . ale#Escape(g:ale#util#nul_file)
\ . ' %s'
endfunction
call ale#linter#Define('crystal', {
@ -36,6 +30,6 @@ call ale#linter#Define('crystal', {
\ 'executable': 'crystal',
\ 'output_stream': 'both',
\ 'lint_file': 1,
\ 'command_callback': 'ale_linters#crystal#crystal#GetCommand',
\ 'command': function('ale_linters#crystal#crystal#GetCommand'),
\ 'callback': 'ale_linters#crystal#crystal#Handle',
\})

90
ale_linters/cs/csc.vim Normal file
View File

@ -0,0 +1,90 @@
call ale#Set('cs_csc_options', '')
call ale#Set('cs_csc_source', '')
call ale#Set('cs_csc_assembly_path', [])
call ale#Set('cs_csc_assemblies', [])
function! ale_linters#cs#csc#GetCwd(buffer) abort
let l:cwd = ale#Var(a:buffer, 'cs_csc_source')
return !empty(l:cwd) ? l:cwd : expand('#' . a:buffer . ':p:h')
endfunction
function! ale_linters#cs#csc#GetCommand(buffer) abort
" Pass assembly paths via the -lib: parameter.
let l:path_list = ale#Var(a:buffer, 'cs_csc_assembly_path')
let l:lib_option = !empty(l:path_list)
\ ? '/lib:' . join(map(copy(l:path_list), 'ale#Escape(v:val)'), ',')
\ : ''
" Pass paths to DLL files via the -r: parameter.
let l:assembly_list = ale#Var(a:buffer, 'cs_csc_assemblies')
let l:r_option = !empty(l:assembly_list)
\ ? '/r:' . join(map(copy(l:assembly_list), 'ale#Escape(v:val)'), ',')
\ : ''
" register temporary module target file with ale
" register temporary module target file with ALE.
let l:out = ale#command#CreateFile(a:buffer)
" The code is compiled as a module and the output is redirected to a
" temporary file.
return 'csc /unsafe'
\ . ale#Pad(ale#Var(a:buffer, 'cs_csc_options'))
\ . ale#Pad(l:lib_option)
\ . ale#Pad(l:r_option)
\ . ' /out:' . l:out
\ . ' /t:module'
\ . ' /recurse:' . ale#Escape('*.cs')
endfunction
function! ale_linters#cs#csc#Handle(buffer, lines) abort
" Look for lines like the following.
"
" Tests.cs(12,29): error CSXXXX: ; expected
"
" NOTE: pattern also captures file name as linter compiles all
" files within the source tree rooted at the specified source
" path and not just the file loaded in the buffer
let l:patterns = [
\ '^\v(.+\.cs)\((\d+),(\d+)\)\:\s+([^ ]+)\s+([cC][sS][^ ]+):\s(.+)$',
\ '^\v([^ ]+)\s+([Cc][sS][^ ]+):\s+(.+)$',
\]
let l:output = []
let l:dir = ale_linters#cs#csc#GetCwd(a:buffer)
for l:match in ale#util#GetMatches(a:lines, l:patterns)
if len(l:match) > 6 && strlen(l:match[5]) > 2 && l:match[5][:1] is? 'CS'
call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'type': l:match[4] is# 'error' ? 'E' : 'W',
\ 'code': l:match[5],
\ 'text': l:match[6] ,
\})
elseif strlen(l:match[2]) > 2 && l:match[2][:1] is? 'CS'
call add(l:output, {
\ 'filename':'<csc>',
\ 'lnum': -1,
\ 'col': -1,
\ 'type': l:match[1] is# 'error' ? 'E' : 'W',
\ 'code': l:match[2],
\ 'text': l:match[3],
\})
endif
endfor
return l:output
endfunction
call ale#linter#Define('cs',{
\ 'name': 'csc',
\ 'output_stream': 'stdout',
\ 'executable': 'csc',
\ 'cwd': function('ale_linters#cs#csc#GetCwd'),
\ 'command': function('ale_linters#cs#csc#GetCommand'),
\ 'callback': 'ale_linters#cs#csc#Handle',
\ 'lint_file': 1
\})

View File

@ -0,0 +1,5 @@
scriptencoding utf-8
" Author: David Houston <houstdav000>
" Description: cspell support for C# files.
call ale#handlers#cspell#DefineLinter('cs')

View File

@ -1,22 +1,27 @@
let g:ale_cs_mcs_options = get(g:, 'ale_cs_mcs_options', '')
function! ale_linters#cs#mcs#GetCommand(buffer) abort
return 'mcs -unsafe --parse ' . ale#Var(a:buffer, 'cs_mcs_options') . ' %t'
let l:options = ale#Var(a:buffer, 'cs_mcs_options')
return 'mcs -unsafe --parse'
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' %t'
endfunction
function! ale_linters#cs#mcs#Handle(buffer, lines) abort
" Look for lines like the following.
"
" Tests.cs(12,29): error CSXXXX: ; expected
let l:pattern = '^.\+.cs(\(\d\+\),\(\d\+\)): \(.\+\): \(.\+\)'
let l:pattern = '^\v(.+\.cs)\((\d+),(\d+)\)\: ([^ ]+) ([^ ]+): (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'text': l:match[3] . ': ' . l:match[4],
\ 'type': l:match[3] =~# '^error' ? 'E' : 'W',
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'type': l:match[4] is# 'error' ? 'E' : 'W',
\ 'code': l:match[5],
\ 'text': l:match[6],
\})
endfor
@ -27,6 +32,6 @@ call ale#linter#Define('cs',{
\ 'name': 'mcs',
\ 'output_stream': 'stderr',
\ 'executable': 'mcs',
\ 'command_callback': 'ale_linters#cs#mcs#GetCommand',
\ 'command': function('ale_linters#cs#mcs#GetCommand'),
\ 'callback': 'ale_linters#cs#mcs#Handle',
\})

91
ale_linters/cs/mcsc.vim Normal file
View File

@ -0,0 +1,91 @@
call ale#Set('cs_mcsc_options', '')
call ale#Set('cs_mcsc_source', '')
call ale#Set('cs_mcsc_assembly_path', [])
call ale#Set('cs_mcsc_assemblies', [])
function! ale_linters#cs#mcsc#GetCwd(buffer) abort
let l:cwd = ale#Var(a:buffer, 'cs_mcsc_source')
return !empty(l:cwd) ? l:cwd : expand('#' . a:buffer . ':p:h')
endfunction
function! ale_linters#cs#mcsc#GetCommand(buffer) abort
" Pass assembly paths via the -lib: parameter.
let l:path_list = ale#Var(a:buffer, 'cs_mcsc_assembly_path')
let l:lib_option = !empty(l:path_list)
\ ? '-lib:' . join(map(copy(l:path_list), 'ale#Escape(v:val)'), ',')
\ : ''
" Pass paths to DLL files via the -r: parameter.
let l:assembly_list = ale#Var(a:buffer, 'cs_mcsc_assemblies')
let l:r_option = !empty(l:assembly_list)
\ ? '-r:' . join(map(copy(l:assembly_list), 'ale#Escape(v:val)'), ',')
\ : ''
" register temporary module target file with ale
" register temporary module target file with ALE.
let l:out = ale#command#CreateFile(a:buffer)
" The code is compiled as a module and the output is redirected to a
" temporary file.
return 'mcs -unsafe'
\ . ale#Pad(ale#Var(a:buffer, 'cs_mcsc_options'))
\ . ale#Pad(l:lib_option)
\ . ale#Pad(l:r_option)
\ . ' -out:' . l:out
\ . ' -t:module'
\ . ' -recurse:' . ale#Escape('*.cs')
endfunction
function! ale_linters#cs#mcsc#Handle(buffer, lines) abort
" Look for lines like the following.
"
" Tests.cs(12,29): error CSXXXX: ; expected
"
" NOTE: pattern also captures file name as linter compiles all
" files within the source tree rooted at the specified source
" path and not just the file loaded in the buffer
let l:patterns = [
\ '^\v(.+\.cs)\((\d+),(\d+)\)\:\s+([^ ]+)\s+([cC][sS][^ ]+):\s(.+)$',
\ '^\v([^ ]+)\s+([Cc][sS][^ ]+):\s+(.+)$',
\]
let l:output = []
let l:dir = ale_linters#cs#mcsc#GetCwd(a:buffer)
for l:match in ale#util#GetMatches(a:lines, l:patterns)
if len(l:match) > 6 && strlen(l:match[5]) > 2 && l:match[5][:1] is? 'CS'
call add(l:output, {
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'type': l:match[4] is# 'error' ? 'E' : 'W',
\ 'code': l:match[5],
\ 'text': l:match[6] ,
\})
elseif strlen(l:match[2]) > 2 && l:match[2][:1] is? 'CS'
call add(l:output, {
\ 'filename':'<mcs>',
\ 'lnum': -1,
\ 'col': -1,
\ 'type': l:match[1] is# 'error' ? 'E' : 'W',
\ 'code': l:match[2],
\ 'text': l:match[3],
\})
endif
endfor
return l:output
endfunction
call ale#linter#Define('cs',{
\ 'name': 'mcsc',
\ 'output_stream': 'stderr',
\ 'executable': 'mcs',
\ 'cwd': function('ale_linters#cs#mcsc#GetCwd'),
\ 'command': function('ale_linters#cs#mcsc#GetCommand'),
\ 'callback': 'ale_linters#cs#mcsc#Handle',
\ 'lint_file': 1
\})

View File

@ -0,0 +1,5 @@
scriptencoding utf-8
" Author: David Houston <houstdav000>
" Description: cspell support for CSS files.
call ale#handlers#cspell#DefineLinter('css')

View File

@ -13,6 +13,6 @@ endfunction
call ale#linter#Define('css', {
\ 'name': 'csslint',
\ 'executable': 'csslint',
\ 'command_callback': 'ale_linters#css#csslint#GetCommand',
\ 'command': function('ale_linters#css#csslint#GetCommand'),
\ 'callback': 'ale#handlers#css#HandleCSSLintFormat',
\})

9
ale_linters/css/fecs.vim Normal file
View File

@ -0,0 +1,9 @@
" Author: harttle <yangjvn@126.com>
" Description: fecs for CSS files
call ale#linter#Define('css', {
\ 'name': 'fecs',
\ 'executable': function('ale#handlers#fecs#GetExecutable'),
\ 'command': function('ale#handlers#fecs#GetCommand'),
\ 'callback': 'ale#handlers#fecs#Handle',
\})

View File

@ -2,23 +2,18 @@
call ale#Set('css_stylelint_executable', 'stylelint')
call ale#Set('css_stylelint_options', '')
call ale#Set('css_stylelint_use_global', 0)
function! ale_linters#css#stylelint#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'css_stylelint', [
\ 'node_modules/.bin/stylelint',
\])
endfunction
call ale#Set('css_stylelint_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#css#stylelint#GetCommand(buffer) abort
return ale_linters#css#stylelint#GetExecutable(a:buffer)
\ . ' ' . ale#Var(a:buffer, 'css_stylelint_options')
return '%e ' . ale#Pad(ale#Var(a:buffer, 'css_stylelint_options'))
\ . ' --stdin-filename %s'
endfunction
call ale#linter#Define('css', {
\ 'name': 'stylelint',
\ 'executable_callback': 'ale_linters#css#stylelint#GetExecutable',
\ 'command_callback': 'ale_linters#css#stylelint#GetCommand',
\ 'executable': {b -> ale#path#FindExecutable(b, 'css_stylelint', [
\ 'node_modules/.bin/stylelint',
\ ])},
\ 'command': function('ale_linters#css#stylelint#GetCommand'),
\ 'callback': 'ale#handlers#css#HandleStyleLintFormat',
\})

View File

@ -0,0 +1,16 @@
" Author: Dalius Dobravolskas <dalius.dobravolskas@gmail.com>
" Description: VSCode css language server
function! ale_linters#css#vscodecss#GetProjectRoot(buffer) abort
let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
endfunction
call ale#linter#Define('css', {
\ 'name': 'vscodecss',
\ 'lsp': 'stdio',
\ 'executable': 'vscode-css-language-server',
\ 'command': '%e --stdio',
\ 'project_root': function('ale_linters#css#vscodecss#GetProjectRoot'),
\})

View File

@ -0,0 +1,46 @@
" Author: Eddie Lebow https://github.com/elebow
" Description: Cucumber, a BDD test tool
function! ale_linters#cucumber#cucumber#GetCommand(buffer) abort
let l:features_dir = ale#path#FindNearestDirectory(a:buffer, 'features')
if !empty(l:features_dir)
let l:features_arg = '-r ' . ale#Escape(l:features_dir)
else
let l:features_arg = ''
endif
return 'cucumber --dry-run --quiet --strict --format=json '
\ . l:features_arg . ' %t'
endfunction
function! ale_linters#cucumber#cucumber#Handle(buffer, lines) abort
try
let l:json = ale#util#FuzzyJSONDecode(a:lines, {})[0]
catch
return []
endtry
let l:output = []
for l:element in get(l:json, 'elements', [])
for l:step in l:element['steps']
if l:step['result']['status'] is# 'undefined'
call add(l:output, {
\ 'lnum': l:step['line'],
\ 'code': 'E',
\ 'text': 'Undefined step'
\})
endif
endfor
endfor
return l:output
endfunction
call ale#linter#Define('cucumber', {
\ 'name': 'cucumber',
\ 'executable': 'cucumber',
\ 'command': function('ale_linters#cucumber#cucumber#GetCommand'),
\ 'callback': 'ale_linters#cucumber#cucumber#Handle'
\})

View File

@ -0,0 +1,23 @@
" Author: Tommy Chiang <ty1208chiang@gmail.com>
" Description: Clangd language server for CUDA (modified from Andrey
" Melentyev's implementation for C++)
call ale#Set('cuda_clangd_executable', 'clangd')
call ale#Set('cuda_clangd_options', '')
call ale#Set('c_build_dir', '')
function! ale_linters#cuda#clangd#GetCommand(buffer) abort
let l:build_dir = ale#c#GetBuildDirectory(a:buffer)
return '%e'
\ . ale#Pad(ale#Var(a:buffer, 'cuda_clangd_options'))
\ . (!empty(l:build_dir) ? ' -compile-commands-dir=' . ale#Escape(l:build_dir) : '')
endfunction
call ale#linter#Define('cuda', {
\ 'name': 'clangd',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'cuda_clangd_executable')},
\ 'command': function('ale_linters#cuda#clangd#GetCommand'),
\ 'project_root': function('ale#c#FindProjectRoot'),
\})

46
ale_linters/cuda/nvcc.vim Normal file
View File

@ -0,0 +1,46 @@
" Author: blahgeek <i@blahgeek.com>
" Description: NVCC linter for cuda files
call ale#Set('cuda_nvcc_executable', 'nvcc')
call ale#Set('cuda_nvcc_options', '-std=c++11')
function! ale_linters#cuda#nvcc#GetCommand(buffer) abort
return '%e -cuda'
\ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)))
\ . ale#Pad(ale#Var(a:buffer, 'cuda_nvcc_options'))
\ . ' %s -o ' . g:ale#util#nul_file
endfunction
function! ale_linters#cuda#nvcc#HandleNVCCFormat(buffer, lines) abort
" Look for lines like the following.
"
" test.cu(8): error: argument of type "void *" is incompatible with parameter of type "int *"
let l:pattern = '\v^([^:\(\)]+):?\(?(\d+)\)?:(\d+)?:?\s*\w*\s*(error|warning): (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = {
\ 'lnum': str2nr(l:match[2]),
\ 'type': l:match[4] =~# 'error' ? 'E' : 'W',
\ 'text': l:match[5],
\ 'filename': fnamemodify(l:match[1], ':p'),
\}
if !empty(l:match[3])
let l:item.col = str2nr(l:match[3])
endif
call add(l:output, l:item)
endfor
return l:output
endfunction
call ale#linter#Define('cuda', {
\ 'name': 'nvcc',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'cuda_nvcc_executable')},
\ 'command': function('ale_linters#cuda#nvcc#GetCommand'),
\ 'callback': 'ale_linters#cuda#nvcc#HandleNVCCFormat',
\ 'lint_file': 1,
\})

View File

@ -0,0 +1,26 @@
" Author: Francisco Lopes <francisco@oblita.com>
" Description: Linting for Neo4j's Cypher
function! ale_linters#cypher#cypher_lint#Handle(buffer, lines) abort
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+): (.*)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'text': l:match[4],
\ 'type': 'E',
\})
endfor
return l:output
endfunction
call ale#linter#Define('cypher', {
\ 'name': 'cypher_lint',
\ 'executable': 'cypher-lint',
\ 'command': 'cypher-lint',
\ 'output_stream': 'stderr',
\ 'callback': 'ale_linters#cypher#cypher_lint#Handle',
\})

22
ale_linters/d/dls.vim Normal file
View File

@ -0,0 +1,22 @@
" Author: aurieh <me@aurieh.me>
" Description: A Language Server implementation for D
call ale#Set('d_dls_executable', 'dls')
function! ale_linters#d#dls#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'd_dls_executable')
endfunction
function! ale_linters#d#dls#FindProjectRoot(buffer) abort
" Note: this will return . if dub config is empty
" dls can run outside DUB projects just fine
return fnamemodify(ale#d#FindDUBConfig(a:buffer), ':h')
endfunction
call ale#linter#Define('d', {
\ 'name': 'dls',
\ 'lsp': 'stdio',
\ 'executable': function('ale_linters#d#dls#GetExecutable'),
\ 'command': function('ale_linters#d#dls#GetExecutable'),
\ 'project_root': function('ale_linters#d#dls#FindProjectRoot'),
\})

View File

@ -1,67 +1,106 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: "dmd for D files"
function! s:FindDUBConfig(buffer) abort
" Find a DUB configuration file in ancestor paths.
" The most DUB-specific names will be tried first.
for l:possible_filename in ['dub.sdl', 'dub.json', 'package.json']
let l:dub_file = ale#path#FindNearestFile(a:buffer, l:possible_filename)
if !empty(l:dub_file)
return l:dub_file
endif
endfor
return ''
endfunction
function! ale_linters#d#dmd#DUBCommand(buffer) abort
function! s:GetDUBCommand(buffer) abort
" If we can't run dub, then skip this command.
if !executable('dub')
if executable('dub')
" Returning an empty string skips to the DMD command.
return ''
let l:config = ale#d#FindDUBConfig(a:buffer)
" To support older dub versions, we just change the directory to the
" directory where we found the dub config, and then run `dub describe`
" from that directory.
if !empty(l:config)
return [fnamemodify(l:config, ':h'), 'dub describe --data-list
\ --data=import-paths
\ --data=string-import-paths
\ --data=versions
\ --data=debug-versions
\']
endif
endif
let l:dub_file = s:FindDUBConfig(a:buffer)
if empty(l:dub_file)
return ''
endif
" To support older dub versions, we just change the directory to
" the directory where we found the dub config, and then run `dub describe`
" from that directory.
return 'cd ' . ale#Escape(fnamemodify(l:dub_file, ':h'))
\ . ' && dub describe --import-paths'
return ['', '']
endfunction
function! ale_linters#d#dmd#DMDCommand(buffer, dub_output) abort
let l:import_list = []
function! ale_linters#d#dmd#RunDUBCommand(buffer) abort
let [l:cwd, l:command] = s:GetDUBCommand(a:buffer)
" Build a list of import paths generated from DUB, if available.
if empty(l:command)
" If we can't run DUB, just run DMD.
return ale_linters#d#dmd#DMDCommand(a:buffer, [], {})
endif
return ale#command#Run(
\ a:buffer,
\ l:command,
\ function('ale_linters#d#dmd#DMDCommand'),
\ {'cwd': l:cwd},
\)
endfunction
function! ale_linters#d#dmd#DMDCommand(buffer, dub_output, meta) abort
let l:import_list = []
let l:str_import_list = []
let l:versions_list = []
let l:deb_versions_list = []
let l:list_ind = 1
let l:seen_line = 0
" Build a list of options generated from DUB, if available.
" DUB output each path or version on a single line.
" Each list is separated by a blank line.
" Empty list are represented by a blank line (followed and/or
" preceded by a separation blank line)
for l:line in a:dub_output
" line still has end of line char on windows
let l:line = substitute(l:line, '[\r\n]*$', '', '')
if !empty(l:line)
" The arguments must be '-Ifilename', not '-I filename'
call add(l:import_list, '-I' . ale#Escape(l:line))
if l:list_ind == 1
call add(l:import_list, '-I' . ale#Escape(l:line))
elseif l:list_ind == 2
call add(l:str_import_list, '-J' . ale#Escape(l:line))
elseif l:list_ind == 3
call add(l:versions_list, '-version=' . ale#Escape(l:line))
elseif l:list_ind == 4
call add(l:deb_versions_list, '-debug=' . ale#Escape(l:line))
endif
let l:seen_line = 1
elseif !l:seen_line
" if list is empty must skip one empty line
let l:seen_line = 1
else
let l:seen_line = 0
let l:list_ind += 1
endif
endfor
return 'dmd '. join(l:import_list) . ' -o- -vcolumns -c %t'
return 'dmd ' . join(l:import_list) . ' ' .
\ join(l:str_import_list) . ' ' .
\ join(l:versions_list) . ' ' .
\ join(l:deb_versions_list) . ' -o- -wi -vcolumns -c %t'
endfunction
function! ale_linters#d#dmd#Handle(buffer, lines) abort
" Matches patterns lines like the following:
" /tmp/tmp.qclsa7qLP7/file.d(1): Error: function declaration without return type. (Note that constructors are always named 'this')
" /tmp/tmp.G1L5xIizvB.d(8,8): Error: module weak_reference is in file 'dstruct/weak_reference.d' which cannot be read
let l:pattern = '^[^(]\+(\([0-9]\+\)\,\?\([0-9]*\)): \([^:]\+\): \(.\+\)'
let l:pattern = '\v^(\f+)\((\d+)(,(\d+))?\): (\w+): (.+)$'
let l:output = []
let l:dir = expand('#' . a:buffer . ':p:h')
for l:match in ale#util#GetMatches(a:lines, l:pattern)
" If dmd was invoked with relative path, match[1] is relative, otherwise it is absolute.
" As we invoke dmd with the buffer path (in /tmp), this will generally be absolute already
let l:fname = ale#path#GetAbsPath(l:dir, l:match[1])
call add(l:output, {
\ 'lnum': l:match[1],
\ 'col': l:match[2],
\ 'type': l:match[3] ==# 'Warning' ? 'W' : 'E',
\ 'text': l:match[4],
\ 'filename': l:fname,
\ 'lnum': l:match[2],
\ 'col': l:match[4],
\ 'type': l:match[5] is# 'Warning' || l:match[5] is# 'Deprecation' ? 'W' : 'E',
\ 'text': l:match[6],
\})
endfor
@ -71,9 +110,7 @@ endfunction
call ale#linter#Define('d', {
\ 'name': 'dmd',
\ 'executable': 'dmd',
\ 'command_chain': [
\ {'callback': 'ale_linters#d#dmd#DUBCommand', 'output_stream': 'stdout'},
\ {'callback': 'ale_linters#d#dmd#DMDCommand', 'output_stream': 'stderr'},
\ ],
\ 'command': function('ale_linters#d#dmd#RunDUBCommand'),
\ 'callback': 'ale_linters#d#dmd#Handle',
\ 'output_stream': 'stderr',
\})

View File

@ -0,0 +1,41 @@
" Author: Taylor Blau <me@ttaylorr.com>
function! ale_linters#dafny#dafny#Handle(buffer, lines) abort
let l:pattern = '\v(.*)\((\d+),(\d+)\): (.*): (.*)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'filename': l:match[1],
\ 'col': l:match[3] + 0,
\ 'lnum': l:match[2] + 0,
\ 'text': l:match[5],
\ 'type': l:match[4] =~# '^Error' ? 'E' : 'W'
\ })
endfor
for l:match in ale#util#GetMatches(a:lines, '\v(.*)\((\d+),(\d+)\): (Verification of .{-} timed out after \d+ seconds)')
call add(l:output, {
\ 'filename': l:match[1],
\ 'col': l:match[3] + 0,
\ 'lnum': l:match[2] + 0,
\ 'text': l:match[4],
\ 'type': 'E',
\ })
endfor
return l:output
endfunction
function! ale_linters#dafny#dafny#GetCommand(buffer) abort
return printf('dafny %%s /compile:0 /timeLimit:%d', ale#Var(a:buffer, 'dafny_dafny_timelimit'))
endfunction
call ale#Set('dafny_dafny_timelimit', 10)
call ale#linter#Define('dafny', {
\ 'name': 'dafny',
\ 'executable': 'dafny',
\ 'command': function('ale_linters#dafny#dafny#GetCommand'),
\ 'callback': 'ale_linters#dafny#dafny#Handle',
\ 'lint_file': 1,
\ })

View File

@ -0,0 +1,29 @@
" Author: Nelson Yeung <nelsyeung@gmail.com>
" Description: Check Dart files with dart analysis server LSP
call ale#Set('dart_analysis_server_executable', 'dart')
function! ale_linters#dart#analysis_server#GetProjectRoot(buffer) abort
" Note: pub only looks for pubspec.yaml, there's no point in adding
" support for pubspec.yml
let l:pubspec = ale#path#FindNearestFile(a:buffer, 'pubspec.yaml')
return !empty(l:pubspec) ? fnamemodify(l:pubspec, ':h:h') : '.'
endfunction
function! ale_linters#dart#analysis_server#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'dart_analysis_server_executable')
let l:dart = resolve(exepath(l:executable))
return '%e '
\ . fnamemodify(l:dart, ':h') . '/snapshots/analysis_server.dart.snapshot'
\ . ' --lsp'
endfunction
call ale#linter#Define('dart', {
\ 'name': 'analysis_server',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'dart_analysis_server_executable')},
\ 'command': function('ale_linters#dart#analysis_server#GetCommand'),
\ 'project_root': function('ale_linters#dart#analysis_server#GetProjectRoot'),
\})

View File

@ -0,0 +1,29 @@
" Author: ghsang <gwonhyuksang@gmail.com>
" Description: Check Dart files with dart analyze
call ale#Set('dart_analyze_executable', 'dart')
function! ale_linters#dart#dart_analyze#Handle(buffer, lines) abort
let l:pattern = '\v([a-z]+) - (.+):(\d+):(\d+) - (.+) - (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let [l:type, l:filename, l:lnum, l:col, l:message, l:code] = l:match[1:6]
call add(l:output, {
\ 'type': l:type is# 'error' ? 'E' : l:type is# 'info' ? 'I' : 'W',
\ 'text': l:code . ': ' . l:message,
\ 'lnum': str2nr(l:lnum),
\ 'col': str2nr(l:col),
\})
endfor
return l:output
endfunction
call ale#linter#Define('dart', {
\ 'name': 'dart_analyze',
\ 'executable': {b -> ale#Var(b, 'dart_analyze_executable')},
\ 'command': '%e analyze --fatal-infos %s',
\ 'callback': 'ale_linters#dart#dart_analyze#Handle',
\ 'lint_file': 1,
\})

View File

@ -0,0 +1,20 @@
" Author: aurieh <me@aurieh.me>
" Description: A language server for dart
call ale#Set('dart_language_server_executable', 'dart_language_server')
function! ale_linters#dart#language_server#GetProjectRoot(buffer) abort
" Note: pub only looks for pubspec.yaml, there's no point in adding
" support for pubspec.yml
let l:pubspec = ale#path#FindNearestFile(a:buffer, 'pubspec.yaml')
return !empty(l:pubspec) ? fnamemodify(l:pubspec, ':h:h') : ''
endfunction
call ale#linter#Define('dart', {
\ 'name': 'language_server',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'dart_language_server_executable')},
\ 'command': '%e',
\ 'project_root': function('ale_linters#dart#language_server#GetProjectRoot'),
\})

View File

@ -0,0 +1,31 @@
call ale#Set('desktop_desktop_file_validate_options', '')
" Example matches for pattern:
"
" foo.desktop: warning: key "TerminalOptions" in group ...
" foo.desktop: error: action "new-private-window" is defined, ...
let s:pattern = '\v^(.+): ([a-z]+): (.+)$'
function! ale_linters#desktop#desktop_file_validate#Handle(buffer, lines) abort
" The error format doesn't specify lines, so we can just put all of the
" errors on line 1.
return ale#util#MapMatches(a:lines, s:pattern, {match -> {
\ 'lnum': 1,
\ 'col': 1,
\ 'type': match[2] is? 'error' ? 'E' : 'W',
\ 'text': match[3],
\}})
endfunction
call ale#linter#Define('desktop', {
\ 'name': 'desktop_file_validate',
\ 'aliases': ['desktop-file-validate'],
\ 'executable': 'desktop-file-validate',
\ 'command': {b ->
\ '%e'
\ . ale#Pad(ale#Var(b, 'desktop_desktop_file_validate_options'))
\ . ' %t'
\ },
\ 'callback': 'ale_linters#desktop#desktop_file_validate#Handle',
\ 'output_stream': 'both',
\})

View File

@ -0,0 +1,76 @@
" Author: Alexander Olofsson <alexander.olofsson@liu.se>
call ale#Set('dockerfile_dockerfile_lint_executable', 'dockerfile_lint')
call ale#Set('dockerfile_dockerfile_lint_options', '')
function! ale_linters#dockerfile#dockerfile_lint#GetType(type) abort
if a:type is? 'error'
return 'E'
elseif a:type is? 'warn'
return 'W'
endif
return 'I'
endfunction
function! ale_linters#dockerfile#dockerfile_lint#Handle(buffer, lines) abort
try
let l:data = json_decode(join(a:lines, ''))
catch
return []
endtry
if empty(l:data)
" Should never happen, but it's better to be on the safe side
return []
endif
let l:messages = []
for l:type in ['error', 'warn', 'info']
for l:object in l:data[l:type]['data']
let l:line = get(l:object, 'line', -1)
let l:message = l:object['message']
let l:link = get(l:object, 'reference_url', '')
if type(l:link) == v:t_list
" Somehow, reference_url is returned as two-part list.
" Anchor markers in that list are sometimes duplicated.
" See https://github.com/projectatomic/dockerfile_lint/issues/134
let l:link = join(l:link, '')
let l:link = substitute(l:link, '##', '#', '')
endif
let l:detail = l:message
if get(l:object, 'description', 'None') isnot# 'None'
let l:detail .= "\n\n" . l:object['description']
endif
let l:detail .= "\n\n" . l:link
call add(l:messages, {
\ 'lnum': l:line,
\ 'text': l:message,
\ 'type': ale_linters#dockerfile#dockerfile_lint#GetType(l:type),
\ 'detail': l:detail,
\})
endfor
endfor
return l:messages
endfunction
function! ale_linters#dockerfile#dockerfile_lint#GetCommand(buffer) abort
return '%e' . ale#Pad(ale#Var(a:buffer, 'dockerfile_dockerfile_lint_options'))
\ . ' -p -j -f'
\ . ' %t'
endfunction
call ale#linter#Define('dockerfile', {
\ 'name': 'dockerfile_lint',
\ 'executable': {b -> ale#Var(b, 'dockerfile_dockerfile_lint_executable')},
\ 'command': function('ale_linters#dockerfile#dockerfile_lint#GetCommand'),
\ 'callback': 'ale_linters#dockerfile#dockerfile_lint#Handle',
\})

View File

@ -1,37 +1,122 @@
" Author: hauleth - https://github.com/hauleth
" always, yes, never
call ale#Set('dockerfile_hadolint_use_docker', 'never')
call ale#Set('dockerfile_hadolint_docker_image', 'hadolint/hadolint')
function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
" Matches patterns line the following:
"
" stdin:19: F: Pipe chain should start with a raw value.
let l:pattern = '\v^/dev/stdin:?(\d+)? (\S+) (.+)$'
" -:19 DL3001 warning: Pipe chain should start with a raw value.
" /dev/stdin:19:3 unexpected thing
let l:pattern = '\v^%(/dev/stdin|-):(\d+):?(\d+)? ((DL|SC)(\d+) )?((.+)?: )?(.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:lnum = 0
let l:colnum = 0
if l:match[1] !=# ''
if l:match[1] isnot# ''
let l:lnum = l:match[1] + 0
endif
let l:type = 'W'
let l:text = l:match[3]
if l:match[2] isnot# ''
let l:colnum = l:match[2] + 0
endif
call add(l:output, {
" Shellcheck knows a 'style' severity - pin it to info level as well.
if l:match[7] is# 'style'
let l:type = 'I'
elseif l:match[7] is# 'info'
let l:type = 'I'
elseif l:match[7] is# 'warning'
let l:type = 'W'
else
let l:type = 'E'
endif
let l:text = l:match[8]
let l:detail = l:match[8]
let l:domain = 'https://github.com/hadolint/hadolint/wiki/'
let l:code = ''
let l:link = ''
if l:match[4] is# 'SC'
let l:domain = 'https://github.com/koalaman/shellcheck/wiki/'
endif
if l:match[5] isnot# ''
let l:code = l:match[4] . l:match[5]
let l:link = ' ( ' . l:domain . l:code . ' )'
let l:text = l:code . ': ' . l:detail
let l:detail = l:code . l:link . "\n\n" . l:detail
else
let l:type = 'E'
let l:detail = 'hadolint could not parse the file because of a syntax error.'
endif
let l:line_output = {
\ 'lnum': l:lnum,
\ 'col': 0,
\ 'col': l:colnum,
\ 'type': l:type,
\ 'text': l:text,
\ 'nr': l:match[2],
\})
\ 'detail': l:detail
\}
if l:code isnot# ''
let l:line_output['code'] = l:code
endif
call add(l:output, l:line_output)
endfor
return l:output
endfunction
" This is a little different than the typical 'executable' callback. We want
" to afford the user the chance to say always use docker, never use docker,
" and use docker if the hadolint executable is not present on the system.
"
" In the case of neither docker nor hadolint executables being present, it
" really doesn't matter which we return -- either will have the effect of
" 'nope, can't use this linter!'.
function! ale_linters#dockerfile#hadolint#GetExecutable(buffer) abort
let l:use_docker = ale#Var(a:buffer, 'dockerfile_hadolint_use_docker')
" check for mandatory directives
if l:use_docker is# 'never'
return 'hadolint'
elseif l:use_docker is# 'always'
return 'docker'
endif
" if we reach here, we want to use 'hadolint' if present...
if executable('hadolint')
return 'hadolint'
endif
"... and 'docker' as a fallback.
return 'docker'
endfunction
function! ale_linters#dockerfile#hadolint#GetCommand(buffer) abort
let l:command = ale_linters#dockerfile#hadolint#GetExecutable(a:buffer)
let l:opts = '--no-color -'
if l:command is# 'docker'
return printf('docker run --rm -i %s hadolint %s',
\ ale#Var(a:buffer, 'dockerfile_hadolint_docker_image'),
\ l:opts)
endif
return 'hadolint ' . l:opts
endfunction
call ale#linter#Define('dockerfile', {
\ 'name': 'hadolint',
\ 'executable': 'hadolint',
\ 'command': 'hadolint -',
\ 'executable': function('ale_linters#dockerfile#hadolint#GetExecutable'),
\ 'command': function('ale_linters#dockerfile#hadolint#GetCommand'),
\ 'callback': 'ale_linters#dockerfile#hadolint#Handle',
\})

Some files were not shown because too many files have changed in this diff Show More