ossobv / asterisklint

Asterisk PBX configuration syntax checker
GNU General Public License v3.0
63 stars 12 forks source link

Feature to disable special types of errors #1

Closed vabue closed 8 years ago

vabue commented 8 years ago

Without it, for example, we get plenty of errors on standard Freepbx config:

b.com/FreePBX/core.git
Cloning into 'core'...
remote: Counting objects: 10137, done.
remote: Total 10137 (delta 0), reused 0 (delta 0), pack-reused 10137
Receiving objects: 100% (10137/10137), 6.99 MiB | 91.00 KiB/s, done.
Resolving deltas: 100% (6560/6560), done.
Checking connectivity... done.
root@as-05:~# cd core/etc/
root@as-05:~/core/etc# ../../asterisklint/scripts/asterisklint dialplan-check ./extensions.conf
./extensions.conf:29 W_PP_INCLUDE_MISSING: the #include file 'extensions_override_freepbx.conf' could not be found
./extensions.conf:30 W_PP_INCLUDE_MISSING: the #include file 'extensions_additional.conf' could not be found
./extensions.conf:31 W_PP_INCLUDE_MISSING: the #include file 'extensions_custom.conf' could not be found
./extensions.conf:35 H_WSV_CTX_BETWEEN: expected one or two lines between non-tiny contexts
./extensions.conf:99 W_DP_PRIO_BADORDER: bad priority order for pattern '_+1NXXNXXXXXX/_NXXNXXXXXX' and prio 2
./extensions.conf:101 W_DP_PRIO_BADORDER: bad priority order for pattern '_+1NXXNXXXXXX/_011NX.' and prio <unset>
./extensions.conf:105 W_DP_PRIO_BADORDER: bad priority order for pattern '_[0-9+]./_NXXNXXXXXX' and prio <unset>
./extensions.conf:107 W_DP_PRIO_BADORDER: bad priority order for pattern '_[0-9+]./_011NX.' and prio <unset>
./extensions.conf:110 W_DP_PRIO_BADORDER: bad priority order for pattern 's/_NXXNXXXXXX' and prio <unset>
./extensions.conf:112 W_DP_PRIO_BADORDER: bad priority order for pattern 's/_011NX.' and prio <unset>
./extensions.conf:148 W_APP_NEED_PARENS: app 'Answer' should have parentheses (only NoOp is exempt)
./extensions.conf:151 W_APP_BAD_CASE: app 'Playtones' does not have the proper Case 'PlayTones'
./extensions.conf:153 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:154 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:155 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:159 H_WSV_CTX_BETWEEN: expected one or two lines between non-tiny contexts
./extensions.conf:201 H_WSV_CTX_BETWEEN: expected one or two lines between non-tiny contexts
./extensions.conf:232 E_FUNC_MISSING: function 'DB' does not exist (or func_odbc created?)
./extensions.conf:234 W_DP_PRIO_BADORDER: bad priority order for pattern 's' and prio 200
./extensions.conf:235 W_DP_PRIO_BADORDER: bad priority order for pattern 's' and prio 300
./extensions.conf:241 W_WSH_EOL: unexpected trailing whitespace
./extensions.conf:298 E_FUNC_MISSING: function 'DB' does not exist (or func_odbc created?)
./extensions.conf:310 E_FUNC_MISSING: function 'DB_EXISTS' does not exist (or func_odbc created?)
./extensions.conf:315 E_FUNC_MISSING: function 'DB' does not exist (or func_odbc created?)
./extensions.conf:317 E_APP_MISSING: app 'Authenticate' does not exist, dialplan will halt here!
./extensions.conf:318 E_APP_MISSING: app 'AGI' does not exist, dialplan will halt here!
./extensions.conf:325 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:329 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:337 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:351 E_FUNC_MISSING: function 'DB' does not exist (or func_odbc created?)
./extensions.conf:353 E_APP_MISSING: app 'AGI' does not exist, dialplan will halt here!
./extensions.conf:358 W_APP_NEED_PARENS: app 'Hangup' should have parentheses (only NoOp is exempt)
./extensions.conf:372 W_APP_BAD_CASE: app 'Noop' does not have the proper Case 'NoOp'
./extensions.conf:377 H_WSV_CTX_BETWEEN: expected one or two lines between non-tiny contexts
./extensions.conf:410 W_APP_BAD_CASE: app 'Noop' does not have the proper Case 'NoOp'
./extensions.conf:411 E_FUNC_MISSING: function 'MD5' does not exist (or func_odbc created?)
./extensions.conf:415 W_APP_BAD_CASE: app 'Noop' does not have the proper Case 'NoOp'
./extensions.conf:417 E_DP_PRIO_INVALID: invalid priority 'tts+101'
./extensions.conf:427 W_APP_BAD_CASE: app 'Noop' does not have the proper Case 'NoOp'
./extensions.conf:428 E_FUNC_MISSING: function 'MD5' does not exist (or func_odbc created?)
./extensions.conf:434 E_DP_PRIO_INVALID: invalid priority 'tts+101'
./extensions.conf:443 W_APP_BAD_CASE: app 'Noop' does not have the proper Case 'NoOp'
./extensions.conf:444 E_FUNC_MISSING: function 'MD5' does not exist (or func_odbc created?)
./extensions.conf:450 E_DP_PRIO_INVALID: invalid priority 'tts+101'
./extensions.conf:459 W_APP_BAD_CASE: app 'Noop' does not have the proper Case 'NoOp'
./extensions.conf:460 E_FUNC_MISSING: function 'MD5' does not exist (or func_odbc created?)
./extensions.conf:0 H_DP_GENERAL_MISPLACED: [general] context not found or not at top of file
./extensions.conf:0 H_DP_GLOBALS_MISPLACED: [globals] context not found or not at position two
wdoekes commented 8 years ago

Hi there!

Two questions:

wdoekes commented 8 years ago

Closing due to insufficient feedback.

Please reopen / file a new bug if you can provide the requested feedback.