Unity-Technologies / ProjectAuditor

Project Auditor is an experimental static analysis tool for Unity Projects.
Other
795 stars 64 forks source link

Add AnalysisPlatform Attribute to constrain analysis #133

Closed mtrive closed 1 year ago

mtrive commented 1 year ago

Problem Statement As we implement platform-specific modules and analyzers we need to make sure they don't run if they don't support the currently selected analysis platform.

Solution Introduce the AnalysisPlatformattribute which can be used on both Modules and Module analyzers. This is checked at analysis time to exclude types that are not relevant for the current analysis. If no AnalysisPlatformis specified, it is assumed the type is cross-platform.