Commit graph

355 commits

Author SHA1 Message Date
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
Andreas Hollmann
ef7b4af917 Do not enable all clang-tidy checks by default 2018-10-30 11:46:53 +01:00
Andreas Hollmann
4c14e6a5fd Fix clazy tests 2018-10-28 17:44:45 +01: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
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
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
paihu
f4395f5b8c ale#path#CdString include ale#Escape 2018-10-23 23:20:27 +09:00
paihu
2ea83939a5 fix testcase 2018-10-22 22:59:06 +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
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
Auri
be21aa5cda New linter: dls (#1992)
* New linter: dls
2018-10-17 16:11:41 +01:00
Kim Joseph S. Sadomia
cc1aece1e0 Rename solargraph initialization option variable 2018-10-12 18:16:28 +08:00
Kim Joseph S. Sadomia
12409fa73d Expose ruby-solargraph initialization options 2018-10-12 13:03:06 +08: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
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
Travis Gibson
2b2e766dc6 Add Perl6 support via 'perl6 -c' 2018-09-28 16:18:40 -07: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
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
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
Daniel Wennberg
d50e603177 Support both old (<0.7) and new Julia versions
Closes #1931
2018-09-19 07:34:11 -07:00
Devon Meunier
4025030d86
Solargraph stdio 2018-09-18 11:20:29 -04:00
KtorZ
bd32b7c856
Add command_callback tests to cover hlint config variables 2018-09-18 08:25:49 +02: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
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
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
jpsouzasilva
9bbea8b830 Add tests for assuring the SCSS stylelint options work 2018-09-14 13:32:42 -03: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
Sascha Grunert
c48106f484
Adapt tests 2018-09-14 10:47:33 +02:00
Ryan Rosenblum
9e09b7ca35 Update all Ruby linters to work consistently with bundler 2018-09-12 16:53:28 -04:00
w0rp
99e9417ef9
Add support for Julia Language Server (#1894) 2018-09-10 17:24:04 +01:00
Daniel Jones
150015d0dc Fixed NASM tests 2018-09-10 09:23:47 +10:00
Bartolomeo Stellato
97ed25a8bf Escape julia command + reorder table in README 2018-09-09 10:09:05 -04:00
Bartolomeo Stellato
91bb948b90 Try to fix CI 2018-09-08 14:11:11 -04: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
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
7086769289
#1891 Fix the go-langserver tests 2018-09-06 17:05:05 +01:00
Horacio Sanson
a9333c2866 Fix #1822 - support go-langserver lsp. 2018-09-06 13:46:59 +09: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
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
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
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
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
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
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
7c10249c52
Merge pull request #1820 from SuRaMoN/master
Added phpcs options support as described in #257
2018-08-23 22:42:45 +01: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
b78ee18898
Add html stylelint test 2018-08-22 19:00:42 -03:00
matthias
f82ab76833 Added and fixed tests 2018-08-18 20:59:35 +02:00
tyru
88ffdb4736 feat: add ale_go_govet_options variable 2018-08-16 11:36:46 +09: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
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
kodemeister
cc84c19451 Add C/C++ tests for cquery LSP linter 2018-08-09 09:02:16 +06: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
41178425ab
Fix the Windows tests 2018-08-03 01:00:39 +01:00
w0rp
217284360d
Simplify the code for most linters and tests with closures 2018-08-02 23:44:12 +01: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
w0rp
ac4bac8ea4
Add support for parsing compile_commands.json files for C compilers 2018-07-29 19:24:27 +01:00
Andrey Melentyev
9b4963847d Add Clangd language server support for C 2018-07-22 21:22:38 +02:00
w0rp
baa44bb3a7
Merge pull request #1742 from typetetris/master
Add cabal-ghc linter
2018-07-22 14:12:23 +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
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
a42999a639
Massively reduce the amount of code needed for linter tests 2018-07-15 18:28:28 +01:00
w0rp
4999ad7e78
Add an AssertLinter command for tests 2018-07-06 22:46:36 +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
b88bf6ecba
Fix #1412 - Use --stdin-filename for newer reek versions 2018-07-01 10:21:59 +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
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
Abin Simon
17c1aefb5b Add fixer tidy for HTML
Add tests for tidy HTML fixer
2018-06-23 22:59:13 +05:30
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
d7efb13203
Try to fix the tests on Windows 2018-06-20 22:41:19 +01: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
Ben Falconer
20db9ab719 Add the cquery LSP #1475 #1594 2018-06-06 17:58:47 +01:00