I choose for adding AnalyzerConfig to Settings, instead of to every overload of RoslynAssert.
Instead of adding new overloads for Settings constructor and CodeFactory.CreateSolution, I decided to add an extra optional parameter. If you prefer the other way using overloads, let me know and I will update the PR.
A few quirks of Roslyn API:
An AnalyzerConfigDocument must be rooted, i.e. start with a /. AnalyzerConfig.cs
A source document (DocumentInfo) must have a file name, either direct or implied from the ProjectInfo otherwise its configuration is set to None. See: ProjectState.cs
Fixes #272
I choose for adding
AnalyzerConfig
toSettings
, instead of to every overload ofRoslynAssert
.Instead of adding new overloads for
Settings
constructor andCodeFactory.CreateSolution
, I decided to add an extra optional parameter. If you prefer the other way using overloads, let me know and I will update the PR.A few quirks of Roslyn API:
AnalyzerConfigDocument
must be rooted, i.e. start with a /. AnalyzerConfig.csDocumentInfo
) must have a file name, either direct or implied from theProjectInfo
otherwise its configuration is set to None. See: ProjectState.cs