Conversation
Enables the `Microsoft.CodeAnalysis.PublicApiAnalyzers` analyzer to help identify and avoid breaking changes. All current APIs have been documented as "Shipped".
WalkthroughA new dependency on Microsoft.CodeAnalysis.PublicApiAnalyzers (v4.14.0) has been introduced and centrally managed. The Mimic project now references this analyser, and associated lock files are updated. A comprehensive public API specification file for Mimic has been added, and nullable reference types are enabled for the unshipped API. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/Directory.Packages.props (1)
15-17: Prefer centralising PrivateAssets to avoid per-project duplicationYou already centralise PrivateAssets for JetBrains.Annotations. Do the same for the PublicApiAnalyzers to keep things consistent and simplify project files.
- <PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="4.14.0" /> + <PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="4.14.0" PrivateAssets="All" />If you make this change, you can drop the PrivateAssets node from Mimic.csproj for this package.
src/Mimic/Mimic.csproj (2)
14-17: PrivateAssets looks correct; IncludeAssets is redundant noiseFor analyser-only packages, the IncludeAssets value is the default and can be omitted. Keeping only PrivateAssets keeps the file lean.
- <PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers"> - <PrivateAssets>all</PrivateAssets> - <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> - </PackageReference> + <PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers"> + <PrivateAssets>all</PrivateAssets> + </PackageReference>If you adopt central PrivateAssets in Directory.Packages.props (as suggested), you can reduce this to a self-closing reference:
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" />
11-22: Optional: enforce RS00xx as errors via .editorconfig for stronger API stabilitySince the goal is preventing breaking changes, consider pinning Public API analyser rules to error in .editorconfig so CI fails on API drift.
Example .editorconfig entries:
dotnet_diagnostic.RS0016.severity = error dotnet_diagnostic.RS0017.severity = error dotnet_diagnostic.RS0026.severity = error dotnet_diagnostic.RS0027.severity = errorsrc/Mimic/PublicAPI.Shipped.txt (1)
3-278: Baseline looks comprehensive; adopt a clear workflow for updatesThe shipped API list is extensive and appears coherent for a first baseline. To keep it healthy:
- Add new/changed APIs to PublicAPI.Unshipped.txt during development, then move to Shipped at release.
- Keep PublicApiAnalyzers enabled in CI with RS00xx as errors to catch accidental changes.
If you want, I can draft a contributor guide snippet that documents this workflow.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/Directory.Packages.props(1 hunks)src/Mimic/Mimic.csproj(1 hunks)src/Mimic/PublicAPI.Shipped.txt(1 hunks)src/Mimic/PublicAPI.Unshipped.txt(1 hunks)src/Mimic/packages.lock.json(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/Mimic/PublicAPI.Shipped.txt
[style] ~6-~6: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...TValue> Mimic.CallCount Mimic.CallCount.CallCount() -> void Mimic.CallCount.Equals(Mimic....
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[duplication] ~11-~11: Possible typo: you repeated a word.
Context: ...ception.MimicException(Mimic.Exceptions.Reason reason, string? message) -> void Mimic.Excepti...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~12-~12: Possible typo: you repeated a word.
Context: ...ception.MimicException(Mimic.Exceptions.Reason reason, string? message, System.Exception? inn...
(ENGLISH_WORD_REPEAT_RULE)
[style] ~103-~103: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...> Mimic.IMimicked.Mimic.get -> Mimic.Mimic<T!>! Mimic.IProceed Mimic.IProceed.Proc...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~103-~103: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...micked.Mimic.get -> Mimic.Mimic<T!>! Mimic.IProceed Mimic.IProceed.Proceed() -> Mi...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~170-~170: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Mimic.Mimic() -> void Mimic.Mimic.Mimic(bool strict) -> void Mimic.Mimic.Nam...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~177-~177: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...lProperties() -> Mimic.Mimic<T!>! Mimic.Mimic.SetupGet(System.Linq.Expr...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~179-~179: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...(TProperty?)) -> Mimic.Mimic<T!>! Mimic.Mimic.SetupSet(System.Action<T!>! setterEx...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[duplication] ~186-~186: Possible typo: you repeated a word.
Context: ...unc<T!, TProperty>!>! expression, Mimic.CallCount callCount) -> void Mimic.Mimic.VerifyGetReceiv...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~187-~187: Possible typo: you repeated a word.
Context: ...unc<T!, TProperty>!>! expression, Mimic.CallCount callCount, string! failureMessage) -> void Mimic....
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~191-~191: Possible typo: you repeated a word.
Context: ...<System.Action<T!>!>! expression, Mimic.CallCount callCount) -> void Mimic.Mimic.VerifyReceived(...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~192-~192: Possible typo: you repeated a word.
Context: ...<System.Action<T!>!>! expression, Mimic.CallCount callCount, string! failureMessage) -> void Mimic....
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~195-~195: Possible typo: you repeated a word.
Context: ....Func<T!, TResult>!>! expression, Mimic.CallCount callCount) -> void Mimic.Mimic.VerifyReceived<...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~196-~196: Possible typo: you repeated a word.
Context: ....Func<T!, TResult>!>! expression, Mimic.CallCount callCount, string! failureMessage) -> void Mimic....
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~199-~199: Possible typo: you repeated a word.
Context: ...tem.Action<T!>! setterExpression, Mimic.CallCount callCount) -> void Mimic.Mimic.VerifySetReceiv...
(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~200-~200: Possible typo: you repeated a word.
Context: ...tem.Action<T!>! setterExpression, Mimic.CallCount callCount, string! failureMessage) -> void Mimic....
(ENGLISH_WORD_REPEAT_RULE)
[grammar] ~218-~218: This sentence seems to be incomplete. Insert a noun before ‘Is’ to make the sentence complete.
Context: ...>! comparer) -> TValue static Mimic.Arg.Is(System.Linq.Expressions.Express...
(MISSING_SUBJECT)
[grammar] ~219-~219: This sentence seems to be incomplete. Insert a noun before ‘Is’ to make the sentence complete.
Context: ...l>!>! match) -> TValue static Mimic.Arg.Is(System.Linq.Expressions.Express...
(MISSING_SUBJECT)
[grammar] ~220-~220: This sentence seems to be incomplete. Insert a noun before ‘Is’ to make the sentence complete.
Context: ...l>!>! match) -> TValue static Mimic.Arg.Is(TValue value) -> TValue static ...
(MISSING_SUBJECT)
[grammar] ~221-~221: This sentence seems to be incomplete. Insert a noun before ‘Is’ to make the sentence complete.
Context: ...Value value) -> TValue static Mimic.Arg.Is(TValue value, System.Collection...
(MISSING_SUBJECT)
[style] ~235-~235: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tatic Mimic.CallCount.operator !=(Mimic.CallCount left, Mimic.CallCount right) -> bool st...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~235-~235: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...operator !=(Mimic.CallCount left, Mimic.CallCount right) -> bool static Mimic.CallCount.o...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~236-~236: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tatic Mimic.CallCount.operator ==(Mimic.CallCount left, Mimic.CallCount right) -> bool st...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~236-~236: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...operator ==(Mimic.CallCount left, Mimic.CallCount right) -> bool static Mimic.DelayableEx...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~277-~277: Using many exclamation marks might seem excessive (in this case: 420 exclamation marks for a text that’s 30875 characters long)
Context: ..., TResult value) -> Mimic.IReturnsResult!
(EN_EXCESSIVE_EXCLAMATION)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Test (macos-latest, net9.0)
- GitHub Check: Test (macos-latest, net8.0)
- GitHub Check: Test (windows-latest, net8.0)
- GitHub Check: Test (ubuntu-latest, net9.0)
- GitHub Check: Test (windows-latest, net9.0)
- GitHub Check: Package (macos-latest)
- GitHub Check: Package (windows-latest)
- GitHub Check: Analyze (csharp)
🔇 Additional comments (3)
src/Mimic/PublicAPI.Unshipped.txt (1)
1-1: Good: nullability context enabled for unshipped APIThis is the recommended directive for PublicAPI files when tracking nullability. No further action needed.
src/Mimic/packages.lock.json (1)
26-31: Lock entry for PublicApiAnalyzers is consistent with the csprojRequested/resolved versions and content hash look sane. No action needed.
src/Mimic/PublicAPI.Shipped.txt (1)
1-2: Good: nullability context enabled for shipped API baselineThis ensures the analyser tracks nullability annotations for your released surface.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
=======================================
Coverage 92.30% 92.30%
=======================================
Files 64 64
Lines 2117 2117
Branches 365 365
=======================================
Hits 1954 1954
Misses 85 85
Partials 78 78 ☔ View full report in Codecov by Sentry. |
Enables the
Microsoft.CodeAnalysis.PublicApiAnalyzersanalyzer to help identify and avoid breaking changes.All current APIs have been documented as "Shipped".
Summary by CodeRabbit
New Features
Chores