Skip to content

Comments

docs: Add CLAUDE.md, update README with installation and diagnostics, add analyzer rule docs#38

Merged
DrBarnabus merged 1 commit intomainfrom
docs/update-readme-and-add-diagnostics
Feb 22, 2026
Merged

docs: Add CLAUDE.md, update README with installation and diagnostics, add analyzer rule docs#38
DrBarnabus merged 1 commit intomainfrom
docs/update-readme-and-add-diagnostics

Conversation

@DrBarnabus
Copy link
Owner

@DrBarnabus DrBarnabus commented Feb 20, 2026

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

    • Added comprehensive source generation analyser documentation with validation rules and diagnostics guidance
    • Included installation instructions in README
    • Updated code examples to reflect current API patterns
    • Created diagnostics reference guide for developers
  • Chores

    • Updated build configuration

… 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.
@DrBarnabus DrBarnabus added the documentation Improvements or additions to documentation label Feb 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

The 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

Cohort / File(s) Summary
Configuration
.gitignore
Adds Claude-related ignore entries (.claude/settings.local.json and .claude/todos/) to the existing SourceGenerator Launch Settings section.
Project Documentation
CLAUDE.md, README.md
CLAUDE.md introduces new repository guidance for Claude Code including project overview, build/test commands, architecture, domain concepts, and coding conventions. README.md adds Installation section with package snippet, revises ComplexKey example to use ImmutableArray Values instead of single Guid, updates attribute annotation with PrimaryKeySeparator configuration, and introduces new Diagnostics section with IDE analyser links.
Diagnostic Rules Documentation
docs/rules/COMPOSITE000[1-9].md, docs/rules/COMPOSITE001[0-1].md, docs/rules/README.md
Adds 12 comprehensive rule documentation pages for CompositeKey.SourceGeneration diagnostics. Each page documents rule metadata, cause, and resolution guidance with before/after code examples. Topics include: C# language version requirements (COMPOSITE0001), type constraints (COMPOSITE0002–0004), template string validation (COMPOSITE0005–0006), property accessors (COMPOSITE0007), format specifiers (COMPOSITE0008), repeating collection syntax (COMPOSITE0009–0011). Index page (README.md) provides rule summary table with links to individual documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 With whiskers twitching, rules I've penned,
Diagnostics documented, start to end,
From COMPOSITE codes one through eleven bright,
Each error explained, each fix made right! ✨

🚥 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 and specifically summarizes the main changes: adding CLAUDE.md, updating README with installation and diagnostics sections, and adding comprehensive analyzer rule documentation.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/update-readme-and-add-diagnostics

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.

❤️ Share

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

Copy link

@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: 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
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.66%. Comparing base (2162306) to head (e8736f1).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@DrBarnabus DrBarnabus merged commit 96663af into main Feb 22, 2026
4 of 5 checks passed
@DrBarnabus DrBarnabus deleted the docs/update-readme-and-add-diagnostics branch February 22, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant