requiresMainFunction property
bool
get
requiresMainFunction
Whether this rule only applies to files with a main() function.
If true, the rule is skipped for library files without main(). Uses ContentRegionIndex for fast detection.
Example: Rules checking app entry points:
@override
bool get requiresMainFunction => true;
Default: false (runs on all files)
Implementation
bool get requiresMainFunction => false;