Skip to content

first#508

Merged
ignatandrei merged 2 commits into
mainfrom
504-httpsgithubcomgeorgiy-petrovscottencodinggenerator
Jul 5, 2026
Merged

first#508
ignatandrei merged 2 commits into
mainfrom
504-httpsgithubcomgeorgiy-petrovscottencodinggenerator

Conversation

@ignatandrei

@ignatandrei ignatandrei commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a new example and documentation set for a source generator, including usage walkthroughs, generated output samples, and a demo project.
    • Expanded the site’s example listings, category pages, and time-based index with the new entry.
  • Bug Fixes
    • Updated JSON parsing to accept trailing commas in example metadata.
  • Documentation
    • Refreshed counts and “Latest Update” dates across the README and related docs to reflect 273 examples.

Copilot AI review requested due to automatic review settings July 4, 2026 15:19
@ignatandrei ignatandrei linked an issue Jul 4, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new Roslyn source generator example, ScottEncodingGenerator (entry #273), including a demo project (ResultSave union type, SaveToDatabase, Program.cs), generator documentation (readme, description.json, video.json), docs-site pages, and catalog registration updates across README, book HTML, JSON data exports, and docs-site index/category pages. Additionally, MultiGeneratorV2.GatherData now deserializes description.json with AllowTrailingCommas enabled.

Changes

ScottEncodingGenerator Example Addition

Layer / File(s) Summary
Deserialization option for trailing commas
v2/Generator/MultiGeneratorV2.cs
GatherData now uses JsonSerializerOptions with AllowTrailingCommas = true when deserializing description.json.
UnionTypesDemo sample project
v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo.sln, .../UnionTypesDemo.csproj, .../ResultSave.cs, .../SaveToDatabase.cs, .../Program.cs, .../.tours/ScottEncodingGenerator.tour
New demo project implementing a ResultSave<T> union type with Ok/None cases, a SaveToDatabase.Save factory, and a console Program.cs consuming the generated Match API.
Generator metadata and readme documentation
v2/rscg_examples/ScottEncodingGenerator/description.json, nuget.txt, readme.txt, video.json
Adds generator metadata, NuGet description, detailed readme covering rules/diagnostics/generated files, and a walkthrough video script.
Docs site page for ScottEncodingGenerator
v2/rscg_examples_site/docs/RSCG-Examples/ScottEncodingGenerator.md
New MDX documentation page mirroring the demo, including tabbed usage examples and generated file samples.
Catalog and index registration
README.md, later.md, v2/book/examples/ScottEncodingGenerator.html, v2/book/list.html, v2/book/pandocHTML.yaml, v2/RSCGExamplesData/GeneratorDataRec.json, v2/docFind.json, v2/rscg_examples_site/static/exports/RSCG.json
Registers the new generator as entry #273 with updated counts, dates, links, and JSON data records.
Docs-site category, author, and index count updates
v2/rscg_examples_site/docs/Authors/Georgiy_Petrov.md, .../Categories/FunctionalProgramming.md, .../Categories/_PrimitiveFunctionalProgramming.mdx, .../RSCG-Examples/index.md, .../about.md, .../indexRSCG.md, .../src/components/HomepageFeatures/index.js
Updates counts, entries, and flowchart links across category, author, and index pages to reflect the new generator.

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
Loading

Possibly related PRs

Poem
A rabbit hopped through code so bright,
Found ScottEncoding, pure delight—
Two hundred seventy-three now stand,
Union types across the land.
Match and factory, step by step,
This bunny's counted every rep! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague to indicate the main change in the pull request. Use a concise, specific title that names the primary change, such as adding the ScottEncodingGenerator example and related docs.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 504-httpsgithubcomgeorgiy-petrovscottencodinggenerator

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.json

File contains syntax errors that prevent linting: Line 36: Property key must be double quoted; Line 36: unexpected character =; Line 36: expected , but instead found " "; Line 36: expected : but instead found }; Line 38: Expected an array, an object, or a literal but instead found ']'.


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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MultiGeneratorV2 to deserialize description.json with AllowTrailingCommas = 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)',
Comment on lines +436 to +439
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() \{ }

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (2)
v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csproj (1)

