Commit Graph

1521 Commits

Author SHA1 Message Date
Albert Peschar
599f7b1eda
phpstan: set cwd to configuration file directory (#4422)
PHPStan will only detect a configuration file in the current working
directory, so set that to the directory in which ALE finds the
configuration file.
2023-02-02 14:09:11 +09:00
Yining
b6f6d84c25
add: pycln as a python linter and fixer (#4415)
this commit adds pycln as a Python linter and fixer, together with some
tests and documentation. It addresses #4340

pycln repo: https://github.com/hadialqattan/pycln
2023-01-27 10:24:18 +09:00
Actionless Loveless
26c79014f5
fix(ale_linters: python: ruff): add --stdin-filename if version > 0.0.69 (#4414) 2023-01-27 09:03:41 +09:00
Antonio Gurgel
ef6715ee41
nix: durably handle versions before 2.4 (#4398)
What I should have done in 4394. Idea: @w0rp
2022-12-28 21:05:32 +09:00
Antonio Gurgel
4c5c47b593
nix: handle versions past 2.9 (#4394) 2022-12-25 19:02:01 +09:00
w0rp
bc95701575
Fix #4388: Fix pylsp and Pyright cwd
Add functions to compute the cwd to be the same as the project root for
pylsp and Pyright to work around issues in each language server when
they encounter modules that share the same name as first or third party
libraries.
2022-12-24 13:37:57 +00:00
Michael F. Schönitzer
42a17dec16
Handle empty answer of ansible-lint (#4373)
* Handle empty answer of ansible-lint

The variable a:lines might be empty if ansible-lint exited early, in
that case json_decode would trow an error.

* Use ales JSON decode function
2022-12-06 21:44:10 +09:00
Yining
cad8f8e683
add: support for refurb as a Python linter (#4379)
this commit adds refurb as a Python linter, together with some tests
and documentation. it should fix issue: #4362

refurb repo: https://github.com/dosisod/refurb
2022-12-06 21:26:09 +09:00
Horacio Sanson
3e460fa93b
Fix 4246 - Add ansible language-server (#4355) 2022-11-25 13:13:38 +00:00
Carl Smedstad
590352304e
Fix bug in sqlfluff implementation & implement fixer support (#4365)
* Account for no sqlfluff output

Avoid crashes when there isn't any output from sqlfluff.

* Add supplort for sqlfluff as a fixer
2022-11-23 19:58:49 +09:00
Carl Smedstad
6c4be47437
Implement support for SQL linter sqlfluff (#4361) 2022-11-21 19:50:45 +09:00
Götz Christ
ca355f4cb4
Markdown: allow passing custom executable for markdownlint (#4358) 2022-11-21 19:47:05 +09:00
Yining
edffffac25
add: support config option for checkmake linter (#4351)
`checkmake` by default checks config file "in the same folder it's
executed in" unless `--config` option is set.

This commit allows setting the `--config` option with an option
variable (with documentation updated).
2022-11-06 09:32:51 +09:00
Matthew Armand
121fbefeae
Add 'dockerfile_hadolint_options' config setting (#4353)
- Add this option so command line arguments can be supplied to hadolint
- This will be respected when running in docker and via the executable
- Preserve the --no-color and - flags, and add these to the list
- Add to docs and tests
2022-11-04 17:07:56 +09:00
Yining
483d056528
add: support for ruff as a Python linter and fixer (#4347)
this commit adds ruff as both a Python linter and fixer, together with
some tests and documentation.

ruff repo: https://github.com/charliermarsh/ruff
2022-10-31 21:55:14 +09:00
Dmitri Vereshchagin
06efbdd25a
Add erlang_ls linter for Erlang files (#4346) 2022-10-29 20:58:30 +09:00
Ben Boeckel
28cff80652
codespell: fix spelling errors picked out by codespell (#4343) 2022-10-29 20:56:09 +09:00
Nicolas Pauss
951a668b14
cc: fix using '-x c*-header' for header files with GCC. (#4334)
Gcc does not support `x c*-header` when using `-` as input filename,
which is what ALE does.

Rework the feature to only use `-x c*-header` flag when using Clang and
not GCC.

The feature is now also controlled with the variable
`g:ale_c_cc_use_header_lang_flag` and
`g:ale_cpp_cc_use_header_lang_flag`.
2022-10-12 07:05:37 +09:00
koka
14d2b261ce
Add support for tfsec Terraform linter (#4323) 2022-10-04 11:47:00 +09:00
Nicolas Pauss
78942df284
cc: use '-x c*-header' for header files for C and C++ linters. (#4318)
When linting an header file in C or C++, `-x c-header` or
`-x c++-header` should be used instead of `-x c` or `-x c++`.

Using `-x c` or `-x c++` for headers files can lead to unused variables
and functions marked as static inlined as seen in #4096.

Using `-x c-header` or `-x c++-header` solve these issues.

The list of file extensions that are considered as header files can be
configured with the variables `g:ale_c_cc_header_exts` and
`g:ale_cpp_cc_header_exts`.
2022-09-25 09:02:43 +09:00
Christoph Frick
a56d51ec1c
Pass input via stdin and filename as arg to clj-kondo (#4315)
This allows using linters like `:namespace-name-mismatch`.

This replaces: https://github.com/dense-analysis/ale/pull/4109
2022-09-22 07:24:01 +09:00
Carl Smedstad
e73f0f5cb3
bicep: Lint files on disk instead of buffer (#4311)
I discovered that references to other Bicep files (modules) will be
broken if running on a temporary file in a different location. I've
found no way of providing an alternate path when invoking the command.
2022-09-21 22:44:22 +09:00
Carl Smedstad
8e03ceecdc
Add support for Microsoft's DSL Bicep (#4310)
* Add support for Microsoft's DSL Bicep

The compilation command 'bicep build' catches compilation errors as well
as providing some lint warnings.

Repository for Bicep: https://github.com/Azure/bicep

* Different null file on Windows & hardcode commands
2022-09-14 08:13:41 +09:00
BBOOXX
77fcf9b2c2
chore(volar): update volar executable name (#4308)
see: johnsoncodehk/volar#876
see: johnsoncodehk/volar/blob/master/packages/vue-language-server/package.json#L11
2022-09-11 11:07:01 +09:00
Horacio Sanson
a51fd9daba
Add gitlablint support (#3042) 2022-09-11 10:53:33 +09:00
Guangqing Chen
477ad3fdd2
Allow to pass options to the buf linter and fix callback. (#4300)
* Allow to pass options to the buf linter

* Fix the callback of buf linter
2022-09-08 17:04:17 +09:00
Nathan Henrie
5063804d44
Add openscad and sca2d support (#4205) 2022-08-07 16:27:17 +09:00
0xHyoga
0ea53870b6
cairo support (#4256)
* cairo support

* supported languages txt

* add cairo to ale.txt
2022-07-22 13:05:08 +09:00
Gabriel Remus
4a0d669c0a
Show warnings for dart_analyze linter (#4237) 2022-06-25 00:18:08 +09:00
Isman Firmansyah
876140832c
Add support for actionlint options (#4216)
* Add support for actionlint options

* fix misaligned doc tags
2022-05-29 22:23:47 +09:00
Michał Padula
e343148e80
Fallback to summary field if detail exists but is empty in terraform linter (#4157)
* Fallback to summary field if detail exists but is empty in terraform linter

* Add test

* Update terraform.vim

* remove whitespaces
2022-05-17 00:00:34 +09:00
Reza J. Bavaghoush
75d2413425
add rego support (#4199)
* add opa fmt fixer for rego files

* add opa linter

* add basic tests for linter and fixer

* add cspell to the docs
2022-05-16 21:14:11 +09:00
James C. Davis
5479b58660
support ember-template-lint 4.x (#4200)
* support ember-template-lint 4.x

* update ember-template-lint linter test
2022-05-15 12:44:23 +09:00
Matt Perry
14265e464a
Add support for ansible-lint 6.0.0 (#4189)
ansible-lint 6.0.0 removed the `--parseable-severity` option. Use the
JSON output in its place.

Fixes #4188
2022-05-09 20:27:21 +09:00
Richard Jonas
9e1351499c
Handle golangci_lint warning and error messages correctly (#4182)
* Handle golangci_lint warning and error messages correctly

* Fix linter warning

Co-authored-by: Richard Jonas <richard.jonas@derivco.se>
2022-05-04 20:05:32 +09:00
zandr
4e6a7debb4
Use stdin for Selene Lua linter (#4183)
When I added Selene as a linter, I wasn't aware it had the option to
process stdin using `-`.
2022-05-04 10:55:13 +09:00
bretello
c694a24188
add yaml actionlint support (github actions) (#4173)
Co-authored-by: bretello <bretello@distruzione.org>
2022-05-03 10:03:05 +09:00
Dalius Dobravolskas
56399106fc
VSCode LSPs for CSS, HTML and JSON (#4175)
Switched to `vscode-langservers-extracted` as it is the one most
up-to-date.
2022-05-02 19:42:24 +09:00
Dalius Dobravolskas
34892186e4
vscode-json-languageserver support (#4164)
* vscode-json-languageserver-bin support

VSCode JSON languageserver has schema support for linting and
completions.

I have enabled snippets support (`snippetSupport`) even if it is not
fully supported. `label` that comes with completions response can be
used as well.

* Test fix.

* vscode-json-languageserver instead of vscode-json-languageserver-bin

vscode-json-languageserver is more up-to-date (about 1 year old),
vscode-json-languageserver-bin is 4 years old.

* Use git root.

* Documentation update.

* Trying to sort ordering issue.

* One more attempt

* One more attempt

* Uppercase seems to win.

* Clean-up

* Clean-up 2

* Test removed.
2022-04-30 12:33:48 +09:00
zandr
57e16957e0
Add support for selene Lua linter (#4169) 2022-04-30 11:11:12 +09:00
Diep Pham
6c51bb1573
Improve pylama linter output handling (#4106)
* Use JSON format for newer pylama version

https://github.com/klen/pylama/blob/develop/Changelog

The --format json option is added in pylama version 8.1.4.

* Fix linting warnings for pylama
2022-04-24 08:28:33 +09:00
Alex McKinney
607f33a1b0
Add buf linter and fixer (#4128)
* Add buf lint to linters

* Add buf format to fixers

* Fix test/linter/test_buf_lint.vader

* Fix test/fixers/test_buf_format_fixer_callback.vader

* Simplify test/test-files/proto/testfile.proto

* Add buf-lint alias and rename linter
2022-04-06 17:00:59 +09:00
Felix Maurer
80dcd648d3
rust-analyzer for non-Cargo projects (#4118)
* rust-analyzer in non-cargo projects

rust-analyzer can also be used in non-cargo projects. This requires a
rust-project.json file in the project root [1].

Make the rust-analyzer linter search for a rust-project.json file if no
Cargo.toml file could be found.

[1]: https://rust-analyzer.github.io/manual.html#non-cargo-based-projects

* Document rust-analyzer without cargo

* Test rust-analyzer with non-cargo projects

Change the other rust tests to match the new directory structure of the
test files.
2022-03-23 10:56:29 +09:00
Barnabás Ágoston
5c7019f394
Make it possible to override awk --lint option (#4114)
Currently, it's not possible to override the awk `--lint` option with

```viml
let g:ale_awk_gawk_options = '--lint=no-ext'
```

although this could be useful for those who only use gawk and don't want to get these lint errors:
> FEATURE X is a gawk extension

The idea is to move the default `--lint` option before the `awk_gawk_options` in the gawk.vim code to give the custom `--lint=...` option a higher precedence.

Co-authored-by: Barnabás Ágoston <barna@agoston.dev>
2022-03-20 13:52:22 +00:00
yoshi1123
e490e87a60
Add eclipselsp jdt:// support for textDocument/definition (#4030)
This patch adds support for opening jdt:// links on "go to definition" requests returned by Java language servers.

Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-04 19:03:27 +00:00
Horacio Sanson
5b1044e2ad
Fix 4086 - use stable command options for rustc (#4087) 2022-02-20 00:01:06 +09:00
Jon Parise
8b1ea33cc0
Add a unimport linter for Python files (#4058)
Unimport (https://github.com/hakancelik96/unimport/) is a linter,
formatter for finding and removing unused import statements.

This introduces linting support, although fixer support could come
later.
2022-02-08 15:54:25 +09:00
Carl Smedstad
c9938bc293
Add CMake linter cmake-lint (#4036)
* Add CMake linter cmake-lint

Add support for the CMake linter provided by
https://github.com/cheshirekow/cmake_format.

* Escape cmake-lint executable and add linter tests
2022-02-06 21:09:38 +09:00
offa
7cbb68da6c
Add oelint-adv support (#4043) 2022-02-06 14:08:10 +09:00
Linda_pp
0d529d9b94
Add naga linter for WGSL support (#4047)
* Add WGSL support using `naga` command

* Add documents for wgsl

* Add test for `naga` linter

* Separate naga handler callback to hanlder/naga.vim
2022-02-04 16:29:28 +09:00