test(sdk): cover local editorconfig override behavior#138
Conversation
|
@coderabbitai autofix |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)tests/**/*.cs⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughReworked editorconfig-related tests in tests/ANcpLua.Sdk.Tests/SdkTests.cs: removed the single test asserting SDK global 🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@tests/ANcpLua.Sdk.Tests/SdkTests.cs`:
- Around line 434-435: The current assertions Assert.False(result.HasWarning())
and Assert.False(result.HasError()) are too broad; change them so the test
asserts there are no errors (keep Assert.False(result.HasError())) and that any
warnings present are only IDE0061 by filtering diagnostics for warnings where
diagnostic.Id != "IDE0061" and asserting that filtered collection is empty (use
result.Diagnostics or the available warnings collection and the
result.HasWarning()/HasError() helpers as needed). This narrows the check to
IDE0061-only style emissions while keeping the rest of the test contract stable.
- Around line 434-435: Replace the xUnit Assert.True/Assert.False boolean
assertions with FluentAssertions style on the boolean-returning methods; for
example change Assert.False(result.HasWarning()) and
Assert.False(result.HasError()) to result.HasWarning().Should().BeFalse() and
result.HasError().Should().BeFalse() respectively, and similarly convert the
assertion at the other reported spot (line ~470) to use
.Should().BeTrue()/BeFalse() as appropriate; search for Assert.True/Assert.False
in SdkTests.cs and update those boolean checks to FluentAssertions using the
.Should() extension on the boolean-returning calls (e.g., HasWarning(),
HasError(), or the specific method used at the other assertion).
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ef204024-13fd-4e3f-8da2-fec0e61e8bb5
📒 Files selected for processing (1)
tests/ANcpLua.Sdk.Tests/SdkTests.cs
📜 Review details
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: create_nuget
- GitHub Check: Agent
- GitHub Check: lint_config
- GitHub Check: test (macos-latest)
- GitHub Check: test (ubuntu-latest)
- GitHub Check: test (windows-latest)
🧰 Additional context used
📓 Path-based instructions (1)
tests/**/*.cs
⚙️ CodeRabbit configuration file
tests/**/*.cs: xUnit + FluentAssertions. AAA pattern. NSubstitute for mocks.
Flag: blocking-async patterns (Task.Run(() => x.Result)), missing
async Task(sync-void),Thread.Sleepinstead ofawait Task.Delay,
tests asserting on private state via reflection.
Files:
tests/ANcpLua.Sdk.Tests/SdkTests.cs
There was a problem hiding this comment.
Pull request overview
Adds regression coverage around how a consumer project’s local .editorconfig interacts with the SDK’s global analyzer configuration, specifically distinguishing Debug vs Release build behavior.
Changes:
- Replaces/renames the prior precedence-focused test with a Debug-specific test asserting IDE code-style diagnostics aren’t produced when
EnforceCodeStyleInBuildis off. - Adds a Release build test asserting a local
.editorconfigcan elevateIDE0061to an error.
|
@coderabbitai autofix |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. The branch was updated while autofix was in progress. Please try again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: badce52009
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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 `@tests/ANcpLua.Sdk.Tests/SdkTests.cs`:
- Around line 435-441: Remove the filter that excludes "IDE0061" from
unexpectedWarnings and instead add an explicit assertion in Debug builds that no
warning with RuleId == "IDE0061" was produced: stop filtering inside the LINQ on
result.GetWarnings(), and add a Debug-only check (e.g. wrap with `#if` DEBUG) that
verifies !result.GetWarnings().Any(d => d.RuleId == "IDE0061") while keeping the
existing unexpectedWarnings.Should().BeEmpty() and
result.HasError().Should().BeFalse() assertions intact; refer to GetWarnings(),
unexpectedWarnings, and result.HasError() to locate where to change the code.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: af42771a-7bbb-4d85-9fe9-8eea813737f4
📒 Files selected for processing (3)
Directory.Packages.propstests/ANcpLua.Sdk.Tests/ANcpLua.Sdk.Tests.csprojtests/ANcpLua.Sdk.Tests/SdkTests.cs
📜 Review details
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test (macos-latest)
- GitHub Check: test (ubuntu-latest)
- GitHub Check: test (windows-latest)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.props
⚙️ CodeRabbit configuration file
**/*.props: MSBuild property files. Review for: condition guards on every override
(consumer must be able to opt out), no<RemoveAttributes>on items
that consumers may have set, and that defaults are sensible without
forcing a downstream cascade.
Files:
Directory.Packages.props
tests/**/*.cs
⚙️ CodeRabbit configuration file
tests/**/*.cs: xUnit + FluentAssertions. AAA pattern. NSubstitute for mocks.
Flag: blocking-async patterns (Task.Run(() => x.Result)), missing
async Task(sync-void),Thread.Sleepinstead ofawait Task.Delay,
tests asserting on private state via reflection.
Files:
tests/ANcpLua.Sdk.Tests/SdkTests.cs
🪛 GitHub Actions: Claude Code Review / 0_claude-review.txt
tests/ANcpLua.Sdk.Tests/SdkTests.cs
[warning] 1-1: CodeRabbit check "No Suppression Of Fixable Diagnostics" reported: One SuppressMessage(CA2000) added without inline comment matching acceptable-suppressions allowlist (MEAI001/OPENAI002/preview/source-gen/DevUI/upstream/AOT/netstandard2.0).
|
@coderabbitai autofix |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. The branch was updated while autofix was in progress. Please try again. |
|
@coderabbitai autofix |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
@coderabbitai autofix |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Summary
Verification
Need help on this PR? Tag
@codesmithwith what you need.Summary by CodeRabbit