Commit Graph

297 Commits

Author SHA1 Message Date
w0rp
e6b132c915 Fix an off-by-one bug in ALEFix 2017-05-20 19:02:36 +01:00
w0rp
4214832ae2 Remove the code for checking if functions exist. It breaks autoload functions 2017-05-20 19:02:36 +01:00
w0rp
1f4d1800e0 Allow function aliases to be registered for fixing problems, and add some more argument checking for fixing problems 2017-05-20 19:02:36 +01:00
w0rp
ea1627f5ce Start experimenting with generic functions for fixing problems 2017-05-20 19:02:36 +01:00
w0rp
0b743389e5 Send modified lines to jobs, not the file contents 2017-05-20 19:02:36 +01:00
w0rp
05bab00c3c Allow strings to be used for selecting a single fix function for g:ale_fixers too 2017-05-20 19:02:36 +01:00
w0rp
8ebd15a54d Add commands to run ALEFix, and some tests to cover functionality so far. Add a simple autopep8 function. 2017-05-20 19:02:36 +01:00
w0rp
7d8390d43e Add experimental code for fixing errors 2017-05-20 19:02:36 +01:00
w0rp
65fbf1cdff #563 Use a configurable list of directories for detecting virtualenv paths instead. 2017-05-20 13:34:53 +01:00
w0rp
d012fd1f09 Revert "Fix #556 Remove duplicate error messages from clang++"
This reverts commit 164c4efb32.
2017-05-20 12:57:41 +01:00
w0rp
0646b2861f Revert "#562 Join split JSON lines together for new Rust output"
This reverts commit 5790df1272.
2017-05-20 12:57:21 +01:00
w0rp
0f0d1709c5 #567 Try and fix NeoVim split line handling 2017-05-20 12:50:19 +01:00
w0rp
3ca70cb841 Add a check to make tests fail less 2017-05-18 09:27:18 +01:00
w0rp
f7fc54262d Refactor special command parsing into its own file 2017-05-17 11:17:49 +01:00
w0rp
164c4efb32 Fix #556 Remove duplicate error messages from clang++ 2017-05-17 10:10:25 +01:00
w0rp
5790df1272 #562 Join split JSON lines together for new Rust output 2017-05-17 09:43:28 +01:00
w0rp
372a4dfd7e Merge pull request #546 from dawikur/master
Add cpplint linter
2017-05-17 09:12:36 +01:00
w0rp
e2860f8a26 #538 Fix an off-by-one bug with end columns 2017-05-16 19:46:19 +01:00
w0rp
1b53fa841b Fix some problems with LSP functions 2017-05-16 19:38:05 +01:00
w0rp
a65358cfce #538 Suport highlight sizes by looking at end column numbers 2017-05-16 18:12:49 +01:00
Dawid Kurek
9185a0d2e5 Add cpplint linter 2017-05-16 19:09:59 +02:00
w0rp
4c5e97dd1c Fix #555 - Handle csslint errors without groups 2017-05-15 21:21:09 +01:00
w0rp
fa3a4b3ba2 Complain when shellescape is used instead of ale#Escape 2017-05-15 20:21:28 +01:00
w0rp
d4466d4be7 Add some functions for sending LSP commands to a process, and automatically starting that process 2017-05-13 00:12:12 +01:00
w0rp
204e3ca36b Automatically remove jobs from the internal map after they are done 2017-05-12 23:56:58 +01:00
w0rp
5a947933d7 Refactor jobs into a Vim version agnostic API which can be used for other purposes 2017-05-12 21:16:15 +01:00
w0rp
2bafdb7e5a Run all tests in NeoVim, improve the test script, and make all tests pass for NeoVim 2017-05-12 20:38:52 +01:00
w0rp
07b2542c0d #549 Temporarily revert shell escaping changes, just for Windows 2017-05-12 09:20:16 +01:00
w0rp
6ea00af689 #540 Fix shell escaping pretty much everywhere 2017-05-08 22:59:25 +01:00
w0rp
28c6ec9cad #517 - Implement LSP chunked message parsing, sending messages to sockets, and callbacks 2017-05-08 22:18:28 +01:00
w0rp
cd79ced839 #517 Implement some LSP message handling 2017-05-07 23:54:14 +01:00
w0rp
32f21751f4 Do not copy the items for setting highlights, as we do need to modify the items in ale_buffer_info 2017-05-07 19:33:59 +01:00
w0rp
ca120088c7 Fix #539 - Just set our highlights again when buffers are shown after being hidden 2017-05-07 19:30:19 +01:00
w0rp
2e1c9b0fa5 #208 Automatically detect pylint in virtualenv directories 2017-05-06 19:11:43 +01:00
w0rp
bf8aae02e8 Fix #534 - Stop other higlights being restored when buffers are hidden and shown again 2017-05-06 16:20:39 +01:00
w0rp
ab9afaa2bf Add a has() wrapper we can override for tests, and add a function for generating paths up to the root directory to search through 2017-05-05 23:03:19 +01:00
w0rp
14f3fc777f #427 Implement b:ale_warn_about_trailing_whitespace 2017-05-04 23:50:11 +01:00
w0rp
0aed51565e Fix #528 remove and restore highlights when buffers are hidden and shown 2017-05-03 23:28:57 +01:00
w0rp
a6cadaabef Fix #356 Don't complain about #pragma once in C++ headers 2017-04-30 00:31:52 +01:00
w0rp
2c7d14809d Set GCC flags appropriately for older versions 2017-04-29 20:00:42 +01:00
w0rp
6fc3954bd3 Cover the new path functions with some tests 2017-04-29 18:03:08 +01:00
w0rp
0b4acd6453 Fix #518 Fix handling of spaces in filenames for various linters 2017-04-29 17:33:18 +01:00
w0rp
cbb01e32b9 Cache executable calls to make things slightly faster 2017-04-29 11:58:50 +01:00
w0rp
447917e348 #427 Output buffer variables when buffer numbers are strings 2017-04-27 00:15:16 +01:00
w0rp
6853d2c304 #427 - Output buffer-local variables with :ALEInfo 2017-04-27 00:07:41 +01:00
w0rp
b25dbd6ea5 Fix #506 - Don't set signs for buffers which don't exist 2017-04-26 23:32:20 +01:00
w0rp
5d5ba2a780 #427 Allow linters and aliases to be configured in buffer local variables 2017-04-25 23:52:13 +01:00
w0rp
fe51866dfc Credit the original author of the Ruby handler 2017-04-25 20:50:56 +01:00
Matthias Günther
c55064881d Add erb linter (#497)
* Add eruby linter

* Update README with erb linter

* Fix example and contributions

* Remove trailing newline

* Fix for Vimscript style guide

* Eruby-linter: codereview with @w0rp
- read from stderro output_stream

* Eruby-linter: codereview => add handler for ruby

* Eruby-linter: codereview
- eruby and ruby lint use the same ruby-handler (removes
  duplicated handling logic)

* Eruby-linter: try to fix tests
2017-04-25 18:38:02 +01:00
w0rp
a25b55b954 Fix #469 - Remove Unicode quotes from GCC errors, which cause issues 2017-04-24 23:00:43 +01:00
w0rp
a03121f5b0 Break shared handlers up into their own files, and fix stylelint error handling 2017-04-24 22:27:18 +01:00
w0rp
b4c0335ebc Handle Unix errors with no space after the colon 2017-04-24 21:38:12 +01:00
w0rp
99afe586b3 Simplify some code and format some tests better 2017-04-24 21:11:33 +01:00
Jason Tibbitts
c1a2d26711 Disable rpmlint by default (#492)
* Disable rpmlint by default as it is not safe.
2017-04-20 16:55:20 +01:00
w0rp
d8dcc56af5 Remove error highlights when buffers are cleaned up 2017-04-19 22:55:06 +01:00
w0rp
bdad25eefd Add a function for getting matches, and use it to simplify a lot of code 2017-04-18 00:35:53 +01:00
w0rp
e237add9fd Move path functions to their own file 2017-04-17 23:29:02 +01:00
w0rp
e80116cee0 #427 Add a function for looking up ALE variables in buffer scope, and then global scope 2017-04-16 00:16:48 +01:00
w0rp
35c831dd2c Merge pull request #471 from breed808/gometalinter
Add gometalinter linter for go files
2017-04-15 21:09:23 +01:00
w0rp
f0d76bc298 Use g:ale_linters for turning gometalinter on, and update documentation as appropriate 2017-04-15 21:04:43 +01:00
w0rp
c9a5d9845b Explain some code better 2017-04-15 12:13:31 +01:00
w0rp
e2287a42bc Merge pull request #463 from valtermro/multi-ft-aliases
Add support for multiple filetypes in filetype aliasing
2017-04-13 00:02:18 +01:00
valtermro
475dd2e76a Add support for multiple filetypes in filetype aliasing 2017-04-12 19:47:34 -03:00
w0rp
65fe914fb8 #392 Handle clang header errors too 2017-04-11 21:05:41 +01:00
w0rp
b06b832447 #392 Report errors inside of headers, in a very basic way 2017-04-11 20:32:57 +01:00
w0rp
85d86620f7 Cover basic GCC functionality with tests 2017-04-03 22:24:30 +01:00
w0rp
5f02595ea4 #380 Add some experimental code for killing long-running processes in NeoVim 2017-04-03 19:50:57 +01:00
w0rp
9691649b65 #446 Do not run ALE if inside of a command window 2017-04-03 19:21:11 +01:00
w0rp
7c736579b7 Fix #438 Create Java .class files for javac in a temporary directory 2017-03-31 20:14:53 +01:00
Steven Lu
ef5b900657 adds line highlights style (#436)
* adds line highlights style

* adding doc for the new highlight styles.

* missing space
2017-03-31 19:22:25 +01:00
Lucas Kolstad
b3f6f56745 Fix #272 by checking if quickfix is open before reopening to avoid triggering a BufEnter event that causes quickly repeating linting runs when g:ale_lint_on_enter = 1.
Add test assertions that quickfix window closes when lists become empty again.
2017-03-24 10:39:37 -07:00
w0rp
18bae7da2e #333 Finish implementing the lint_file option 2017-03-21 14:52:02 +00:00
w0rp
3e13e10e03 #333 Change arguments for ale#Queue so they are more obvious, and check files in more places 2017-03-21 13:38:27 +00:00
w0rp
2d1d6fb850 Add some utility functions for changing directories for commands 2017-03-21 13:09:02 +00:00
w0rp
e7d32fe376 #333 Pass in a flag indicating that linters should be run against files, and clear more jobs 2017-03-14 23:51:57 +00:00
w0rp
790c614b7a #333 Update line numbers for loclist items when current sign_id values are set 2017-03-14 23:04:25 +00:00
w0rp
d19a35485f #333 Keep any loclist items which have match_id values set on them 2017-03-14 20:26:44 +00:00
w0rp
6f0fc965ab #394 Attempt to fix running linters when bufwinid() doesn't exist 2017-03-13 23:45:32 +00:00
w0rp
711ab99362 #333 Remember the IDs for highlights 2017-03-12 22:46:33 +00:00
w0rp
382e569f66 Revert "Don't save the sign ID on loclist items. This approach won't work."
This reverts commit f25a543260.
2017-03-12 22:34:32 +00:00
w0rp
f25a543260 Don't save the sign ID on loclist items. This approach won't work. 2017-03-12 21:48:40 +00:00
w0rp
4bf6784d7d #333 Save sign IDs back on loclist items, and make it possible to get line numbers again 2017-03-11 20:33:29 +00:00
w0rp
fc072a0772 Get milliseconds timestamps without system() calls for tests 2017-03-09 20:22:02 +00:00
w0rp
ad49846a48 #376 Use the window ID for a given buffer for setting the loclist 2017-03-09 00:43:53 +00:00
w0rp
1c3f0b1e19 #333 Add the List needed for the lint_file option, and option itself. Neither do anything meaningful yet 2017-03-08 00:23:14 +00:00
w0rp
21caf54543 Make the navigation commands only work with ALE's pre-sorted list 2017-03-07 23:31:25 +00:00
w0rp
76df2d393b Fix detailed messages with newline characters 2017-03-04 23:55:12 +00:00
w0rp
fb8df75ac3 Remove a now redundant line 2017-03-04 01:22:44 +00:00
w0rp
2750c605c1 Fix cursor issues, and clean up the cursor tests 2017-03-03 20:14:03 +00:00
Jasper Woudenberg
edc5dee226 Merge remote-tracking branch 'upstream/master' 2017-03-02 19:04:28 -08:00
Jasper Woudenberg
f5ddc51d85 Address some feedback 2017-03-02 18:40:07 -08:00
w0rp
0e50a7d278 Fix #373 - echo the cursor message after lint cycles or when leaving Insert mode 2017-03-02 23:36:31 +00:00
Manuel Unno Vio
79f18e7d87 Update sign regex for LANG = it_IT.UTF-8
I've noticed that signs weren't unplaced and, learning that this was an issue depending on locale and :sign place, I've fixed the regular expression used to match those messages in my locale (it_IT.UTF-8).
2017-03-02 12:17:43 +01:00
Jasper Woudenberg
70711022db Add support for error details
Some review needed.
2017-03-01 23:27:48 -08:00
Daniel M. Capella
18508f7453 proselint: Add more supported filetypes (#367)
* proselint: Add more suported filetypes

* proselint: Minor consistency fixes

* Vim help: Disable linters by default
2017-03-02 00:06:09 +00:00
w0rp
b2fe1b2567 Copy all loclist items returned from handlers, and set up defaults for convenience 2017-02-26 14:51:22 +00:00
w0rp
6a02c5812c Fix #314 - quickfix should take precedence over loclist for jumping 2017-02-21 12:51:49 +00:00
w0rp
c310080359 #314 filter both lists, and add tests to cover the list retrieval 2017-02-21 12:46:07 +00:00
w0rp
884109c6f4 Add an extra custom check for using endif instead of end, etc. 2017-02-21 11:50:59 +00:00
w0rp
8eca101fd1 Merge pull request #348 from rob-b/add-hdevtools-linter
Add hdevtools linter for haskell
2017-02-21 11:09:15 +00:00
Rob Berry
06fe8a043f Add hdevtools linter for haskell
This adds support for the hdevtools haskell linter
https://github.com/hdevtools/hdevtools

The output for hdevtools is near identical to the ghc output so this
also extracts the ghc handler into the handle file and adds tests

* Add testing for previous major release of ghc
2017-02-17 17:18:38 +00:00
w0rp
b21ca4ed4e Use a more reliable method for getting an ID for a job 2017-02-17 10:19:44 +00:00
w0rp
bdbf36991d Prevent some stupid exceptions 2017-02-17 09:56:36 +00:00
w0rp
eac0a41ae1 #254 Add an option for logging the output of commands 2017-02-16 23:18:57 +00:00
w0rp
843370b96f #254 Capture command exit codes in the history 2017-02-16 22:19:53 +00:00
w0rp
ca17b5aebd Add an option for completely disabling command history, and add documentation 2017-02-16 21:33:44 +00:00
w0rp
3a2286a1b8 Refactor history management functions into their own file 2017-02-16 21:18:03 +00:00
Rob Berry
c4afd72792 Add hdevtools linter for haskell
This adds support for the hdevtools haskell linter
https://github.com/hdevtools/hdevtools

The output for hdevtools is near identical to the ghc output so this
also extracts the ghc handler into the handle file and adds tests
2017-02-16 10:06:48 +00:00
w0rp
9e7034c6e2 Fix #319 - Enable only cargo for Rust by default 2017-02-15 22:59:33 +00:00
w0rp
0131526261 #254 Add a command for copying ALEInfo to your clipboard quickly 2017-02-14 23:45:22 +00:00
w0rp
ed370667c8 #254 Add command history to ALEInfo 2017-02-14 23:44:37 +00:00
w0rp
c460602cbb #338 Try and stop ALE from throwing ALEs when run from a sandbox 2017-02-14 21:02:49 +00:00
w0rp
f39e88cfa8 #274 - Fix airline integration when ALE is not loaded fully 2017-02-13 23:31:29 +00:00
w0rp
c0814934af Output ALE global variables for :ALEInfo 2017-02-13 23:15:52 +00:00
w0rp
0589022c76 Include most linter variables in ALEInfo 2017-02-13 22:11:35 +00:00
w0rp
f6bc73b749 Fix a style issue 2017-02-13 12:52:44 +00:00
w0rp
a5ec5366c4 Actually catch all Job ID problems 2017-02-13 12:13:54 +00:00
ninjawithaneedle
a2f59049dc Highlighting should not filter linter messages without column info 2017-02-13 16:30:32 +05:30
w0rp
5cdd1498b4 #283 Fix linting buffers with no filename, by creating a filename with a guess for the file extension 2017-02-13 10:36:38 +00:00
w0rp
3aa1d57b57 Fix #171 - Implement basic error highlighting 2017-02-13 00:24:25 +00:00
w0rp
4a71638061 Feed files to commands via stdin by first writing the file to a temporary file, and then piping them in via the shell instead 2017-02-11 22:43:13 +00:00
w0rp
2078255ec3 Fix filename substitution, especially on Windows 2017-02-11 20:34:14 +00:00
w0rp
ecbb276805 Replace every stdin-wrapper script with the new %t formatting support 2017-02-11 19:40:57 +00:00
w0rp
c33602534e Fix Pug linting 2017-02-11 18:49:12 +00:00
w0rp
beeef28b1a Use writefile() for temporary files, which works better 2017-02-11 18:19:01 +00:00
w0rp
03ab963d1a Add support for temporary filename substitution, for replacing stdin_wrapper 2017-02-11 18:14:18 +00:00
w0rp
88192e8662 Add support for managing temporary files/directories 2017-02-11 15:16:08 +00:00
w0rp
4737e09bcf Try and fix Travis builds again 2017-02-11 00:20:16 +00:00
w0rp
14c38cdb63 Fix #116 - Send SIGKILL to processes if they don't respond to SIGTERM 2017-02-11 00:08:05 +00:00
w0rp
926cd1a953 Fix #283 Add an option for using ch_sendraw(), which can be better for some users 2017-02-10 19:34:44 +00:00
w0rp
5de445c041 Fix #315 Implement the read_buffer option 2017-02-09 23:32:57 +00:00
w0rp
9f8c76b5b9 Make ALE complain when conflicting command options are used 2017-02-09 20:44:13 +00:00
Daniel Lupu
6dfed8576e add ALEToggle command (#303)
* add ALEToggle command

* stop active jobs when toggled off

* small logic cleanup & ensure ale can be ran manually while toggled off
2017-02-09 18:47:14 +00:00
w0rp
bf2075cd0c Revert "Add a Batch stdin wrapper script"
This reverts commit 76a03b0709.
2017-02-09 00:28:32 +00:00
w0rp
325fcc25dd #314 Use the quickfix list for jumping between errors if that is set instead of the loclist 2017-02-08 22:14:07 +00:00
w0rp
eb37d9c1fc #39 Don't send the Vim buffer to commands before the last in a chain 2017-02-08 09:37:22 +00:00
w0rp
c3ebe7bd9e Cover the Rust handler with some tests 2017-02-07 21:17:10 +00:00
w0rp
a3b7056cad #289 Only use the --stdin-display-name flag if the flake8 version supports it 2017-02-06 11:12:27 +00:00
w0rp
829f87bc6a Fix #124 Finish implementing command chaining, and make it work for DMD 2017-02-04 18:30:30 +00:00
w0rp
97131262ab Add a default alias for the Dockerfile filetype, which is capitalised for some users. 2017-02-02 22:26:46 +00:00
DiscoViking
a9c650cd05 Add ALEInfo command to get list of available/enabled linters (#273)
* Add ALEInfo command to get list of available/enabled linters for current filetype

* Add Vader tests for ALEInfo command

* Fix ALEInfo tests breaking CI by echoing too much output to screen

* Speculative change to Makefile which seems to fix test hanging problem locally.

* Fix Vader tests to not require a TTY
2017-01-24 15:50:49 +00:00
w0rp
d7ed49f849 Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues. 2017-01-22 14:54:57 +00:00
EinfachToll
23f8e7ddc5 Fix parsing of currently shown signs with Spanish locale (#268)
* Fix parsing of currently shown signs with spanish locale

* Add a test for parsing of Spanish signs
2017-01-22 13:40:23 +00:00
yfery
a23173eeb2 Add option to open loclist/quicklist when there are errors (#266)
* Add option to open loclist/quicklist when there are errors

I copied PR #137, and tries to complete it by correcting some issues and
adding vader tests.

About tests, first time with vader, can you give some feedback if there
are what you expected in PR #137.

* Remove old code + fix indent issue

* add g:ale_keep_list_window_open option

* Correct bug with keep open option

* Add comment into vader file

* Fix errors for Travis CI build
2017-01-22 12:57:05 +00:00
w0rp
9820899b9e Improve mypy handling a little bit more 2017-01-20 17:30:34 +00:00
EinfachToll
831f783493 Join the lines Neovim passes to ale (#263)
* Join the lines Neovim passes to ale

Fixes #256

* Refactor line joining into own function

* Add test for line joining

* Fix the test. Sorry.
2017-01-19 20:01:51 +00:00
diartyz
6c0996eb9c [enhancement] add node_modules support for stylelint & htmlhint (#226)
* Add node_modules support for stylelint

* add node_modules support for htmlhint

* fix stdin

* update doc about stylelint & htmlhint
2016-12-22 11:39:01 +00:00
w0rp
cd6d8f2ab6 Fix #229 Disable text linters by default 2016-12-22 11:32:20 +00:00
w0rp
8cb9b2ba4e Make sign parsing testable, and add tests for it against various languages. 2016-12-16 10:01:28 +00:00
cympfh
8df2444ec4 Fix: sign pattern 2016-12-15 13:57:26 +09:00