Commit Graph

1551 Commits

Author SHA1 Message Date
Horacio Sanson dcec4b3c37
Fix 3998 - add language option to uncrustify fixer (#4007) 2021-12-25 00:25:47 +09:00
Dalius Dobravolskas 5b792c7641
ALEFileRename command added. (#4012)
* ALEFileRename command added.

This command renames file and uses tsserver `getEditsForFileRename` to
fix import paths in Typescript files.

* ale#util#Input fix

* Even more fixes.

* Linting error fix.
2021-12-17 08:09:26 +09:00
Horacio Sanson 9a01836015
Fix check for did_save and includeText capabilities (#4008) 2021-12-09 23:22:07 +09:00
Magnus Groß 9860dadbc9
Initialize hl-groups correctly if virtual text is loaded first (#3960)
If virtualtext.vim is autoloaded first, it will link
ALEVirtualTextWarning to ALEWarning. But ALEWarning is not initialized
yet, so it will create ALEWarning, but with no color definition set.

Shortly after, highlight.vim is autoloaded, which would usually link
ALEWarning to SpellCap, but only if ALEWarning is not already set.
However since ALEWarning is already initialized due to the previous
link, we skip this and never actually come around to properly
initializing it.

We fix this by initializing all highlight groups in highlight.vim, thus
satisfying the dependency of ALEVirtualTextWarning being initialized
after ALEWarning.

Fixes #3585
2021-12-09 23:21:39 +09:00
Dan George 072750137f
Fix --file-filter option on cppcheck command (#3987)
* Add cppcheck handler match on misra msg

* Fix cppcheck --file-filter setting

This time, the tests and actually usage both work.

Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-20 19:01:32 +09:00
David Houston ea643b97ab
Add cspell Linter (#3981)
* Add cspell linter

Add cspell linter, with the languages it supports.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add cspell Global Variables Documentation

Add documentation to /doc/ale.txt with cspell configuration options.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add cspell to docs, Minor Cleanup

Add cspell for each supported language, adding some spaces and removing
others when caught navigating the file.

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-19 07:41:05 +09:00
Dan George aee0cc45be
Cppcheck buffered file only (#3983)
* Add cppcheck handler match on misra msg

* Use --file-filter cppcheck option

Cppcheck recently added --file-filter so that cppcheck only checks the
filtered files, even when using --project option, which checks all files
in the project, by default. The --ccpcheck-build-dir option didn't help
enough (at all?).

* Added C test cases

Also fixed and assumed typo: foo.c, instead of foo.cpp

* Replace hard-coded full path filenames

Attempt to fix the windows platform test execution.

* Fix typo - foo.c, instead of foo.cpp

* Reset buffer var between tests

* Handle header files in cppcheck

Cppcheck isn't designed to check header files, stand-alone. Daniel
Marjamäki suggested using --suppress options to avoid FPs.

* Fix Vint complaint in cppcheck handler.

* Fix file path in cppcheck handler

Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-18 13:27:23 +09:00
David Houston 2cfeabd1b5
Rewrite Alex Integration to Use stdin (#3982)
Since having been added, the `alex` tool has added support for linting
on stdin. Rewrite this integration to reduce the number of tools
requiring disk-write access.

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-18 13:00:45 +09:00
Chuan Wei Foo 01fdd8d66b
Show errors and warnings for the 'smlnj' linter (#3957)
* Show errors and warnings for the 'smlnj' linter

Fixes #3953

* Change smlnj stdIn regex
2021-11-15 20:35:45 +09:00
Dan George d72a9d64ff
Add cppcheck handler match on misra msg (#3980)
Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-15 20:34:46 +09:00
David Houston a9d7f45924
Implement statix Linter and Fixer (#3969)
* Add Statix for Linting

Add `statix check` as a linter. Provides a simple set of definition
tests additionally. Variable names specify "check" to allow for later
addition of `statix fix` as a formatter once stream support is added.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fixup Supported Tools List

I didn't realise there were two separate lists of tools, so add statix
to the other list. Also, remembered "S" comes after "R", and so
re-ordered it.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix statix Test File

I refactored the variables for statix to allow for writing a fixer
later, and forgot to update them in the test, so update them now. Also
remove a stray "i", add missing space before checks

Signed-off-by: David Houston <houstdav000@gmail.com>

* Update Output Stream for v0.4.0

statix v0.4.0 provides a breaking change of output stream from stderr to
stdout.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add statix fix Fixer

Implement statix fix as a fixer for simple Nix antipatterns.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix statix Fixer Tests

Fix the statix fixer tests by removing the unnecessary
'read_temporary_file' value from the command, since it simply uses the
default value.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add statix Handler Test

Add a test for the statix handler per @hsanson's request.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix to run only on stdin for linting

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-12 07:34:25 +09:00
David Houston 8b3b16d71c
Implement gofumpt Fixer (#3968)
* Implement gofumpt Fixer

Add an implementation with test and documentation for the gofumpt go
code formatter, a stricter formatter than your standard "go fmt".

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add gofumpt to ale.txt TOC

Forgot to add gofumpt to the ALE vim help Table of Contents, so do so.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix Test Setup Method Capitalization

I had put "Setup" instead of "SetUp" for "ale#assert#SetUpFixerTests".
Fix such.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix typos

Add a missing space, remove an extra bracket by actually running tests
locally first. Would've been smart to do that from the beginning...

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-09 16:53:44 +09:00
Magnus Groß da331acc9e
Replace line breaks in virtual text with whitespace (#3949)
Before this patch multiline warnings would appear in a single line with
'^@' as separator.
Now we use whitespace as separator to improve the appearance.

Also strip trailing whitespace, newlines, etc...

Fixes #3939
2021-10-24 11:35:06 +09:00
Horacio Sanson 16898417e6
Fix 3941 - add version check to isort fixer (#3942) 2021-10-16 14:02:58 +09:00
Horacio Sanson c7e3f1a0dd
Fix 3207 - do not send didSave notification if not supported (#3930) 2021-10-15 08:42:07 +09:00
Roeland 7413dfd3fc
erblint as fixer (#3935)
* fixer erblint

* erblint fixer test
2021-10-11 20:52:46 +09:00
Wilson E. Alvarez 42a6e039cb
Implement textDocument/didSave includeText optional argument (#3925) 2021-10-07 20:48:54 +09:00
D. Ben Knoble 34a972f85d
sml: use filenames (fix #1084) (#3860) 2021-10-07 11:33:33 +09:00
Tomáš Janoušek efa563826d
codefix: Fix code actions that return Command[] directly instead of CodeAction[] (#3929)
According to
https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_codeAction,
the response to textDocument/codeAction is:

    (Command | CodeAction)[] | null

and the code only handled the case where it was a CodeAction that either
specified an edit or a command, but didn't handle a direct Command.

Note that the specification also says that both can be specified and
then the edit is applied first, then the command. Furthermore, there
seems to be some hacky code handling arguments directly, which I suspect
is non-standard and only works with a specific LSP server that happens
to pass the edits in the arguments unmodified.
2021-10-07 11:29:00 +09:00
Magnus Groß 708e810414
Implement virtual text support for vim (#3915)
This requires the textprop and popupwin feature (vim 8.2).

Fixes #3906
2021-10-02 09:02:49 +09:00
Yuto Ito c9c89a1853
Fix: Failed to execute rubocop fixer on other machine (#3916) 2021-09-23 18:46:16 +09:00
Trevor Whitney f8a4c78b5b
Add support for jsonnetfmt and jsonnet-lint (#3907)
* update to lates

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* fix up docs

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* fix docs

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* get tests passing

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* update regex

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* use ale#Pad and AssertFixer

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
2021-09-21 10:49:15 +09:00
Dalius Dobravolskas dca56dd772
ALECodeAction fix: check linter name when searching for nearest error. (#3901)
It is easier to explain this fix with an example:

* tsserver and LSPs ask for error information when you want to fix
  error. tsserver `ts@getCodeFixes` command needs tsserver error code.

* now let's imagine that user has eslint and tsserver in use. Sometimes
  both can report same error in different way.

* Now there is no guarantee which error will come first and if eslint
  error comes first then tsserver will not return code fixes as we are
  passing wrong error code to it.

This fix will return proper error code based on linter.
2021-09-16 22:05:38 +09:00
Oliver Albertini f769f64c07
[ale-python-root] add `.pyre_configuration.local` to list of files (#3900)
Without this, we have one `pyre` process running across different pyre
projects. With this change, files in different projects can be linted
with pyre at the same time.

Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
2021-09-15 21:07:45 +09:00
Horacio Sanson bf29f6ea92
Fix 3897 - add poetry to isort (#3898)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-09-10 15:18:41 +09:00
Horacio Sanson 42aadf6a26
Fix 3886 - Don't JSON decode completion user data if already a dict (#3894)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-09-08 21:45:19 +09:00
Amadeus Demarzi 35d0bd1519
Fix truncated echo (#3889)
* Fix truncated echo

In typescript, when putting the cursor on a `>` character of an arrow
function, the displayString body comes back as an empty string, and
means the split operation has 0 items, causing a failure when attempting
to call TruncatedEcho.

Even if there's a better fix, I'd assume this is a good safety since we
are injesting external data.

* Convert to use `empty()`
2021-09-06 11:26:32 +09:00
Jon Parise 8fd23f4b71
Introduce an ALELSPStarted autocommand (#3878)
This User autocommand is trigged immediately after an LSP process is
successfully initialized. This provides a way to perform any additional
initialization work, such as setting up buffer-level mappings.
2021-09-05 10:07:53 +09:00
tsjordan-eng b9fdb91e92
Cppcheck backwards compat 1.34 (#3887)
* Add support for cppcheck 1.34

* Add cppcheck 1.34 tests, correct pattern

Co-authored-by: Tyler S. Jordan <tsjorda@sandia.gov>
2021-09-03 22:31:17 +09:00
Jelte Fennema d53a085096
Add fixer for "dotnet format" (#3879)
The .NET ecosystem has an official tool for formatting its files: `dotnet format`
This adds support for that tool to ALE.
2021-08-25 15:27:04 +09:00
toastal a099fe24b2
Dhall fixes: use stdin, doc errors (#3868)
* purs-tidy

* Dhall fixes: use stdin, docs errors
2021-08-09 20:43:50 +09:00
toastal 9264ffda23
purs-tidy fix (#3867)
* purs-tidy

* Fixup for purs-tidy
2021-08-09 20:42:19 +09:00
pigfrown 836125391a
Adds fixer for golines (#3862)
* Adds fixer for golines

* Repositions golines docs to be in alphabetical order

* Fixes golines doc tag

* Fixes formatting for golines docs
2021-08-09 10:13:43 +09:00
toastal 775d121d46
`purs-tidy` for PureScript (#3863)
* purs-tidy

* update email address for toastal
2021-08-08 22:09:21 +09:00
Horacio Sanson 10f984673c
Fix lint tests failing due to multibyte chars. (#3858)
For some reason CI tests started failing with these errors:

> ale_linters/eruby/erb.vim:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)
> ale_linters/mail/languagetool.vim:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)

Not sure at which point or what changed for this to happen but this MR
fixes it by removing the multibyte chars present on the problem files.

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-08-06 11:36:39 +09:00
Arnold Chand 8c591996a8
Add importMap option to deno Initialization Options (#3827)
* feat(deno): move init options to handlers

* feat(deno): add deno lsp support for js files

* feat(deno): use default map option

* feat(docs): add deno import map option

* feat(deno): add tests for importMap option

* fix(deno): use full path in importMap

* feat(deno): remove deno as linter for js, separate PR

* fix(deno): test for executable

* fix(deno-test): include filename to simplify function
2021-07-25 13:39:56 +09:00
Daniel Roseman 7d8fb2ba17
Python support poetry (#3834)
* Add poetry support to python linters and black fixer.

* Update python.vim to detect poetry project.

* Update ale.vim, add an option for poetry `g:ale_python_auto_poetry`.

* Update ale-python.txt, add poetry support.

* Add and update poetry related tests.

Co-authored-by: unc0 <unc0@users.noreply.github.com>
2021-07-25 13:39:05 +09:00
D. Ben Knoble 530b38de34
Vim popup (#3817)
* implement vim popups for preview

Details on implementation
-------------------------
- we make use of the |popupwin| api
- we split implementations (Nvim* vs. Vim* prefix) and call the right
  one based on has('nvim')
- we follow a similar structure in each function, using the relevant API
  - popup_list, win_execute, popup_settext in VimShow
  - popup_create in VimCreate
  - popup_close in VimClose

Some differences
----------------
- we DON'T have VimPrepareWindowContent because we use arguments to
  popup_create for borders, padding, etc., and it also takes care of
  buffer creation.
- we follow the protocol of setting and using w:preview for information,
  but we only need the ID
- InsertEnter is the only autocommand required, because of
  popup_create's moved argument. Any cursor movement with 'any' will
  close the popup. This in turns means VimClose is only called from
  InsertMode, so no mode-restoration necessary
- we don't tweak too much in the buffer because vim's popup buffers
  already have most relevant settings and aren't editable without
  calling popup functions.
- I enabled scrollbars, close buttons, dragging, and resizing
- vim popups get as big as they need to by default, so no worrying about
  truncating/hiding/size

Note: we might want to consider changing w:preview to w:ale_preview to
avoid clashes if someone else tries to use the same variable

* floating window: document that vim supports it

* lint: fix indent/cont. lines
2021-07-23 21:59:31 +09:00
Horacio Sanson 5ad4fdd583
Fix 3801 - Add ALEDummySign some width. (#3832)
* Fix 3801 - Add ALEDummySign some width.

Due to changes in NeoVim 0.5 the g:ale_sign_column_always configuration
stopped working.

This PR sets the ALEDummySign to a blank space so when g:
ale_sign_column_always is set we have a sign with 1 width allowing the
configuration to work as before.

https://github.com/neovim/neovim/issues/13635

* Fix visual artifact on dummy sign

* Fix visual artifact on dummy sign (attempt 2)

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-21 18:25:41 +09:00
foobarbyte c1c3873c89
Correct typo in python config filenames (#3826)
* Correct typo in a config file filename.

.tool_versions should be .tool-versions

* Correct typo in config file names.

.tool_versions should be .tool-versions
2021-07-20 18:14:45 +09:00
D. Ben Knoble 651038b601
racket: support racket-langserver lsp (#3808)
* racket: support racket-langserver lsp

* racket-langserver: find highest dir with init.rkt

* autoload/ale/racket: re-indent to 4 spaces

* racket: lint: sort supported tools

* racket: lint: function!

This is _not_ needed anymore, but the lint wants it. See :help E127

* racket-langserver: do not use new dict format

* racket: lint: use snake_case

* add tests for racket-langserver

* racket-langserver tests: correct result values
2021-07-20 10:02:23 +09:00
foobarbyte 1893abdb19
Python .tool versions (#3820)
* Also check for asdf-vm's .tool_versions file

A minimal python project may only be specifying a python version using a version management tool like asdf-vm, without providing other common python project configuration files. asdf-vm creates a single .tool_versions file in the managed directory. By checking for .tool_versions in addition to other common python config files we ensure that python linters (whose behaviour typically depends on a particular python version) will run with the same version of python used by the project. This will also be the same python version used by vim itself when it is run from inside the project's directories.

* add .tool_versions to ale-python-root documentation

This reflects the corresponding change to autoload/ale/python.vim
2021-07-17 21:46:43 +09:00
ghsang d6dbb5398e
Add support for `dart format` fixer (#3764) 2021-07-16 16:20:47 +09:00
Jeff Willette d8f4e8b708
added filename to stdin stream of isort (#3815)
modified tests to run with new format

Co-authored-by: Jeff Willette <jeff@Jeffs-MacBook-Pro.local>
2021-07-14 20:58:25 +09:00
Nikolay Zakirov 82a7e9f588
add autoflake fixer (#3779)
* first attempt

* added autoflake executable

* added Windows executable for appveyor

* delete unused files

* corrected wrong sorting
2021-07-13 21:58:18 +09:00
Horacio Sanson d098124e59
Fix 3373 - do not crash on HandleUserData with invalid json (#3807)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-07-13 08:37:21 +09:00
Mathias Jean Johansen 1e9f40ff8d
Add support for `lua-format` fixer. (#3804) 2021-07-09 23:54:43 +09:00
Jesse Hathaway 36fcb01e05
Add pandoc as a markdown fixer (#3641)
Utilize pandoc to fix markdown files, currently set to Github-Flavored
Markdown, but that can be changed by setting,
ale_markdown_pandoc_options.
2021-07-04 21:39:29 +09:00
Michael Jeanson 9efa96eb94
fix: cflags parser: no absolute path for '-include' (#3775)
Both '-include' and '-imacros' take a file as an argument that will then
be searched in the include path like a regular '#include "..."'
statement in a source file. As such, they should not have their path
converted to an absolute path.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
2021-07-04 21:27:55 +09:00
Buck Evan 52563f9181
black fixer: --pyi option was appended without a space (#3759) 2021-07-04 21:15:37 +09:00
Robert Liebowitz 0d90cb64c6
Add stylua fixer for lua (#3789) 2021-07-03 18:50:48 +09:00
Gregory Anders 49bdbc3ba5
Deduplicate items in location list (#3792) 2021-07-03 18:38:37 +09:00
w0rp 7862633d9d
When repeating selections, jump to the last selected item 2021-06-29 11:53:11 +01:00
Shannon Moeller 397d56f40c
fix(eslint): yarn 2 project cwd (#3684)
* eslint-handler: fix getcwd when there is no node_modules
2021-06-19 12:03:39 +01:00
حبيب الامين ad27e921d7
Fix breakage w/ plugins that inadvertently trigger ALE in `execute()` (#3719)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2021-06-19 11:56:43 +01:00
w0rp e78519683e
Close #3433 - Only use noselect if set for automatic completion 2021-06-19 10:57:34 +01:00
w0rp 1b08791228
Make staticcheck configurable with GOPATH detection 2021-05-27 22:03:46 +01:00
Pau Ruiz Safont a02a4f2811
ocaml: prepare for filetype separation (#3732)
The ocaml filetype is currently used for several, different file
formats. This causes problems as not all tools support all formats.
New filetypes are introduced to support this separation, this needs some
changes in ale that are fortunately backwards-compatible.

These change add ocamlinterface file support for ocp-indent, merlin,
ocamlformat and ocaml-lsp. For ocaml-lsp I took the liberty to
add all recognised language ids, even if they are not supported.

ols has not been changed as the project has been abandoned since 2019.
2021-05-27 16:33:43 +09:00
w0rp f53431331e
Enable gopls by default with GOPATH detection 2021-05-26 22:43:33 +01:00
awang bf1c30f585
Use stdin/out for cmake-format (#3725)
cmake-format added support for reading from/outputting to stdin/out as
of v0.3.6, released 2018-04-10 (commit 2e2aff2) [0].

Reading from stdin is preferable over reading from a temporary file
because when given a concrete file cmake-format will look for its config
file (.cmake-format.py or similar) in the parent directories of the
provided file. If the temporary file is off in a tmpdir somewhere (e.g.,
/tmp on *nix), cmake-format will almost certainly not come across the
user's intended format configuration file, making it appear that
cmake-format is ignoring the config file.

If cmake-format reads from stdin, though, it'll look for its config file
in its current working directory and its parent directories, in a
similar manner to clang-format. This has a much higher chance of running
across the intended config file.

[0]: https://github.com/cheshirekow/cmake_format/releases/tag/v0.3.6

Co-authored-by: Alex Wang <ts826848@gmail.com>
2021-05-25 09:37:09 +09:00
Horacio Sanson 93f80ea767
Fix 3524 - parse buffer signs with getplaced() function (#3648)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-05-23 21:58:13 +09:00
w0rp bee8eccb42
Fix a bug when code actions have no changes 2021-05-04 08:44:33 +01:00
Jay Sitter 737c1bf1ac
Fix stylelint not obeying project-specific rules (#3272)
* Fix stylelint not obeying project-specific rules

* Fix tests

* Fix test

* Fix test
2021-04-20 12:50:57 +09:00
Henrique Barcelos 1c90d8c018
Updated `solhint` linter to be able to use a local installation (#3682)
* fix: added support for local solhint executable

* feat: added support for matching parse errors

* test: added test for solhint command callback and handler

* chore: removed command callback test

* refactor: made solhint handler structure closer to eslint
2021-04-15 09:01:18 +09:00
Kevin Clark 1cd0c0c33b
Don't exit visual mode on floating preview close (#3689) 2021-04-12 16:57:14 +09:00
yohei yoshimuta cec9954d01
feat: Add protolint as linter and fixer (#2911) 2021-04-09 22:16:23 +09:00
bosr f0887d3e61
apple-swift-format: linter and fixer with config swiftpm support (#3671) 2021-04-07 19:34:34 +09:00
fiatjaf 655f0070cd
Add support for V: "v" (compiler) and "vfmt" fixer. (#3622)
* v: add "v fmt" fixer.

* v: add "v" (build) linter.

* v: fix vlint complaints and add documentation.

* v: add tests.

* v: use ale#Pad().
2021-03-26 15:38:57 +09:00
David Houston b1f95dc4fb
Add nixfmt as a Nix fixer. (#3651)
* Add nixfmt fixer.

* Replace manual options pad with ale#Pad()
2021-03-24 09:02:17 +09:00
Jon Parise eb0ebe6221
Switch to using buildifier's -path option (#3640)
Buildifier offers a -path command line option:

> Buildifier's reformatting depends in part on the path to the file
> relative to the workspace directory. Normally buildifier deduces
> that path from the file names given, but the path can be given
> explicitly with the -path argument. This is especially useful when
> reformatting standard input, or in scripts that reformat a temporary
> copy of a file.

This lets us drop our `-type`-guessing logic.

For the moment, we rely on the buffer filename being "relative to the
workspace directory", which it generally is, but in a future change, we
should introduce logic that will locate the WORKSPACE file and adjusts
the filename relative to that directory. This could be complicated based
on the working directory in which `buildifier` is executed, so a little
more research is necessary to implement that logic correctly.
2021-03-23 22:04:51 +09:00
BarrOff cdac7a830e
Add support for `ptop` fixer (#3652)
* Add support for `ptop` fixer

* add test file for ptop tests

* called wrong fixer in assertion test

* use ' %s %t' instead of ' %t %t'
2021-03-23 21:51:14 +09:00
w0rp f7852dbd0a
#3633 - Move linter tests into test/linter 2021-03-21 00:25:33 +00:00
fiatjaf 4411b4d751
add support for svelte via svelteserver language server (#3644)
* add support for svelte via svelteserver language server
* svelte: fix Vint error and add a `svelteserver` simple test.

Co-authored-by: Joakim Repomaa <mail@j.repomaa.com>
Co-authored-by: Joakim Repomaa <mail@jreinert.com>
2021-03-20 22:23:27 +00:00
w0rp dc40ece3c3
#3632 Add ale#util#MapMatches 2021-03-15 22:30:22 +00:00
w0rp bd808dca30
Fix ale#path#Dirname on Windows 2021-03-15 21:30:13 +00:00
w0rp b45ee8ec6c
Close #2102 - Add support for the Angular language server 2021-03-14 21:10:20 +00:00
Yen3 1d76fd55a1
Add borders for floating windows in Neovim (#3603)
* Add borders for floating windows in Neovim
* Add docs for floating window border setting

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2021-03-01 21:36:05 +00:00
w0rp 680ba68d81
#3599 - Use ale_root instead of ale_lsp_root
The `ale_lsp_root` setting is now deprecated, and `ale_root` should be
used instead. The setting will be used for both setting the root easily
for LSP linters, and for running other linters over whole projects.
2021-03-01 20:51:29 +00:00
w0rp 9fe7b1fe6a
Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they
can later be swapped out when running linters over projects is
supported, and also better support filename mapping for running linters
on other machines in future.
2021-03-01 20:11:10 +00:00
Antoine Gagné 48fab99a0a
Add support for `erlfmt` fixer (#3602)
* Add support for `erlfmt`

* Add missing entry to table of contents

* Fix warnings

* Add missing tools to supported tools
2021-02-28 22:31:44 +09:00
Jon Parise 90b9597d50
Add a buildifier fixer for Bazel files (#3499)
This fixer enables buildifier's formatting and "lint fix" modes.
Additional options can be provided via `bazel_buildifier_options`.

It also implements some basic logic for guessing the file's type.
buildifier itself usually does this based on the filenames provided on
the command line, but because we're piping our buffer via stdin, we need
to do this manually.
2021-02-21 21:35:26 +09:00
Tomáš Janoušek 2550f5d952
Fixes to code actions (cursor moving, tests, EOL/EOF corner cases) (#3478)
* code_action: Don't move cursor when change covers entire file
* code_action: Refactor/simplify ApplyChanges
* code_action: Fix EOL at EOF corner cases while performing no changes
* code_action: Fix column around EOL corner cases
* code_action: Handle positions out of bounds
* code_action: Add instructions for verifying corner case tests against vscode
2021-02-20 16:16:47 +00:00
Alex LaFroscia d340710fcf
Support going to type definition with tsserver (#3545) 2021-02-20 16:09:28 +00:00
Risto Stevcev 3ea887d2f4
Added ocamllsp (#3595)
* Added ocamllsp

* Update ordering in docs to be alphabetical

* Updated expected result in test
2021-02-18 23:51:11 +09:00
David Buchan-Swanson 1ee7f6c97b
add support for prettier-ruby to prettier fixer (#3593)
it _does_ need an additional plugin, but when it has the plugin, it
works as expected.
2021-02-18 16:33:02 +09:00
Mukund Mauji b30c5c9b51
Allow clangformat to use a local style file (#3587)
* Allow clangformat to use a local style file.

* Add tests.

* Fix Vint issue.

* Improve explanation of feature in documentation.

* Fix failing test.

The test was checking the wrong directory.
2021-02-14 23:03:04 +09:00
w0rp 3b184f88d3
Bump the ALE version to v3.1.0 2021-02-11 19:47:29 +00:00
Hugo Gualandi 77c034884b
Bugfix: ParseCFlagsFromMakeOutput was never being called (#3574)
Previously, the make output was never being parsed, even when the
`c_parse_makefile` option was set.
2021-02-06 19:06:01 +00:00
Horacio Sanson b88d3c4e4b
Merge pull request #3575 from hugomg/gnumakefile
Have c_parse_makefile look for GNUmakefile as well
2021-02-06 21:31:16 +09:00
Horacio Sanson f612805801
Merge pull request #3576 from cyyever/fish_indent
Fish indent
2021-02-05 22:58:43 +09:00
Hugo Musso Gualandi 4c7e843fd0 Have c_parse_makefile look for GNUmakefile as well
Makefiles using GNU-make features might be called "GNUmakefile" instead
of "Makefile". This commit teaches the `c_parse_makefile` feature to
look for a GNUmakefile file if a Makefile is not present.
2021-02-03 19:15:03 -03:00
Jerko Steiner e8080be08b
Allow duplicate LSP completions for autoimport (#3473)
Similarly to TS completions, this allows the user to pick the package to autoimport when both the package and method name are the same.
2021-01-31 16:21:31 +00:00
Horacio Sanson bafe1c0fd6
3560 add vim 8.2 and nvim 0.4 to ci tests (#3561)
* Add vim82 and neovim04 to CI tests.

* Fix test_sign_column_hightlighting test.

In vim82 with verbose=1 the output of highlight command changes breaking
the ale#sign#SetUpDefaultColumnWithoutErrorsHighlight(). This commit
forces verbose=0 when the method starts and restores the previous value
before exiting.

* No return values in vim82 returns a numeric value instead of a empty string.

* Fix test_reek_handler test

The FuzzyJSONDecode() method catches E474 when it fails to parse the
input as JSON but Vim8.2 throws E491 instead. This commit modifies the
function to catch both E474 or E491.

* Fix perl6 handler test.

Perl6 handler catches json parse errors using the E474 error but in
Vim82 it changed to E491. This commit modifies the handler so both
errors are considered.

* Fix list opening tests.

In Vim 8.2 the call `range(1, bufnr('$'))` always returns quickfix
buffers no matter if they are closed or not. Using `ls` does not show
them but the above range will always include them.

This new behavior breaks the ale#list#IsQuickfixOpen() method that in
turn breaks many other things. This commit fixes this by using the
getqflist() and getloclist() methods instead.

* Fix test updates loclist test.

For some reason in Vim 8.2 the sign offset seems to not reset between
tests causing the sign_id to not match in the Assert. When the test is
run individually it passes but when run as part of the whole suite the
sign_id is off by one.

Forcing the offset in the test setup seems to fix the issue.

* Fix omnifunc completion test.

For unknown reasons the SetCompletionResponse tests fail in Neovim 0.2
and 0.4. Unfortunatelly the only solution I found is to disable them
for neovim.

* Fix linter warnings

* Fix smoker test.

Add vim 8.2 to the list of versions that need some retires due to
randomly failing tests.

* Add docker image build job.

Trying some clever trick to build the docker image if not available
locally or in Docker hub. It uses the Dockerfile md5 checksum as tag so
only when changes on that file occur will the image be downloaded or
build.

* Add labels to Docker image

* Remove tests for middle versions 8.1 and 0.3.5

* Use same vader commit as appveyor

* Implement image push to Docker Hub

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-01-27 19:52:24 +00:00
Kevin Svetlitski cab4280d02
Feature: Add support for named-pipe sockets for LSPs (#3509)
* Add support for using named pipes for lsp 'socket' servers; documentation updated accordingly
* Add tests for connecting to named pipe sockets
2021-01-26 20:43:17 +00:00
Horacio Sanson 1101346657
Merge pull request #3547 from hsanson/3546-fix-E928-when-using-javac-linter-on-non-maven-projects
Fix 3546 - check empty executable string.
2021-01-23 21:26:39 +09:00
Horacio Sanson 3e94c42ec0
Merge pull request #3521 from hsanson/3498-change-standardrb-fixer-to-use-stdin
3498 change standardrb fixer to use stdin
2021-01-23 19:28:41 +09:00
Horacio Sanson a6dfc611f6
Merge pull request #3424 from maxice8/atools
Add support for Alpine Linux APKBUILD
2021-01-23 16:05:26 +09:00
tatsuya 997dd7f8fe add spectral handler 2021-01-23 11:56:10 +09:00
Mohammed Chelouti 9b362634f7 feat: Add Deno lsp support 2021-01-22 19:06:53 +01:00
Mohammed Chelouti 4f2666265a feat: Add Deno fmt fixer 2021-01-22 19:06:52 +01:00