Move to latest .NET8 pre-release version of NetAnalyzers package for dogfooding#6380
Conversation
…an issue to fix these as a follow-up PR
…sue to fix or suppress these violations
… parameter names for overridden method
…erride equals and operator equals on value types
…tions if appropriate): For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
…lection) to suggestion. TODO: File an issue to fix or suppress CA1851 violations in the repo and revert this downgrade.
…ndexer access guarded by a 'ContainsKey' check to avoid double lookup
…esult of 'string.Compare' to 0
…ary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
…ns(char)' instead of 'string.Contains(string)' when searching for a single character
|
@Youssef1313 for review |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6380 +/- ##
=======================================
Coverage 96.10% 96.10%
=======================================
Files 1361 1361
Lines 316050 316037 -13
Branches 10186 10193 +7
=======================================
- Hits 303755 303743 -12
+ Misses 9867 9862 -5
- Partials 2428 2432 +4 |
| <MicrosoftCodeAnalysisVersionForTests>4.4.0-2.22416.9</MicrosoftCodeAnalysisVersionForTests> | ||
| <DogfoodAnalyzersVersion>3.3.4-beta1.22418.3</DogfoodAnalyzersVersion> | ||
| <DogfoodNetAnalyzersVersion>7.0.0</DogfoodNetAnalyzersVersion> | ||
| <DogfoodNetAnalyzersVersion>8.0.0-preview1.22621.6</DogfoodNetAnalyzersVersion> |
There was a problem hiding this comment.
So is 7.0.0 broken? If that's the case, I think it's important to fix that and release on NuGet?
There was a problem hiding this comment.
Yes, AnalysisLevel/AnalysisMode regression is first fixed in 7.0.101. We definitely need to release the corresponding NuGet package on NuGet.org. Tagging @jmarolf
There was a problem hiding this comment.
@mavasani The 7.0.0 tag is pointing to e26a04c, which is supposed to have the fix:
Is the tag pointing to incorrect commit?
| protected override bool IsExpressionOfForEachStatement(SyntaxNode syntax) | ||
| => syntax.Parent is ForEachStatementSyntax forEachStatementSyntax && forEachStatementSyntax.Expression.Equals(syntax); |
There was a problem hiding this comment.
Unrelated to the PR, but it looks like we have a false negative here. Guessing this should be CommonForEachStatementSyntax
|
Thank you @Youssef1313 |

Recommended to be reviewed commit by commit
This PR also fixes most of the new violations.
#6379 tracks auditing certain suppressed violations so these are either fixed and suppressions removed or we decide that the suppressions are desirable.