Commit graph

3345 commits

Author SHA1 Message Date
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