Skip to content

v1.17.0: DX-22 Fix-or-Explain Complexity Rules

Choose a tag to compare

@Tefx Tefx released this 04 Jan 16:43
· 1406 commits to Main since this release

Release Highlights

DX-22: Fix-or-Explain Complexity Rules for TypeScript

This release completes the DX-22 implementation, bringing TypeScript Guard to feature parity with Python Guard for complexity management.

New Features

  • @shell_complexity Marker Detection - Suppress complexity warnings by adding // @shell_complexity: <justification> comment before functions
  • Project-Level Complexity Debt Enforcement - Accumulation of ≥3 unaddressed warnings escalates to ERROR
  • Aligned Severity Levels - max-function-lines changed from ERROR → WARN to match Python Guard philosophy

Breaking Changes

  • ESLint plugin updated to v0.2.0 (from v0.1.0)
  • max-function-lines rule now WARN in recommended config (was ERROR)

Security Improvements

  • Enhanced path validation with realpath in CLI tools (prevents symlink-based path traversal)

Documentation

  • New docs/rule-severity-comparison.md - Comprehensive comparison of Python vs TypeScript rule severities
  • Updated context.md with v1.17.0 reference

What's Changed

  • feat(DX-22): Implement Fix-or-Explain complexity rules for TypeScript
  • chore: Bump version to 1.17.0

Full Changelog

v1.16.0...v1.17.0


Install: pip install --upgrade invar-tools

Packages:

  • invar-tools v1.17.0
  • invar-runtime v1.3.0 (unchanged)
  • @invar/eslint-plugin v0.2.0