Skip to content

Plugin 0.3.1 · Try rules before saving them, safer rule patterns

Choose a tag to compare

@lintsure lintsure released this 20 Nov 13:20
· 17 commits to main since this release

Uses Lintsure engine 0.3.13 (85 rules), unchanged. Update it from the /plugin menu in Claude Code, or reinstall it from the marketplace.

New

  • Try a rule before saving it. When you tell your agent a rule in plain words ("Lintsure: never put API keys in the frontend"), it now compiles the rule to your repo's real folders, runs it as a dry run, and tells you what it matches today before asking to save it. Too many matches means the rule is too broad, and the agent tightens it. The helper's new try command does the dry run; matched keys are shown cut short, so a real key isn't copied into the conversation.
  • Rules can leave out paths with except:, for example API routes when a rule is about code that ships to the browser.

Safer

  • A rule's pattern can't hang a guard. Patterns come from people and from repos, so they're checked before they run: shapes that can take minutes on one line, like (a+)+ or (a|b)*, are refused, patterns are capped at 500 characters, and lines are cut to 2,000. Every match also runs in a worker that is stopped after 1 second (3 seconds for a dry run). A rule that runs out of time is reported as skipped, never treated as a pass. This costs about 50 ms per edit, only in projects with code rules.
  • On Windows Git Bash, a pattern passed inline can lose its backslashes on the way in. The helper now refuses a pattern that arrived broken, and takes rules from a file (@rule.json) instead.

Runs locally; nothing is sent unless you add a Lintsure API key. Not an audit or legal advice.