Description
CLI commands have inconsistent input handling:
parse "SELECT 1" — ✅ accepts inline SQL
analyze "SELECT 1" — ✅ accepts inline SQL
optimize "SELECT 1" — ✅ accepts inline SQL
format "SELECT 1" — ❌ treats argument as file path
validate "SELECT 1" — ❌ treats argument as file path
lint "SELECT 1" — ❌ treats argument as file path
Workaround
Pipe via stdin: echo "SELECT 1" | gosqlx format -
Expected
All commands should accept inline SQL as a positional argument, consistent with parse/analyze/optimize.
Description
CLI commands have inconsistent input handling:
parse "SELECT 1"— ✅ accepts inline SQLanalyze "SELECT 1"— ✅ accepts inline SQLoptimize "SELECT 1"— ✅ accepts inline SQLformat "SELECT 1"— ❌ treats argument as file pathvalidate "SELECT 1"— ❌ treats argument as file pathlint "SELECT 1"— ❌ treats argument as file pathWorkaround
Pipe via stdin:
echo "SELECT 1" | gosqlx format -Expected
All commands should accept inline SQL as a positional argument, consistent with parse/analyze/optimize.