15-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider marking the generator package as an analyzer-only dependency.

The ScottEncodingGenerator reference lacks PrivateAssets/IncludeAssets metadata, so it will flow as a transitive dependency to any consumer of this project. Analyzer/source-generator packages are typically referenced with PrivateAssets="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

goodFor mixes two unrelated sections with restarting numbering.

The array under goodFor concatenates 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., goodFor and generatorAdds) 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

📥 Commits

Reviewing files that changed from the base of the PR and between db4bbb8 and ce1ec6e.

⛔ Files ignored due to path filters (4)
  • v2/Generator/all.csv is excluded by !**/*.csv
  • v2/rscg_examples_site/static/exports/RSCG.xlsx is excluded by !**/*.xlsx
  • v2/rscg_examples_site/static/sources/AlephMapper.zip is excluded by !**/*.zip
  • v2/rscg_examples_site/static/sources/ScottEncodingGenerator.zip is excluded by !**/*.zip
📒 Files selected for processing (27)
  • README.md
  • later.md
  • v2/Generator/MultiGeneratorV2.cs
  • v2/RSCGExamplesData/GeneratorDataRec.json
  • v2/book/examples/ScottEncodingGenerator.html
  • v2/book/list.html
  • v2/book/pandocHTML.yaml
  • v2/docFind.json
  • v2/rscg_examples/ScottEncodingGenerator/description.json
  • v2/rscg_examples/ScottEncodingGenerator/nuget.txt
  • v2/rscg_examples/ScottEncodingGenerator/readme.txt
  • v2/rscg_examples/ScottEncodingGenerator/src/.tours/ScottEncodingGenerator.tour
  • v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo.sln
  • v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/Program.cs
  • v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/ResultSave.cs
  • v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/SaveToDatabase.cs
  • v2/rscg_examples/ScottEncodingGenerator/src/UnionTypesDemo/UnionTypesDemo.csproj
  • v2/rscg_examples/ScottEncodingGenerator/video.json
  • v2/rscg_examples_site/docs/Authors/Georgiy_Petrov.md
  • v2/rscg_examples_site/docs/Categories/FunctionalProgramming.md
  • v2/rscg_examples_site/docs/Categories/_PrimitiveFunctionalProgramming.mdx
  • v2/rscg_examples_site/docs/RSCG-Examples/ScottEncodingGenerator.md
  • v2/rscg_examples_site/docs/RSCG-Examples/index.md
  • v2/rscg_examples_site/docs/about.md
  • v2/rscg_examples_site/docs/indexRSCG.md
  • v2/rscg_examples_site/src/components/HomepageFeatures/index.js
  • v2/rscg_examples_site/static/exports/RSCG.json

Comment on lines +5 to +11
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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 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.

Comment on lines +23 to +54
<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" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Comment thread v2/book/list.html
<body>
<h1>
This is the list of 272 RSCG with examples =>
This is the list of 273 RSCG with examples =>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Escape the > in the heading text.

HTMLHint will keep flagging this raw >; &gt; 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 =&gt;
📝 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.

Suggested change
This is the list of 273 RSCG with examples =>
This is the list of 273 RSCG with examples =&gt;
🧰 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) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Suggested change
|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

Comment on lines +13 to +29
,{
"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"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Comment on lines +35 to +38
{"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/ScottEncodingGenerator#download-example-net--c-",
SpeakTest=" "},
{"typeStep":"waitseconds","arg":"30"},
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Suggested change
{"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

@ignatandrei ignatandrei merged commit ac79bfa into main Jul 5, 2026
4 checks passed
@ignatandrei ignatandrei deleted the 504-httpsgithubcomgeorgiy-petrovscottencodinggenerator branch July 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

https://github.com/Georgiy-Petrov/ScottEncodingGenerator

2 participants