demo#503
Conversation
📝 WalkthroughWalkthroughThis PR adds AssemblyMetadata.Generators as the 270th RSCG example: a demo project and solution, generator metadata and README, catalog JSON registration, public HTML/MDX documentation and category/author/index updates, a CodeTour and video script, and global count/date updates. ChangesAssemblyMetadata.Generators Catalog Entry
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Pull request overview
Adds a new RSCG example for AssemblyMetadata.Generators (by LoreSoft) as entry #270 in the EnhancementProject category, including its example project, documentation, code tour, video script, and updates to all aggregated indexes/counters across the site and book.
Changes:
- New example project
DemoMeta(csproj, Program.cs, slnx) plus metadata files (description.json,readme.txt,nuget.txt,video.json) and a CodeTour underv2/.tours/. - Generated documentation page (
AssemblyMetadata.Generators.html), category/index listings, and counts bumped from 269 → 270 acrossREADME.md,about.md,indexRSCG.md,index.md,list.html, etc. - Updates to data files:
GeneratorDataRec.json,RSCG.json,docFind.json,all.csv,pandocHTML.yaml, and the LoreSoft author page.
Reviewed changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| v2/RSCGExamplesData/GeneratorDataRec.json | Adds AssemblyMetadata.Generators entry (introduces trailing comma). |
| v2/rscg_examples/AssemblyMetadata.Generators/video.json | New demo video script (contains malformed JSON entries). |
| v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.cs | Minimal sample using ThisAssembly constants. |
| v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/DemoMeta.csproj | Demo project referencing the analyzer NuGet. |
| v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta.slnx | Solution descriptor for the demo. |
| v2/rscg_examples/AssemblyMetadata.Generators/readme.txt | Generator readme copy. |
| v2/rscg_examples/AssemblyMetadata.Generators/nuget.txt | One-line NuGet description. |
| v2/rscg_examples/AssemblyMetadata.Generators/description.json | Metadata used by the site generator. |
| v2/rscg_examples_site/static/exports/RSCG.json | Adds new entry to exported list. |
| v2/rscg_examples_site/src/components/HomepageFeatures/index.js | Bumps example count to 270. |
| v2/rscg_examples_site/docs/RSCG-Examples/index.md | Updates titles/counts and EnhancementProject section. |
| v2/rscg_examples_site/docs/indexRSCG.md | Updates list/counts. |
| v2/rscg_examples_site/docs/Categories/EnhancementProject.md | Inserts entry, renumbers list. |
| v2/rscg_examples_site/docs/Categories/_PrimitiveEnhancementProject.mdx | Same insertion in the primitive include. |
| v2/rscg_examples_site/docs/Authors/LoreSoft.md | Replaces Injectio entry with new one (regression). |
| v2/rscg_examples_site/docs/about.md | Updates count. |
| v2/Generator/all.csv | Appends LinkDotNet.Enumeration and AssemblyMetadata.Generators rows. |
| v2/docFind.json | Adds search entry. |
| v2/book/pandocHTML.yaml | Adds book input file. |
| v2/book/list.html | Bumps count and appends row 270. |
| v2/book/examples/LinkDotNet.Enumeration.html | Replaces About text. |
| v2/book/examples/GenerateDispose.html | Replaces About text. |
| v2/book/examples/AssemblyMetadata.Generators.html | New book example page. |
| v2/.tours/AssemblyMetadata.Generators.tour | New CodeTour for the demo. |
| README.md | Bumps count and appends new section for #270. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {"typeStep":"waitseconds","arg":"30"}, | ||
| {"typeStep":"text","arg": "Remember, you can download the code from here"}, | ||
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators#download-example-net--c-", | ||
| SpeakTest=" "}, |
| {"typeStep":"waitseconds","arg":"30"}, | ||
| ] | ||
| } |
| "Category": 1, | ||
| "dtStart": "2026-04-02T00:00:00", | ||
| "show": true | ||
| }, |
| # Author : Loresoft | ||
|
|
||
| Number RSCG: 1 | ||
|
|
||
|
|
||
| 1 [Injectio](/docs/Injectio) [](https://www.nuget.org/packages/Injectio/)  2023-08-17 | ||
| 1 [AssemblyMetadata.Generators](/docs/AssemblyMetadata.Generators) [](https://www.nuget.org/packages/AssemblyMetadata.Generators/)  2026-04-02 | ||
|
|
There was a problem hiding this comment.
Actionable comments posted: 11
🤖 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 `@v2/.tours/AssemblyMetadata.Generators.tour`:
- Around line 14-17: The tour step's "pattern" value ("this is the code")
doesn't match the actual contents of the Program.cs referenced by the step;
update the JSON "pattern" property for the step that targets Program.cs (the
tour entry referencing Program.cs / DemoMeta) to a string that actually appears
in that file such as "ThisAssembly.Title" or "ThisAssembly.TargetFramework" so
the tour stop will anchor correctly.
In `@v2/book/examples/AssemblyMetadata.Generators.html`:
- Line 2: Add the HTML5 doctype as the very first line of the file so it
precedes the page title "RSCG nr 270 : AssemblyMetadata.Generators" and any
other content; open the file containing the AssemblyMetadata.Generators example
and insert <!doctype html> at the top to ensure browsers and tooling render in
standards mode.
In `@v2/book/examples/GenerateDispose.html`:
- Line 15: The HTML currently has the entire README/description collapsed on one
line; split it into semantic HTML blocks so headings, paragraphs, code samples
and lists render correctly: create <h3>Purpose</h3> and a following <p>
describing the generator, a <pre><code> block for the C# example that preserves
the showLineNumbers attribute and the
GenerateDispose.SourceGenerators.GenerateDispose attribute usage (and the
partial class DALDB and Drop method), a <h3>What Gets Generated</h3> section
with a <ul> listing the Dispose method, the private int _isDisposed field and
sealed vs non-sealed behavior, an example <h3>How to Use</h3> with a <pre><code>
using (var db = new DALDB()){...} </code></pre>, and a final <h3>Key
Benefits</h3> with bullet points; ensure code fences become proper <pre><code>
blocks and that symbols like GenerateDispose, DALDB, Dispose, Drop, and
_isDisposed remain unchanged.
In `@v2/book/examples/LinkDotNet.Enumeration.html`:
- Line 15: Split the single-line markdown into semantic HTML: create a heading
for the tool description (e.g., "Purpose"), a paragraph explaining the
generator, a code block or <pre> for the sample declaration (the
[Enumeration(...)]public sealed partial record CarTypes; example) and another
code block for usage examples (CarTypes.TryParse(...) and car.Match(...)), and
convert the feature list into a proper unordered list with each bullet as its
own <li> (include items like Exhaustive matching / Create/TryCreate / IParsable
/ Implicit string conversion / CarTypes.All / GenerateJsonConverter). Ensure
identifiers like CarTypes, Match, TryParse, Create/TryCreate, IParsable,
CarTypes.All and GenerateJsonConverter are preserved verbatim.
In `@v2/book/list.html`:
- Line 20: The heading text "This is the list of 270 RSCG with examples =>"
contains an unescaped ">" which breaks HTMLHint; update the heading content (the
visible heading string in v2/book/list.html) to escape the greater-than sign
(replace "=>" with "=>" or remove the arrow) so the HTML is valid and passes
linting.
In `@v2/rscg_examples_site/docs/indexRSCG.md`:
- Line 23: The markdown link label contains trailing space inside the square
brackets causing MD039; remove the extra space so the label in the table becomes
"AssemblyMetadata.Generators by Loresoft" (no leading/trailing spaces inside the
[...] )—edit the line with the table entry that currently reads
"[AssemblyMetadata.Generators by Loresoft ](/docs/AssemblyMetadata.Generators)"
to "[AssemblyMetadata.Generators by
Loresoft](/docs/AssemblyMetadata.Generators)".
- Around line 23-25: The three table rows for AssemblyMetadata.Generators,
LinkDotNet.Enumeration, and GenerateDispose are out of descending-chronological
order: AssemblyMetadata.Generators (2026-04-02) should come after the two May
2026 entries. Fix indexRSCG.md by reordering these table rows (or implement a
sort by the date column) so entries are sorted descending by the parsed date
(yyyy-mm-dd) — specifically move the AssemblyMetadata.Generators row below
LinkDotNet.Enumeration and GenerateDispose (or ensure the sort routine handling
these rows sorts by the date string in the first date column).
In `@v2/rscg_examples/AssemblyMetadata.Generators/readme.txt`:
- Line 21: Update the documentation sentence that describes the source generator
to use the hyphenated term "assembly-level" instead of "assembly level": locate
the line mentioning the internal partial class `ThisAssembly` and change
"assembly level attributes" to "assembly-level attributes" so the text reads
that it converts "assembly-level attributes" to string constants.
In `@v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta.slnx`:
- Around line 1-3: Add a parallel .sln file next to the existing .slnx so
downstream resolution (MultiGeneratorV2.GatherData which searches
Directory.GetFiles(..., "*.sln")) can find a solution; create a minimal solution
file containing the same Project entry as the .slnx (pointing to
DemoMeta/DemoMeta.csproj) so output.fullPathToSln is populated for
tour/video/catalog generation paths.
In `@v2/rscg_examples/AssemblyMetadata.Generators/video.json`:
- Line 29: The tour step entry with "typeStep":"tour" has an incorrect "arg"
pointing to "src/.tours/"; update the "arg" value to the actual tour file path
added in this PR (e.g. "v2/.tours/AssemblyMetadata.Generators.tour" or the
relative path that points to AssemblyMetadata.Generators.tour) so the tour step
correctly references the new tour file.
- Around line 35-38: The JSON in
v2/rscg_examples/AssemblyMetadata.Generators/video.json is invalid: remove the
malformed key syntax SpeakTest=" " (replace with a proper JSON key/value or
delete the entry) and remove the trailing comma after the last array element
(the object with "typeStep":"waitseconds","arg":"30"); also fix the tour path
argument that currently points to "src/.tours/" to the correct
"v2/.tours/AssemblyMetadata.Generators.tour" so the "arg" for the tour step
resolves correctly.
🪄 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: d9741a6e-f6a7-43b8-aea3-f17647ef40e6
⛔ Files ignored due to path filters (3)
v2/Generator/all.csvis excluded by!**/*.csvv2/rscg_examples_site/static/exports/RSCG.xlsxis excluded by!**/*.xlsxv2/rscg_examples_site/static/sources/AssemblyMetadata.Generators.zipis excluded by!**/*.zip
📒 Files selected for processing (24)
README.mdv2/.tours/AssemblyMetadata.Generators.tourv2/RSCGExamplesData/GeneratorDataRec.jsonv2/book/examples/AssemblyMetadata.Generators.htmlv2/book/examples/GenerateDispose.htmlv2/book/examples/LinkDotNet.Enumeration.htmlv2/book/list.htmlv2/book/pandocHTML.yamlv2/docFind.jsonv2/rscg_examples/AssemblyMetadata.Generators/description.jsonv2/rscg_examples/AssemblyMetadata.Generators/nuget.txtv2/rscg_examples/AssemblyMetadata.Generators/readme.txtv2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta.slnxv2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/DemoMeta.csprojv2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.csv2/rscg_examples/AssemblyMetadata.Generators/video.jsonv2/rscg_examples_site/docs/Authors/LoreSoft.mdv2/rscg_examples_site/docs/Categories/EnhancementProject.mdv2/rscg_examples_site/docs/Categories/_PrimitiveEnhancementProject.mdxv2/rscg_examples_site/docs/RSCG-Examples/index.mdv2/rscg_examples_site/docs/about.mdv2/rscg_examples_site/docs/indexRSCG.mdv2/rscg_examples_site/src/components/HomepageFeatures/index.jsv2/rscg_examples_site/static/exports/RSCG.json
| "file": "rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.cs", | ||
| "description": "File Program.cs \r\n>> dotnet run --project rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/DemoMeta.csproj ", | ||
| "pattern": "this is the code" | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the step pattern exists in Program.cs
rg -n --fixed-strings "this is the code" v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.csRepository: ignatandrei/RSCG_Examples
Length of output: 51
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== tour snippet =="
# show the relevant lines from the tour file
sed -n '1,120p' v2/.tours/AssemblyMetadata.Generators.tour | nl -ba | sed -n '1,120p'
echo "== Program.cs summary =="
FILE="v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.cs"
if [ -f "$FILE" ]; then
wc -l "$FILE"
echo "---- head (first 120 lines max) ----"
sed -n '1,120p' "$FILE" | nl -ba
echo "---- likely literals (Console.WriteLine etc.) ----"
rg -n "Console\.WriteLine|Title|Target Framework|TargetFramework|AssemblyName|Metadata" "$FILE" || true
else
echo "Missing: $FILE"
fi
echo "== exact pattern search =="
rg -n --fixed-strings "this is the code" "$FILE" || trueRepository: ignatandrei/RSCG_Examples
Length of output: 149
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== tour snippet =="
sed -n '1,120p' v2/.tours/AssemblyMetadata.Generators.tour | cat -n | sed -n '1,120p'
echo "== Program.cs check =="
FILE="v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.cs"
if [ -f "$FILE" ]; then
echo "File exists: $FILE"
wc -l "$FILE"
echo "---- head (first 160 lines max) ----"
sed -n '1,160p' "$FILE" | cat -n
echo "---- search likely stable strings ----"
rg -n "Console\.WriteLine|Title|Target Framework|TargetFramework|AssemblyName|Metadata" "$FILE" || true
echo "---- exact pattern search: this is the code ----"
rg -n --fixed-strings "this is the code" "$FILE" || true
else
echo "Missing: $FILE"
fiRepository: ignatandrei/RSCG_Examples
Length of output: 1827
Fix tour step pattern mismatch for DemoMeta/Program.cs
rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.cs contains only Console.WriteLine(ThisAssembly.Title); and Console.WriteLine(ThisAssembly.TargetFramework);, so the step pattern "this is the code" can’t match and the tour stop won’t anchor correctly. Update the step’s "pattern" to a string that actually exists in Program.cs (e.g., ThisAssembly.Title / ThisAssembly.TargetFramework).
🤖 Prompt for 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.
In `@v2/.tours/AssemblyMetadata.Generators.tour` around lines 14 - 17, The tour
step's "pattern" value ("this is the code") doesn't match the actual contents of
the Program.cs referenced by the step; update the JSON "pattern" property for
the step that targets Program.cs (the tour entry referencing Program.cs /
DemoMeta) to a string that actually appears in that file such as
"ThisAssembly.Title" or "ThisAssembly.TargetFramework" so the tour stop will
anchor correctly.
| @@ -0,0 +1,53 @@ | |||
|
|
|||
| <h1>RSCG nr 270 : AssemblyMetadata.Generators</h1> | |||
There was a problem hiding this comment.
Add HTML doctype declaration at the top.
Line 2 starts with content before <!doctype html>, which triggers standards mode issues in some browsers and tooling. Add the doctype as the first line.
🧰 Tools
🪛 HTMLHint (1.9.2)
[error] 2-2: Doctype must be declared before any non-comment content.
(doctype-first)
🤖 Prompt for 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.
In `@v2/book/examples/AssemblyMetadata.Generators.html` at line 2, Add the HTML5
doctype as the very first line of the file so it precedes the page title "RSCG
nr 270 : AssemblyMetadata.Generators" and any other content; open the file
containing the AssemblyMetadata.Generators example and insert <!doctype html> at
the top to ensure browsers and tooling render in standards mode.
| <h2>About</h2> | ||
|
|
||
| Generating the Dispose method for a class that implements IDisposable. | ||
| GenerateDispose for boilerplate reduction for IDisposable pattern### PurposeA Roslyn source generator that replaces the 10+ lines of IDisposable boilerplate code with a single attribute.It also automatically adapts the generated pattern when the class modifiers change (e.g. sealed to non-sealed).### How to Define```csharp showLineNumbers[GenerateDispose.SourceGenerators.GenerateDispose(nameof(Drop))]partial class DALDB : IDisposable // : IDisposable is optional!{ private ConnectionDB cn; private ConnectionDB cn1; public DALDB() { cn = new ConnectionDB(); cn1 = new ConnectionDB(); } public void Drop() // Your custom disposal logic { cn.Dispose(); cn1.Dispose(); }}```- The class must be partial- Pass nameof(YourDisposeMethod) to the attribute - the method must be callable with no arguments### What Gets Generated- public void Dispose() (thread-safe, calls your method)- A private int _isDisposed field for double-dispose protection- Adapts to sealed vs non-sealed automatically (private vs protected virtual)### How to Use```csharp showLineNumbersusing (var db = new DALDB()){ // use db...} // Dispose() called automatically```### Key Benefits- 10+ lines of boilerplate replaced by 1 attribute- sealed changes auto-adapt the Dispose pattern- No manual IDisposable wiring needed |
There was a problem hiding this comment.
Reformat collapsed markdown blob into valid HTML sections.
Line 15 packs headings, code fences, and bullets into one line, so the “About” content won’t render as intended and is hard to consume. Split this into proper <p>, <h3>, <ul>, and <pre><code> blocks.
🤖 Prompt for 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.
In `@v2/book/examples/GenerateDispose.html` at line 15, The HTML currently has the
entire README/description collapsed on one line; split it into semantic HTML
blocks so headings, paragraphs, code samples and lists render correctly: create
<h3>Purpose</h3> and a following <p> describing the generator, a <pre><code>
block for the C# example that preserves the showLineNumbers attribute and the
GenerateDispose.SourceGenerators.GenerateDispose attribute usage (and the
partial class DALDB and Drop method), a <h3>What Gets Generated</h3> section
with a <ul> listing the Dispose method, the private int _isDisposed field and
sealed vs non-sealed behavior, an example <h3>How to Use</h3> with a <pre><code>
using (var db = new DALDB()){...} </code></pre>, and a final <h3>Key
Benefits</h3> with bullet points; ensure code fences become proper <pre><code>
blocks and that symbols like GenerateDispose, DALDB, Dispose, Drop, and
_isDisposed remain unchanged.
| <h2>About</h2> | ||
|
|
||
| Generating enumeration from classes in C# with matching | ||
| Good for replacing enum + switch patterns with string-based enumerations with exhaustive pattern matching.### PurposeA source code generator that creates string-based enumerations (similar to Java enums / DDD value objects) with exhaustive pattern matching, replacing enum + switch patterns.### How to Define[Enumeration(Casing.Preserve, "None", "Dacia", "Tesla", "BMW", "Mercedes")]public sealed partial record CarTypes;### How to UseCarTypes.TryParse("BMW", null, out var car);car.Match(onBMW: () => "this is bmw", onDacia: () => "this is dacia", ...);### Key Features- Exhaustive matching: Match() requires all values- Create / TryCreate: throws vs returns bool- IParsable: Minimal APIs & Model Binding- Implicit string conversion- CarTypes.All returns FrozenSet of CarTypes- JSON: GenerateJsonConverter = true |
There was a problem hiding this comment.
Convert the one-line markdown block into structured HTML.
Line 15 combines headings, sample code, and bullet points into a single line, which breaks readability/rendering on this HTML page. Please expand it into semantic HTML elements.
🤖 Prompt for 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.
In `@v2/book/examples/LinkDotNet.Enumeration.html` at line 15, Split the
single-line markdown into semantic HTML: create a heading for the tool
description (e.g., "Purpose"), a paragraph explaining the generator, a code
block or <pre> for the sample declaration (the [Enumeration(...)]public sealed
partial record CarTypes; example) and another code block for usage examples
(CarTypes.TryParse(...) and car.Match(...)), and convert the feature list into a
proper unordered list with each bullet as its own <li> (include items like
Exhaustive matching / Create/TryCreate / IParsable / Implicit string conversion
/ CarTypes.All / GenerateJsonConverter). Ensure identifiers like CarTypes,
Match, TryParse, Create/TryCreate, IParsable, CarTypes.All and
GenerateJsonConverter are preserved verbatim.
| <body> | ||
| <h1> | ||
| This is the list of 269 RSCG with examples => | ||
| This is the list of 270 RSCG with examples => |
There was a problem hiding this comment.
Escape special character in heading text.
Line 20 includes a raw > (=>), which violates HTML escaping rules and fails HTMLHint. Replace it with => (or remove the arrow).
Proposed fix
-This is the list of 270 RSCG with examples =>
+This is the list of 270 RSCG with examples =>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This is the list of 270 RSCG with examples => | |
| This is the list of 270 RSCG with examples => |
🧰 Tools
🪛 HTMLHint (1.9.2)
[error] 20-20: Special characters must be escaped : [ > ].
(spec-char-escape)
🤖 Prompt for 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.
In `@v2/book/list.html` at line 20, The heading text "This is the list of 270 RSCG
with examples =>" contains an unescaped ">" which breaks HTMLHint; update the
heading content (the visible heading string in v2/book/list.html) to escape the
greater-than sign (replace "=>" with "=>" or remove the arrow) so the HTML is
valid and passes linting.
|
|
||
| ### Generated | ||
|
|
||
| This source generator creates an internal partial class called `ThisAssembly` with all the assembly level attributes converted to string constants |
There was a problem hiding this comment.
Fix hyphenation in documentation text.
Use “assembly-level” instead of “assembly level” for correctness and consistency in technical writing.
Suggested patch
-This source generator creates an internal partial class called `ThisAssembly` with all the assembly level attributes converted to string constants
+This source generator creates an internal partial class called `ThisAssembly` with all the assembly-level attributes converted to string constants📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This source generator creates an internal partial class called `ThisAssembly` with all the assembly level attributes converted to string constants | |
| This source generator creates an internal partial class called `ThisAssembly` with all the assembly-level attributes converted to string constants |
🧰 Tools
🪛 LanguageTool
[grammar] ~21-~21: Use a hyphen to join words.
Context: ...led ThisAssembly with all the assembly level attributes converted to string con...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for 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.
In `@v2/rscg_examples/AssemblyMetadata.Generators/readme.txt` at line 21, Update
the documentation sentence that describes the source generator to use the
hyphenated term "assembly-level" instead of "assembly level": locate the line
mentioning the internal partial class `ThisAssembly` and change "assembly level
attributes" to "assembly-level attributes" so the text reads that it converts
"assembly-level attributes" to string constants.
| <Solution> | ||
| <Project Path="DemoMeta/DemoMeta.csproj" /> | ||
| </Solution> |
There was a problem hiding this comment.
Add a .sln file alongside .slnx to satisfy downstream discovery.
MultiGeneratorV2.GatherData currently resolves solutions with Directory.GetFiles(..., "*.sln") (see v2/Generator/MultiGeneratorV2.cs:466), so this .slnx-only setup can break tour/video/catalog generation paths that depend on output.fullPathToSln.
🤖 Prompt for 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.
In `@v2/rscg_examples/AssemblyMetadata.Generators/src/DemoMeta.slnx` around lines
1 - 3, Add a parallel .sln file next to the existing .slnx so downstream
resolution (MultiGeneratorV2.GatherData which searches Directory.GetFiles(...,
"*.sln")) can find a solution; create a minimal solution file containing the
same Project entry as the .slnx (pointing to DemoMeta/DemoMeta.csproj) so
output.fullPathToSln is populated for tour/video/catalog generation paths.
| {"typeStep":"text","arg": "And now I will show you an example of using AssemblyMetadata.Generators"}, | ||
|
|
||
| {"typeStep":"hide","arg": "now execute the tour in VSCode"}, | ||
| {"typeStep":"tour", "arg": "src/.tours/"}, |
There was a problem hiding this comment.
Tour path appears inconsistent with the actual tour file location.
Line 29 points to src/.tours/, but this PR adds v2/.tours/AssemblyMetadata.Generators.tour. This likely breaks the scripted “tour” step.
🤖 Prompt for 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.
In `@v2/rscg_examples/AssemblyMetadata.Generators/video.json` at line 29, The tour
step entry with "typeStep":"tour" has an incorrect "arg" pointing to
"src/.tours/"; update the "arg" value to the actual tour file path added in this
PR (e.g. "v2/.tours/AssemblyMetadata.Generators.tour" or the relative path that
points to AssemblyMetadata.Generators.tour) so the tour step correctly
references the new tour file.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators#download-example-net--c-", | ||
| SpeakTest=" "}, | ||
| {"typeStep":"waitseconds","arg":"30"}, | ||
| ] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Validate JSON syntax after fix
jq . v2/rscg_examples/AssemblyMetadata.Generators/video.json >/dev/nullRepository: ignatandrei/RSCG_Examples
Length of output: 128
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="v2/rscg_examples/AssemblyMetadata.Generators/video.json"
echo "== File: $FILE =="
echo "-- Lines 20-45 --"
nl -ba "$FILE" | sed -n '20,45p'
echo
echo "-- Tour references (.tours) --"
rg -n "\.tours" "$FILE" || true
echo
echo "-- Check expected tour file path(s) --"
ls -la v2/.tours/AssemblyMetadata.Generators.tour 2>/dev/null || echo "MISSING: v2/.tours/AssemblyMetadata.Generators.tour"
ls -la src/.tours/AssemblyMetadata.Generators.tour 2>/dev/null || echo "MISSING: src/.tours/AssemblyMetadata.Generators.tour"Repository: ignatandrei/RSCG_Examples
Length of output: 216
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="v2/rscg_examples/AssemblyMetadata.Generators/video.json"
echo "== File: $FILE =="
echo "-- Lines 20-45 --"
awk 'NR>=20 && NR<=45 {printf "%6d %s\n", NR, $0}' "$FILE"
echo
echo "-- Tour references (.tours) --"
rg -n "\.tours" "$FILE" || true
echo
echo "-- Check expected tour file path(s) --"
ls -la v2/.tours/AssemblyMetadata.Generators.tour 2>/dev/null || echo "MISSING: v2/.tours/AssemblyMetadata.Generators.tour"
ls -la src/.tours/AssemblyMetadata.Generators.tour 2>/dev/null || echo "MISSING: src/.tours/AssemblyMetadata.Generators.tour"Repository: ignatandrei/RSCG_Examples
Length of output: 1587
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="v2/rscg_examples/AssemblyMetadata.Generators/video.json"
python3 - <<'PY'
import json, re, pathlib
path = pathlib.Path("v2/rscg_examples/AssemblyMetadata.Generators/video.json")
s = path.read_text(encoding="utf-8")
# Simulate the intended fix: SpeakTest=" "}, -> "SpeakTest":" "},
s2 = s.replace('SpeakTest=" "},', '"SpeakTest":" "},')
try:
json.loads(s2)
print("JSON parse after simulated fix: OK")
except Exception as e:
print("JSON parse after simulated fix: FAIL")
print(type(e).__name__ + ":", e)
PY
echo
echo "== Tour references (.tours) =="
rg -n "\.tours" "$FILE" || trueRepository: ignatandrei/RSCG_Examples
Length of output: 247
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json, pathlib, re
path = pathlib.Path("v2/rscg_examples/AssemblyMetadata.Generators/video.json")
s = path.read_text(encoding="utf-8")
# 1) Fix invalid property assignment syntax
s = s.replace('SpeakTest=" "},', '"SpeakTest":" "},')
# 2) Remove trailing comma immediately before the closing array bracket (if present)
# Targets the specific pattern shown: the last object ends with "},\n ]"
s = re.sub(r'("typeStep"\s*:\s*"waitseconds"\s*,\s*"arg"\s*:\s*"30")\s*,\s*\n(\s*\])', r'\1\n\2', s)
try:
json.loads(s)
print("JSON parse after simulated full fix: OK")
except Exception as e:
print("JSON parse after simulated full fix: FAIL")
print(type(e).__name__ + ":", e)
PYRepository: ignatandrei/RSCG_Examples
Length of output: 174
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
p = Path("v2/rscg_examples/AssemblyMetadata.Generators/video.json")
lines = p.read_text(encoding="utf-8").splitlines(True) # keep newlines
for i in range(33, 40): # 1-based
line = lines[i-1]
print(f"{i}: {line!r}")
PYRepository: ignatandrei/RSCG_Examples
Length of output: 435
🏁 Script executed:
#!/bin/bash
python3 - <<'PY'
from pathlib import Path
import json, re
p = Path("v2/rscg_examples/AssemblyMetadata.Generators/video.json")
s = p.read_text(encoding="utf-8")
# Fix 1: SpeakTest=" " -> "SpeakTest":" "
s = s.replace('SpeakTest=" "}', '"SpeakTest":" "}')
# Fix 2: remove trailing comma before closing array bracket
s = re.sub(r'(\{\s*"typeStep"\s*:\s*"waitseconds"\s*,\s*"arg"\s*:\s*"30"\s*\})\s*,\s*(\n?\s*\])',
r'\1\2',
s)
try:
json.loads(s)
print("JSON parse after targeted fixes: OK")
except Exception as e:
print("JSON parse after targeted fixes: FAIL")
print(type(e).__name__ + ":", e)
PYRepository: ignatandrei/RSCG_Examples
Length of output: 105
Fix invalid JSON + tour path in v2/rscg_examples/AssemblyMetadata.Generators/video.json
- Lines 35-38: file is invalid JSON due to
SpeakTest=" "(wrong JSON key syntax) and a trailing comma after the final array element ({"typeStep":"waitseconds","arg":"30"},before]). - Line 29: tour
argpoints tosrc/.tours/, but the tour file exists underv2/.tours/AssemblyMetadata.Generators.tour.
Suggested fix (JSON)
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators#download-example-net--c-",
-SpeakTest=" "},
+"SpeakTest":" "},
{"typeStep":"waitseconds","arg":"30"},-{"typeStep":"waitseconds","arg":"30"},
+{"typeStep":"waitseconds","arg":"30"}
]
}- Suggested fix (tour path): change line 29 from
src/.tours/to the correctv2/.tours/location.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators#download-example-net--c-", | |
| SpeakTest=" "}, | |
| {"typeStep":"waitseconds","arg":"30"}, | |
| ] | |
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators#download-example-net--c-", | |
| "SpeakTest":" "}, | |
| {"typeStep":"waitseconds","arg":"30"} | |
| ] |
🧰 Tools
🪛 Biome (2.4.15)
[error] 36-36: Property key must be double quoted
(parse)
[error] 36-36: unexpected character =
(parse)
[error] 36-36: expected , but instead found " "
(parse)
[error] 36-36: expected : but instead found }
(parse)
[error] 38-38: Expected an array, an object, or a literal but instead found ']'.
(parse)
🤖 Prompt for 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.
In `@v2/rscg_examples/AssemblyMetadata.Generators/video.json` around lines 35 -
38, The JSON in v2/rscg_examples/AssemblyMetadata.Generators/video.json is
invalid: remove the malformed key syntax SpeakTest=" " (replace with a proper
JSON key/value or delete the entry) and remove the trailing comma after the last
array element (the object with "typeStep":"waitseconds","arg":"30"); also fix
the tour path argument that currently points to "src/.tours/" to the correct
"v2/.tours/AssemblyMetadata.Generators.tour" so the "arg" for the tour step
resolves correctly.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
v2/rscg_examples_site/docs/indexRSCG.md (1)
23-23:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove trailing space inside the markdown link text.
The link text has an extra space before the closing bracket:
[AssemblyMetadata.Generators by LoreSoft ]should be[AssemblyMetadata.Generators by LoreSoft]. This violates MD039 (no-space-in-links).🔧 Proposed fix
-|270| [AssemblyMetadata.Generators by LoreSoft ](/docs/AssemblyMetadata.Generators)|2026-05-15 => 15 May 2026 | [EnhancementProject](/docs/Categories/EnhancementProject) | +|270| [AssemblyMetadata.Generators by LoreSoft](/docs/AssemblyMetadata.Generators)|2026-05-15 => 15 May 2026 | [EnhancementProject](/docs/Categories/EnhancementProject) |🤖 Prompt for 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. In `@v2/rscg_examples_site/docs/indexRSCG.md` at line 23, Remove the trailing space inside the markdown link text `[AssemblyMetadata.Generators by LoreSoft ]` so it becomes `[AssemblyMetadata.Generators by LoreSoft]`; update the link text in the file where the table row contains that link (the string `[AssemblyMetadata.Generators by LoreSoft ](/docs/AssemblyMetadata.Generators)`) to remove the extra space before the closing bracket to satisfy MD039.
🤖 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 `@v2/rscg_examples_site/docs/RSCG-Examples/AssemblyMetadata.Generators.md`:
- Around line 62-92: Heading lines use too many '#' characters (e.g., "#########
Usage", "########## Add package", "######### Generated", "######### Namespace");
replace those excessive heading levels with valid markdown headings (use 3 or 4
'#' as appropriate, e.g., "### Usage", "### Add package", "### Generated", "###
Namespace") so the README renders correctly while leaving the code block and
text unchanged.
---
Duplicate comments:
In `@v2/rscg_examples_site/docs/indexRSCG.md`:
- Line 23: Remove the trailing space inside the markdown link text
`[AssemblyMetadata.Generators by LoreSoft ]` so it becomes
`[AssemblyMetadata.Generators by LoreSoft]`; update the link text in the file
where the table row contains that link (the string `[AssemblyMetadata.Generators
by LoreSoft ](/docs/AssemblyMetadata.Generators)`) to remove the extra space
before the closing bracket to satisfy MD039.
🪄 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: 1eca7d08-ebcc-4cf4-8da2-a34e9d8d1e44
📒 Files selected for processing (11)
README.mdlater.mdv2/RSCGExamplesData/GeneratorDataRec.jsonv2/book/examples/AssemblyMetadata.Generators.htmlv2/rscg_examples/AssemblyMetadata.Generators/description.jsonv2/rscg_examples_site/docs/Authors/LoreSoft.mdv2/rscg_examples_site/docs/Categories/EnhancementProject.mdv2/rscg_examples_site/docs/Categories/_PrimitiveEnhancementProject.mdxv2/rscg_examples_site/docs/RSCG-Examples/AssemblyMetadata.Generators.mdv2/rscg_examples_site/docs/indexRSCG.mdv2/rscg_examples_site/static/exports/RSCG.json
✅ Files skipped from review due to trivial changes (8)
- later.md
- v2/book/examples/AssemblyMetadata.Generators.html
- v2/rscg_examples/AssemblyMetadata.Generators/description.json
- v2/rscg_examples_site/static/exports/RSCG.json
- README.md
- v2/rscg_examples_site/docs/Categories/EnhancementProject.md
- v2/RSCGExamplesData/GeneratorDataRec.json
- v2/rscg_examples_site/docs/Authors/LoreSoft.md
| ######### Usage | ||
|
|
||
| ########## Add package | ||
|
|
||
| Add the nuget package project to your projects. | ||
|
|
||
| `dotnet add package AssemblyMetadata.Generators` | ||
|
|
||
| ######### Generated | ||
|
|
||
| This source generator creates an internal partial class called `ThisAssembly` with all the assembly level attributes converted to string constants | ||
|
|
||
| ```c# | ||
| internal static partial class ThisAssembly | ||
| { | ||
| public const string TargetFramework = ".NETCoreApp,Version=v7.0"; | ||
| public const string Company = "LoreSoft"; | ||
| public const string Configuration = "Debug"; | ||
| public const string Copyright = "Copyright © 2023 LoreSoft"; | ||
| public const string Description = "Source generator to expose assembly attributes as string constants"; | ||
| public const string FileVersion = "1.0.0.0"; | ||
| public const string InformationalVersion = "1.0.0"; | ||
| public const string Product = "AssemblyMetadata.Generators.Tests"; | ||
| public const string Title = "AssemblyMetadata.Generators.Tests"; | ||
| public const string Version = "1.0.0.0"; | ||
| public const string RepositoryUrl = "https://github.com/loresoft/AssemblyMetadata.Generators"; | ||
| public const string NeutralResourcesLanguage = "en-US"; | ||
| } | ||
| ``` | ||
|
|
||
| ######### Namespace |
There was a problem hiding this comment.
Fix incorrect heading levels in the Original Readme section.
Lines 62, 64, 70, and 92 use excessive # symbols (9-10 instead of the standard 3-4) which creates invalid markdown headings. Standard markdown supports heading levels 1-6 only.
📝 Proposed fix
-######### Usage
+### Usage
-########## Add package
+#### Add package
Add the nuget package project to your projects.
`dotnet add package AssemblyMetadata.Generators`
-######### Generated
+### Generated
This source generator creates an internal partial class called `ThisAssembly` with all the assembly level attributes converted to string constants
```c#
internal static partial class ThisAssembly
{
public const string TargetFramework = ".NETCoreApp,Version=v7.0";
public const string Company = "LoreSoft";
public const string Configuration = "Debug";
public const string Copyright = "Copyright © 2023 LoreSoft";
public const string Description = "Source generator to expose assembly attributes as string constants";
public const string FileVersion = "1.0.0.0";
public const string InformationalVersion = "1.0.0";
public const string Product = "AssemblyMetadata.Generators.Tests";
public const string Title = "AssemblyMetadata.Generators.Tests";
public const string Version = "1.0.0.0";
public const string RepositoryUrl = "https://github.com/loresoft/AssemblyMetadata.Generators";
public const string NeutralResourcesLanguage = "en-US";
}-######### Namespace
+### Namespace
</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
### Usage
#### Add package
Add the nuget package project to your projects.
`dotnet add package AssemblyMetadata.Generators`
### Generated
This source generator creates an internal partial class called `ThisAssembly` with all the assembly level attributes converted to string constants
🧰 Tools
🪛 LanguageTool
[grammar] ~72-~72: Use a hyphen to join words.
Context: ...led ThisAssembly with all the assembly level attributes converted to string con...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for 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.
In `@v2/rscg_examples_site/docs/RSCG-Examples/AssemblyMetadata.Generators.md`
around lines 62 - 92, Heading lines use too many '#' characters (e.g.,
"######### Usage", "########## Add package", "######### Generated", "#########
Namespace"); replace those excessive heading levels with valid markdown headings
(use 3 or 4 '#' as appropriate, e.g., "### Usage", "### Add package", "###
Generated", "### Namespace") so the README renders correctly while leaving the
code block and text unchanged.
Summary by CodeRabbit
#270with comprehensive docs, usage guides, demo project, generated-artifact preview, and downloadable assets.