Commit Graph

4608 Commits

Author SHA1 Message Date
Nicolas Derumigny
d2f4090c33 doc(slang): fix minor typo (#5047)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-10-26 16:16:04 +09:00
Bill Ruddock
59c6b4f7b0 phpstan: support config phpstan.dist.neon (#5052)
phpstan will load config from (in order) phpstan.neon, phpstan.neon.dist, or
phpstan.dist.neon.
2025-10-26 15:55:40 +09:00
Bill Ruddock
21d5de18b2 fix phpstan: use configured level 0 (#5053)
Use configured g:ale_php_phpstan_level if it is 0 (as a number rather
than string).

0 (number) is considered to be empty, but '0' (string) is not.
2025-10-26 15:51:03 +09:00
Max Jacobson
ed26d1f1d9 Add --editor-mode flag when invoking rubocop (#5049)
* Add --editor-mode flag when invoking rubocop

Since RuboCop 1.61.0 (released in February 2024), RuboCop accepts an
`--editor-mode` flag which improves editor integrations like ale.

Some of RuboCop's auto-corrections can be surprising or annoying to run
on save. When RuboCop is running via an LSP or when the `--editor-mode`
flag is passed, it will understand that it is running in an editor, and
it will hold off on making changes that might be surprising or annoying.

For example, if I write

```ruby
def call
  results = some_process
end
```

This has an unused variable, and RuboCop will remove the unused variable
when you run it. However, if you're in the middle of editing, you may
not want it to remove that unused variable, because you may be about to
add a usage of it.

More context:

- PR which introduced it: https://github.com/rubocop/rubocop/pull/12682
- Release notes for 1.61: https://github.com/rubocop/rubocop/releases/tag/v1.61.0
- Docs: https://docs.rubocop.org/rubocop/1.80/configuration.html#contextual

This will be a breaking change for anyone who is running an old version
of RuboCop, because the flag will not exist for them. If they would like
to opt out of this change, they can set an option to omit the flag. I
think this ought to be enabled by default so that people will get this
benefit out of the box.

In the meantime, I am opting into this behavior by setting this option:

```vim
let g:ale_ruby_rubocop_options = "--editor-mode"
```

So I appreciate that this seam was already introduced.

* Make this a non-breaking change

This will detect the current rubocop version and auto-enable
--editor-mode for newer version of rubocop without affecting users of
older versions of rubocop.
2025-10-26 15:14:30 +09:00
FouMalade
9811114948 Add j2lint linter for Jinja2 templates (#5048)
Co-authored-by: Nicolas SCHMAUCH <nic.schmauch@i-0330135t.ac-bordeaux.fr>
2025-10-26 14:54:22 +09:00
Shigma
4217461c48 fix issue 5037. "/s/c/" to "/s/c" (#5043)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
a bug on windows.
link: https://github.com/dense-analysis/ale/issues/5037
2025-09-06 16:36:44 +09:00
Ben Boeckel
528e25954b ale: add FindNearestFileOrDirectory function (#5033)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* test: rename `FindNearestFile` test file

It matches the API name better and now lives beside the test file for
`FindNearestDirectory`.

* ale: add `FindNearestFileOrDirectory` function

Some anchor paths can be files or directories (e.g., `.git` is a
directory normally, but a file for worktrees). Add a function that finds
either type of path and returns the nearest.
2025-08-21 12:59:18 +01:00
rymdbar
b415dddf9f Make phpactor configurable and documented (#5027)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Add php_phpactor_executable for phpactor and make it configurable
through php_phpactor_config.

When phpactor was first added in 3b8ff65, it had no configuration. Thus
the documentation for it could be completely blank. That is why it now
seems like an initial addition

Co-authored-by: cos <cos>
2025-08-15 12:27:58 +01:00
rymdbar
55acb6536e Update two broken links to golang tools (#5031)
Co-authored-by: cos <cos>
2025-08-15 12:26:37 +01:00
Yining
34d1fd266b chore: remove some unused files and minor typo fix (#5029)
removed some files that seem not needed any longer and a minor typo in
code comment
2025-08-15 12:23:31 +01:00
rymdbar
84eae97bf2 Correct typo in documented python command (#5030)
Co-authored-by: cos <cos>
2025-08-15 12:22:56 +01:00
w0rp
9acafa8018 Close #5019 - Mention Sponsorship page
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-08-14 20:26:42 +01:00
w0rp
11cbd96667 Stop oelint_adv functions possibly conflicting 2025-08-14 20:21:50 +01:00
offa
ce1ee7c598 Update oelint pattern (#5016)
* Update oelint pattern
* Handle optional branch output
2025-08-14 20:18:00 +01:00
rymdbar
a083d58c7f Fix lua_language_server_config variable name (#5025)
Since added in commit f2a21c9, the implementation and documentation has
differed in their naming. The latter has had an additional lua_-prefix.

With this fix, setting the variable as documented actually results in a
'workspace/didChangeConfiguration' method being executed on the luals.

Adding a reference to the documentation of which configurations the lsp
supports doesn't hurt, so that's done too.

Co-authored-by: cos <cos>
2025-08-14 20:16:18 +01:00
w0rp
3539f39d4d Add checkov linter for cloudformation
Co-Authored-By: jhandsel <64368631+jhandsel@users.noreply.github.com>
2025-08-14 17:34:25 +01:00
Kyle Behrens
37e64b5caf fixes ruff#GetCommand checking packagemanger verison and not ruff (#5026)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-08-14 11:57:46 +00:00
Woshiluo Luo
822d9a1bf3 linter/scala/metals: add build.mill as project root detect file (#5012)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
2025-08-13 15:58:33 +00:00
rymdbar
92dd497e6c Add support for perl language server (#5003)
* Fix perl test case clean-up
* Add support for perl language server

Co-authored-by: cos <cos>
2025-08-13 16:57:11 +01:00
Nicolas Derumigny
6d7bc15d9a Add support for verible: language server + fixer (#4994)
* Add support for verible: language server + fixer
* verible: add default flag, rules support for verible-ls
2025-08-13 14:41:56 +00:00
w0rp
29f1ff2579 Add support for fortitude (fortran linter) #5004
* add support for fortitude fortran linter
* add fortitude fortran linter doc
* Add a fortitude linter test file
* docs listings are now alphabetically sorted

Co-Authored-By: gomfol12 <info@marekb.de>
2025-08-13 15:24:35 +01:00
bretello
7df94447c1 add preview for ALEFindReferences (#5001)
* add preview for ALEFindReferences
* ALEFindReferences: add -contents options and g:ale_references_show_contents option to configure default behaviour
* tests: add tests for ALEFindReferences -contents feature
* tests: update tsserver references tests with show_contents args
2025-08-13 14:21:48 +01:00
Yining
c74b917648 add: support project-local ansible-lint (#5015)
Add support for project-local `ansible-lint` (via `uv`, `poetry`, and `pipenv`) 
when using the system-wide installed one is not possible or not desirable.
2025-08-13 14:19:15 +01:00
w0rp
206b414120 Save redpen_options when running tests
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-08-13 13:07:28 +01:00
Jason Weir
5dfd1fdb9a Add configurable options support for redpen linter (#5006)
Redpen linter previously had hardcoded command-line options and duplicated
linter definitions across all supported file types (asciidoc, markdown,
review, rst, tex, text). This refactoring centralizes the linter definition
and adds support for user-configurable options via g:ale_redpen_options.

Key changes:
- Created ale#handlers#redpen#DefineLinter() to eliminate code duplication
- Added ale#handlers#redpen#GetCommand() to support configurable options
- All file types now use shared configuration and command building
- Added comprehensive test coverage for option handling
- Updated documentation for all affected file types

This allows users to customize redpen behavior with additional command-line
options while maintaining backward compatibility and reducing maintenance
overhead.
2025-08-13 13:06:06 +01:00
F-Kearney
ac691b0b89 Appended 💬 emoji to any line containing an lsp (#5011) 2025-08-13 12:45:33 +01:00
w0rp
28573c8ada Reduce lines of code for tombi 2025-08-13 12:45:26 +01:00
Ben Boeckel
d6f1a47647 tombi: support its LSP (#5022)
* tombi: support its LSP
* tombi: support linting and formatting
2025-08-13 12:30:46 +01:00
Ben Boeckel
487d915984 doc/ale-rust: fix rust-analyzer typo (#5021) 2025-08-13 12:27:00 +01:00
w0rp
c7f3ba9d41 Take Vim binaries from ALE release assets 2025-08-13 12:21:22 +01:00
w0rp
295752ff3e Skip empty or unparseable ruff items 2025-08-13 12:18:58 +01:00
Benjamin Block
3d68ec7857 Only strip newlines for echo, otherwise full messages (#4964)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Updates `ale#lsp#response#ReadDiagnostics` to always store the full, unaltered diagnostic message from the LSP in question. The current process is to replace all newline characters with whitespace (' '), which then leads to broken formatting when viewing complex output from an LSP with `:ALEDetail` and other commands.
* Updates `ale#cursor#TruncatedEcho` to replace newline characters with a space ' ' instead of an empty string '' to retain the previous style of formatting for echoed messages.

Fixes: #2356
Fixes: #3068
Fixes: #2301
2025-07-20 11:47:26 +01:00
Tarik Graba
e670c9781c Slang verilog Linter: set default searchpath and output filename (#4999)
* Sets module search path to file directory for slang/verilog linter

Similar to iverilog behaviour.
See 699c0dbe80

Reasonable default behaviour, can be changed by adding '-y%s:h' to
`b:ale_verilog_slang_options` buffer variable.

* Adds filename to slang/verilog linter output

slang can parse other files based on the modules instances names find in
the current file and returns warning/error messages related to those
files that have the same pattern.

Adding the file name to the outputs avoid polluting the active buffer
with those messages.

* Absolute paths in slang/verilog linter messages

Otherwise temp files are not correctly detected
2025-07-20 11:27:25 +01:00
Tarik Graba
0d1d0a9f81 Add explicit module search path to the verilator linter (#5000)
Adds the origin file directory as a module search path.
This is the default behaviour, this commit makes it explicit.

Note from the doc:

'-I' -> include search path
'-y' -> module search path

The space after '-y' seems mandatory, at least when I tested it with
vresion 5.032-46-g447ab12ce
2025-07-20 11:15:15 +01:00
Leo Correa
c8890af8d4 Add initialization_options to Sorbet LSP linter (#4954)
* Add initialization_options to Sorbet LSP linter

Using a predefined object will ensure that Sorbet always receives an
object instead of an array. LSP defines the initializationOptions as
anything. Unfortunately Sorbet is too strict and raises an error when
anything other than an object is passed which causes the linter to fail

* Document empty objects will prevent Sorbet from properly initializing
2025-07-20 11:13:33 +01:00
F-Kearney
9abe393961 Added 'build/Debug' and 'build/Release' to g:ale_c_build_dir_names (#4322) (#5008) 2025-07-20 10:01:56 +00:00
w0rp
4b1bf3ee8f Disable unreachable errors from shellcheck in run-tests
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-07-12 13:02:49 +01:00
w0rp
edccdfa9ef Make shellcheck respect ale_warn_about_trailing_whitespace
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-07-06 18:47:46 +01:00
Andrey Starodubtsev
9e49019a26 Some absolute paths are not recognized for Windows (#4987)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Some abs paths are not recognized for win32

Paths like "c:/abc/def.cpp" were not recognized as absolute on Windows.

* Fix test for mypy_handler

mypy handler not just simplifies path, but tries to convert path to
absolute.
2025-06-24 11:05:11 +01:00
w0rp
a0572359ae Remove pytest.ini from project detection files
This breaks detecting the project root when editing tests with a nested
pytest.ini file where other project files are available. The other files
are so common we can just removes this entirely and test that we
ignore it in one case.
2025-06-24 07:47:15 +01:00
w0rp
80ff84db84 Skip whitespace warnings from ruff, if so configured
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-05-20 16:59:42 +01:00
w0rp
c8c33e7217 Add bash-language-server as an alias for it 2025-05-20 15:55:26 +01:00
Horacio Sanson
5098dfd27e Fix golangci-lint fixer with version 2 (#4960)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-05-17 20:28:17 +09:00
Oliver Albertini
7cdaaa645d [python/pyre.vim] use pyrefly executable (#4972)
https://github.com/facebook/pyrefly

The pyre project has evolved to pyrefly. This replaces the pyre linter
with a pyrefly one and removes the test files that were added for
finding the project root in the old pyre world.

Co-authored-by: Oliver Ruben Albertini <oliverruben@gmail.com>
2025-05-17 20:08:52 +09:00
Nikita Korolev
2f4a866591 Add initial support for named-checkzone linter (#4961)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Co-authored-by: ds <ds@local>
2025-05-05 15:05:51 +09:00
Benjamin Block
f9de268816 Adding Roc language linters and fixers. (#4966)
* `roc_language_server`

* `roc format`

* `roc format annotate`
2025-05-05 15:01:45 +09:00
w0rp
1aaeb2cdae Add other issue types
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-04-26 04:32:53 +01:00
w0rp
05e22db9a2 Add Bug as a bug issue template type 2025-04-26 04:31:16 +01:00
Benjamin Block
d0cdde7516 Add support for the Lean 4 LSP, served by lake. (#4952) 2025-04-26 10:48:39 +09:00
Mikhail Velikikh
baaca9a5d7 Use ale#Escape in c_clangformat_style_option (#4949)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Use ale#Escape in c_clangformat_style_option
* Update Vader test
2025-04-16 02:29:57 +00:00