Skip to content

feat(analyzers): add support for recommended analyzer packages and va…#374

Merged
samtrion merged 2 commits intomainfrom
feature/recommended-packages
Apr 14, 2026
Merged

feat(analyzers): add support for recommended analyzer packages and va…#374
samtrion merged 2 commits intomainfrom
feature/recommended-packages

Conversation

@samtrion
Copy link
Copy Markdown
Contributor

@samtrion samtrion commented Apr 13, 2026

…lidation logic

Summary by CodeRabbit

  • New Features

    • Added build-time validation to notify projects when recommended analyzer packages are missing.
  • Documentation

    • Added comprehensive documentation for the new diagnostic about missing recommended analyzer packages.
    • Updated documentation with expanded diagnostic rule references and analyzer package recommendations.
  • Chores

    • Updated and added analyzer package versions to the project configuration.

@samtrion samtrion self-assigned this Apr 13, 2026
@samtrion samtrion requested a review from a team as a code owner April 13, 2026 23:11
@samtrion samtrion added state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added. labels Apr 13, 2026
@samtrion samtrion requested review from Hnogared and removed request for a team April 13, 2026 23:11
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Warning

Rate limit exceeded

@samtrion has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 33 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 33 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 269978f0-bbe1-44e4-8c40-65c08b555871

📥 Commits

Reviewing files that changed from the base of the PR and between d212940 and 5908bc9.

📒 Files selected for processing (4)
  • src/NetEvolve.Defaults.Analyzer/Diagnostics/IsPackableProjectDiagnosticAnalyzer.cs
  • src/NetEvolve.Defaults.Analyzer/Diagnostics/OldProjectSupportDiagnosticAnalyzer.cs
  • src/NetEvolve.Defaults.Analyzer/NetEvolve.Defaults.Analyzer.csproj
  • src/NetEvolve.Defaults/buildMultiTargeting/SupportMissingAnalyzers.targets

Walkthrough

This PR introduces a new NED0010 diagnostic to validate recommended analyzer packages during builds, updates analyzer package versions in the package manifest, and enhances documentation with formatting improvements and a new diagnostic specification page.

Changes

Cohort / File(s) Summary
Analyzer Package Configuration
Directory.Packages.props
Updated Microsoft.CodeAnalysis.BannedApiAnalyzers from 3.3.4 to 4.14.0, downgraded SonarAnalyzer.CSharp from 10.23.0 to 10.22.0, added Meziantou.Analyzer 3.0.48 and four new Roslynator packages (Formatting.Analyzers, CodeAnalysis.Analyzers, CodeFixes, Refactorings) all at 4.15.0.
Build Infrastructure
.editorconfig, src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.targets
Added diagnostic severity configuration for RCS1163 in editor config; imported new SupportMissingAnalyzers.targets file into build pipeline.
Analyzer Validation Logic
src/NetEvolve.Defaults/buildMultiTargeting/SupportMissingAnalyzers.targets
New MSBuild targets file implementing ValidateRequiredAnalyzerPackages target that checks for recommended analyzer packages in project/solution references, emitting NED0010 warnings or errors for missing packages with suppression support via DisableRecommendedPackage property.
Documentation
README.md, docs/usage/ned0010.md, src/NetEvolve.Defaults/README.md
Enhanced README with formatting improvements and updated diagnostic rule range from NED0001-NED0009 to NED0001-NED0010; added comprehensive documentation page for new NED0010 diagnostic covering validation behavior, resolution paths, and examples; updated local README with recommended analyzer packages section and suppression guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰✨ New rules hop into the build with care,
Analyzers checked from everywhere!
From config files to targets so bright,
Our defaults dance through day and night,
Documentation blooms, the story's told—
NED0010 worth its weight in gold! 🏆

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main feature: adding support for recommended analyzer packages and validation logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/NetEvolve.Defaults/buildMultiTargeting/SupportMissingAnalyzers.targets`:
- Around line 25-37: The Warning and Error elements that emit NED0010 (the
Warning/Error elements with Code="NED0010" that check
'@(MissingRequiredAnalyzerPackage)' and '$(TreatWarningsAsErrors)') do not
respect $(NoWarn); update both Conditions to also ensure the NED0010 code is not
present in $(NoWarn) (i.e., skip emitting if NoWarn includes "NED0010").
Concretely, modify the Condition expressions on the Warning and Error elements
that reference '@(MissingRequiredAnalyzerPackage)' so they additionally check
that $(NoWarn) does not contain "NED0010" (use an MSBuild-safe string/regex
check) so users can suppress NED0010 via NoWarn as documented.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d144fb1d-35a6-4be5-8c3c-4c1f4832b878

📥 Commits

Reviewing files that changed from the base of the PR and between b1d6ae9 and d212940.

📒 Files selected for processing (7)
  • .editorconfig
  • Directory.Packages.props
  • README.md
  • docs/usage/ned0010.md
  • src/NetEvolve.Defaults/README.md
  • src/NetEvolve.Defaults/buildMultiTargeting/NetEvolve.Defaults.targets
  • src/NetEvolve.Defaults/buildMultiTargeting/SupportMissingAnalyzers.targets

@samtrion samtrion merged commit c37895b into main Apr 14, 2026
12 checks passed
@samtrion samtrion deleted the feature/recommended-packages branch April 14, 2026 00:01
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (b1d6ae9) to head (5908bc9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #374   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant