Open utrumo opened 4 years ago
While I could see why you would want that. Supporting specifically jinja or any other preprocessor is not part of the scope of the project.
However, you could do one of two things:
If you look at this example: https://github.com/ossobv/asterisklint/blob/master/contrib/commands/vg.py
You'll find a preprocessor that did some other alterations. If placed in the right ~/.local dir, it would be called as follows:
asterisklint vg dialplan-check [...]
Ideally you'll want to add line numbers translation there from the recently parsed jinja, but that might be tricky.
ansible compile config only before put it to host. I don't now, how can i use this hook with it.
Can you simply add syntax for ignore problem line like it work in javascript eslint?
<some problem string>; asterisklint-disable-line <error-type>
or
; asterisklint-disable-next-line <error-type>
<some problem string>
my line example:
dsn={{ INT_ODBC_DSN_ASTERISK }}; asterisklint-disable-line E_CONF_KEY_INVALID
or
; asterisklint-disable-next-line E_CONF_KEY_INVALID
dsn={{ INT_ODBC_DSN_ASTERISK }}
Hello! Can you add support for ansible jinja2 template syntax (for example detect double brace as string)? I use ansible for change config files of asterisk and linter with this files works incorrect:![jinja_syntax_error](https://user-images.githubusercontent.com/22612354/75626015-bf5da080-5bd4-11ea-8a98-f69b252d8514.png)
There is link on other examples
Alternative idea: add support for line ignore comment, like it works in eslint: {{ some incorrect syntax line }} # asterisklint-disable-line // eslint-disable-line