Commit Graph

1585 Commits

Author SHA1 Message Date
Braden M. Kelley
fd07cb8787 fix: run opacheck on entire dir for more context
Running `opa check` on a single file can report errors that might not
exist when considering other files in the same directory
2024-07-07 23:23:02 -07:00
w0rp
3220b94d20
Fix #4714 - Handle ruff garbage
When ruff outputs errors are invalid JSON text, handle that and stop ALE
from throwing exceptions.
2024-07-08 03:22:46 +01:00
Braden Kelley
a0ad5f938a
fix!(biome): allow passing options to biome check (#4799)
The only option available to biome's `lsp-proxy` command used for
linting is `--config-path`. However, we are using ALE to find and set
the project root, and have a way to manually override, so that is no
longer necessary.

The LSP proxy also used the `g:ale_biome_options` config, which is
shared with the fixer's `check` command, but `lsp-proxy` will throw an
error if unknown options are included, making it so that option is only
useful to set the project root.

BREAKING CHANGE: We are no longer passing options to the biome LSP
proxy, but we can still set the project root with
`g:ale_biome_lsp_project_root`.
2024-06-27 14:30:06 +09:00
Loic Nageleisen
e09520e2d7
Add Ruby linter with Steep (#4671)
* Add Ruby linter with Steep

Fixes #3254

* Run steep instead of using language server

LSP presents a few issues and this works around those.

* Work around Steep path issue

See https://github.com/soutaro/steep/pull/975

* Add simple tests for steep

* Add steep to supported tools

* Pass linter

* Add a comment regarding Steep's column counting

* Make lnum an integer

* Add Steep handler test

* Fix separator for Windows

* Escape Windows path separators for substitute()

* Use ALEInfo (I) group

* Use fnameescape instead of quotes

* Skip linting for files not under steep root

* Add and pass tests covering proper steep root lookup

* Fix separator discrepancy

* Use strict operators (match case)

* Fix ordering

* Use `is#` instead of `==#`
2024-06-25 17:17:27 +09:00
Braden Kelley
5606606b32
fix(biome): send correct language to lsp proxy (#4773)
Since Biome understands `typescriptreact` and `javascriptreact` as
languages, we can send the `filetype` to the LSP, rather than only
sending `typescript` for both `ts` and `tsx` files, or `javascript` for
`js` and `jsx` files.

fixes: #4752
2024-06-24 06:32:24 +01:00
w0rp
c7c41e1574
Run actionlint by default on GitHub files
Detect paths containing .github as a directory for running actionlint
by default on YAML filetypes.
2024-06-02 19:07:06 +01:00
Macuyler Dunn
c88bddfa83
Update dart analysis_server command (#4761)
* Update dart analysis_server command

In 2021 the dart team added a new sub-command `language-server` to
replace the original `./snapshots/analysis_server.dart.snapshot --lsp`
convention for starting the language server.

c224cc2e0d

* Add ale_dart_analysis_server_enable_language_server option

This allows users to opt-in to the new `dart language-server` command.

* Enable ale_dart_analysis_server_enable_language_server option by default

* Update doc/ale-dart.txt

Include the dart version number where the `dart language-server` command
was added.
2024-05-09 10:58:16 +09:00
Yining
d19b238aa2
fix: force --no-fix when ruff used as a linter (#4759)
this commit is to fix #4756 which suggests to force disable applying
fixes when linting, particularly when `fix = true` was set in project
`pyproject.toml` file.

The flag `--no-fix` was added without checking the version of `ruff` at
this moment as it seems to be available in a quite early version.
2024-04-26 18:29:17 +09:00
Chayoung You
b6b9612691
Make cmake-lint read .cmake-format config file (#4747) 2024-04-07 10:32:19 +09:00
Shad
712b4b3a97
Add support for sqlfluff 3.0.0 (#4743)
As stated in the changelog:
"the original fields of line_pos and line_no have been renamed to start_line_pos and start_line_no, to distinguish them from the new fields starting end_*"
2024-03-14 09:09:56 +09:00
Horacio Sanson
8f9197b79b
Fix 4740 - add hurlfmt linter (#4741)
* Fix 4740 - add hurlfmt linter

* Fix 4740 - add hurlfmt fixer

* Fix wrong comments

* Add end_col to qflist

* Fix test
2024-03-12 09:51:49 +09:00
Yining
b01c0b23bb
Fix: ruff version 0.3.0 cli breaking changes (#4732)
This commit appends `check` to the ruff executable if the version of
specified ruff executable is `>= 0.3.0`, as ruff version `0.3.0`
deprecates `ruff <path>` in favor of `ruff check <path>`:

https://github.com/astral-sh/ruff/releases/tag/v0.3.0
2024-03-02 08:31:19 +09:00
Horacio Sanson
24a937e04f
Fix 4586 - Make golangci-lint lint package on by default. (#4730)
Checking whole packages instead of individual files is more sensible
default for golang projects. Without this we get many cryptic
`typecheck` errors in ALE that do not show when running in terminal or
CI.
2024-02-28 10:07:22 +09:00
Jorengarenar
9b8413a825
Fix chktex highlighting wrong column when using tabs instead of spaces (#4727)
* Fix '-s' to be '-S' when setting 'TabSize=1' for chktex

Fixes #4712
Closes #4725

* Check if chktex's -S option is available

* Check chktex version instead of trying -S option
2024-02-27 08:54:14 +09:00
Horacio Sanson
00dcf52d6f
4712 revert chktex 4661 (#4725)
* Fix 4712 - revert #4661

* Fix tests
2024-02-26 11:56:56 +09:00
Filip Gospodinov
9cc8383fe9
Add full support for biome (#4705)
* Revert "Add biome support for javascript (#4701)"

This reverts commit 8922478a83.

* Add support for biome
2024-02-24 16:51:39 +09:00
Dmitri Vereshchagin
b74cd02648
Set working directory for Elvis linter (#4726)
Most of the time it works to assume that the current working
directory is the root of the project.  However, this is not the case
for Rebar3 checked out dependencies, for example.

It's also worth noting that because of the way Elvis handles file
patterns, and because directories in configuration are relative to the
project root, the path supplied to command must be also relative.
2024-02-24 15:37:55 +09:00
Sam
5e8904cd3d
Add support for gjs template linting using embertemplate lint (#4653)
* super hacky way to get ember template lint to work on gjs files

* Clean up code so we use a handler which means we reuse all the config
also moves handler to the glimmer directory so it only fires
for gjs files

* fix tests
2024-02-23 13:30:12 +09:00
Edwin Huijsing
f38a802172
Add file mapping to phpstan (#4685)
* PHPStan is now working with filename-mapping

See help ale-lint-other-machines for more info about filename-mapping.

* Add two tests to show and test what is expected

* Missed this update while creating previous commit

* Simplified the update

We only needed to refactor the processing loop.
No extra test are needed.
2024-02-22 11:55:52 +09:00
AlvinRolling
52c6146751
Slang linter for Verilog. (#4713) 2024-02-22 11:18:04 +09:00
Dmitri Vereshchagin
1c5b84f375
Update project root detection for erlang_ls linter (#4619)
* Refactor erlang_ls linter tests

* Add Rebar3 _checkouts support for erlang_ls linter

* Add Erlang.mk support for erlang_ls linter
2024-02-22 11:14:56 +09:00
Benjamin Block
8b8ddea6e5
Adding support for Odin language server (ols). (#4679) 2024-02-22 11:12:57 +09:00
Tim Carry
6fd9f3c54f
fix #4687 - only lint one file with actionlint (#4688) 2024-02-06 10:23:26 +09:00
Jorengarenar
94f764631d
Fix chktex highlighting wrong column when using tabs instead of spaces (#4661)
* Fix chktex highlighting wrong column when using tabs instead of spaces

Fixes #723

chktex implemented feature request [1] for allowing setting options from
the command line. Thanks to that we can tell it to treat tab character
as of one space width, i.e. one char. That means, after we translate the
output back to Vim columns, we get correct numbers.

[1]: https://savannah.nongnu.org/bugs/?56486

* Add test_tex_chktex.vader

* Use functions to set g: variables in ale_linters/tex/chktex.vim

* Update ale_linters#tex#chktex#GetCommand() to use '%e'
2024-01-14 21:04:23 +09:00
Tim Carry
17cca243e3
Actionlint: correctly parse error line when using shellcheck sublinter (#4689) 2024-01-14 20:51:39 +09:00
Jonathan Palardy
ebc6718c0a
Support gleamlsp language server for gleam (#4696) 2024-01-14 20:43:59 +09:00
Nicolas Blanchot
32e6fc5975
Stylelint linter output stream can go to stderr (#4702)
Since [version 13.6.0](804bb24c75/CHANGELOG.md (L654)),
following [PR 4799](https://github.com/stylelint/stylelint/pull/4799)
`stylelint` errors are sent to `stderr`. Previous versions where sending
errors to `stdout`.
2024-01-14 20:43:31 +09:00
samuelhelen
143074a780
Fix E1085: Not a callable type: elm_ls#GetOptions (#4707)
Rename GetOptions to GetInitializationOptions for consistency.
2024-01-14 20:28:29 +09:00
Finn Steffens
9a23ec1f60
Ruff use json-lines output format (#4656)
* Ruff use json-lines output format
* Fix Ruff: add -q to prevent non json output

Using the json-lines output format allows for setting of the end_line,
end_col and code field of the handle output.

Additionally, the first letter of the code is used to determine the type
field.

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2023-12-10 11:45:01 +00:00
Shad
ecc796b3d7
fix tempfile for phpmd, to be able to use phpmd 2.14.0 (#4617) 2023-12-10 11:11:29 +00:00
MD
71718722b2
Add support for Scarb in cairo files (#4669)
* Add support for Scarb in `cairo` files
* specify if linter should run on saved
2023-12-08 22:13:37 +00:00
Jorengarenar
fc45a935bf
Add clang-check linter for C (#4662)
* Close #976 - add clang-check to C linters

* Update docs
2023-12-07 14:49:37 +00:00
Adam Blackwater
50e237facd
Fix: Ruff output option (#4632)
* fix --output-format option
* Add conditionally changing flag based on Ruff version
2023-11-08 21:44:11 +00:00
w0rp
53b01d6a54
Fix #4499 - Fix solhint >= 3.4.0
Fix solhint for versions >= 3.4.0, while still supporting older
versions.

The solhint linter code has been moved out of the `handlers` directory
as it does not need to be shared between different filetypes. Code has
been simplified.

Co-authored-by: Henrique Barcelos <16565602+hbarcelos@users.noreply.github.com>
2023-09-17 17:24:23 +01:00
w0rp
bd9fc580a1
Close #4541 - Fix Haskell project root detection
We weren't joining and returning paths correctly for detecting project
roots for Haskell projects, and now we are.

Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
2023-09-16 23:25:39 +01:00
w0rp
ae1d051504
#4454 Clean up more tests and code
* Remove some tests we no longer need
* Delete blocks of redundant code
* Compress some tests together to simplify them
* Remove a little code for ancient linter versions
* Escape more executables we didn't escape before
* Rename a deno option that didn't match our conventions
2023-09-16 22:23:30 +01:00
w0rp
be69af2705
#4607 No conflicts with nvim-lspconfig by default
Default `g:ale_disable_lsp` to a new mode `'auto'` by default. With this
setting applied, ALE will now check for the presence of nvim-lspconfig
and automatically turn off particular LSP linters if already configured
via nvim-lspconfig.

For users that do not use `nvim-lspconfig`, everything should work as
before.
2023-09-14 00:40:56 +01:00
ymap
9092af9ad6
Add support for Packwerk (#4594)
Packwerk (https://github.com/Shopify/packwerk) is a Ruby gem
used to enforce boundaries and modularize Rails applications.
2023-09-13 15:53:24 +01:00
Axel Clark
ac615e7f65
Add lexical for linting elixir projects (#4580) 2023-09-11 13:48:11 +01:00
Peter Benjamin
61892e8586
fix(json): update vscode json lsp name (#4601)
* fix(json): update vscode json lsp name
* fix(vscodejson): fallback to previous name

Co-authored-by: w0rp <devw0rp@gmail.com>
2023-09-09 23:28:38 +01:00
w0rp
92267a14ba
Remove backwards compatibility with ancient setting names 2023-09-09 23:13:44 +01:00
w0rp
d2c2bbf2dc
Add --globals vim to luacheck automatically
luacheck will run with `--globals vim` automatically if the file is in
runtimepath and `--globals` hasn't already been configured.
2023-09-09 14:01:00 +01:00
Peter Benjamin
3bedafc29a
fix(yaml): make actionlint respect config (#4584)
* fix(yaml): make actionlint respect config
* docs: update actionlint docs
* chore: update author & add description
* test: move actionlint test to test/linter/
2023-09-05 14:33:41 +01:00
Peter Benjamin
18cd44c57d
feat(markdown): add marksman lsp (#4565)
* feat(markdown): add marksman lsp
* docs: add marksman docs
* test(markdown): add marksman test

Co-authored-by: Peter Benjamin <peter.benjamin@peter.benjamin-FVFHP2WSQ05Q>
2023-08-01 21:23:02 +01:00
JoseGRuiz
481c5cccbf
fixed parsing errors when certain options are used in glslangValidator (#4540)
* fixed parsing errors when certain options are used in glslang

* Update glslang.vim

set column number to 0 like it is always set by glslangValidator

* Added a test for the handler of glslangValidator
2023-07-24 21:43:13 +09:00
Craig Rodrigues
3d10770387
Remove gometalinter support (#4534)
gometalinter has been deprecated, and was archived in 2019
2023-07-24 21:33:15 +09:00
Mitchell Hanberg
7ba88ad343
chore: update elixir_ls.vim (#4547)
The project was forked and lived under a new organization
2023-07-24 10:28:34 +09:00
Arnold Chand
32e1417d98
fix(vue): volar v1 support (#4552)
* fix: volar v1 support

* fix: volar linter errors
2023-07-24 10:08:11 +09:00
Craig Rodrigues
29e5ffe35a
Remove golint supported-tools (#4535)
golint has been deprecated and was archived in 2019
2023-06-27 18:52:50 +09:00
Chuck Grindel
21f1ab6ffc
feat: support Bazel buildifier linter (#4529)
* Initial buildifier linter files

* Add handler test

* Fix test when options are not set
2023-06-27 18:52:25 +09:00