asterisklint icon indicating copy to clipboard operation
asterisklint copied to clipboard

Become aware of eventual syntax changes in Asterisk versions

Open JCCyC opened this issue 5 years ago • 0 comments

Imagine, if you will, that Asterisk 20 introduces a new, optional syntax to extensions.conf. Now imagine that, by mistake, I put a new-syntax extensions.conf in my Asterisk 18 installation. It is invalid, but asterisklint will flag it as valid. My suggestion is to take an optional argument, saying what Asterisk version we're checking against. This could apply to other subcommands too, not only dialplan-check.

asterisklint dialplan-check -a 18 ~/mystagindir/extensions.conf

Or

asterisklint -a 18 dialplan-check ~/mystagindir/extensions.conf

Could also be an environment variable:

ALINT_ASTVER=18 asterisklint dialplan-check ~/mystagindir/extensions.conf

JCCyC avatar Dec 30 '20 15:12 JCCyC