Commit graph

2041 commits

Author SHA1 Message Date
w0rp
b8c0ac2e61
Close #3309 - Add b:ale_lint_delay 2020-08-28 09:54:43 +01:00
w0rp
47fdc02fc7
Merge pull request #2988 from joereynolds/master
Add sql-lint as linter
2020-08-28 08:43:10 +01:00
w0rp
369e3876f0
#3324 - Enable rls by default 2020-08-28 08:23:10 +01:00
Sorin Iclanzan
80bd2e18d6
Set prettier working directory to where .prettierignore is (#3101)
Prettier does not use `.prettierignore` unless the current directory is the root where the `.prettierignore` file resides.

* Update Prettier tests
* Look for prettierignore to determine project root
2020-08-28 08:14:50 +01:00
w0rp
7545b18ba1
Fix #3318 - Escape macros when parsing C flags 2020-08-27 21:17:24 +01:00
w0rp
6d843715f3
Fix C flag parsing and tests on Windows 2020-08-27 20:18:13 +01:00
w0rp
af177d7825
#3318 Refactor C flag parsing to set up for quoting arguments 2020-08-27 19:33:43 +01:00
w0rp
5d3d33626c
Merge pull request #3310 from pbrisbin/master
Add dhall-format as a Fixer
2020-08-27 13:39:30 +01:00
w0rp
571cff932d
Label the test cases more clearly 2020-08-27 13:15:04 +01:00
w0rp
17605777d6
Fix #3317 - Parse -include from C flags 2020-08-27 13:05:50 +01:00
w0rp
66ff00c420
Fix #3316 - Repeat -relative for ALERepeatSelection 2020-08-27 12:41:07 +01:00
w0rp
f5aa0e8457
Fix #3307 - Handle compile_commands paths better
ALE now converts paths from compile_commands.json files into absolute
paths and prefers matching against absolute file and directory names for
determining which flags to use for files. As a result, parsing
compile_commands.json to determine flags should work for a lot more C
and C++ projects.
2020-08-27 11:44:35 +01:00
w0rp
a955f5dfa8
#3312 - Just check if additionalTextEdits is non-empty 2020-08-27 08:57:12 +01:00
w0rp
396fba7cca
Fix #3312 - Fix a false positive for auto imports
ALE was incorrectly detecting completion results from servers such as
rust-analyzer as wanting to add import lines when additionalTextEdits
was present, but empty.

Now ALE only filters out completion results if the autoimport setting is
off, and one of the additionalTextEdits starts on some line other than
the current line. If any additionalTextEdits happen to be identical to
the change from completion anyway, ALE will skip them.
2020-08-27 08:44:43 +01:00
patrick brisbin
447aea4af0
Add dhall-format as a Fixer
https://github.com/dhall-lang/dhall-lang
2020-08-25 09:34:34 -04:00
w0rp
3e2abe3f25
#2556 - Support modifiers for formatted filenames 2020-08-24 09:33:07 +01:00
Horacio Sanson
1a7366067a
Merge pull request #3302 from khaveesh/master
latexindent: Run fixer from stdin instead of a temporary file
2020-08-24 09:16:35 +09:00
w0rp
33eb03ea71
Yes, try again to fix Windows tests 2020-08-23 20:19:22 +01:00
w0rp
d4583f1a63
Try to fix Windows tests again 2020-08-23 20:14:08 +01:00
w0rp
c0566db1d2
Try to fix Windows tests 2020-08-23 20:05:09 +01:00
w0rp
ba3dd0d027
Close #2556 - Support filename mapping
ALE now supports mapping files between different systems for running
linters and fixers with Docker, in virtual machines, in servers, etc.
2020-08-23 19:55:42 +01:00
Khaveesh N
76801743cf
Fixed tests 2020-08-21 17:29:43 +05:30
Bartek thindil Jasicki
62f07d820c Merge remote-tracking branch 'upstream/master' 2020-08-21 10:39:39 +02:00
w0rp
2b785688ea
#3299 Merge gcc and clang into a cc linter
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.
2020-08-20 01:49:14 +01:00
awang
4d42ebc160
Keep -iframework if present in parsed C/C++ flags (#3057)
* Keep -iframework if present in parsed C/C++ flags
* Add test to make sure -iframework is parsed

Co-authored-by: Alex Wang <ts826848@gmail.com>
2020-08-20 00:09:02 +01:00
w0rp
361027eac6
Fix #3200 - Do not use -fstack-usage from parsed flags 2020-08-19 01:04:08 +01:00
w0rp
794224aafa
#3056 Add tests for parsed C/C++ -std flag handling 2020-08-19 00:47:39 +01:00
w0rp
e27d4377b5
Merge pull request #3178 from sudobash1/expand_at
Fixes #3092 - Implement loading `@file` c arguments
2020-08-19 00:15:34 +01:00
w0rp
5eda1df0a9
Remove features deprecated in previous versions 2020-08-18 23:03:43 +01:00
w0rp
4df352eee5
Fix #3294 - Fix hover off by 1, handle LSP server crashes 2020-08-18 01:48:07 +01:00
w0rp
bc6304bdb0
Merge pull request #3007 from klaaspieter/swift-format
Add Apple's swift-format as a linter
2020-08-17 23:37:23 +01:00
w0rp
ac56574b55
Merge pull request #3046 from hsanson/2816-fix-standard-fix-doesnt-work
Fix 2816 - Standard fix does not work.
2020-08-17 21:44:19 +01:00
w0rp
6d33417b15
Merge pull request #2759 from kgrzywacz/master
credo now recognizes umbrella projects
2020-08-17 21:34:10 +01:00
w0rp
eb864730e2
Merge pull request #2906 from elebow/shelldetect-fall-back-to-filetype-if-no-hashbang
ShellDetect falls back to filetype if no hashbang (fixes #2886)
2020-08-17 21:29:16 +01:00
w0rp
514e5a8baa
Merge pull request #2940 from davidsierradz/add-markdownlint-options
allow passing custom options to markdownlint
2020-08-17 10:21:36 +01:00
blyoa
d5c1d84230
Add remark-lint for a markdown fixer (#2836) 2020-08-17 10:14:38 +01:00
w0rp
5c778e1ae7
Make it easier to run tests locally
Certain tests could break if you ran them separately from other tests.
They have been patched.

`run-tests` now has a `--fast` option which runs tests with only the
fastest Vim version ALE tests with, and the custom checks.
2020-08-16 21:20:08 +01:00
Bartek thindil Jasicki
04bd84e914 Merge remote-tracking branch 'upstream/master' 2020-08-14 19:38:09 +02:00
w0rp
5a4fad6172
Fix #2899 - Handle tsserver default import completion 2020-08-14 01:55:54 +01:00
w0rp
2b2403a20d
Merge pull request #3144 from jamescdavis/dont_append_newline_when_noeol
don't append a newline to temp file when buffer is noeol and nofixeol is set
2020-08-14 00:32:28 +01:00
w0rp
8151e3e8fa
Merge pull request #2920 from ConradIrwin/prettier-standard-stdin
Fix prettier_standard to respect the configuration file
2020-08-14 00:27:41 +01:00
w0rp
94a968ef39
Merge pull request #2924 from patrick96/vlog-filename
verilog: Add filename to vlog linter output
2020-08-14 00:20:57 +01:00
toastal
167e2e7750
tests 2020-08-14 00:31:49 +07:00
Ben Boeckel
506a8532d0 rust/cargo: add support for a custom target directory
This can avoid having to wait for ALE or ALE being blocked on other
cargo actions within the same crate.
2020-08-13 10:22:33 -04:00
Horacio Sanson
8e6c7bff9a
Fix 1695 - Change rubocop fixer to use stdin (#3230)
* Fix 1695 - Change rubocop fixer to use stdin
* Update test_rubocop_fixer_callback.vader

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-08-13 11:25:07 +01:00
w0rp
7c4b1d8444
Close #3274 - Handle basic LSP markdown formatting 2020-08-12 22:11:45 +01:00
Nihad Abbasov
d5912b53dd
Restore old behavior of ALEFix command for Rubocop (#3237)
* Restore old behavior of ALEFix command for Rubocop

Since RuboCop 0.60 ALEFix command stopped to fix all found offenses. This change restores the 
previous behavior by allowing rubocop to fix all detected offenses.

* Fix tests
* Allow to configure auto-correct option for Rubocop
2020-08-12 14:04:54 +01:00
w0rp
d3f410b6f7
Fix #1608 - Treat .h as C++ files for C++ clang-tidy 2020-08-10 02:33:50 +01:00
w0rp
2237f9b462
#2919 Use compile_commands.json for headers 2020-08-10 02:14:23 +01:00
w0rp
05210846e4
Fix #3278 - Handle UTF-8 in URI encoding/decoding 2020-08-10 02:03:41 +01:00
w0rp
6d502233d8
Close #3267 - Add a general autoimport setting 2020-08-09 02:32:47 +01:00
w0rp
8bfb5c6407
Merge pull request #2849 from DonnieWest/excludeTsserverWarnings
Allow the user to remove warnings from completions
2020-08-09 01:32:27 +01:00
w0rp
2d174db5b2
Merge pull request #3107 from daliusd/tslintfix
Fix tslint fixer not working issue (temporary file not found)
2020-08-07 19:52:18 +01:00
Bartek thindil Jasicki
973c4ea053 Merge remote-tracking branch 'upstream/master' 2020-08-07 17:43:11 +02:00
w0rp
f741245f11
Fix #3273 - Handle missing keys in hover information 2020-08-07 12:34:45 +01:00
w0rp
388049dbea
Try to fix gopls tests again 2020-08-07 12:30:50 +01:00
w0rp
96d525a287
Try to fix gopls tests 2020-08-07 12:27:26 +01:00
w0rp
7cefc80f1b
Fix a failing test 2020-08-07 12:21:22 +01:00
w0rp
19229e8e27
Close #2472 - Add support for pyright 2020-08-07 12:16:13 +01:00
w0rp
9bdabce8df
Fix #2907 - Handle dictionaries for capabilities 2020-08-07 10:54:38 +01:00
w0rp
667618b399
Merge pull request #3191 from mostfunkyduck/master
Fixes govet linter for go 1.13+, with tests
2020-08-07 08:54:17 +01:00
tsjordan-eng
f17b74679f
fix cppcheck for 1.89+, and add column support (#3030)
* 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
2020-08-06 20:50:44 +01:00
Andre Souto
5b3da60cea
Adds hdl_checker LSP support (#2804)
* 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
2020-08-06 13:20:54 +01:00
w0rp
711c90c523
Merge pull request #3123 from liskin/ccls-build-dir
ccls: Detect build dir and set compilationDatabaseDirectory
2020-08-06 13:12:56 +01:00
w0rp
1bd7b3e4ad
Merge pull request #3196 from jeremija/autoimport-langserver-pr
Add autoimport and rename support for langservers
2020-08-05 13:35:48 +01:00
w0rp
acf892c4d1
#1532 - Display hover information on CursorHold 2020-08-04 20:11:49 +01:00
Horacio Sanson
316c7c7372
Merge pull request #3259 from sblask/support-markdownlint-rules-with-multiple-slashes
Support markdownlint rules with multiple slashes
2020-08-01 13:22:22 +09:00
Bartek thindil Jasicki
9a9d12cf4f Merge remote-tracking branch 'upstream/master' 2020-07-31 07:56:28 +02:00
jhlink
e2d1e54eb5 doc: Meaningless comment to kick CI from hang 2020-07-30 21:54:41 -04:00
Sebastian Blask
fbfeae0587 Support markdownlint rules with multiple slashes 2020-07-31 11:15:13 +12:00
jhlink
ac2ebafadd fix: Force add .astylerc in test_cpp_project 2020-07-30 09:58:14 -04:00
jhlink
ab6aed17ab test: Find .astylerc placed with src for astyle 2020-07-30 09:43:41 -04:00
jhlink
d49b06e030 fix: Find proj_options in same dir for astyle 2020-07-30 09:29:33 -04:00
Sebastian Blask
7cada95683 Support markdownlint 0.19.0 and 0.22.0
Fixes #2965
2020-07-30 09:57:46 +12:00
Horacio Sanson
5338dbf680
Merge pull request #3231 from jhlink/add-astyle-for-c-formatting
Add astyle for C/C++ formatting
2020-07-29 22:08:46 +09:00
jhlink
428c5f94da fix: Use ALE to reliably find project options 2020-07-29 01:36:45 -04:00
jhlink
f4cff3bc06 test: Set empty values for astyle project_options 2020-07-28 23:29:19 -04:00
jhlink
7d40d0a16f chore: Distinguish test value name 2020-07-28 23:28:25 -04:00
jhlink
a9b2f6362d chore: Delete dead test code 2020-07-28 23:26:49 -04:00
jhlink
5377272d20 fix: Change _options to _project_options 2020-07-28 19:48:27 -04:00
jhlink
0e6578cf65 fix: Remove explicit calls to file path in astyle 2020-07-26 22:05:14 -04:00
jhlink
78295024e1 feat: Add project option file support for astyle 2020-07-26 21:11:37 -04:00
jhlink
b25bb64a4d feat: Use stdin/redirection for astyle 2020-07-26 20:51:41 -04:00
jhlink
a9799fe90e test: Add cpp test case for astyle 2020-07-25 21:25:11 -04:00
Bartek thindil Jasicki
e06060a31f Merge remote-tracking branch 'upstream/master' 2020-07-24 10:38:29 +02:00
w0rp
68b484a49f
Merge pull request #2914 from hsanson/2913-fix-checkstyle-config-with-options
Fix 2913 - checkstyle config file ignored.
2020-07-21 12:49:55 +01:00
w0rp
f4668c751f
Merge pull request #3070 from hsanson/2732-add-bashate-support
Fix 2732 - Add bashate support
2020-07-21 12:47:33 +01:00
w0rp
70ab831001
Merge pull request #3119 from hsanson/2269-ktlint-stdin-support
Fix 2269 - use ktlint stdin.
2020-07-21 12:45:26 +01:00
Mark Egan-Fuller
d38b92c957 Handling for puppet parser error at end of input.
Add handling for `Syntax error at end of input` which doesn't give a
line or column.

Fixes #2656
2020-07-15 12:10:34 +01:00
Sheheryar Parvaz
23c58e63d4 Support zls language server for zig 2020-07-10 22:33:37 -04:00
jhlink
fecffeee91 test: Add astyle vader test 2020-07-10 18:26:15 -04:00
Kevin Locke
106c27644b
eslint: Use cwd from executable location to fix nested projects (#3222)
* Split FindNearestExecutable from FindExecutable

The path searching in ale#node#FindExecutable() will be useful for
eslint.  Refactor it into a separate function so it can be used without
regard for the state of the _use_global and _executable variables.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* eslint: Set project root from local executable

Using the nearest directory with node_modules does not work correctly
for nested projects where the eslint dependencies are in the outer
project.  For example:
https://github.com/dense-analysis/ale/issues/3143#issuecomment-652452362

Adopt the behavior of SublimeLinter, which runs from project_root
determined by the presence of the eslint executable in node_modules/.bin
(or eslint in dependencies/devDependencies of package.json, which we can
add later as necessary).  See [NodeLinter#find_local_executable].

[NodeLinter#find_local_executable]: https://github.com/SublimeLinter/SublimeLinter/blob/056e6f6/lint/base_linter/node_linter.py#L109

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-08 14:42:01 +01:00
Christopher Peterson
1fcb9d1e1a Tests/puppet: add new test case for a heretofore unaccounted-for version of error message 2020-07-02 12:44:39 -04:00
Bartek thindil Jasicki
0f45d3d01d Merge remote-tracking branch 'upstream/master' 2020-07-02 10:11:30 +02:00
Kevin Locke
b3c6db173a
Run ESLint fixer from project root, where possible (#3096)
* Split eslint#GetCdString from eslint#GetCommand

Move the code for finding the project root and building the cd string
into a separate function so that it can be reused in the eslint fixer.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Run ESLint fixer from project root dir

To match the ESLint linter, as changed in 9ee57d43 (which I forgot to
apply to the fixer, whoops).

Fixes: #3094
Closes: #3095

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-01 17:00:21 +01:00
Horacio Sanson
834d6f9c48
Merge pull request #3158 from ulidtko/improve-dockerfile_lint
Improve :ALEDetail for dockerfile_lint [READY TO REVIEW]
2020-06-20 20:58:42 +09:00
w0rp
1428c7b29e
Update the internal ALE version to 2.7.0 2020-06-11 19:21:17 +01:00
Bartek thindil Jasicki
a5e7f2c8bb Merge remote-tracking branch 'upstream/master' 2020-06-07 09:26:06 +02:00
Jerko Steiner
b29e9867e8 Add test for LSP autoimport 2020-05-31 11:46:10 +02:00
Jerko Steiner
b339a8bfa0 Add support for rename (documentChanges) 2020-05-31 11:00:53 +02:00
Keith Maxwell
53bfe41841 vim/vint: show policy name
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)
2020-05-30 08:38:07 +01:00
mostfunkyduck
35c7c297b6 Fixes govet linter for go 1.13+, with tests 2020-05-25 11:46:16 -04:00
Paco
7265ceb6d0
Support revive for go files (#2933)
Signed-off-by: Penghui Liao <liaoishere@gmail.com>
2020-05-22 06:09:14 -05:00
Stephen Robinson
b209315714 Fixes #3092 - Implement loading @file c arguments 2020-05-20 18:15:52 -07:00
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
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
RyanSquared
70005134e5
Merge branch 'rust-analyzer' of https://github.com/jonhoo/ale into jonhoo-rust-analyzer 2020-05-05 09:21:49 -05:00
James C. Davis
15d590ee5e
fix: don't append newline when buffer is noeol and nofixeol 2020-04-30 15:00:10 -04:00
Ian2020
65bea1a5cb Main logic of shellcheck has moved, updated backward compat test 2020-04-29 17:45:16 +01:00
Klaas Pieter Annema
2548763d04
Add Apple's swift-format as a linter 2020-04-29 14:33:13 +02:00
Ian2020
f67cb56e5e Fix shell detection test, shellcheck function name has changed 2020-04-28 18:20:10 +01:00
Ian2020
3f34265151 Fix handler test, function name has changed 2020-04-28 18:13:34 +01:00
Jeffrey Lau
60d683da3b Add vim-language-server linter support 2020-04-21 02:29:22 +08: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
Tomas Janousek
4fbfcc9dec ccls: Detect build dir and set compilationDatabaseDirectory
Fixes #2621
2020-04-18 13:57:57 +02:00
w0rp
64b9a2708d
Merge pull request #3098 from tarikgraba/verilator-columnn
Adds column number to the verilator verilog linter
2020-04-18 12:36:16 +01:00
w0rp
1f9ac1c6dc
Fix the cursor tests, that stop tests running 2020-04-18 12:26:38 +01:00
Yuto
93a13d7353
Broken message in pycodestyle (or any other Linters whose name include 'code') (#3114)
* Swap substitution order for echoed message

This prevents 'code' string in liter_name to be substituted by accident.
Linters including pycodestyle have been affected by this problem.

* Add test for linter whose name contains 'code'

Test for c525db8cb4088d02448c5ddcf4a80ffa028c3181
2020-04-18 11:59:26 +01: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
dc054f30c8
Merge pull request #2823 from jeremija/do-not-save-on-autoimport
Do not save after ALERename and ALEOrganizeImports
2020-04-17 17:32:36 +01:00
Horacio Sanson
16cd59805b
Merge pull request #3050 from StarryLeo/fix-vim-sign-priority-patch-check
Fix vim sign priority patch check
2020-04-17 22:22:03 +09:00
w0rp
82f734a7c2
Closes #3019 - Implement default navigation
Default navigation for commands that jump to new locations has been
implemented with the `ale_default_navigation` variable, and all commands
that jump to locations now support `-tab`, `-split`, or `-vsplit`
arguments for overriding the default navigation behavior.
2020-04-15 16:50:13 +01:00
Dalius Dobravolskas
891852de71
Fix tslint fixer not working issue (temporary file not found) 2020-04-15 17:30:19 +03:00
Jon Gjengset
6087765cad
Move to rust-analyzer everywhere 2020-04-09 13:23:03 -04: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
StarryLeo
302ce71931 Fix vim sign priority patch check
With Vim 8.2 released, the previous check method is not accurate enough.
2020-03-15 14:58:38 +08:00
Horacio Sanson
c207d6a550 Fix 2816 - Standard fix does not work.
The standard linter --fix fails if the file being input is not relative
to the project root (https://github.com/standard/standard/issues/1384).

This MR attempts to fix this by changing the command so the input file
is relative to the project root and the output is to a temporary file.

Preliminary tests with toy javascript projects seem to indicate this
works fine.
2020-03-12 16:29:46 +09:00
w0rp
bbe5153fcb
Fixes #2982 - Implement g:ale_exclude_highlights
Particular highlights can now be excluded by providing Lists of regular
expressions.
2020-03-11 12:52:41 -04:00
Joe Reynolds
07080066e4 Add sql-lint as linter 2020-01-31 11:11:12 +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
57eba1afac
Fix the build 2020-01-02 14:23:28 +00:00
w0rp
8c4c8dfd97
Fix #2704 - Show mypy notes; can be disabled 2020-01-02 14:19:21 +00:00
Jerko Steiner
0cb432cb82 Add TypeScript autoimport support for deoplete (#2779)
* Add autoimport support for deoplete

* Fix test_deoplete_source.py

* Use callback instead of is_async for deoplete

Shuogo, the author of Deoplete, does not recommend using the `is_async`
option:

> I think is_async is not recommended. It is not so useful and broken.
> You should use callback system instead.

Link: https://github.com/Shougo/deoplete.nvim/issues/1006#issuecomment-526797857

Incidentally, the same thread mentiones an issue started by w0rp:
https://github.com/Shougo/deoplete.nvim/issues/976

The deoplete docs also say is_async is deprecated:

> is_async        (Bool)
>     If the gather is asynchronous, the source must set
>     it to "True". A typical strategy for an asynchronous
>     gather_candidates method to use this flag is to
>     set is_async flag to True while results are being
>     produced in the background (optionally, returning them
>     as they become ready). Once background processing
>     has completed, is_async flag should be set to False
>     indicating that this is the last portion of the
>     candidates.
>
>     Note: The feature is deprecated and not recommended.
>     You should use callback system by
>     |deoplete#auto_complete()| instead.

Link: https://github.com/Shougo/deoplete.nvim/blob/master/doc/deoplete.txt

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-01-01 19:00:41 +00:00
davidsierradz
0cea55924b allow passing custom options to markdownlint 2019-12-19 13:11:25 -05:00
Kevin Locke
9ee57d4362 Run ESLint from project root dir where possible
ESLint 6 loads all plugins/configs/parsers relative to the project root
which, by default, is the directory in which ESLint is invoked, as
described in [ESLint RFC 2018-simplified-package-loading].

Therefore, ALE should run ESLint from the project root, when possible,
so that dependencies will load.  This commit does so.

[ESLint RFC 2018-simplified-package-loading]: https://github.com/eslint/rfcs/blob/master/designs/2018-simplified-package-loading/README.md

Fixes: #2787

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-12-17 12:25:44 -07:00
patrick96
1e9f870b74
verilog: Add filename to vlog linter output 2019-12-05 19:35:34 +01:00
Conrad Irwin
efe120ce9a Fix prettier_standard to respect the configuration file
Before this change, prettier_standard would run and ignore any
.prettierrc, now it will respect the configuration of the file being
linted.

This change relies on prettier-standard 16.1.0 for the --stdin-filepath
flag, but is backward compatible: older versions of prettier-standard
will ignore the unknown flag and continue to run with no configuration
file.
2019-12-04 23:15:41 -08: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
Horacio Sanson
5f95d032ee Fix 2891 - eslint not showing errors.
ESLint errors are contained in an array that can contain different
stuff other than JSON error messages. This patch iterates over the whole
array ignoring any non-json data.
2019-11-26 13:37:25 +09:00
Eddie Lebow
1997a8f7e2
ShellDetect: fall back to filetype if no hashbang
Some files lack a hashbang line but still have an unambiguous filetype.
For example, the file `.zshrc` has the filetype `zsh`.

Augment ale#handlers#sh#GetShellType to fall back to the filetype if
no hashbang line can be found.
2019-11-23 00:34:40 -05:00
w0rp
b91d82bfaa
Merge pull request #2847 from DonnieWest/allowUserToCustomizeItems
Allow user to customize items
2019-11-15 09:34:24 +00:00
w0rp
9005a62dc2
Clean up the nimpretty code 2019-11-14 14:50:21 +00:00
w0rp
7665559d0e
Merge pull request #2660 from YPCrumble/master
Add StandardJS linter for TypeScript
2019-11-14 14:47:19 +00:00
Bùi Thành Nhân
abad8e474b add nimpretty fixer 2019-11-09 16:28:49 +07:00
Donnie West
5985f8bd63
Fix typo 2019-11-08 16:44:02 -06:00
Donnie West
0b5fcbad1f
Allow the user to set their own completion values 2019-11-08 16:44:00 -06:00
Donnie West
db5fe5659f
Allow the user to remove warnings from completions 2019-11-08 16:41:37 -06:00
Bartek thindil Jasicki
b6828ac5c5 Merge remote-tracking branch 'upstream/master' 2019-11-07 22:07:26 +01:00
Thibault Vatter
db6b1b5ecc Switch from style to transformers (#2838)
* Switch to transformers for styler
* Adapt unit test too
2019-11-07 18:22:57 +00:00
w0rp
a273b9cf4a
Fix a test failing in AppVeyor 2019-11-07 15:52:03 +00: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 Jasicki
b454e43143
Update test/command_callback/test_adals_command_callbacks.vader
Co-Authored-By: timlag1305 <timlag1305@gmail.com>
2019-11-05 18:00:16 +01:00
Bartek thindil Jasicki
3e4a23cb14 Merge remote-tracking branch 'upstream/master' 2019-10-31 09:42:58 +01:00
w0rp
2d9380d75c
Merge pull request #2690 from iclanzan/purty
Add purty fixer for PureScript
2019-10-29 17:37:18 +00: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
9a0b604a99
Fix the test issues with html-beautify 2019-10-28 13:45:25 +00:00
Hugo Osvaldo Barrera
47eb3dd0c0 Add support for html-beautify (#2788)
* Add support for html-beautify
* Add html-beautify to the list of supported tools
* Update docs
2019-10-28 13:25:36 +00:00
Charlie Johnson
af8c8516d1 fixers/stylelint: enhance stylelint fixer (#2745)
* Refactor stylelint fixer test
* Support additional stylelint fixer options
* Support changing working directory for stylelint fixer
* Force css syntax for stylelint fixer
2019-10-28 13:23:02 +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
Jerko Steiner
463deedc29 Merge branch 'master' into do-not-save-on-autoimport 2019-10-22 16:40:27 -05:00
Ian Campbell
cf5120ba75 Remove standardts fixer in favor of allowing standard.vim fixer to handle JavaScript or TypeScript options. 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
w0rp
67d0ccc398
Fix #2835 - Bump up the sign group version check for NeoVim 2019-10-21 09:35:23 +01: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
Andre Souto
5e69aaf4c2 Adding support for LSP window/showMessage method (#2652)
* Added base handling for window/showMessage
* Ignoring severity log
* Code formatting
* Added user configurable severity
* Preferring ale#util#ShowMessage over echo'ing directly
* Using format similar to ale_echo_msg_format for consistency
* Updating docs
* Added LSP log config string; improved tests
* Use warning as fallback for incorrect user config
2019-10-18 16:17:54 +01:00
w0rp
9125ec8739
Merge pull request #2845 from DonnieWest/fixItemDetailsOnEmptySource
Fix tsserver not returning details for items with empty source
2019-10-18 15:16:54 +01:00
Donnie West
8698c44e2a
Fix tsserver not returning details for items with empty source 2019-10-17 23:26:24 -05:00
Donnie West
b27df1b169
Allow code actions to work on callback based sources 2019-10-17 23:22:31 -05: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
w0rp
b24fd13423
Bump the ALE version 2019-10-16 17:23:31 +01:00
Jon Gjengset
81cb40ce4b
minor test fix 2019-10-16 11:54:43 -04: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
c30869617f another fix for test 2019-10-11 10:48:50 +02:00
Bartek thindil Jasicki
321a3892a7 fixed test again (this time for sure) 2019-10-11 10:41:19 +02:00
Bartek thindil Jasicki
c74cc93140 fixed test 2019-10-11 10:35:54 +02:00
Bartek thindil Jasicki
38e0e3feef added adalsp test 2019-10-11 10:08:36 +02:00
Jerko Steiner
c8c142b881 Do not save for ALERename and ALEOrganizeImports 2019-10-09 20:54:47 -05:00
Murfalo
a1fab59811 Suboptimal fix to prevent variables from leaking out of new clangd test 2019-10-09 14:24:56 -04:00
Murfalo
d488198c9c Hopefully fixed issue with Windows paths 2019-10-09 13:52:17 -04:00
Murfalo
a62f26434a Added tests for clangd compile commands dectection 2019-10-09 13:40:04 -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
06082ef377
Merge pull request #2735 from zoonfafer/scala-metals
Add linter for Scala Metals
2019-10-07 19:24:47 +01:00
w0rp
d3a3f4011b
Merge pull request #2676 from davidtwco/nixfmt-fixer
Add nixpkgs-fmt fixer.
2019-10-07 19:22:01 +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
Thomas A. Werne
89fa43551f Add test for new vlog format 2019-10-05 11:25:56 -07:00
Horacio Sanson
7c2f5e83ab Fix sign parser to be language independent. 2019-10-04 21:58:44 +09: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
Horacio Sanson
41ff80dc9e 569 support vim sign group and priority (#2786)
* Use sign-group only on supported vim versions.

The sign-group feature is only available in nvim 0.4.0 and vim 8.1.614.

* Add priority to ALE signs.

This allows users to set a priority to ALE signs to take precedence over
other plugin signs.
2019-09-25 09:15:16 +01: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
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
d93512fe60
Fix #2744 - Make ALEFix work when only casing is changed 2019-09-20 19:02:21 +01:00
Jerko Steiner
f5e44415e8 Show description of autoimport action for tsserver 2019-09-20 13:11:16 +07:00
w0rp
e3784c4c4e
Close #2764 - Support the new React filetypes with aliases 2019-09-19 20:48:37 +01:00
w0rp
529f57a66f
Document and test solc 2019-09-19 20:26:24 +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
58b7c281c5
Merge pull request #2696 from elebow/update-test-docs-for-linter-lists
Update test docs and output for linter tables checked
2019-09-12 22:57:44 +01:00
Cluas
a6c59faa0f feat: support sqlformat. (#2702)
* feat: support sqlformat.
2019-09-12 22:48:27 +01:00
Jerko Steiner
3e8c8d3ccb Add ALERename (tsserver & LSP), ALEOrganizeImports (tsserver) and auto import support (tsserver) (#2709)
This commit adds support for renaming symbols in tsserver and with LSP tools, and for organising imports with tsserver. Completion results for symbols that can be imported are now suggested if enabled for tsserver completion done via ALE.
2019-09-12 21:53:23 +01:00
Samuel Roeca
05ba522c9a languagetools: stop auto-appending --autoDetect (#2616)
Options are now configurable for languagetools, and `--autoDetect` can be removed by changing the options.
2019-09-12 21:22:47 +01:00
w0rp
fbe7cea91c
Merge pull request #2741 from zoonfafer/shell
linter/sh: Improve parsing of error messages in different locales
2019-09-12 20:41:49 +01:00
theoremoon
2e323b529d dfmt support (#2662)
* Add support for `dfmt`
2019-09-10 20:54:14 +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
BlahGeek
9f814a8ce9 Add g:ale_sign_highlight_linenr (#2678)
* add g:ale_sign_highlight_linenr
* Fix tests. Change option default value
* Rename ale_sign_highlight_linenr to ale_sign_highlight_linenrs
* Default ale_sign_highlight_linenrs to 0
2019-09-01 14:03:54 +01:00
w0rp
67ee2b9586
Fix tests so they work with new NeoVim highlight code 2019-09-01 13:31:09 +01:00
w0rp
7d7ddf22d3
Merge pull request #2638 from frangio/nvim-highlight
Use Neovim API for highlights when available
2019-09-01 10:47:28 +01: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
David Wood
6aeb462171
Add nixpkgs-fmt fixer.
This commit adds a fixer for the Nix language, nixpkgs-fmt
(https://github.com/nix-community/nixpkgs-fmt).
2019-08-26 19:21:07 +01: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
w0rp
73812c3e41
Merge remote-tracking branch 'AlexeiDrake/master' into bugfix/c-lsp-build-dir-settings 2019-08-18 18:29:59 +01:00
w0rp
91636cff06
Merge pull request #2677 from davidtwco/check-toc-test-failure
Remove `/bin/ls` assumption from check-toc test.
2019-08-18 16:26:14 +01:00
richyfish
c4bdf165ca Black fixer should include --pyi for files with .pyi extension (#2705)
* black fixer should include --pyi for files with .pyi extension
2019-08-18 15:45:15 +01:00
w0rp
ddb559b3be
Merge pull request #2631 from timlag1305/feat/ada-gnatpp
Add gnatpp fixer for Ada
2019-08-18 15:37:51 +01:00
fx-carton
b62e306222 Fix cflags parsing (#2510, #2265) (#2590)
* Parse CFLAGS that can be passed using a whitelist

I went through GCC's man page and selected flags that can safely be
passed to GCC and that can be useful to syntax checking. These include:

- -I/-i* include flags
- preprocessor flags such as -D
- -W* warning flags
- -O* optimization flags
- most -f options
- -m arch dependent options

* Fix CFLAGS tests: -Idir is now parsed to -I dir
* Added two tests for flags we want or don't want to pass.
* Also check for / in addition to s:sep
2019-08-17 19:08:14 +01:00
Donnie West
5388ff1d54 Add asyncomplete.vim Support (#2627) 2019-08-17 18:40:05 +01:00
Eddie Lebow
74a43755c6
Update test docs and output for linter tables checked
This makes some of the run-test output less misleading.

Also fix a minor shellcheck issue: "\*" and "\\*" are equivalent, but
the second one makes clear that the literal backslash is intentional.
2019-08-13 21:30: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
Sorin Iclanzan
f89b49a014 Add purty fixer. 2019-08-12 11:49:19 -04:00
richyfish
28c93ab185 aleinfo global options (#2686)
* added omitted global variables which was breaking this test when run standalone
* invert logic for s:GetLinterVariables excluding disabled linters, so that linter global options can appear in output
* additional tests for s:GetLinterVariables for linter global options
2019-08-12 16:29:28 +01: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
David Wood
20cc6d3e05
Remove /bin/ls assumption.
On some systems, notably NixOS, there is no `/bin/ls` and thus this test
can fail unnecessarily on those systems. This commit uses
`/usr/bin/env ls` which resolves the issue.
2019-08-03 12:42:22 +01:00
w0rp
dd1e1025b8
Fix #2668 - Set g:ale_go_go111module 2019-08-02 09:09:10 +01:00
w0rp
3ae01ba249
Merge pull request #2430 from eliath/master
Support $GO111MODULE with Go tooling
2019-07-30 21:17:20 +01:00
w0rp
8f5ecf0120
Merge pull request #2646 from paulreimer/fixer-clangformat-use-assume-filename
Set --assume-filename for clangformat fixer
2019-07-30 08:21:21 +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
Paul Reimer
d25711a516
Set --assume-filename for clangformat fixer 2019-07-19 07:57:10 -07: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
delphinus
240bb8abae Add Deoplete's input_patterns for cpp 2019-07-14 22:20:44 +09:00