walter@walter-dev:0:~/asterisklint$ ./scripts/asterisklint dialplan-check bug.conf
bug.conf:0 H_DP_GENERAL_MISPLACED: [general] context not found or not at top of file
bug.conf:0 H_DP_GLOBALS_MISPLACED: [globals] context not found or not at position two
Traceback (most recent call last):
File "./scripts/asterisklint", line 34, in <module>
sys.exit(main(sys.argv[1:], os.environ))
File "/home/walter/asterisklint/asterisklint/main.py", line 147, in main
return command_module.main(args, envs)
File "/home/walter/asterisklint/asterisklint/commands/dialplan-check.py", line 49, in main
dialplan.walk_jump_destinations()
File "/home/walter/asterisklint/asterisklint/dialplan.py", line 181, in walk_jump_destinations
extension, priority)
File "/home/walter/asterisklint/asterisklint/dialplan.py", line 281, in match_pattern
if pattern.matches_extension(extension):
File "/home/walter/asterisklint/asterisklint/pattern.py", line 375, in matches_extension
value = self.values[i + 2]
UnboundLocalError: local variable 'i' referenced before assignment
walter@walter-dev:1:~/asterisklint$ cat bug.conf
[context]
exten => s,1,GotoIf($["${CALLERID(num):0:1}"="+"]?${EXTEN:1},1) ; strip + if it is there