* origin/master: (40 commits)
fix: correct suggested filetype for yamlfix
feat: add yamlfix fixer
Use _config for LSP config options
Add support for R languageserver (#3370)
Fix 3103 - add shellcheck shell directive detection. (#3216)
Added the Vundle command in installation instructions (#3400)
Adds support for Tlint - A Tighten Opinionated PHP Linter (#3291)
Add php phpcbf options (#3383)
Use has('gui_running') instead of has('gui')
Close#2727 - Add a hover-only setting for balloons
Fix#3332 - Modify everything for rename/actions
Add a missing blank line in documentation
Add luafmt fixer (#3289)
#3442 Fix code fix clangd issue
Close#1466 - Add GVIM refactor menu support
Look for node packages in .yarn/sdks as well
Update documentation for code actions and rename
cmp forwards, and reverse the code actions
Support for LSP/tsserver Code Actions (#3437)
Move the test for buffer-local variables
...
Hadolint is in the process of adding the severity of a lint rule to the
commandline output: https://github.com/hadolint/hadolint/pull/501
This change utilizes that to show the severity in vim.
NOTE: The custom-linting-rules test fails due to the following (legit)
warnings:
ale_linters/clojure/clj_kondo.vim:29 Use snake_case names for linters
ale_linters/elixir/elixir_ls.vim:15 Use snake_case names for linters
ale_linters/go/golangci_lint.vim:54 Use snake_case names for linters
ale_linters/swift/swiftformat.vim:56 Use snake_case names for linters
The message wasn't getting printed because docker was explicitly only
being asked to connect stdout (ignoring stderr). Unclear yet why the
error code wasn't getting bubbled up.
sed wasn't using -E, so '|' wasn't being handled properly. Seems likely
that's sed-implementation specific, so now it runs through docker's sed
to support portability.
* Fix 3103 - add shellcheck shell directive detection.
Searches for shellcheck shell directive to detect dialects for scripts
that do not have shebang.
* Change order of detection of shellcheck dialect
In a situation where the filetype can be wrong (example: something.sh
which is written in bash dialect) and has no hash-bang (since it is
meant to be sourced) then the override specified within the script will
be ignored.
It probably is the most right thing to do if the script author has added
a specific directive; it should trump everything else.
Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: Dino Korah <dino.korah@redmatter.com>
ALE now just modifies every open buffer for rename and actions, and sets
up a one-time use BufEnter event to reload buffers that are changed so
you don't have to think about what to do with changed buffers.
* Added tsserver and LSP code action support.
* tsserver refactors support added.
* Handling special case when new text is added after new line symbol.
* ale#code_action#ApplyChanges simplified.
* Initial attempt on LSP Code Actions.
* workspace/executeCommand added.
* Some null checks added.
* Add last column to LSP Code Action message.
* Pass diagnostics to LSP code action.
Previously ApplyChanges code was applied from top-to-bottom that required
extra parameters to track progress and there was bug. I have changed code
to bottom-to-top approach as that does not require those extra parameters
and solved the bug.
Tested with typescript-language-server and it is working.
* origin/master:
Add tests for maven.vim file
Fix grammatical error in doc
Add maven helper file; use maven wrapper if available instead of global 'mvn' executable
fix lint, fix variable semantics and update tests
bibclean: update matchlist reges for bibclean > v2.11.4
Update rubocop_auto_correct_all tag
Newer versions of pylint will now check your code as you type. Older
versions will still only check the file on disk.
Co-authored-by: Oliver Wiegers <oliver.wiegers@gmail.com>
Add an `ALECompletePost` event along with everything needed to make it
useful for its primary purpose: fixing code after inserting completions.
* `ALEFix` can now be called with a bang (`!`) to suppress errors.
* A new `ALELintStop` command lets you stop linting, and start it later.
A new command, `:ALEImport`, has been added, which lets you import words
at your cursor if a completion provider can provide a completion for
that word which includes some additional text changes.
* ember-template-lint: Lint from stdin
* This feature has recently been implemented in ember-template-lint.
* Refactor ember-template-lint executable
* Fallback on a temporary file for old template-lint
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
Option `per-file-ignores` was introduced in flake8 version 3.7.0.
It allows to ignore specific errors in specific files using glob syntax.
For example `per-file-ignores = src/generated/*.py:F401` will
ignore `F401` error in all python files in `src/generated`.
Thus ale has to run flake8 from project root where .flake8 config
is placed otherwise glob won't match linted file.
`lint_file` can now be computed dynamically with a callback function,
which can return a deferred result, as per `ale#command#Run`. This
allows linters to dynamically switch between checking files on disk,
or checking code on the fly.
Some tests have been fixed on Windows.
Prettier does not use `.prettierignore` unless the current directory is the root where the `.prettierignore` file resides.
* Update Prettier tests
* Look for prettierignore to determine project root
ALE now converts paths from compile_commands.json files into absolute
paths and prefers matching against absolute file and directory names for
determining which flags to use for files. As a result, parsing
compile_commands.json to determine flags should work for a lot more C
and C++ projects.
ALE was incorrectly detecting completion results from servers such as
rust-analyzer as wanting to add import lines when additionalTextEdits
was present, but empty.
Now ALE only filters out completion results if the autoimport setting is
off, and one of the additionalTextEdits starts on some line other than
the current line. If any additionalTextEdits happen to be identical to
the change from completion anyway, ALE will skip them.
Users can easily be confused when they set some options for a C or C++
compiler, and another compiler is run with different options, which
still reports errors. To remedy this, the existing `gcc` and `clang`
linters have been replaced with a `cc` linter that will run either
compiler.
This is a breaking change for ALE v3.0.0.
Certain tests could break if you ran them separately from other tests.
They have been patched.
`run-tests` now has a `--fast` option which runs tests with only the
fastest Vim version ALE tests with, and the custom checks.
* Restore old behavior of ALEFix command for Rubocop
Since RuboCop 0.60 ALEFix command stopped to fix all found offenses. This change restores the
previous behavior by allowing rubocop to fix all detected offenses.
* Fix tests
* Allow to configure auto-correct option for Rubocop