rigid_dart 0.1.3
rigid_dart: ^0.1.3 copied to clipboard
Rust-grade guardrails for Dart/Flutter. Enforces layout safety, state discipline, architecture boundaries, and modern Dart idioms as hard analyzer errors via custom_lint.
0.1.3 #
rigid_no_magic_numbersrefinement: Context-aware design token enforcement.- Wider coverage: Now tracks
fontSize,letterSpacing,wordSpacing,size,iconSize,splashRadius,borderRadius,borderWidth,strokeWidth,blurRadius,spreadRadius,runSpacing,wheelDiameter,maxExtent. - Private widget suppression: Magic numbers inside
_PrivateWidget(...)constructors are silently skipped — these are implementation details, not design decisions. - Widened allowed values:
3and0.25are now allowed by default (covers common borders and fine spacing). - Configurable whitelist: Projects can add
allowed_magic_numbers: [4, 8, 16]inrigid_dart.yamlpreferences to whitelist project-specific values.
- Wider coverage: Now tracks
0.1.2 #
- Fix:
rigid_no_unbounded_columnnow recognizesmainAxisSize: MainAxisSize.minas a valid bounded pattern, eliminating false positives forColumninsideSingleChildScrollView.
0.1.1 #
- Framework-agnostic: All rule messages, docs, and examples no longer mandate Riverpod specifically. setState/ChangeNotifier bans apply regardless of chosen state management.
- Config fix: State discipline rules now correctly enable for
blocandproviderin balanced preset (previously onlyriverpod). - pub.dev metadata: Added homepage, topics, issue_tracker. Install via
rigid_dart: ^0.1.1. - Archive trimmed:
.pubignoreexcludes 2MB header image. Package size: 27KB.
0.1.0 #
- Initial release.
- 23 strict analyzer rules across 5 phases:
- Layout Safety (3 rules): Expanded constraints, unbounded columns, text field sizing
- State Discipline (5 rules): setState ban, ChangeNotifier ban, async state exhaustiveness, BuildContext safety, dispose enforcement
- Architecture (6 rules): Hardcoded colors/styles, magic numbers, test coverage, layer boundaries, DI leakage
- Freshness (4 rules): WillPopScope, withOpacity, dynamic, print bans
- Quality (5 rules): Widget line limits, raw async, test assertions, list keys, hardcoded strings
- Configurable presets:
strict,balanced,safety,custom - 3 quick fixes: WillPopScope → PopScope, withOpacity → withValues, dynamic → Object?
- Optional PATH wrapper to block
flutter rununtil clean rigid_dart.yamlconfiguration file support