Skip to content

v0.1.2

Choose a tag to compare

@morodomi morodomi released this 12 Mar 06:08
· 236 commits to main since this release

v0.1.2 — False-positive reduction & T110

Continued false-positive reduction from extended dogfooding (13 projects / 4 languages / ~45,000 tests) and a new rule.

Features

  • T110 skip-only-test detection (#65): New INFO rule that flags test functions whose only logic is skip() / markTestSkipped() / pytest.skip(). These are placeholder tests that should either be implemented or removed.

Bug Fixes

  • Python ^assert_^assert broadening (#62): Python assertion pattern now matches assertoutcome() and other helpers without underscore after assert. Fixes ~148 FPs in pytest's own test suite.
  • PHP addToAssertionCount() (#63): Recognized as a valid assertion for T001. Fixes 91 FPs in Symfony.
  • Skip-only tests excluded from T001 (#64): Test functions that only call skip/markTestSkipped are no longer flagged as assertion-free. Fixes 91 FPs in Symfony.
  • Rust assert*() helper function calls (#66): Simple assert_matches() and scoped common::assert_foo() function calls are now detected as assertions for T001.
  • Return-wrapped Chai property assertions (#52): return expect(x).to.be.true is now correctly counted as an assertion.

Install

cargo install exspec

Full changelog: CHANGELOG.md