Implements phase 2 of docs/design-sql-bound-parameters.md. jetc --lint-sql [--strict] <file|dir>... lists each <sql> whose statement contains a $[...] or #[...] reference instead of a <bind>, with file:line and where each value comes from. Row values ($[.col], $[session.col], $[?N], $[#]) are only reported with --strict. References in <bind>, <if>, <set> and the other attribute-only tags, <comment> and |> <| are skipped. A custom tag defined as <sql><container></sql> (barant.com's <showtable>) is checked at each use. Exit status is 0 for none found, 1 for findings, 2 for an unreadable path. - jetc/JetLint.*: the scanner; jetc.cpp: the option - build scripts and runbindtests.sh: link JetLint.cpp - tests/runlinttests.sh and tests/lintsql/: fixtures and expected output - docs: worklist for the local copies of both sites, design doc status, manual note on the lint Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
707 B
Plaintext
9 lines
707 B
Plaintext
site/kinds.page:1: <sql> pastes $[plain] (global), $[:form] (cgi), $[@sess] (session)
|
|
site/kinds.page:2: <sql> pastes $[&HTTP_HOST] (env), $[%kw] (keyword), $[!g] (global), #[loc] (local)
|
|
site/kinds.page:3: <sql> pastes $[late] (global)
|
|
site/kinds.page:6: <sql> pastes $[name$[ix]] (global)
|
|
site/safe.page:1: <sql> pastes $[.col] (row), $[projman.col] (row), $[?1] (row), $[#] (row), $[?#] (row)
|
|
site/uses.page:1: <showtable> (wraps sql) pastes $[_login_id] (global)
|
|
site/uses.page:2: <showtable> (wraps sql) pastes $[.id] (row)
|
|
lint-sql: 7 of 11 <sql> blocks (and uses of tags that wrap <sql>) paste values into the statement, in 3 of 4 files (cgi 1, env 1, global 5, keyword 1, local 1, row 6, session 1)
|