Commit graph

1361 commits

Author SHA1 Message Date
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
Horacio Sanson
69d96aa9d9
Merge pull request #3077 from puritys/javaagent
To support javaagent on eclipselsp
2020-05-15 10:12:25 +09: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
Klaas Pieter Annema
2548763d04
Add Apple's swift-format as a linter 2020-04-29 14:33:13 +02:00
Ian2020
d4e1c57026 Moved common code to ale handlers, updated bats doc 2020-04-28 17:46:15 +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
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
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
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
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
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
Tho Nguyen Duc
46d7ee564f Fix 3011 - not catching kotlinc output on stderr 2020-03-06 13:44:30 +09:00
Joe Reynolds
07080066e4 Add sql-lint as linter 2020-01-31 11:11:12 +00: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
8c4c8dfd97
Fix #2704 - Show mypy notes; can be disabled 2020-01-02 14:19:21 +00:00
davidsierradz
0cea55924b allow passing custom options to markdownlint 2019-12-19 13:11:25 -05:00
patrick96
1e9f870b74
verilog: Add filename to vlog linter output 2019-12-05 19:35:34 +01: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
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
w0rp
7665559d0e
Merge pull request #2660 from YPCrumble/master
Add StandardJS linter for TypeScript
2019-11-14 14:47:19 +00:00
Jesse Harris
f09cc26f87 Default errorview in pwsh7 now concise 2019-11-09 13:43:00 +10:00
Bartek thindil Jasicki
b6828ac5c5 Merge remote-tracking branch 'upstream/master' 2019-11-07 22:07:26 +01: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
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
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
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
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
9017d3ef9c Add StandardJS for TypeScript linting and fixing. 2019-10-21 18:20:43 -04: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
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
f5c289dce6
Add support for rust-analyzer
Fixes #2832
2019-10-16 11:34:16 -04: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
87a0227d01 added support for Ada Language Server 2019-10-11 09:43:55 +02: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
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
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
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
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
Thomas A. Werne
d0e87c0df4 Correct vint-discovered advisory in vlog handler 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
Murfalo
618f2d71fc Added automatic compile-commands-dir arg to ale_cpp_clangd linter 2019-10-03 13:22:13 -04: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
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
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
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
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
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
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
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
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
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
Richard French
266fa1c0a4 mypy linter capture stderr for error reporting in ALEInfo 2019-08-15 16:36:11 +01: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
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
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
w0rp
3ae01ba249
Merge pull request #2430 from eliath/master
Support $GO111MODULE with Go tooling
2019-07-30 21:17:20 +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
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
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
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
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
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
Jean Mertz
53b0e6c37d
support all cargo options for build/clippy 2019-06-25 11:22:36 +02: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
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
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
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
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
w0rp
1ba1a9ef0e
Merge pull request #2558 from hsanson/fix-javalsp-command-callback
Fix javalsp command callback.
2019-06-10 19:15:15 +01: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
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
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
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
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
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
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
Nils Kuhnhenn
79d1b99067 Use JSON output for eslint and fix tsserver column 2019-06-02 14:39:03 +02: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
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
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
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
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
28819eedd3
Close #2359 - Find compile_commands.json in build dirs for cppcheck 2019-05-20 22:08:03 +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
5e64acc6ab
Fix #2512 - Use -o /dev/null for gcc linting 2019-05-20 13:00:32 +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
w0rp
4234d39d87
Close #908 - Report phpcs problems as style problems 2019-05-14 22:58:58 +01:00
w0rp
07b596efb5
Close #791 - Handle exceptions for puglint 2019-05-13 21:57:44 +01:00
rliang
ab7e5b264f [linter] Add LSP support for LaTeX via texlab 2019-05-13 15:50:03 -03:00
Mikko Pesari
afa20d96ca Add phpstan autoload option 2019-05-10 18:28:32 +03: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
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
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
w0rp
5f64f8dc57
Escape phpstan arguments, and update documentation 2019-05-07 19:38:38 +01: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
Fletcher Nichol
2303b05baa Add g:ale_sh_shellcheck_change_directory 2019-04-18 16:48:10 -06:00
Ian Shipman
2eb68f6d23 #1791 Set the working directory for cabal and stack 2019-04-17 14:26:09 +01:00
w0rp
61c1ddd904
Fix #2440 - Fix the kotlinc command when Maven and Gradle are missing 2019-04-15 13:36:03 +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
Jesse Harris
2ed53108c4 Linter for powershell syntax errors (#2413)
* Linter for powershell syntax errors
2019-04-13 12:24:56 +01:00
robertking
df806c511c change default value of ale_rust_rls_toolchain and update documentation 2019-04-11 23:05:59 +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
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
Raphael Hoegger
81423701b0 Adding new linter "cookstyle" for chef recipes (Issue #1187) (#2362) 2019-04-10 18:52:52 +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
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
5be6a2b4e0
Merge pull request #2340 from svanharmelen/svh/f-gotype
make `gotype` return all errors
2019-04-02 14:27:01 +01: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
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
davidsierradz
dfff73795a support jsonlint local executable 2019-03-15 16:21:48 -05: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
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
Vincent Dahmen
7eae06d3f3 linter/markdown: adds support for languatool (#2155) 2019-03-09 13:55:54 +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
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
w0rp
883978ece9
#2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +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
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
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
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
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
w0rp
7a48750610
Complain about binary operators on the ends of lines 2019-02-10 11:43:48 +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
800d029b46
Merge pull request #2284 from jqno/master
Fixes javalsp linter
2019-02-08 10:08:09 +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
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
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
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
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
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