This refactoring would allow us to write some specific tests about the actual content of the properties bag provided by Roslyn.
Edit:
This refers to Diagnostic.Properties.
We have a few rules which are using these properties and could benefit from this.
E.g. https://github.com/SonarSource/sonar-dotnet/blob/734df7968037387faade9353c7aedd1a77c010a0/sonaranalyzer-dotnet/src/SonarAnalyzer.CSharp/Rules/GetHashCodeMutable.cs#L89
Not clear what this is about, so we are closing it.
@Evangelink - do you remember exactly what this was about?
Some rules are storing extra information in the properties bag, for example the sub-messages related to secondary locations. With the test framework in place, you can test the location and the message reported but not these info so you could introduce a regression without noticing.
The idea of this ticket was to allow testing these extra data.
So this refers to https://docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.diagnostic.properties?view=roslyn-dotnet#Microsoft_CodeAnalysis_Diagnostic_Properties. Indeed there are a few rules which are using this. E.g. https://github.com/SonarSource/sonar-dotnet/blob/734df7968037387faade9353c7aedd1a77c010a0/sonaranalyzer-dotnet/src/SonarAnalyzer.CSharp/Rules/GetHashCodeMutable.cs#L89
Thanks @Evangelink for clarifying this!
Most helpful comment
Some rules are storing extra information in the
propertiesbag, for example the sub-messages related to secondary locations. With the test framework in place, you can test the location and the message reported but not these info so you could introduce a regression without noticing.The idea of this ticket was to allow testing these extra data.