Files
ale/test/handler/test_djlint_handler.vader
Adrian Vollmer 47f1f49655
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Add linting support for all formats supported by djlint (#4920)
* 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>
2025-03-18 07:56:32 +09:00

22 lines
450 B
Plaintext

Before:
runtime ale_linters/html/djlint.vim
After:
call ale#linter#Reset()
Execute(The Djlint handler should parse output with a column correctly):
AssertEqual
\ [
\ {
\ 'lnum': 47,
\ 'vcol': 1,
\ 'col': 8,
\ 'code': 'H008',
\ 'text': 'Attributes should be double quoted.',
\ 'type': 'W'
\ }
\ ],
\ ale#handlers#djlint#Handle(0, [
\ 'H008 47:8 Attributes should be double quoted.'
\ ])