Commit graph

414 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Mikko Pesari
6b919e88be Add test to verify phpstan autoload parameter 2019-05-12 23:12:52 +03: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
robertking
fb7099d440 modify rls testcase 2019-04-11 23:38:16 +08:00
harttle
4b6691f602 test: unit test for fecs fixer, fecs command 2019-04-11 19:47:31 +08:00
Horacio Sanson
f02e2ec54c Fix 1996 - Add eclipse LSP support. 2019-04-11 08:50:04 +09: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
w0rp
3eb6d7b3db
#2395 - Handle empty output for redpen 2019-03-29 16:09:27 +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
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
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
Francisco Lopes
d9a12348d0 Fix passing file to languagetool 2019-03-11 04:42:25 -03: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
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