defaultAuditRules top-level property
The 3 rules this audit actually runs — see this file's doc comment for why there are only 3, not 6.
Implementation
final List<AuditRule> defaultAuditRules = [
AuditRule(
id: AuditRuleId.reducedMotionCoverage,
severity: AuditSeverity.error,
description:
'File tạo AnimationController nhưng không tham chiếu NeonTheme.reducedMotion ở đâu cả',
triggerPattern: RegExp(r'AnimationController\('),
requiredPattern: RegExp('reducedMotion'),
),
AuditRule(
id: AuditRuleId.tapTargetSemantics,
severity: AuditSeverity.warning,
description:
'File tạo GestureDetector/InkWell nhưng không có Semantics/semanticLabel/ExcludeSemantics nào',
triggerPattern: RegExp(r'GestureDetector\(|InkWell\('),
requiredPattern: RegExp('Semantics\\(|semanticLabel|ExcludeSemantics'),
),
AuditRule(
id: AuditRuleId.rtlDirectionalSafety,
severity: AuditSeverity.warning,
description:
'File dùng EdgeInsets.only/Positioned với left:/right: literal thay vì start:/end: (EdgeInsetsDirectional/PositionedDirectional) an toàn theo hướng chữ',
triggerPattern: RegExp(
r'(EdgeInsets\.only\([^)]*\b(left|right):|Positioned\([^)]*\b(left|right):)',
),
),
];