applicableFileTypes property

  1. @override
Set<FileType>? get applicableFileTypes
override

The file types this rule applies to.

Override to restrict this rule to specific file types for early exit. Return null to apply to all files (default behavior).

Example: A widget-specific rule should return {FileType.widget}:

@override
Set<FileType>? get applicableFileTypes => {FileType.widget};

Files not matching any of the specified types will be skipped entirely, avoiding expensive AST traversal for irrelevant files.

Implementation

@override
Set<FileType>? get applicableFileTypes => {FileType.widget};