* 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.
* 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
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.
```
---
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>
* 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>
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.
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.
* 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
* 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
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)
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.
* 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.
Resolvesdense-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>
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 427fe19104Closes#3120
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
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.
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.
* 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
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.