Commit Graph

700 Commits

Author SHA1 Message Date
w0rp
91d7e81ebc
Fix #605 - Support vcol: 1 for multi-byte character positions 2018-04-08 17:17:46 +01:00
Adriaan Zonnenberg
121e806423 Add g:ale_php_cs_fixer_options variable (#1477)
* Add g:ale_php_cs_fixer_options variable

* Fix test
2018-04-07 23:53:03 +02:00
Jack Evans
c5d3af04fc Added support for Python black fixer (#1451) 2018-04-06 11:08:25 +02:00
Nils Leuzinger
912f632bf5 Add fsc linter for Scala (#1452)
* Add fsc as a Scala linter

* Pull reused code into `autoload/ale/` directory

* Include fsc into the README

* Add unit test for testing the scala handler

* Add unit test for scala's fsc linter

* Rename scala unit tests for clarity

* Fix typo in README

* Fix typos in doc/ale.txt

* Fix author headline

* Put methods for fsc commands back into fsc.vim

* Move command_callback tests to correct location

* Rewrite handler test so it actually tests handler

* Clarify description of test in test_scala_handler
2018-04-05 21:04:11 +02:00
w0rp
018831d601
Merge pull request #1434 from roel0/master
Automatically determine build flags by parsing `make -n` output #1167
2018-03-27 09:55:43 +01:00
roel0
dfb3e194d7 Extended unit tests + simplified parsing algoritme #1167 2018-03-27 10:18:24 +02:00
w0rp
27c5faeafe Use the --stdin-filename option for textlint, so configuration files will be discovered better 2018-03-26 10:35:10 +01:00
w0rp
8b34a4bf6b Fix config and executable issues with the textlint linter 2018-03-26 09:55:18 +01:00
w0rp
164c711b3d
Fix #1404 - Do not show balloons when g:ale_set_balloons is 0. Add b:ale_set_balloons 2018-03-25 12:57:08 +01:00
yasuhiroki
1d33d2cacf Support textlint for plaintext without textlintrc 2018-03-24 14:40:44 +09:00
roel0
69237a7e57 Added additional unit tests + adapted review comments #1167 2018-03-21 20:44:35 +01:00
roel0
7593e20377 Fix failing unit tests for windows 2018-03-21 07:37:32 +01:00
roel0
18d0aeb1a0 * Shell commands should by called async with the help of a command chain
* The makefile parser unit test should only test the cflag parser itself
#1167
2018-03-20 21:49:31 +01:00
w0rp
64c95d4881
Merge remote-tracking branch 'tylucaskelley/master' 2018-03-20 20:27:50 +00:00
Ben Paxton
6452c5e2f0 Use govet handler for gosimple, gotype, staticcheck 2018-03-20 14:19:48 +00:00
roel0
3fb7efa2c6 Added some unit tests and fixed some linting errors for automatic makefile parsing in C #1167 2018-03-20 11:56:46 +01:00
roel0
c47b5fd4b8 Automatically determine build flags by parsing 'make -n' output #1167 2018-03-19 21:56:18 +01:00
w0rp
43e8f47e6e
#1431 Normalize paths when checking for temporary paths on Windows 2018-03-18 20:39:50 +00:00
INOUE Yosuke
68b9399d4c handle multibyte string when linting text with redpen (#1416)
* handle multibyte string when linting text with redpen

* fix error when no string is provided, fix test's expect value

* remove ambiguious `==` operator
2018-03-18 18:12:47 +00:00
w0rp
434f22e44a
Merge pull request #1415 from fohte/fixer-rufo
Add rufo fixer for Ruby files
2018-03-18 17:42:07 +00:00
w0rp
440502dc93
Clean up the mix format command and tests 2018-03-18 17:40:34 +00:00
w0rp
92612a9eab
Merge pull request #1410 from fribmendes/frm/mix_format_options
Allow passing options to mix_format
2018-03-18 17:36:33 +00:00
Hideaki Tokida
1b1e53ef61 add textlint support for markdown (#1383) 2018-03-18 17:28:26 +00:00
Martin Tournoij
302f69e933
Add ALEFixPre and ALEFixPost events
To run autocmd before and after every fix cycle.

Fixes #623 (`ALELintPre` was added in #1203).
2018-03-17 18:24:38 +00:00
Anthony DeDominic
92e6e4d1ba Fix awk linter and security concerns. (#1411)
* Fixed (g)awk linter

 * Made it secure, albeit less useful.
 * Added gawk handler; the cpplint one was not working?
 * Added gawk handler test.
 * added warning to gawk handler.
 * added gawk command callback test
 * added comment about --source

* added back optional commandline option
2018-03-14 17:46:57 +00:00
Hayato Kawai
7e1a9a9810
Add rufo fixer for ruby files 2018-03-11 13:33:57 +09:00
w0rp
05d39bc1a9
Merge pull request #1395 from gfontenot/gfontenot/fix-elm-format-name
Fix elm-format fixer name
2018-03-10 10:51:27 +00:00
Christian-Gibbons
b586eba4a4 Handle flawfinder severity level (#1400)
* Handle flawfinder severity level
* Reverted code allowing Flawfinder to piggyback off of gcc's format handler
* Gave Flawfinder its own format handler and made requested changes.
2018-03-10 10:44:55 +00:00
Fernando Mendes
6320ce6674 Allow passing options to mix_format 2018-03-08 15:29:10 +00:00
Gordon Fontenot
9258c73680
Fix elm-format fixer name
Support for elm-format as a fixer has existed since Sept 2017, but it's not
easy to discover because the fixer was named `format`. This breaks the
convention of the other fixers that use the full name in the registry.

I've gone ahead and fixed this discrepancy, but I left the existing registry
entry in place. We should move people towards using `elm-format` as the fixer
name, but I'd hate to break existing setups.
2018-03-08 09:19:12 -06:00
w0rp
0a0535546f Add a command for stopping all LSP clients 2018-03-06 10:23:55 +00:00
Ty-Lucas Kelley
2a575ca551 add basic support for markdownlint 2018-03-03 19:16:41 -05:00
w0rp
193a4b9336
Satisfy my own checks 2018-03-03 18:13:57 +00:00
w0rp
f476c28b29
Add deprecation warnings for old NeoVim versions and old functions 2018-03-03 17:50:09 +00:00
w0rp
08cfd5f90c
Close #1379 - Increment b:ale_linted when a buffer is checked 2018-03-03 16:22:56 +00:00
w0rp
ad7ffe2875
Merge pull request #1390 from jdeniau/jd-feat-phpCsFixer
add php-cs-fixer to list of fixers
2018-03-02 20:40:31 +00:00
w0rp
2c2c7ceb1d Fix #1384 - Handle warnings and suggestions for tsserver 2018-03-02 20:33:45 +00:00
Andrew Crites
acbe527e15 Option to open lists vertically (#1381)
* Add configuration option to open lists vertically

* Add tests, clean up vertical list config

* Vertical list option cleanup

* Use is# for tests
* Order properties in documentation alphabetically
2018-03-02 20:22:29 +00:00
w0rp
2096562899 Make updating linter results slightly faster when the list is empty 2018-03-02 12:10:27 +00:00
Julien Deniau
fbbb8c17d9 add php-cs-fixer to list of fixers 2018-03-01 15:48:47 +01:00
Christian-Gibbons
82f8a04e18 New linter: Flawfinder (#1361)
* Flawfinder support added for C and C++

A minor modification to gcc handler was made to support flawfinder's
single-line output format that does not have a space following the
colon denoting the warning level.  gcc handler still passes its
Vader tests after this modification.

* Documentation fixes

* Revert documentation regression

* Added Flawfinder to table of contents

* Removed trailing whitespace

* Follow ALE conventions better

Added additional documentation and Vader tests
2018-02-25 14:11:04 +00:00
w0rp
478a2883a6 #1363 Make ale#engine#IsCheckingBuffer part of the public API 2018-02-25 12:57:54 +00:00
w0rp
89f8d3e456 Fix #1336 - Print a friendly message when using invalid function names for fixers 2018-02-18 10:13:30 +00:00
Kevin Tindall
716b46e10d
functional pony linter 2018-02-10 13:17:53 -06:00
w0rp
0f822b063c Fix #1330 - Find isort configs better by changing the working directory 2018-02-04 13:16:44 +00:00
blyoa
23db293bdf Add prettier fixer support to vue 2018-02-01 02:30:02 +09:00
w0rp
c589e3d57d
Merge pull request #1322 from datanoise/master
fixed rust errors parsing
2018-01-29 13:54:50 +00:00
w0rp
7ef55a8615 #1303 jq isn't a Node program 2018-01-28 11:51:20 +00:00
Kent Sibilev
ea60fcea39 fixed rust errors parsing
use correct column values instead of absolute byte positions
2018-01-27 16:15:29 -05:00
w0rp
bc63325881
Merge pull request #1311 from butlerx/update/prettier-md
add prettier support for graphql
2018-01-26 17:30:00 +00:00
rhysd
ef898fa303 fixjson: Add support for local installation 2018-01-25 07:21:25 +09:00
butlerx
be47e37bbc
add prettier support for graphql 2018-01-24 15:25:25 +00:00
rhysd
b28a6ddbe4 Support fixing JSON files with fixjson 2018-01-24 10:36:31 +00:00
Rafael Rinaldi
d562d53102 Add jq as a JSON fixer 2018-01-24 10:12:29 +00:00
w0rp
8675bfc4ab
Merge pull request #1287 from rhysd/prettier-markdown
Enable prettier to format markdown files
2018-01-19 17:16:00 +00:00
w0rp
a5ec4143d2 Fix the didSave tests so they work in NeoVim 0.1.7, and do not send the message for tsserver 2018-01-19 16:50:04 +00:00
Rafael Lerm
042dec059a Send didSave message to LSP-based linters (#1295)
* Also send didSave to LSP linters.
* Add tests for messages sent to LSP linters.
2018-01-19 16:40:55 +00:00
w0rp
045c92ed65 Fix #1298 - Escape commands for PowerShell 2018-01-17 18:08:17 +00:00
rhysd
13c839cf16 Enable prettier to format markdown files 2018-01-15 11:28:56 +09:00
Jelte Fennema
b6d1c41925 Go: Add gotype support (#1099) 2018-01-07 12:11:01 +00:00
w0rp
c9d66b861b Show more ALE variables in ALEInfo 2018-01-07 12:01:20 +00:00
Björn Lindström
b0eaddadc9 Don't use temporary file for rustfmt fixer
rustfmt normally acts on a file in place, and applies configuration
from rustfmt.toml files according to the path of the file.

Using a temporary file for rustfmt breaks this functionality, so
removing the '%t' from the rustfmt command.
2017-12-27 23:12:57 +07:00
w0rp
c165c7c5d1 Fix #1251 - Handle an empty list in the line callback when NeoVim crashes 2017-12-26 18:15:59 +00:00
w0rp
e43e7065da Fix #1115 - Add support for wrapping all commands with an option 2017-12-20 12:20:38 +00:00
w0rp
1568bf8128 Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
w0rp
d2bea5c310 Allow the cursor messages to be disabled while Vim is running 2017-12-19 14:43:24 +00:00
w0rp
2cacba5758 Fix #1228 - Reset the cursor if echoing a message moves it 2017-12-19 12:06:08 +00:00
Johannes Wienke
79aaec5a99 Missing warning level 'suggestion' for vale
Vale can also, optionally, raise suggestions. These weren't covered yet.
2017-12-18 17:10:57 +01:00
w0rp
fdaac9bd78 Fix #1210 - Fix a Windows path issue which broke TSLint 2017-12-18 13:27:59 +00:00
w0rp
e0c3cbd16f Remove some now redundant echo code 2017-12-18 11:22:24 +00:00
w0rp
8afd9a70a6 #1212 Fix some echo cursor flashing by only echoing once all linters are finished. 2017-12-18 11:14:10 +00:00
w0rp
fdde8af894
Merge pull request #1232 from languitar/vale-json
Use JSON output with vale
2017-12-18 10:11:57 +00:00
Daniel Parker
d3cf02ecda Add support for Vritual Env folder called venv 2017-12-18 09:33:11 +00:00
Johannes Wienke
96b90b45db Use JSON output with vale
Switches all vale instances to JSON output and provides an appropriate
handler for that. Without JSON, no end_col is provided and text
highlighting only catches the first character of every result.
2017-12-17 16:49:57 +01:00
w0rp
c4956657dc
Merge pull request #1220 from languitar/linter-alex
Add a linter for alex
2017-12-17 13:11:49 +00:00
w0rp
55e09a4a2d Look for mypy.ini to find Python project roots too 2017-12-17 12:38:50 +00:00
w0rp
7e793c9d71 Fix a typo 2017-12-17 12:36:07 +00:00
w0rp
c8ee402cce
Merge pull request #1203 from Carpetsmoker/autocmd-start
Add ALEStartLint autocmd
2017-12-17 12:06:57 +00:00
Johannes Wienke
55ca96bd83 Add a linter for alex
https://github.com/wooorm/alex

Enabled for text-like file formats and documented in README and doc.
2017-12-13 14:37:42 +01:00
Martin Tournoij
4825cce1cc
Run before lint cycle, rename autocmds 2017-12-10 13:10:52 +00:00
butlerx
0700c2d900
add google-java-format fixer 2017-12-09 14:25:35 +00:00
Martin Tournoij
92f20b0e51
goimports fixer doesn't work for vendored libraries
In Go you can "vendor" packages by putting them in the `vendor/`
directory for a project. Adding the `-srcdir` argument makes `goimports`
pick up these packages, in addition to what you have in GOPATH.

Without this, `goimports` is not very useful, since most projects vendor
their packages.
2017-12-08 12:49:02 +00:00
w0rp
7d932a239c Fix #1205 Do not add line highlights if the groups do not exist 2017-12-07 23:25:17 +00:00
w0rp
7a71186d62
Merge pull request #1174 from eborden/eborden/add-brittany-for-haskell-formatting
Add brittany for Haskell formatting
2017-12-07 19:15:33 +00:00
Martin Tournoij
d6bf13502a
Add ALEStartLint autocmd
This grew out of my work in #1193; to ensure the statusline was being
updated I had to add:

    fun! s:redraw(timer)
        redrawstatus
    endfun

    augroup ALEProgress
        autocmd!
        autocmd BufWritePost * call timer_start(100, function('s:redraw'))
        autocmd User ALELint redrawstatus
    augroup end

Which kind of works, but is ugly. With this, I can replace the
`BufWritePost` with:

    autocmd User ALEStartLint redrawstatus

Which is much better, IMHO.

Actually, this patch actually replaces adding a function, since you can
do:

    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint hi Statusline ctermfg=darkgrey
        autocmd User ALELint      hi Statusline ctermfg=NONE
    augroup end

or:

    let s:ale_running = 0
    let l:stl .= '%{s:ale_running ? "[linting]" : ""}'
    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint let s:ale_running = 1 | redrawstatus
        autocmd User ALELint      let s:ale_running = 0 | redrawstatus
    augroup end

Both seem to work very well in my testing.

No need to `ale#Statusline#IsRunning()` anymore, I think?
2017-12-07 16:14:20 +00:00
Jeff Willette
fba3c57872 added importjs fixer
- added tests for fixer functions
- added docs
2017-12-05 00:37:31 +09:00
w0rp
a4f8506227 Fix #1186 - Disable checking code with perl by default 2017-12-02 20:43:47 +00:00
w0rp
83760a0952
Merge pull request #1188 from ejsexton82/master
Fixed Command String for phpcbf Fixer
2017-12-02 12:25:13 +00:00
w0rp
6053f764bd Make toggling work when pattern options are enabled 2017-12-01 17:12:19 +00:00
E.J. Sexton
6b3927820b Fixed command string for phpcbf fixer 2017-12-01 14:55:34 +01:00
w0rp
a990188e27 Fix #1176 - Add an option for caching failing executable checks 2017-11-30 10:34:51 +00:00
w0rp
fd261264d7 Escape the filename for finddir 2017-11-30 10:25:32 +00:00
Lukas Galke
5d65980c42 fnameescape when searching nearest file 2017-11-30 00:33:13 +01:00
w0rp
6503b85d3d Fix #1178 - Don't use the output from eslint_d for fixing files when the output is an error message 2017-11-29 10:08:54 +00:00
Evan Rutledge Borden
edb3a0c5e4 Add brittany for Haskell formatting
`brittany` is one of the options for Haskell source formatting. This
adds the necessary fixer files and documentation to support `brittany`
in `ALE`.
2017-11-28 17:58:13 -05:00
w0rp
21b460bb1d Implement go to defintion for LSP linters 2017-11-26 22:27:08 +00:00
w0rp
01318b6930 Compress one line 2017-11-26 21:30:26 +00:00
w0rp
ae7cd2c090 Fix #918 - Save prettier details for Haskell linters 2017-11-26 18:24:10 +00:00
w0rp
8254e507d6 #1162 Get LSP completions working reasonably well 2017-11-26 13:01:01 +00:00
w0rp
b1a6abdda6 #1162 Add unfinished experimental code for supporting LSP completion, clean up the tests, and make the completion cancelling better 2017-11-26 12:24:18 +00:00