Skip to content

feat(rules): let a host supply the SQLCLEAN044 guidance - #20

Merged
kvlonge merged 1 commit into
mainfrom
feat/long-literal-guidance
Oct 31, 2026
Merged

kvlonge merged 1 commit into
mainfrom
feat/long-literal-guidance

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Why

SQLCLEAN044 always advises shortening a long literal or moving it into a reference table or query parameter. A host such as SQLBuild has its own way to share a value (a declared constant), and its users should see that advice instead. Before SQLClean took over the Rule, SQLBuild users got that advice.

Changes

  • The lint request accepts long_literal_guidance. When set, SQLCLEAN044 gives it in place of SQLClean's own sentence, followed by the usual max_literal_length setting.
  • The embedding reference documents the field, and the generated skill is refreshed.

Verification

  • A new remediation case sends the field with config_file and checks the host sentence leads the help while SQLClean's sentence and file name are absent; it fails on main.
  • make verify, make test-integration test-e2e, clippy on 1.95 and the hygiene scan pass.

A lint request can now set long_literal_guidance, which replaces SQLClean's advice to shorten the literal or move it into a reference table. SQLBuild uses it to point at its own constants.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sqlclean with  Cloudflare Pages  Cloudflare Pages

Latest commit: e9359c0
Status: ✅  Deploy successful!
Preview URL: https://010c08ed.sqlclean.pages.dev
Branch Preview URL: https://feat-long-literal-guidance.sqlclean.pages.dev

View logs

@kvlonge
kvlonge merged commit ae670ed into main Oct 31, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant