mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Add yq support (#4861)
* 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>
This commit is contained in:
@@ -729,6 +729,7 @@ Notes:
|
||||
* `yamlfix`
|
||||
* `yamlfmt`
|
||||
* `yamllint`
|
||||
* `yq`
|
||||
* YANG
|
||||
* `yang-lsp`
|
||||
* Zeek
|
||||
|
||||
@@ -366,5 +366,43 @@ g:ale_yaml_gitlablint_options *g:ale_yaml_gitlablint_options
|
||||
This variable can be set to pass additional options to gll.
|
||||
|
||||
|
||||
===============================================================================
|
||||
yq *ale-yaml-yq*
|
||||
|
||||
Website: https://github.com/mikefarah/yq
|
||||
|
||||
|
||||
Installation
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Install yq: >
|
||||
|
||||
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - | tar xz && mv ${BINARY} /usr/bin/yq
|
||||
|
||||
Options
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
g:ale_yaml_yq_executable *g:ale_yaml_yq_executable*
|
||||
*b:ale_yaml_yq_executable*
|
||||
Type: |String|
|
||||
Default: `'yq'`
|
||||
|
||||
This variable can be set to change the path to yq.
|
||||
|
||||
|
||||
g:ale_yaml_yq_options *g:ale_yaml_yq_options*
|
||||
*b:ale_yaml_yq_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to yq.
|
||||
|
||||
g:ale_yaml_yq_filters *g:ale_yaml_yq_filters
|
||||
*b:ale_yaml_yq_filters*
|
||||
Type: |String|
|
||||
Default: `'.'`
|
||||
|
||||
This option can be changed to pass additional filters to yq
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -3517,6 +3517,7 @@ documented in additional help files.
|
||||
yamlfmt...............................|ale-yaml-yamlfmt|
|
||||
yamllint..............................|ale-yaml-yamllint|
|
||||
gitlablint............................|ale-yaml-gitlablint|
|
||||
yq....................................|ale-yaml-yq|
|
||||
yang....................................|ale-yang-options|
|
||||
yang-lsp..............................|ale-yang-lsp|
|
||||
zeek....................................|ale-zeek-options|
|
||||
|
||||
Reference in New Issue
Block a user