How to reproduce:
1. Open the attached project "RuleArgumentRepro"
2. Go to [Internal link] -> Run WithAdditionalDiagnosticRules argument cases
3. Observe the Console
Expected results: A null rule list and a list containing a null Rule are ignored, the same way an empty list and Rules with null, empty or unknown Ids already are
Actual results: Both throw "NullReferenceException" - the null list from AnalysisParams.WithAdditionalDiagnosticRules and the null Rule from SeverityRules.AddRule
Reproducible with: 6000.5.9f1, 6000.6.0b9, 6000.7.0a5
Reproducible on: macOS Tahoe 26.6 (M1 Max)
Not reproducible on: No other environment tested
First lines of error:
NullReferenceException: Object reference not set to an instance of an object
at Unity.ProjectAuditor.Editor.AnalysisParams.WithAdditionalDiagnosticRules (System.Collections.Generic.List`1[T] rules) [0x00000] in /Users/bokken/build/output/unity/unity/Modules/ProjectAuditorEditor/API/AnalysisParams.cs:175
NullReferenceException: Object reference not set to an instance of an object
at Unity.ProjectAuditor.Editor.SeverityRules.AddRule (Unity.ProjectAuditor.Editor.Rule ruleToAdd) [0x0000d] in /Users/bokken/build/output/unity/unity/Modules/ProjectAuditorEditor/API/SeverityRules.cs:38