first#508
Conversation
📝 WalkthroughWalkthroughThis PR adds a new Roslyn source generator example, ScottEncodingGenerator (entry ChangesScottEncodingGenerator Example Addition
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Program
participant SaveToDatabase
participant ResultSave
Program->>SaveToDatabase: Save(0)
SaveToDatabase->>ResultSave: None()
ResultSave-->>Program: None instance
Program->>SaveToDatabase: Save(1)
SaveToDatabase->>ResultSave: Ok(1)
ResultSave-->>Program: Ok instance
Program->>ResultSave: Match(...)
ResultSave-->>Program: computed message
Possibly related PRs
Poem 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.1)v2/rscg_examples/ScottEncodingGenerator/video.jsonFile contains syntax errors that prevent linting: Line 36: Property key must be double quoted; Line 36: unexpected character 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 entry for ScottEncodingGenerator across the repository’s data sources, generated site docs/exports, and book outputs, keeping all “count/latest update” references in sync. Also relaxes JSON parsing in the generator to tolerate trailing commas when reading description.json.
Changes:
- Added the full ScottEncodingGenerator example project (source, solution, CodeTour, video script) plus its metadata (
description.json,readme.txt,nuget.txt). - Updated the website/docs/book exports and indices to include example #273 and increment totals from 272 → 273.
- Updated
MultiGeneratorV2to deserializedescription.jsonwithAllowTrailingCommas = true.
Reviewed changes
Copilot reviewed 28 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| v2/RSCGExamplesData/GeneratorDataRec.json | Adds ScottEncodingGenerator to the internal generator registry list. |
| v2/rscg_examples/ScottEncodingGenerator/video.json | Adds the generated video scenario script for the new example. |
| v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csproj | Adds the demo project referencing ScottEncodingGenerator. |
| v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/SaveToDatabase.cs | Adds a simple demo function returning union-like results. |
| v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/ResultSave.cs | Adds the ScottEncoding-annotated discriminated union type. |
| v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/Program.cs | Adds usage examples for pattern matching and generated Match. |
| v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo.sln | Adds the solution file for the demo. |
| v2/rscg_examples/ScottEncodingGenerator/src/.tours/ScottEncodingGenerator.tour | Adds a CodeTour walkthrough for the example. |
| v2/rscg_examples/ScottEncodingGenerator/readme.txt | Adds the captured upstream readme content for documentation. |
| v2/rscg_examples/ScottEncodingGenerator/nuget.txt | Adds a short NuGet/package summary line. |
| v2/rscg_examples/ScottEncodingGenerator/description.json | Adds generator metadata used by the docs/build pipeline. |
| v2/rscg_examples_site/static/exports/RSCG.json | Adds ScottEncodingGenerator to the site’s exported JSON list. |
| v2/rscg_examples_site/src/components/HomepageFeatures/index.js | Updates the homepage “Examples” count to 273. |
| v2/rscg_examples_site/docs/RSCG-Examples/ScottEncodingGenerator.md | Adds the full generated documentation page for the example. |
| v2/rscg_examples_site/docs/RSCG-Examples/index.md | Updates category index counts/list to include the new entry. |
| v2/rscg_examples_site/docs/indexRSCG.md | Updates the time-based list (and total count) with the new entry. |
| v2/rscg_examples_site/docs/Categories/FunctionalProgramming.md | Increments FunctionalProgramming count and inserts the new link. |
| v2/rscg_examples_site/docs/Categories/_PrimitiveFunctionalProgramming.mdx | Updates the “primitive” category include list with the new entry. |
| v2/rscg_examples_site/docs/Authors/Georgiy_Petrov.md | Updates author page count and adds the new generator link. |
| v2/rscg_examples_site/docs/about.md | Updates the overall example count reference to 273. |
| v2/Generator/MultiGeneratorV2.cs | Allows trailing commas when deserializing description.json. |
| v2/Generator/all.csv | Adds ScottEncodingGenerator to the CSV registry. |
| v2/docFind.json | Adds ScottEncodingGenerator to the search/index feed. |
| v2/book/pandocHTML.yaml | Adds the new example HTML page to the book build inputs. |
| v2/book/list.html | Updates book list count and adds ScottEncodingGenerator to the table. |
| v2/book/examples/ScottEncodingGenerator.html | Adds the book’s generated HTML page for the new example. |
| README.md | Updates total count/latest update and appends the new entry. |
| later.md | Updates the “Latest Update” date to 2026-06-30. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const FeatureList = [ | ||
| { | ||
| title: '272 Examples (16 from MSFT)', | ||
| title: '273 Examples (16 from MSFT)', |
| var opt = new JsonSerializerOptions(JsonSerializerOptions.Default); | ||
| opt.AllowTrailingCommas = true; | ||
|
|
||
| desc = JsonSerializer.Deserialize<Description>(text,opt); |
| public sealed partial class Some | ||
| { | ||
| public Some(T value) => Value = value; | ||
| public T Value \{ get; } |
|
|
||
| public sealed partial class None | ||
| { | ||
| public None() \{ } |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (2)
v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csproj (1)
15-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider marking the generator package as an analyzer-only dependency.
The
ScottEncodingGeneratorreference lacksPrivateAssets/IncludeAssetsmetadata, so it will flow as a transitive dependency to any consumer of this project. Analyzer/source-generator packages are typically referenced withPrivateAssets="all"to avoid this.♻️ Suggested change
<ItemGroup> - <PackageReference Include="ScottEncodingGenerator" Version="1.0.0" /> + <PackageReference Include="ScottEncodingGenerator" Version="1.0.0"> + <PrivateAssets>all</PrivateAssets> + </PackageReference> </ItemGroup>🤖 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/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csproj` around lines 15 - 17, The ScottEncodingGenerator PackageReference is currently treated like a normal dependency, so it can flow transitively to consumers. Update the UnionTypesDemo.csproj package reference for ScottEncodingGenerator to be analyzer/source-generator only by adding the appropriate PrivateAssets and IncludeAssets metadata on that PackageReference, keeping it scoped to this project.v2/rscg_examples/ScottEncodingGenerator/description.json (1)
12-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
goodFormixes two unrelated sections with restarting numbering.The array under
goodForconcatenates a "Usage" list (items 1-4) and a "What the generator adds" list (items 1-4), both re-starting numbering, inside a single field. Consider splitting into distinct keys (e.g.,goodForandgeneratorAdds) for clearer rendering on the docs site.🤖 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/ScottEncodingGenerator/description.json` around lines 12 - 23, The description.json entry under goodFor mixes two separate topics and restarts numbering, so split the content into distinct fields instead of one array. Update the ScottEncodingGenerator description to keep the usage bullets under goodFor and move the “What the generator adds” items into a separate key such as generatorAdds, preserving the existing section content but making the structure render cleanly.
🤖 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/book/examples/ScottEncodingGenerator.html`:
- Around line 5-11: Add rel="noopener noreferrer" to every anchor in this page
that opens in a new tab to prevent reverse-tabnabbing. Update the links in
ScottEncodingGenerator.html that use target="_blank" for the NuGet, GitHub, and
related docs references, and make sure the same change is applied to the other
matching anchors mentioned in the comment. Locate the affected markup by the
existing target="_blank" attributes and keep the link text and URLs unchanged.
- Around line 23-54: Add descriptive alt text to every meaningful screenshot in
ScottEncodingGenerator.html so screen-reader users can understand the examples;
update each img tag in the ScottEncodingGenerator section, using the surrounding
labels like UnionTypesDemo.csproj, Program.cs, ResultSave.cs, SaveToDatabase.cs,
and the generated file screenshots to craft concise descriptions. Apply the same
alt-text pattern consistently across all images on the page, including the
starting code and generated files screenshots.
In `@v2/book/list.html`:
- Line 20: The heading text in the book list contains a raw greater-than symbol
that triggers HTMLHint; update the heading content to use the escaped form so
the rendered text stays the same while the markup becomes valid. Locate the list
heading text in the book list template and replace the raw symbol with the
corresponding HTML entity, keeping the rest of the heading unchanged.
In `@v2/rscg_examples_site/docs/indexRSCG.md`:
- Line 23: The markdown link text for the ScottEncodingGenerator entry contains
a trailing space that triggers MD039. Update the entry in indexRSCG.md by
trimming the extra space inside the link label for the ScottEncodingGenerator
link so the docs remain lint-clean.
In
`@v2/rscg_examples/ScottEncodingGenerator/src/.tours/ScottEncodingGenerator.tour`:
- Around line 13-29: The CodeTour steps are using placeholder pattern values
that do not exist in the target files, so the anchors will fail. Update the
`pattern` entries for the `SaveToDatabase.cs`, `ResultSave.cs`, and `Program.cs`
steps in `ScottEncodingGenerator.tour` to use text that actually appears in each
corresponding file, so the tour can reliably locate the intended code. Use the
existing step objects for those three files to choose stable unique snippets
from each file.
In `@v2/rscg_examples/ScottEncodingGenerator/video.json`:
- Around line 35-38: The JSON in the ScottEncodingGenerator video example is
malformed: the object using typeStep and arg contains an invalid SpeakTest
entry, and the surrounding array also has a trailing comma before the closing
bracket. Fix the entry so it uses valid JSON key/value syntax consistent with
the neighboring typeStep items, then remove the trailing comma so the file
parses correctly under strict JSON parsing.
---
Nitpick comments:
In `@v2/rscg_examples/ScottEncodingGenerator/description.json`:
- Around line 12-23: The description.json entry under goodFor mixes two separate
topics and restarts numbering, so split the content into distinct fields instead
of one array. Update the ScottEncodingGenerator description to keep the usage
bullets under goodFor and move the “What the generator adds” items into a
separate key such as generatorAdds, preserving the existing section content but
making the structure render cleanly.
In
`@v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csproj`:
- Around line 15-17: The ScottEncodingGenerator PackageReference is currently
treated like a normal dependency, so it can flow transitively to consumers.
Update the UnionTypesDemo.csproj package reference for ScottEncodingGenerator to
be analyzer/source-generator only by adding the appropriate PrivateAssets and
IncludeAssets metadata on that PackageReference, keeping it scoped to this
project.
🪄 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: 4fabbb48-aa87-4e8f-b977-991b6de1c235
⛔ Files ignored due to path filters (4)
v2/Generator/all.csvis excluded by!**/*.csvv2/rscg_examples_site/static/exports/RSCG.xlsxis excluded by!**/*.xlsxv2/rscg_examples_site/static/sources/AlephMapper.zipis excluded by!**/*.zipv2/rscg_examples_site/static/sources/ScottEncodingGenerator.zipis excluded by!**/*.zip
📒 Files selected for processing (27)
README.mdlater.mdv2/Generator/MultiGeneratorV2.csv2/RSCGExamplesData/GeneratorDataRec.jsonv2/book/examples/ScottEncodingGenerator.htmlv2/book/list.htmlv2/book/pandocHTML.yamlv2/docFind.jsonv2/rscg_examples/ScottEncodingGenerator/description.jsonv2/rscg_examples/ScottEncodingGenerator/nuget.txtv2/rscg_examples/ScottEncodingGenerator/readme.txtv2/rscg_examples/ScottEncodingGenerator/src/.tours/ScottEncodingGenerator.tourv2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo.slnv2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/Program.csv2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/ResultSave.csv2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/SaveToDatabase.csv2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csprojv2/rscg_examples/ScottEncodingGenerator/video.jsonv2/rscg_examples_site/docs/Authors/Georgiy_Petrov.mdv2/rscg_examples_site/docs/Categories/FunctionalProgramming.mdv2/rscg_examples_site/docs/Categories/_PrimitiveFunctionalProgramming.mdxv2/rscg_examples_site/docs/RSCG-Examples/ScottEncodingGenerator.mdv2/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
| Nuget : <a href="https://www.nuget.org/packages/ScottEncodingGenerator/" target="_blank">https://www.nuget.org/packages/ScottEncodingGenerator/</a> | ||
|
|
||
| <p>You can find more details at : <a href="https://github.com/Georgiy-Petrov/ScottEncodingGenerator" target="_blank"> https://github.com/Georgiy-Petrov/ScottEncodingGenerator</a></p> | ||
|
|
||
| <p>Author :Georgiy Petrov</p> | ||
|
|
||
| <p>Source: <a href="https://github.com/Georgiy-Petrov/ScottEncodingGenerator" target="_blank">https://github.com/Georgiy-Petrov/ScottEncodingGenerator</a> </p> |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Add rel="noopener noreferrer" to every new-tab link.
These target="_blank" anchors expose the opener window to reverse-tabnabbing. Please add the rel attribute on the NuGet, GitHub, and docs links in this page.
🔒 Suggested fix
- <a href="https://github.com/Georgiy-Petrov/ScottEncodingGenerator" target="_blank">https://github.com/Georgiy-Petrov/ScottEncodingGenerator</a>
+ <a href="https://github.com/Georgiy-Petrov/ScottEncodingGenerator" target="_blank" rel="noopener noreferrer">https://github.com/Georgiy-Petrov/ScottEncodingGenerator</a>Also applies to: 21-23, 56-68
🤖 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/ScottEncodingGenerator.html` around lines 5 - 11, Add
rel="noopener noreferrer" to every anchor in this page that opens in a new tab
to prevent reverse-tabnabbing. Update the links in ScottEncodingGenerator.html
that use target="_blank" for the NuGet, GitHub, and related docs references, and
make sure the same change is applied to the other matching anchors mentioned in
the comment. Locate the affected markup by the existing target="_blank"
attributes and keep the link text and URLs unchanged.
| <img src="images/ScottEncodingGenerator/UnionTypesDemo.csproj.png" width="580" height="580" /> | ||
|
|
||
| <h3>This was for me the <b>starting</b> code</h3> | ||
|
|
||
| <br /> | ||
| I have <b>coded</b> the file Program.cs | ||
| <br /> | ||
| <img src="images/ScottEncodingGenerator/csFiles/Program.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
|
|
||
| <br /> | ||
| I have <b>coded</b> the file ResultSave.cs | ||
| <br /> | ||
| <img src="images/ScottEncodingGenerator/csFiles/ResultSave.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
|
|
||
| <br /> | ||
| I have <b>coded</b> the file SaveToDatabase.cs | ||
| <br /> | ||
| <img src="images/ScottEncodingGenerator/csFiles/SaveToDatabase.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
| <h3>And here are the <i>generated</i> files</h3> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is global__UnionTypesDemo_ResultSave_T_.ScottEncoding.g.cs | ||
| <br /> | ||
| <img src="images/ScottEncodingGenerator/generated/global__UnionTypesDemo_ResultSave_T_.ScottEncoding.g.cs.png" width="580" height="580" /> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is ScottEncodingAttribute.g.cs | ||
| <br /> | ||
| <img src="images/ScottEncodingGenerator/generated/ScottEncodingAttribute.g.cs.png" width="580" height="580" /> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Add alt text to the screenshots.
All of the screenshots on this page are meaningful content, but the <img> tags omit alt. That leaves screen-reader users with no description of the examples.
♿ Suggested fix
- <img src="images/ScottEncodingGenerator/UnionTypesDemo.csproj.png" width="580" height="580" />
+ <img src="images/ScottEncodingGenerator/UnionTypesDemo.csproj.png" width="580" height="580" alt="UnionTypesDemo.csproj screenshot" />Apply the same pattern to the other screenshots.
🤖 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/ScottEncodingGenerator.html` around lines 23 - 54, Add
descriptive alt text to every meaningful screenshot in
ScottEncodingGenerator.html so screen-reader users can understand the examples;
update each img tag in the ScottEncodingGenerator section, using the surrounding
labels like UnionTypesDemo.csproj, Program.cs, ResultSave.cs, SaveToDatabase.cs,
and the generated file screenshots to craft concise descriptions. Apply the same
alt-text pattern consistently across all images on the page, including the
starting code and generated files screenshots.
| <body> | ||
| <h1> | ||
| This is the list of 272 RSCG with examples => | ||
| This is the list of 273 RSCG with examples => |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Escape the > in the heading text.
HTMLHint will keep flagging this raw >; > preserves the rendered text and fixes the markup error.
Proposed fix
-This is the list of 273 RSCG with examples =>
+This is the list of 273 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 273 RSCG with examples => | |
| This is the list of 273 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 in the book list contains a
raw greater-than symbol that triggers HTMLHint; update the heading content to
use the escaped form so the rendered text stays the same while the markup
becomes valid. Locate the list heading text in the book list template and
replace the raw symbol with the corresponding HTML entity, keeping the rest of
the heading unchanged.
Source: Linters/SAST tools
|
|
||
| | No | Name | Date | Category | | ||
| | --------- | ----- | ---- | -------- | | ||
| |273| [ScottEncodingGenerator by Georgiy Petrov ](/docs/ScottEncodingGenerator)|2026-06-30 => 30 June 2026 | [FunctionalProgramming](/docs/Categories/FunctionalProgramming) | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Trim the extra space inside the link text.
[ScottEncodingGenerator by Georgiy Petrov ] triggers MD039 in markdownlint. Removing the trailing space keeps the docs page lint-clean.
🛠 Suggested fix
-|273| [ScottEncodingGenerator by Georgiy Petrov ](/docs/ScottEncodingGenerator)|2026-06-30 => 30 June 2026 | [FunctionalProgramming](/docs/Categories/FunctionalProgramming) |
+|273| [ScottEncodingGenerator by Georgiy Petrov](/docs/ScottEncodingGenerator)|2026-06-30 => 30 June 2026 | [FunctionalProgramming](/docs/Categories/FunctionalProgramming) |📝 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.
| |273| [ScottEncodingGenerator by Georgiy Petrov ](/docs/ScottEncodingGenerator)|2026-06-30 => 30 June 2026 | [FunctionalProgramming](/docs/Categories/FunctionalProgramming) | | |
| |273| [ScottEncodingGenerator by Georgiy Petrov](/docs/ScottEncodingGenerator)|2026-06-30 => 30 June 2026 | [FunctionalProgramming](/docs/Categories/FunctionalProgramming) | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 23-23: Spaces inside link text
(MD039, no-space-in-links)
🤖 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, The markdown link text
for the ScottEncodingGenerator entry contains a trailing space that triggers
MD039. Update the entry in indexRSCG.md by trimming the extra space inside the
link label for the ScottEncodingGenerator link so the docs remain lint-clean.
Source: Linters/SAST tools
| ,{ | ||
| "file": "UnionTypesDemo/SaveToDatabase.cs", | ||
| "description": "File SaveToDatabase.cs ", | ||
| "pattern": "this is the code" | ||
| } | ||
|
|
||
| ,{ | ||
| "file": "UnionTypesDemo/ResultSave.cs", | ||
| "description": "File ResultSave.cs ", | ||
| "pattern": "this is the code" | ||
| } | ||
|
|
||
| ,{ | ||
| "file": "UnionTypesDemo/Program.cs", | ||
| "description": "File Program.cs \r\n>> dotnet run --project UnionTypesDemo/UnionTypesDemo.csproj ", | ||
| "pattern": "this is the code" | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Placeholder pattern strings won't match actual file content.
"pattern": "this is the code" is used for SaveToDatabase.cs, ResultSave.cs, and Program.cs, but none of those files contain this literal text (confirmed for SaveToDatabase.cs and Program.cs in this PR). CodeTour won't be able to anchor these steps to the intended code.
🛠️ Suggested fix (example for SaveToDatabase.cs)
{
"file": "UnionTypesDemo/SaveToDatabase.cs",
"description": "File SaveToDatabase.cs ",
- "pattern": "this is the code"
+ "pattern": "public static ResultSave<int> Save"
}Apply similarly to the ResultSave.cs and Program.cs steps.
🤖 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/ScottEncodingGenerator/src/.tours/ScottEncodingGenerator.tour`
around lines 13 - 29, The CodeTour steps are using placeholder pattern values
that do not exist in the target files, so the anchors will fail. Update the
`pattern` entries for the `SaveToDatabase.cs`, `ResultSave.cs`, and `Program.cs`
steps in `ScottEncodingGenerator.tour` to use text that actually appears in each
corresponding file, so the tour can reliably locate the intended code. Use the
existing step objects for those three files to choose stable unique snippets
from each file.
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/ScottEncodingGenerator#download-example-net--c-", | ||
| SpeakTest=" "}, | ||
| {"typeStep":"waitseconds","arg":"30"}, | ||
| ] |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Malformed JSON — file will fail to parse.
Line 36 uses SpeakTest=" " instead of a valid quoted key/value pair, and the array has a trailing comma before ] on line 38. This breaks strict JSON parsing (unlike description.json, this file isn't deserialized with AllowTrailingCommas).
🐛 Proposed fix
-{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/ScottEncodingGenerator#download-example-net--c-",
-SpeakTest=" "},
+{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/ScottEncodingGenerator#download-example-net--c-"},
{"typeStep":"waitseconds","arg":"30"}
-]
+]📝 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/ScottEncodingGenerator#download-example-net--c-", | |
| SpeakTest=" "}, | |
| {"typeStep":"waitseconds","arg":"30"}, | |
| ] | |
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/ScottEncodingGenerator#download-example-net--c-"}, | |
| {"typeStep":"waitseconds","arg":"30"} | |
| ] |
🧰 Tools
🪛 Biome (2.5.1)
[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/ScottEncodingGenerator/video.json` around lines 35 - 38, The
JSON in the ScottEncodingGenerator video example is malformed: the object using
typeStep and arg contains an invalid SpeakTest entry, and the surrounding array
also has a trailing comma before the closing bracket. Fix the entry so it uses
valid JSON key/value syntax consistent with the neighboring typeStep items, then
remove the trailing comma so the file parses correctly under strict JSON
parsing.
Source: Linters/SAST tools
Summary by CodeRabbit