Commit Graph

481 Commits

Author SHA1 Message Date
w0rp
34aa3437e0 Pass extra rubocop options in the middle instead, and fix the Vader test so it can be run multiple times in Vim 2017-08-10 14:57:30 +01:00
Miguel Palhas
0c26e8945c Rubocop fixer now uses g:ale_ruby_rubocop_options (#841)
* Rubocop fixer now uses g:ale_ruby_rubocop_options

* Adds spec
2017-08-10 14:52:54 +01:00
Gordon Fontenot
4709e67627
Add support for SwiftFormat as a fixer
SwiftFormat is a tool that can be used to format Swift files. This commit adds
support for using SwiftFormat as a fixer from ALE. It looks for executables in
the Pods directory, then the Pods directory for a React Native project, then
finally falls back to the globally installed instance if neither of those were
found.

https://github.com/nicklockwood/SwiftFormat
2017-08-09 12:41:21 -05:00
w0rp
670858f774 Fix #468 - Add a cool down period for when things go wrong 2017-08-09 00:05:55 +01:00
w0rp
16772298ab Simplify some comparisons 2017-08-08 08:43:51 +01:00
w0rp
a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp
5010ddc28f Fix #833 - Do not open windows on save when the option is off 2017-08-08 07:29:10 +01:00
w0rp
16cfedf04a Fix #271 - Add the ability to open the quickfix or loclist windows only after saving a file 2017-08-08 00:46:42 +01:00
w0rp
2edea15358 Fix the resetting of selections and annotate it 2017-08-07 22:08:35 +01:00
Adrian Kocis
c18451fba9 added missing visual reselection after quick/location list update (#788)
Reset visual selection after opening loclist or quickfix windows
2017-08-07 21:57:59 +01:00
w0rp
593cafa18b Fix #823 - Write Windows files with CRLF 2017-08-05 20:17:25 +01:00
w0rp
747d4fe80b Stop writing a test file in real world usage in some cases 2017-08-05 19:51:38 +01:00
w0rp
666cfc6ee2 Fix the completion start position regex matching being off by one 2017-08-04 16:15:48 +01:00
w0rp
9ac74c44fe Tell Vim omnicompletion that tsserver matches are case-insensitive 2017-08-04 13:35:02 +01:00
w0rp
09d50ebe31 Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to rls 2017-08-02 23:21:30 +01:00
w0rp
a4ffd2f37c #734 - Use the buffer number from the events for entering buffers and saving buffers for checking buffers 2017-08-01 00:03:24 +01:00
w0rp
ec82530247 #734 - Do not clear file linter results when no buffers are run 2017-07-31 22:36:30 +01:00
Mahmoud Mostafa
eaeb71993f Add stylelint fixer 2017-07-31 02:54:59 +02:00
w0rp
2c252c0f12 #517 - Get the Rust language server working in a basic way 2017-07-30 23:34:58 +01:00
w0rp
6000d956f0 When servers never send an initialize response, but instead just publish diagnostics straight away, handle that as an initialize response 2017-07-30 22:18:19 +01:00
w0rp
5810d7faa0 Add some error message handling for LSP, for test purposes 2017-07-30 22:17:29 +01:00
w0rp
84af543907 Fix some bugs so the PHP language server will show errors at least once 2017-07-30 14:42:00 +01:00
w0rp
63b9d9e9df Fix #798 - Handle syntax errors for tsserver 2017-07-27 13:24:32 +01:00
w0rp
db4d68eae7 Add a fuzzy JSON decoding function for ignoring json_decode errors for linters 2017-07-27 00:06:15 +01:00
w0rp
810e884dbe Remove channel logging 2017-07-26 10:45:21 +01:00
w0rp
fbf59fd4ce Check the active_linter_list only for running linters 2017-07-26 10:44:27 +01:00
w0rp
cfdb41f4d2 Remove a redundant check for tsserver 2017-07-26 10:44:07 +01:00
w0rp
cd860e3e8d #517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters 2017-07-26 10:37:37 +01:00
w0rp
e45c16d9bb Fix #796 - Ignore errors for closing the last window 2017-07-24 09:30:41 +01:00
w0rp
b4d23d700b Set the g:ale_completion_enabled option when completion is enabled or disabled 2017-07-24 09:22:29 +01:00
w0rp
a0059cfe03 Fix #795 - Handle GCC errors without column numbers 2017-07-23 00:39:59 +01:00
w0rp
12217480f9 Merge pull request #781 from sumnerevans/standard-fixer
Added fixer for Standard linter
2017-07-22 19:33:42 +01:00
Sumner Evans
f3fec6685e
added tests for Standard.js 2017-07-21 11:47:41 -06:00
w0rp
ee6dabcc4e Don't mess with compleopt for each completion, as it doesn't work 2017-07-21 14:55:32 +01:00
w0rp
a5f754a5e0 Fix #786 - Only set --no-local-style for yapf if a configuration file is detected 2017-07-20 11:07:07 +01:00
Sumner Evans
ca83f11bee
added fixer for Standard 2017-07-19 14:50:33 -06:00
w0rp
0931e99ea4 Fix #775 - Run eslint.js via node on Windows for eslint --fix 2017-07-18 12:28:20 +01:00
w0rp
a6cc492a99 Limit the suggestions only after filtering them 2017-07-17 17:39:11 +01:00
w0rp
27feab7e3a Filter the completion results by the prefix we used 2017-07-17 15:31:32 +01:00
w0rp
4fa66ab627 Fix #560 #763 - Silence errors for setting signs, and do nothing for dirvish 2017-07-16 01:15:07 +01:00
w0rp
cad9fc19c6 Fix #773 - Do not clear the loclist when closing the loclist window 2017-07-15 18:44:45 +01:00
w0rp
4c6c5bf84f #697 - Remove highlights more thoroughly 2017-07-13 23:27:02 +01:00
w0rp
f7f6f6541d Make tsserver completion more reliable, but not quite ready for documentation yet 2017-07-13 11:59:33 +01:00
Eddie Lebow
bc32e24203 Add rails_best_practices handler (resolves #655) (#751)
* Move FindRailsRoot() to more general location

* Add rails_best_practices handler (resolves #655)

* Update documentation for rails_best_practices

Also add brakeman to *ale* documentation.

* rails_best_practices: allow overriding the executable

* rails_best_practices: format help correctly

* rails_best_practices: capture tool output on Windows
2017-07-12 10:43:47 +01:00
Matteo Centenaro
ff80b23ee1 Fix docs for FindProjectRoot function 2017-07-12 10:00:42 +02:00
w0rp
340c0bbac5 #756 Escape the paths used for the --include parameter for gometalinter, which uses RE2 2017-07-11 23:47:21 +01:00
Matteo Centenaro
505d114a68 Look for ini file to spot python project root (#755)
* Look for ini file to spot project root

When looking for the project root folder it would be better
to check for some well-known init file instead of __init__.py.
Indeed, with python3 it is now possible to have namespace modules
where intermediate dirs are not required to include the __init__.py file.

* Break if statement conditions over several lines

* Add blank lines for the if block

* Add test for FindProjectRoot

* Typo: missing / for MANIFEST.in

* Fix test for non-namespace package

* Add more test cases
2017-07-11 21:57:37 +01:00
Eddie Lebow
78e0029488 Fix comment typo 2017-07-11 01:30:28 -04:00
Michael Pardo
d787050fa8 Kotlin and general Gradle support. (#745) 2017-07-10 23:03:36 +01:00
w0rp
751d965265 Fix #749 - Use /bin/sh when the shell is fish 2017-07-10 21:35:35 +01:00
w0rp
b44f6053d1 Fix #730 - Lint files on save even when nothing was fixed 2017-07-10 13:40:22 +01:00
w0rp
82dd80c692 Fix #746 - Keep highlights from other plugins when buffers are hidden 2017-07-10 00:02:49 +01:00
w0rp
6a84605c57 Make every test set filenames and switch directories in the same way, and fix some missing escaping for the rubocop linter 2017-07-09 22:43:31 +01:00
w0rp
836a2cfe3b Fix issues with running individual tests, and get the Vim tests to run on certain machines again 2017-07-09 14:58:21 +01:00
Jacob Zimmerman
a70591fa76
Correctly resolve temp files on macOS
On macOS, the `$TMPDIR` is in `/var`. However, `/var -> /private/var`.
This means that fully resolved temp filenames weren't always getting
checked against the proper prefix.

This was affecting some of the Haskell plugins, though I'm sure it could
have affected any program that resolved past the generated `$TMPDIR/foo`
and wound up at a different filename.
2017-07-09 02:16:46 -05:00
w0rp
ab47011ef2 Support setting settings with g:ale_pattern_options 2017-07-09 00:10:28 +01:00
w0rp
8eb4f95766 #697 - Clear all highlights every time items are set again, and refactor most things. Clear errors when linters are removed 2017-07-07 23:47:41 +01:00
daa84
46225f3bb1 Fix windows path check on rust linter (#736)
* Fix rust linter on windows

* Add windows path test

* Use ale#path#IsBufferPath to compare paths

* Fix errors
2017-07-07 17:03:17 +01:00
w0rp
d9a7364dae #710 - Fix a parsing bug caused by the last fix 2017-07-07 10:59:00 +01:00
w0rp
7ce960ae51 Fix #735 - Support old versions of Flow by only adding --respect-pragma for supported versions 2017-07-07 10:47:09 +01:00
w0rp
130928590b #710 - Show warnings as warnings for ghc 2017-07-07 00:28:22 +01:00
w0rp
854066e849 #732 - Use the configuration files when fixing files with rubocop 2017-07-06 22:58:14 +01:00
w0rp
b43413916d Initialize rubocop variables in one place 2017-07-06 22:47:07 +01:00
w0rp
5859050d29 Fix some bad indentation 2017-07-06 10:51:05 +01:00
Gregory Einfrank
af02fb5183 Add ale_fix_on_save and ale_fixers to debug output (#731)
* Add ale_fix_on_save and ale_fixers to debug output

* Fix test by adding new ale-fix vars
2017-07-06 09:27:09 +01:00
w0rp
871ce1c8f5 Correct a comment 2017-07-05 15:52:39 +01:00
w0rp
1bd9b0fbe2 #729 - Use a wrapper for simplify to fix // problems on Windows 2017-07-05 15:51:31 +01:00
w0rp
a04e73ddbc #729 - Support running Python programs from virtualenv for Windows 2017-07-05 13:07:55 +01:00
w0rp
1b8450e7a0 #729 Fix // in virtualenv paths 2017-07-05 12:56:08 +01:00
w0rp
160b9548ee Add a function for fixing the alignment of Vim help tags 2017-07-03 16:51:34 +01:00
w0rp
fd6f05c9ea Report exceptions thrown for stylelint 2017-07-03 16:13:10 +01:00
w0rp
51f256e897 Remove the need for pointless callbacks for LSP linters 2017-07-02 13:25:36 +01:00
w0rp
857ca941d2 Support an 'stdio' type for linter defintions, and require a command for LSP connections via programs 2017-07-02 13:17:24 +01:00
w0rp
b731bd77ab Get automatic completion with tsserver to work 2017-07-02 10:58:18 +01:00
w0rp
5b731f761f Refactor LSP jobs to use a uniform ID value 2017-07-02 10:58:18 +01:00
w0rp
9f21e45156 Add some experimental completion code for tsserver 2017-07-02 10:58:18 +01:00
w0rp
518f99b480 Fix #706 - Skip fixers with jobs that return empty output, in case they have failed 2017-06-29 12:00:32 +01:00
Adam Stankiewicz
7eec1f2efc Add prettier-standard support (#702)
* Add prettier-standard support

* Update ale-javascript.txt

Remove a duplicated header line.
2017-06-28 16:35:19 +01:00
w0rp
8846a8860f Use a new window for the ALEFixSuggest command, and document it better 2017-06-28 16:20:05 +01:00
Alexander "Ace" Olofsson
f883d4d4fd Add puppet-lint fixer (#701)
* Add puppet-lint fixer

* Add vader test for puppetlint fixer

* Ensure puppetlint variables are initialized
2017-06-28 15:27:02 +01:00
w0rp
16ba9bd680 Fix #680 - Use --shadow-file to check for problems with mypy while you type 2017-06-27 10:06:03 +01:00
w0rp
3828ea5b26 Detect .git directories for finding the project root for C projects 2017-06-25 21:33:15 +01:00
w0rp
8b557f346c Move ale#handlers#c functions into ale#c 2017-06-25 20:34:23 +01:00
Lynn Dylan Hurley
7f6e5dc65b Add ruby fixer using rubocop --auto-correct (#689)
* add ruby fixer for `rubocop --auto-correct`
2017-06-25 20:04:14 +01:00
w0rp
93473a4101 Fix #690 - Filter out errors from other files for Haskell 2017-06-25 17:08:57 +01:00
w0rp
492260c967 Fix the tests harder 2017-06-25 16:20:55 +01:00
w0rp
c2138a2656 Fix the tests for the fix on save feature 2017-06-25 16:14:04 +01:00
w0rp
ec3ddce4ac #665 - Replace the nomodified line with :w! 2017-06-25 15:59:38 +01:00
w0rp
2c6b571e66 Fix #665 - Stop prompts appearing when fixing files on save 2017-06-25 15:57:36 +01:00
w0rp
4eaa990fe8 Fix #684 - Use the JSON format for tslint, for consistency betwen versions, and handling of end line and column numbers 2017-06-25 13:56:51 +01:00
Gagbo
e98560a349 Added builddir option to clang-tidy to point to json folder (#688)
Detect compille_commands.json files for clang-tidy
2017-06-24 12:38:16 +01:00
w0rp
026c4f304e #681 Show extra kotlin errors at line 1 2017-06-24 12:35:01 +01:00
w0rp
1ea61162a0 Fix #687 - Check files on enter if they have changed 2017-06-24 12:24:31 +01:00
w0rp
fbf8ccb882 Fix #677 - Ignore errors from other files for cppcheck 2017-06-22 14:08:58 +01:00
w0rp
ce2bfa88eb Fix #676 - Fix handling of Perl errors 2017-06-22 12:37:08 +01:00
w0rp
dab6f39eb0 Fix some escaping and make some tests set filenames consistently 2017-06-21 22:33:34 +01:00
w0rp
50d952b07d Print messages about imports used when modules are turned off 2017-06-20 17:38:21 +01:00
w0rp
a105aa90a5 Fix #668 - Support eslint for TypeScript 2017-06-20 10:50:38 +01:00
w0rp
b96f5845ed Fix #667 - Do not add extra blank lines for add_blank_lines_for_python_control_statements 2017-06-20 09:39:58 +01:00
w0rp
8ab103504f Fix #658 - Clear highlights for all problem types 2017-06-18 18:20:05 +01:00
w0rp
7e79018b8c Fix #661 - Fix line highlights for style errors and warnings 2017-06-18 11:34:06 +01:00
w0rp
629ff513ec #659 - Add options for Python fixers, and cut down on duplicated documentation 2017-06-18 11:03:31 +01:00
David Alexander
fb682be199 Fix for Crystal support (#651)
* Strip color from Crystal compiler output

* Don't lint files if the file doesn't exist

* Lint files if they are readable
2017-06-15 09:30:34 +01:00
w0rp
f814be45b1 Fix #536 - Implement linter problem type re-mapping 2017-06-14 17:59:13 +01:00
w0rp
e455d8219e Fix #649 - Support tsserver linting for NeoVim 2017-06-14 17:08:39 +01:00
w0rp
25e4d1a353 #649 Output the tsserver command in ALEInfo 2017-06-14 16:53:21 +01:00
w0rp
f6b0a28cba Split up the flake8 and ansible-lint handlers 2017-06-14 16:20:30 +01:00
w0rp
3442e58c8b Simplify the code for escaping strings for Windows 2017-06-14 11:05:49 +01:00
w0rp
f472e04b09 #538 - Set some end column indexes for flake8 2017-06-14 10:51:31 +01:00
w0rp
ebbfb64221 Merge branch 'tsserver' 2017-06-13 17:54:07 +01:00
w0rp
aef58f598c Handle LSP responses for different files more consistently 2017-06-13 17:53:47 +01:00
w0rp
86c17e1834 Include package.json in eslint configuration files 2017-06-13 09:35:52 +01:00
w0rp
5146332206 Add tsserver support 2017-06-09 09:47:19 +01:00
w0rp
62862c3347 Experimental code for showing results as soon as each linter completes 2017-06-08 17:30:21 +01:00
w0rp
04190cbcfe #517 Support linter settings needed for LSP, undocumented for now 2017-06-08 13:52:29 +01:00
w0rp
e93dba351c Fix #635 - Cancel previous jobs for fixing files when fixing files again 2017-06-08 09:24:15 +01:00
w0rp
817b6bbd2d Put ve-py3 before ve, so Python 3 executables will be preferred 2017-06-07 21:45:59 +01:00
José Luis Lafuente
1eec446620 Search python fixers in virtual environment (#632)
* Search python fixers in virtual environment

* Add tests for python fixers
2017-06-07 20:42:30 +01:00
w0rp
f61c6d4c0e Add support for generating essential tsserver messages 2017-06-07 17:05:34 +01:00
José Luis Lafuente
2ac670f293
Fix function name 2017-06-07 17:31:05 +02:00
w0rp
25e1aa43b8 Fix #631 - Fix some bad function names 2017-06-07 16:02:05 +01:00
w0rp
9ee7a6d57c Fix #630 - Initialize Prettier options 2017-06-07 15:33:41 +01:00
w0rp
7517fd8226 Move all functions for fixing things to autoload/ale/fixers, and only accept the lines of input where needed. 2017-06-07 14:02:29 +01:00
w0rp
8f9828e5bf Merge pull request #628 from mziab/fix-stylelint-handler
Fixed stylelint not catching all errors.
2017-06-07 09:28:00 +01:00
w0rp
11e38efa83 Fix a bug which breaks the tests 2017-06-07 09:26:54 +01:00
w0rp
f30652a98f Allow ALEFix functions to be defined with only the buffer argument 2017-06-06 23:13:53 +01:00
w0rp
e4d886d4a7 Add a function for computing the number of arguments for a function 2017-06-06 22:27:20 +01:00
Michał Ziąbkowski
e4708c356b Fixed stylelint not catching all errors.
The original regex failed to account for short lines being padded
to the length of the longest error.
2017-06-06 21:08:30 +02:00
w0rp
7db805b0cd #482 - Fix Flow handling with relative paths 2017-06-06 20:08:19 +01:00
w0rp
9dadde190e Fix #461 - Allow multiple loclist windows to be opened, and replace some split windows 2017-06-06 17:31:13 +01:00
w0rp
3c5156d4a4 Simplify job cleanup code 2017-06-06 16:44:01 +01:00
w0rp
a0e0408ecc Complain about incorrect uses of expand('%...') 2017-06-06 10:22:52 +01:00
w0rp
dcbab18a35 Stop errors being generated when jobs are removed from the Dictionary before callbacks fire 2017-06-05 13:30:40 +01:00
Drew Neil
33b0852c84 Add :ALEFirst and :ALELast commands (#616)
* Add :ALEFirst and :ALELast commands

* Add documentation for ALEFirst and ALELast commands

* Add tests for ale#loclist_jumping#JumpToIndex()

* Fix the loclist jumping tests
2017-06-03 12:45:52 +01:00
w0rp
7c68889bbc #574 Do not restore items with no columns for highlights from hidden buffers 2017-06-02 19:02:54 +01:00
w0rp
d5ae9b50ea Fix #499 Set an explicit height for the quickfix list, and make the height configurable 2017-06-01 10:39:21 +01:00
cs86661
81f27a99c8 Set qflist/loclist window title properly ... (#588)
* Update list.vim

Set qflist/loclist window title properly ...

* Update list.vim

1. Remove redundant code.
2. Get absolute path from 'a:buffer'.

* Set the list window titles appropriately for each version of Vim, and add tests
2017-05-31 22:55:23 +01:00
w0rp
735a6a2a88 Fix #537 - Add support for balloons 2017-05-31 22:04:33 +01:00
w0rp
5e4c302b5b Fix #557 - Detect C project roots and include root directories with headers, or include directories 2017-05-31 20:01:47 +01:00
Jon Gjengset
88948e0ee3 Include span label in rust lints (#601)
* Include span label in rust lints

This turns relatively unhelpful error messages like

    mismatched types

into more expressive messages along the lines of

    mismatched types: expected bool, found integral variable

Fixes #597.

* Exclude rust lint span label if empty

* Use single-quoted strings in vimscript

* Add test for detailed rust errors

* Prune Cargo JSON

* Use matching error file name

* Byte offsets not char offsets
2017-05-31 18:16:49 +01:00
w0rp
42efd51723 Fix #596 - Report exceptions thrown by flake8 2017-05-31 15:20:12 +01:00
Jon Gjengset
5eb80f03a2 Include location list end column for rust lint (#602)
* Include location list end column for rust lint

Fixes #599.

* Include rust lint end_lnum for good measure

* Reverse engineer end_* for rust lint tests
2017-05-31 13:17:04 +01:00
w0rp
ab50b3a88a Fix #604 - Support highlights spanning many lines 2017-05-31 13:14:39 +01:00
w0rp
676a4049b3 #604 Add a function for creating positions needed for supporting highlights across many lines 2017-05-31 11:20:57 +01:00
w0rp
fd49f7df90 #604 Change match_id to match_id_list, for future highlights spanning more than 8 lines 2017-05-31 10:27:35 +01:00
Shunsuke Watanabe
5d32366616 make prettier options enabled 2017-05-31 11:48:20 +09:00
w0rp
b9f4b0373a #591 Store buffer variables when fixing filess, and read them back in ale#Var 2017-05-30 22:15:24 +01:00
w0rp
6ec965c8e4 #591 Support fixing files on save 2017-05-30 21:32:51 +01:00
Daniele Sluijters
bfad5c9dc4 go: Remove staticcheck and go build defaults
Fixes #594
2017-05-30 14:48:23 +02:00
w0rp
7a89d0c97e Refactor ALEFix code for work on events and tests to come 2017-05-30 11:06:02 +01:00