Closed IvanLieckens closed 4 months ago
I am assuming that you are using version 1.1.118. There hasn't been any official release in quite some time. To have a good experience when using modern c# feature, you need to use the beta releases.
That's correct. To use the beta I should pull the StyleCop.Analyzers.Unstable package instead?
If you are using Visual Studio, there is a "Include prerelease" checkbox in the NuGet Package Manager window that you can check to see the betas. Another alternative is to use the Unstable package that you mentioned. The content is the same. The Unstable package is mostly for those that are not allowed to use pre-releases.
Thank you for your aid, I have swapped to using the beta and indeed no longer see this issue. I'll close my issue.
The SA1508, SA1502 and SA1500 throw nullreference exceptions: AD0001 Analyzer 'StyleCop.Analyzers.LayoutRules.SA1508ClosingBracesMustNotBePrecededByBlankLine' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. C:\Code\Mvp.Selections\src\Mvp.Selections.Data\CSC 1
AD0001 Analyzer 'StyleCop.Analyzers.LayoutRules.SA1502ElementMustNotBeOnASingleLine' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. C:\Code\Mvp.Selections\src\Mvp.Selections.Data\CSC 1
AD0001 Analyzer 'StyleCop.Analyzers.LayoutRules.SA1500BracesForMultiLineStatementsMustNotShareLine' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'. C:\Code\Mvp.Selections\src\Mvp.Selections.Data\CSC 1
I believe this is caused by the classes that use the single line class with primary constructor syntax:
SA1106 I'm suppressing but is in this case a false positive I believe? (Might warrant its own separate issue?)