Skip to content

feat: add 3 remaining slop rules (#17)#18

Merged
apankov1 merged 1 commit intomainfrom
feat/17-remaining-slop-rules
Mar 6, 2026
Merged

feat: add 3 remaining slop rules (#17)#18
apankov1 merged 1 commit intomainfrom
feat/17-remaining-slop-rules

Conversation

@apankov1
Copy link
Copy Markdown
Owner

@apankov1 apankov1 commented Mar 6, 2026

Summary

Completes the production audit rule set from #14. Adds the 3 remaining rules:

  • vacuous_property (should-fail): Detects fc.property callbacks with return true paths that bypass assertions (2a), and fc.constant-only generators with zero input variation (2b)
  • no_production_call (should-fail): Detects tests that call no imported production function — only builtins, operators, or language guarantees. Includes parseImports() helper for import tracking.
  • impossible_assertion (should-fail): Detects assertions that are mathematically impossible to fail, e.g. expect(x.length).toBeGreaterThanOrEqual(0)

Updates total rule count from 15 to 18 across presets, SKILL.md, and pattern reference.

Test plan

  • 17 new tests covering all 3 rules + parseImports helper
  • All 369 tests pass across 9 skills
  • Biome check clean
  • Preset count assertions updated from 15 to 18
  • SKILL.md Violation Rules table and What To Protect table updated
  • references/patterns.md updated with before/after examples (patterns 16-18)

Closes #17

🤖 Generated with Claude Code

…ll, impossible_assertion (#17)

Completes the production audit rule set from issue #14. Adds:
- vacuous_property: detects fc.property callbacks with return-true paths
  that bypass assertions, and fc.constant-only generators (zero variation)
- no_production_call: detects tests that call no imported production function,
  only exercising builtins or language guarantees
- impossible_assertion: detects .length >= 0 and similar tautological checks
  that are mathematically impossible to fail

Updates total rule count from 15 to 18 across presets, docs, and patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@apankov1 apankov1 marked this pull request as ready for review March 6, 2026 23:05
@apankov1 apankov1 merged commit 423e22a into main Mar 6, 2026
3 checks passed
@apankov1 apankov1 deleted the feat/17-remaining-slop-rules branch March 6, 2026 23:06
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.

slop-test-detector: 3 remaining rules — no_production_call, vacuous_property, impossible_assertion

1 participant