MTA-7228 C# Roslyn provider for analysis - #390
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe rules development documentation removes C# custom-rule and provider-capability pages from assemblies, updates C# ChangesRules development documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Line 28: Update the csharp.referenced location documentation to include FIELD
alongside CLASS, METHOD, and ALL. Clarify that System.Web.Mvc is an example
search pattern or source-code value, not a location value.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 38f7055a-b3a0-48bf-91ef-0a43fe4c1d5a
📒 Files selected for processing (3)
assemblies/rules-development-guide/assembly_creating-rule.adocdocs/topics/rules-development/create-csharp-custom-rule.adocdocs/topics/rules-development/yaml-dotnet-provider.adoc
💤 Files with no reviewable changes (2)
- docs/topics/rules-development/create-csharp-custom-rule.adoc
- assemblies/rules-development-guide/assembly_creating-rule.adoc
|
@mguetta1 @JonahSussman @dymurray Please could you check the updates to C# provider documentation for technical accuracy? I have not addressed the following points. So, please let me know if I should add any of them:
|
606f118 to
789fad0
Compare
dymurray
left a comment
There was a problem hiding this comment.
Changes look sane to me; I'm going to defer to @JonahSussman with respect to the capability declarations
|
@JonahSussman @mguetta1 Can you please help me gain some clarity on the Roslyn-based C# provider? I've listed some queries for your clarification above. |
|
Hey @Pkylas007, here are answers to your questions based on the current provider implementation: Typo: "inheritence" should be "inheritance" in ".NET SDK 9.0 or higher" prerequisite: The .NET 9.0 SDK is bundled inside the provider's container image. Users don't need to install it if they are using the container workflow. Ad-hoc fallback / paket: Worth a brief mention. The provider tries to load projects via MSBuild first ( .NET Framework targets: Yes, the provider can analyze .NET Framework apps (net20, net35, net40, net45, net472, etc.). For these, it downloads
Dependency resolution / source-only mode: The provider resolves dependencies internally for compilation purposes (downloads NuGet packages, resolves framework assemblies), but it does not report a dependency graph back to the analyzer. "you do not need external tools": This line is slightly misleading. The provider does shell out to |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Line 14: Update the dependency-resolution guidance in the provider
documentation to explicitly state that it invokes dotnet restore. Clarify that
the bundled .NET SDK removes the need for users to install an SDK in the
container workflow, while network access remains required unless all
dependencies are available locally.
- Line 12: Update the C# provider project-loading description to state
explicitly that it checks `.sln` files first, followed by SDK-style `.csproj`
files; qualify `.csproj` as SDK-style and avoid implying that all project files
use the MSBuild path.
- Line 46: Make the `location` requirement for `csharp.referenced` consistent
between `yaml-dotnet-provider.adoc` and `yaml-provider-conditions.adoc`: verify
the provider’s actual behavior, then update the documentation that disagrees so
both describe the same required/optional status and default handling.
- Line 26: Update the operator reference in the YAML .NET provider documentation
from `typeOf()` to the correct C# spelling `typeof`, preserving the existing
operator list formatting.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a71c753c-f627-4577-b6aa-ab45ba9006d8
📒 Files selected for processing (6)
assemblies/rules-development-guide/assembly_creating-rule.adocassemblies/rules-development-guide/assembly_rule-yaml-conditions.adocdocs/topics/rules-development/con_external_providers.adocdocs/topics/rules-development/con_provider-capability-in-custom-rules.adocdocs/topics/rules-development/create-csharp-custom-rule.adocdocs/topics/rules-development/yaml-dotnet-provider.adoc
💤 Files with no reviewable changes (4)
- docs/topics/rules-development/con_provider-capability-in-custom-rules.adoc
- docs/topics/rules-development/create-csharp-custom-rule.adoc
- assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc
- assemblies/rules-development-guide/assembly_creating-rule.adoc
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/topics/rules-development/con_external_providers.adoc
|
@JonahSussman Thank you for your explanations! I've modified the draft to include your suggestions. Can you please take a look at the updates? |
Signed-off-by: Prabha Kylasamiyer Sundara Rajan <pkylasam@redhat.com>
55031e8 to
1f6bb77
Compare
JIRA
Version
Preview
Summary by CodeRabbit
Summary by CodeRabbit
referencedprovider documentation to describe Roslyn-based analysis, replaced the old scoping option withlocation(case-insensitive), and clarified supported selectors.