ossobv / asterisklint

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

RFE: Add Set(ARRAY(column_count...)=${FUNC_ODBC_FUNC()}) checks #30

Open wdoekes opened 6 years ago

wdoekes commented 6 years ago

Now that we have initial support for func_odbc SQL column counts, we could add support for (at least) counting the number of returned arguments.

E.g.

[FUNC]
readsql=SELECT a, b, c FROM table WHERE id = ${ARG1}

same => n,Set(ARRAY(LOCAL(a),LOCAL(b))=${ODBC_FUNC(1)})
;                                    ^ E_SOMETHING: missing return value 'c'