Unity-Technologies / ProjectAuditor

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

Rule Descriptors Ids as strings are not comparing probably when checking if descriptor is enabled. #223

Open schraf opened 4 months ago

schraf commented 4 months ago

Describe the bug If you add a Rule entry into the Project Settings and set the Id As String to the rule you want to enable, it will not be enabled.

To Reproduce Steps to reproduce the behavior:

  1. Go to Project Settings -> Project Auditor
  2. Add a Rule with Id As String of "PAA0007"
  3. Run an analysis with Assets enabled and at least one texture in the project
  4. Set a breakpoint in AnalysisContext::IsDescriptorEnabled
  5. Step into the Params.Rules.GetRule call and notice that the Equals call between the Descriptor instances will fail

Expected behavior Rules that you place in the Project Settings will run.

Screenshots

Screenshot 2024-03-06 at 11 12 43 AM Screenshot 2024-03-06 at 11 45 08 AM

Information (please complete the following information):