Commit Graph

207 Commits

Author SHA1 Message Date
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
Rafał Cieślak
2643f9f119 Flow: Fix case where 1st msg points to different file (#477)
* Flow: Fix case where 1st msg points to different file

* Remove `bufnr` from Flow handler output

* Fix the failing test & add a new one
2017-04-16 11:45:42 +01:00
w0rp
e97dada261 #427 Implement buffer variable overrides for all linter options 2017-04-16 01:24:08 +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
7682fab294 Fix #168 - Make the Fortran linter more configurable 2017-04-15 22:06:56 +01:00
w0rp
d5ccb1a7a1 Merge pull request #474 from jordanandree/add-crystal-lint
Add linter for Crystal lang
2017-04-15 11:34:20 +01:00
Adriaan Zonnenberg
8351bdbc06 Add SQL linter sqlint, closes #395 (#472) 2017-04-15 11:24:05 +01:00
jordanandree
abdfaaf84f add crystal lint
- invokes via `crystal build` command without codegen
- adds vader tests
2017-04-13 21:33:36 -04: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
w0rp
8afd914c6d Merge pull request #467 from adriaanzon/php-fix-double-errors
PHP: Fix double errors and support fatal errors
2017-04-12 23:58:01 +01:00
valtermro
475dd2e76a Add support for multiple filetypes in filetype aliasing 2017-04-12 19:47:34 -03:00
w0rp
ceb910e78c Make some temporary file tests more reliable 2017-04-12 23:17:55 +01:00
Adriaan Zonnenberg
7dbf32d0d7 PHP: Fix double errors and support fatal errors 2017-04-12 23:59:12 +02: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
Brandon Roehl
4e40e8cb60 Add Ruby MRI linter (#453)
* Added ruby mri linter

* Added to the list of supported linters

* Async and now with 4 spaces

* Vader tests for ruby

* Match style choices

* Vader test for the Ruby handler now works and passes
2017-04-08 11:24:20 +01:00
Shalom Yiblet
cc8eb05860 improved the sml linter (#445)
* improved the sml linter

* made matching operator agnostic to user settings

* added tests for sml
2017-04-08 11:23:11 +01:00
Adrian
d28d7f732a Add support for linting Handlebars templates with ember-template-lint (#452)
* Ember-template-lint Handlebars template linter: initial handler, test.

* Handlebars support with ember-template-lint: basic documentation entries.
2017-04-07 15:38:50 +01:00
José Júnior
4caf273d53 Adds options to foodcritic linter (#437)
* Adds options to foodcritic linter

Adds a way to pass command line options to the foodcritic command and
documentation about it.

* Creates a simple test for foodcritic command callback

This test simply runs the GetCommand function for the foodcritic linter
and feeds it with some test variables to assert the command line is
being created/escaped correctly.

* Makes foodcritic linter use a command callback

Following review comments, changes the foodcritic linter to use a
`GetCommand` callback for the `command_callback` linter option.

Makes sure that `~` are escaped: flags on foodcritic command line are
negated by adding a `~` in front of the specific cop name:

```
foodcritic -t ~FC011
```

But the way the commands are executed cause foodcritic to fail (since
tilde is recognized as home directory).

* Fixes the doc to include new variables
2017-04-05 18:21:47 +01:00
w0rp
c7bd5cc0ba Cover handling of swiftlint errors with tests 2017-04-03 23:43:31 +01:00
w0rp
4fc8452838 #447 Support zsh in the shell linter 2017-04-03 22:51:39 +01:00
w0rp
85d86620f7 Cover basic GCC functionality with tests 2017-04-03 22:24:30 +01:00
w0rp
b7c79974bb #446 Fix g:ale_lint_on_text_changed compatibility issues 2017-04-03 19:04:02 +01:00
w0rp
927ee79026 Update the test suite so it uses the latest Docker image, and use Bourne shell for most tests, so weird shell issues are easier to catch. 2017-04-02 22:57:29 +01:00
w0rp
7c736579b7 Fix #438 Create Java .class files for javac in a temporary directory 2017-03-31 20:14:53 +01:00
Adriaan Zonnenberg
4b0f3257dd Remove 'col' from linters where it is hardcoded to 1 (#434)
* Remove 'col' from linters where it is hardcoded to 1

When 'col' is 1, the first column will get highlighted for no reason. It
should be 0 (which is the default).

In the scalac linter there was also a check about the outcome of
`stridx`. It would set l:col to 0 if it was -1, and then it uses
`'col': l:col + 1` to convert the outcome of `stridx` to the actual
column number. This will make 'col' equals 1 when there is no match. We
can remove the check because `-1 + 1 = 0`.

* Remove outdated comments about vcol

vcol was added as a default, and the loclists that follow these comments
do not contain 'vcol' anymore
2017-03-30 23:33:38 +01:00
taylorskalyo
36f9631512 Add options to facilitate linting only in normal mode (#425)
* [#420] Add options to facilitate linting only in normal mode

ale_lint_on_text_changed:
Allow setting to 'insert' or 'normal' to lint when text is changed only in
insert or normal mode respectively.

ale_lint_on_insert_leave:
This flag can be set to 1 to enable linting when leaving insert mode.

* [#420] Test updated global options

Ale should
- bind to TextChanged events when g:ale_lint_on_text_changed = 1
- bind to TextChanged events when g:ale_lint_on_text_changed = 'always'
- bind to InsertLeave event when g:ale_lint_on_insert_leave = 1
2017-03-30 23:21:37 +01:00
w0rp
2a88b60ff1 Fix #260 automatically set .csslintrc files from ancestor directories 2017-03-29 00:56:39 +01:00
w0rp
a4220b99a6 Fix #421 Automatically detect create-react-app paths 2017-03-29 00:21:27 +01:00
w0rp
ab3fd2e849 Fix #130 - Run linters when the filetype is changed 2017-03-27 22:40:25 +01:00
w0rp
c9ee3efc11 Enabling linting on save by default, re #333 2017-03-27 20:36:35 +01:00
w0rp
4abefc189c Cover the rubocop handler with tests 2017-03-27 19:53:12 +01:00
w0rp
a1be697a02 Add a pause for the command chain test 2017-03-27 13:46:48 +01:00
w0rp
5de084557b Merge branch 'add-dogma' 2017-03-27 12:57:00 +01:00
w0rp
82fde0ea51 Use the same formatting as other files for the dogma linter file, and cover the Handler function with tests 2017-03-27 12:56:54 +01:00
w0rp
8ca82af4ab Merge pull request #414 from lucaskolstad/add_asm_linter
Add support for ASM files using GCC
2017-03-27 12:32:42 +01:00
w0rp
5582711680 Fix #413 Stop tests failing randomly due to issues with reading buffers too quickly 2017-03-26 02:13:21 +01:00
Lucas Kolstad
d84d91ff35 Add support for ASM files using GCC 2017-03-25 16:36:17 -07: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
baabelfish
9f3cdf8270 Fix problems with nim check (#404)
* Fix problems with nim check

- Multi file errors are not shown in the same buffer
- Fixes parsing of error type that contain ':'

* Remove redundant fnameescape
2017-03-22 09:11:32 +00:00
w0rp
18bae7da2e #333 Finish implementing the lint_file option 2017-03-21 14:52:02 +00:00
w0rp
c59204b94f Remove a test for experimental functionality which was removed 2017-03-21 13:58:08 +00:00
w0rp
2d1d6fb850 Add some utility functions for changing directories for commands 2017-03-21 13:09:02 +00:00
baabelfish
297bc8553c Add support for nim check 2017-03-18 19:45:37 +02: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
Markus Doits
fae26369d4 add slim-lint (#388)
* add slim-lint

* add slim readme entry

* add slim entry to doc

* add slimlint vader test
2017-03-13 23:21:59 +00:00
w0rp
3f3d8b0014 Merge pull request #393 from naoina/fix-coffeelint-pattern
Fix pattern of output for coffeelint
2017-03-13 23:18:06 +00:00
Naoya Inada
e969d97843
Fix pattern of output for coffeelint 2017-03-13 20:09:49 +09: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
892fff03cc Cover error priority in the sign tests 2017-03-11 17:39:51 +00:00
w0rp
bd07d04670 Cover parsing of Italian signs with tests 2017-03-10 13:21:08 +00:00
w0rp
3b981e22cc Fix sign tests. 2017-03-09 22:45:22 +00:00
w0rp
587360e760 Group sign tests 2017-03-09 22:18:45 +00:00
w0rp
3cababc83b Fix #386 report problems with eslint configuration files 2017-03-09 21:05:00 +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
b3ab89ac15 Make sure to reset linters after running the nix handler test 2017-03-06 23:34:19 +00:00
w0rp
663d8f832f Group handler test cases in a directory 2017-03-06 23:32:48 +00:00
w0rp
75a2dc5ff5 Complain loudly when other conflicting plugins are installed 2017-03-06 23:15:34 +00:00
Alistair Bill
f659d97504 Add nix handler test cases 2017-03-05 20:36:29 +00:00
w0rp
76df2d393b Fix detailed messages with newline characters 2017-03-04 23:55:12 +00:00
w0rp
2750c605c1 Fix cursor issues, and clean up the cursor tests 2017-03-03 20:14:03 +00:00
w0rp
da8a0f25cc Fix the tests again 2017-03-03 19:37:24 +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
969274ccc2 Try and fix issues on Travis 2017-03-03 01:01:24 +00: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
Jasper Woudenberg
70711022db Add support for error details
Some review needed.
2017-03-01 23:27:48 -08:00
Adriaan Zonnenberg
6befe9e37c Fix PHP column matching for unexpected single quotes (#370)
* PHP: Fix column matching for unexpected single quotes

Unexpected single quotes resulted in an empty match, because PHP
surrounds the errors with quotes, and we check for the next quote to be
the ending delimiter.

For example: an unexpected string 'foo' would be presented as
`unexpected ''foo''`, and then the match would be `''`. The inner part
of that match is an empty string.

This adds a check for the keyword "expecting". Any quote after
"expecting" won't be matched, so we can use greedy matching instead of
non-greedy.

* PHP: Use "very magic"

The pattern started to get unreadable

Also replaced non-greedy matching (`\{-}`) by greedy matching, because
we don't need to match non-greedily anymore and it reads a little nicer.

* PHP: Add tests for column matches

And with that, also a test for unexpected single quotes.
2017-03-01 23:26:03 +00:00
w0rp
ceeff6c723 Fix #288 - Add a command for running ALE 2017-02-28 09:10:58 +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
Jon Parise
c2c6c9f491 Fix Credo's line-matching pattern (#360)
* Fix Credo's line-matching pattern

In d3e7d3d5, the line matching pattern was changed to handle filenames
other than `stdin`. Unfortunately, this broke the pattern's ability to
reliably extract both line and column numbers because the latter is an
optional match and the filename portion was very greedy. This resulted
in line numbers being discarded (treated as part of the filename) and
column numbers being interpreted as line numbers.

This change simplifies the pattern to only anchor on the line's suffix,
ignoring the filename portion entirely.

Alternatively, we could use vim's `\f` ("file name characters") class,
but that could still run into problems when `:`'s naturally appear in
the filename.

* Add a Vader test case for the Credo handler
2017-02-22 23:33:05 +00:00
Chris Paul
fef3276f34 escape dot in maker regex (#357)
* escape dot in maker regex

* Create test_typecheck_handler

* Rename test_typecheck_handler to test_typecheck_handler.vader
2017-02-21 20:32:37 +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
3c4af280f0 Remove a flaky PHP handler 2017-02-21 11:35:37 +00:00
w0rp
3786322cf0 Merge remote-tracking branch 'adriaanzon/php-columns' 2017-02-21 11:34:39 +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
Adriaan Zonnenberg
cca0222cf1 PHP: Make parser work with more error messages 2017-02-18 00:51:33 +01:00
Adriaan Zonnenberg
a18e172a96 PHP: Fix test for column highlighting 2017-02-18 00:04:59 +01: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
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
Adriaan Zonnenberg
b2241e991b Support columns on php handler
Also added some tests for different error messages
2017-02-15 23:59:18 +01:00
w0rp
cb60a2c06e Cover ALEToggle with Vader tests 2017-02-15 21:36:16 +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
Daan van Vugt
68b6be57f1 Update line marker pattern for new gfortran
Add tests for GCC 4.1.2, 4.9.2 and 6.3.1
2017-02-14 14:31:31 +01: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