Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MSTestAnalysisMode #4712

Merged
merged 9 commits into from
Jan 21, 2025
Merged

Conversation

Youssef1313
Copy link
Member

Fixes #3325

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 11 changed files in this pull request and generated 1 comment.

Files not reviewed (6)
  • TestFx.sln: Language not supported
  • eng/verify-nupkgs.ps1: Language not supported
  • src/Analyzers/MSTest.Analyzers.Package/MSTest.Analyzers.Package.csproj: Language not supported
  • src/Analyzers/MSTest.Analyzers.Package/buildTransitive/MSTest.Analyzers.props: Language not supported
  • src/Analyzers/MSTest.Analyzers.Package/buildTransitive/MSTest.Analyzers.targets: Language not supported
  • src/Analyzers/MSTest.GlobalConfigsGenerator/MSTest.GlobalConfigsGenerator.csproj: Language not supported
Comments suppressed due to low confidence (4)

src/Analyzers/MSTest.GlobalConfigsGenerator/Program.cs:14

  • Ensure that the behavior when the OUTPUT_PATH environment variable is not set is covered by tests.
string? outputPath = Environment.GetEnvironmentVariable("OUTPUT_PATH")

src/Analyzers/MSTest.GlobalConfigsGenerator/Program.cs:29

  • Ensure that the severity comparison logic in the AppendRule method is covered by tests.
foreach (DiagnosticDescriptor rule in analyzers.SelectMany(analyzer => analyzer.SupportedDiagnostics).OrderBy(descriptor => descriptor.Id))

src/Analyzers/MSTest.GlobalConfigsGenerator/AnalyzerSeverityDecider.cs:69

  • The error message could be more descriptive. Consider specifying which rule caused the issue.
throw new InvalidOperationException("Rules with severity >= Warning are expected to be enabled by default.");

src/Analyzers/MSTest.GlobalConfigsGenerator/AnalyzerSeverityDecider.cs:32

  • [nitpick] The TODO comment should be addressed or tracked separately.
// TODO: We should consider at least not enabling "conflicting" rules.

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So glad to see this PR, you really rock @Youssef1313 🚀

@Evangelink Evangelink merged commit b325f54 into microsoft:main Jan 21, 2025
8 checks passed
@Youssef1313 Youssef1313 deleted the analyzer-profiles branch January 21, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an easy way to increase analyzer severity for rules that are good default, but a breaking change
2 participants