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>
Version 2 of golangci-lint introduces several breaking changes to the
command line arguments and the configuration file.
Thi PR updates ale integration to support both version 1.6x.x and 2.x.x
of golangci-lint.
* feat: Add Zig zlint linter and handler for ALE
* docs: Add zlint documentation to ALE Zig integration guide
* docs: Updating docs for zlint support
* tests: Adding tests for checking zlint executable and command
* refactor: Move zlint configuration test to separate test file
* Refactor djlint linter code
This patch moves the code to the `autoload` directory, so it's available
when it's needed by a specific linter. This avoids redundant code when
another format supported by djlint is added.
* Add linting support for all formats supported by djlint
So far, the `djlint` linter in ALE only supported `html`, which is only
one of several file types supported by `djlint`.
This patch adds support for the following file types:
* gohtmltmpl
* handlebars
* htmlangular
* htmldjango
* jinja
* nunjucks
* Add djlint fixer for various HTML template formats
* Supported formats:
- html
- htmlangular
- htmldjango
- jinja
- handlebars
- nunjucks
- gohtmltmpl
* Add doc entries
* Add vader tests
---------
Co-authored-by: Adrian Vollmer <computerfluesterer@protonmail.com>
This adds Yara support to ALE using Avast's language server for Yara:
https://avast.github.io/yls/
A ".git" folder is used to determine the project_root so this means the
Yara rules must be in a git repo for the integration to work.
The server only have 1 optional argument (-v, --verbose). Since this is
the case, no additional configuration options are available.
---------
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
* Add support for the [djlinter](https://www.djlint.com/)
* Add documentation and tests.
* Fix the name of the variable for the executable name.
* Correct the name of the handler in the test.
* Correct the test adding the value of vcol.
* Format djlint.vim according to formatting rules.
In the vein of commit ea72d66b "Verilator current file search path (#3500)"
This includes the directory of the current file in the library
search path. From `man iverilog`:
-ylibdir
Append the directory to the library module search
path. When the compiler finds an undefined module, it
looks in these directories for files with the right name.
This might only be a problem for newer phpstan versions (2.1.1 here).
If you try to run `phpstan` the way ale will when it builds the option, you will get something like:
```
The "--memory-limit" option requires a value.
```
It wants you to use `--memory-limit=-1` instead.
* Add support for c3-lsp linter
Add support for c3-lang with the c3-lsp language server.
Link: http://github.com/pherrymason/c3-lsp
Link: http://c3-lang.org
* fix linter error
* fix: consistent use of the executable name
Consistently use the executable name 'c3lsp' instead of the project name
'c3-lsp'.
* c3lsp: add command line arguments to executable
* Added jq support
Cleaned up yq.vim file
* Updated docs
* Updated supported-tools.md
* Added yq tests
* Fix python linting/formatting error when in virtual environment (#4865)
Python fixers and linters were failing when vim is running in a virtual
environment that's located in a path containing text `poetry`. The cause
of this was the regular expression `poetry\|pipenv\|uv$` which matches
`poetry` and `pipenv` if they appear anywhere in the virtualenv path.
* Add cljfmt fixer for clojure files (#4860)
* When using `actionlint` look for & use a config file (#4858)
Actionlint supports a config file and it lives in a very searchable
path, as the only files it acts on are in the `.github` directory
already.
Look for an `actionlint.yml` and `.yaml` in that path, and use the
config if its there.
* Fix linting with jq (#4765) (#4862)
With the 1.6 version of jq the error message start with "parse error".
With the last version of jq the error message start with "jq: parse error".
Fix it by using a regular expression that works in both cases.
* Properly handle optional end_line_no/end_line_pos in sqlfluff (#4867)
end_line_no/end_line_pos are optional. Example SQL:
`SELECT NULL FROM {{ a_jinja_templated_table }};`
`sqlfluff lint --dialect ansi --format json` gives the following error
among others:
```
{"start_line_no": 1, "start_line_pos": 21, "code": "TMP", "description":
"Undefined jinja template variable: 'a_jinja_templated_table'", "name":
"", "warning": false}
```
As one can see there is no end_line_no/end_line_pos.
* Add golangci-lint fixer (#4853)
Closes#4616
* Fixed copy-paste misstakes and added filter to docs
* Added test vader file for yq
* Fixed and updated the test case
---------
Co-authored-by: Walter Kaunda <14844142+kwalter94@users.noreply.github.com>
Co-authored-by: rudolf ordoyne <49649789+casens5@users.noreply.github.com>
Co-authored-by: Bea Hughes <108035665+beahues@users.noreply.github.com>
Co-authored-by: benjos1234 <legrimlvl24@gmail.com>
Co-authored-by: Coacher <Coacher@users.noreply.github.com>
Co-authored-by: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
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`.
Since biome supports either `biome.json` or `biome.jsonc` config files,
we need to look for both when searching for the LSP project root. We can
also look for a package.json or .git folder to use. This uses mostly the
same logic as deno.
* 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 `==#`
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
* 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.
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.
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
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.
* Fix '-s' to be '-S' when setting 'TabSize=1' for chktex
Fixes#4712Closes#4725
* Check if chktex's -S option is available
* Check chktex version instead of trying -S option
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.
* 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'
* 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>