docs: Add CLAUDE.md, update README with installation and diagnostics, add analyzer rule docs#38
Conversation
… add analyzer rule docs Add CLAUDE.md for Claude Code guidance, update README with installation section, repeating section example, and diagnostics link. Add per-rule documentation for all 11 analyzer diagnostics (COMPOSITE0001-COMPOSITE0011) with cause, fix, and code examples. Update .gitignore for Claude Code.
WalkthroughThe pull request adds project documentation and configuration files. Changes include: adding Claude-related entries to .gitignore, creating CLAUDE.md with project guidance, updating README.md with an installation section and revised ComplexKey example using ImmutableArray, and introducing comprehensive diagnostic rule documentation for COMPOSITE0001–COMPOSITE0011 in docs/rules/. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CLAUDE.md`:
- Line 39: Update the documented diagnostic range in the
CompositeKey.Analyzers.Common description: change the text that currently reads
"DiagnosticDescriptor definitions (COMPOSITE0001–COMPOSITE0008+)" to explicitly
list the full range "COMPOSITE0001–COMPOSITE0011" so the README/CLAUDE.md
reflects all 11 rules; locate the sentence mentioning
CompositeKey.Analyzers.Common and replace the old range string with the new
"COMPOSITE0001–COMPOSITE0011".
In `@docs/rules/COMPOSITE0001.md`:
- Line 23: The example in docs/rules/COMPOSITE0001.md references an EOL
framework "net7.0"; replace that token with a currently supported target such as
"net8.0" (preferred LTS) or "net9.0" so the line "Or target a framework that
defaults to C# 11+ (e.g. net7.0 or later)." becomes e.g. "Or target a framework
that defaults to C# 11+ (e.g. net8.0 or later)." Update the lone occurrence of
the string "net7.0" accordingly and keep the surrounding phrasing intact.
In `@docs/rules/COMPOSITE0004.md`:
- Line 11: Edit the sentence in COMPOSITE0004.md that currently reads "The type
annotated with `[CompositeKey]` has multiple constructors and the source
generator cannot determine which one to use." and insert a comma before "and" so
it reads "...has multiple constructors, and the source generator cannot
determine which one to use." This fixes the missing comma joining two
independent clauses.
In `@docs/rules/COMPOSITE0010.md`:
- Line 11: Edit the sentence in the COMPOSITE0010 rule so it reads
"...`{Property...separator}` syntax, so the generator knows how to format and
parse multiple values." — simply insert a comma before "so" in the sentence that
mentions the `{Property...separator}` syntax to correct the grammar.
In `@docs/rules/COMPOSITE0011.md`:
- Around line 17-25: The "before" example doesn't trigger COMPOSITE0011 because
PrimaryKeySeparator = '#' splits the template into partition/sort sections;
remove the PrimaryKeySeparator from the "Before" example (so `#` is treated as a
literal and `{Name}` follows `{Tags...,}` in the same section) to make it
actually error, and correct the "After" explanatory text to say `{Tags...,}` is
last in the sort section (not the partition section) when PrimaryKeySeparator =
'#' — update references to the CompositeKey template and PrimaryKeySeparator
accordingly.
In `@docs/rules/README.md`:
- Around line 9-10: The table entries in docs/rules/README.md use phrasing that
doesn't match the individual rule titles—update the index row for COMPOSITE0003
to read "Type must be partial" and update the COMPOSITE0004 row to read "No
obvious constructor" so the link text exactly matches the titles in
COMPOSITE0003.md and COMPOSITE0004.md; adjust only the right-hand description
strings in the table for the symbols COMPOSITE0003 and COMPOSITE0004 to ensure
exact wording alignment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
=======================================
Coverage 87.66% 87.66%
=======================================
Files 35 35
Lines 2099 2099
Branches 344 344
=======================================
Hits 1840 1840
Misses 157 157
Partials 102 102 ☔ View full report in Codecov by Sentry. |
Add CLAUDE.md for Claude Code guidance, update README with installation section, repeating section example, and diagnostics link.
Add per-rule documentation for all 11 analyzer diagnostics (COMPOSITE0001-COMPOSITE0011) with cause, fix, and code examples.
Update .gitignore for Claude Code.
Summary by CodeRabbit
Documentation
Chores