-
-
Notifications
You must be signed in to change notification settings - Fork 6
demo #503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
demo #503
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Just later | ||
|
|
||
| ## Latest Update : 2026-05-14 => 14 May 2026 | ||
| ## Latest Update : 2026-05-15 => 15 May 2026 | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
|
|
||
| { | ||
| "$schema": "https://aka.ms/codetour-schema", | ||
| "title": "AssemblyMetadata.Generators", | ||
| "steps": | ||
| [ | ||
| { | ||
| "file": "rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/DemoMeta.csproj", | ||
| "description": "First, we add Nuget [AssemblyMetadata.Generators](https://www.nuget.org/packages/AssemblyMetadata.Generators/) in csproj ", | ||
| "pattern": "AssemblyMetadata.Generators" | ||
| } | ||
|
|
||
| ,{ | ||
| "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" | ||
| } | ||
|
|
||
|
|
||
| ,{ | ||
| "file": "rscg_examples/AssemblyMetadata.Generators/src/DemoMeta/obj/GX/AssemblyMetadata.Generators/AssemblyMetadata.Generators.AssemblyMetadataGenerator/AssemblyMetadata.g.cs", | ||
| "description": "Generated File 1 from 1 : AssemblyMetadata.g.cs ", | ||
| "line": 1 | ||
| } | ||
|
|
||
| ], | ||
|
|
||
| "ref": "main" | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
|
|
||
| <h1>RSCG nr 270 : AssemblyMetadata.Generators</h1> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add HTML doctype declaration at the top. Line 2 starts with content before 🧰 Tools🪛 HTMLHint (1.9.2)[error] 2-2: Doctype must be declared before any non-comment content. (doctype-first) 🤖 Prompt for AI Agents |
||
|
|
||
| <h2>Info</h2> | ||
| Nuget : <a href="https://www.nuget.org/packages/AssemblyMetadata.Generators/" target="_blank">https://www.nuget.org/packages/AssemblyMetadata.Generators/</a> | ||
|
|
||
| <p>You can find more details at : <a href="https://github.com/loresoft/AssemblyMetadata.Generators" target="_blank"> https://github.com/loresoft/AssemblyMetadata.Generators</a></p> | ||
|
|
||
| <p>Author :LoreSoft</p> | ||
|
|
||
| <p>Source: <a href="https://github.com/loresoft/AssemblyMetadata.Generators" target="_blank">https://github.com/loresoft/AssemblyMetadata.Generators</a> </p> | ||
|
|
||
| <h2>About</h2> | ||
|
|
||
| Generating assembly metadata attributes at compile time. | ||
|
|
||
| <h2> | ||
| How to use | ||
| </h2> | ||
| <h3> | ||
| Add reference to the <a href="https://www.nuget.org/packages/AssemblyMetadata.Generators/" target="_blank">AssemblyMetadata.Generators</a> in the csproj | ||
| </h3> | ||
| <img src="images/AssemblyMetadata.Generators/DemoMeta.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/AssemblyMetadata.Generators/csFiles/Program.cs.png" width="580" height="580" /> | ||
| <hr /> | ||
| <h3>And here are the <i>generated</i> files</h3> | ||
|
|
||
| <br /> | ||
| The file <i>generated</i> is AssemblyMetadata.g.cs | ||
| <br /> | ||
| <img src="images/AssemblyMetadata.Generators/generated/AssemblyMetadata.g.cs.png" width="580" height="580" /> | ||
|
|
||
| <p> | ||
| You can download the code and this page as pdf from | ||
| <a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators'> | ||
| https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators | ||
| </a> | ||
| </p> | ||
|
|
||
|
|
||
| <p> | ||
| You can see the whole list at | ||
| <a target="_blank" href='https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG'> | ||
| https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG | ||
| </a> | ||
| </p> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ <h2>Info</h2> | |
|
|
||
| <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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 🤖 Prompt for AI Agents |
||
|
|
||
| <h2> | ||
| How to use | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ <h2>Info</h2> | |
|
|
||
| <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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
||
|
|
||
| <h2> | ||
| How to use | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,7 +17,7 @@ | |||||
| </head> | ||||||
| <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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Escape special character in heading text. Line 20 includes a raw Proposed fix-This is the list of 270 RSCG with examples =>
+This is the list of 270 RSCG with examples =>📝 Committable suggestion
Suggested change
🧰 Tools🪛 HTMLHint (1.9.2)[error] 20-20: Special characters must be escaped : [ > ]. (spec-char-escape) 🤖 Prompt for AI Agents |
||||||
| </h1> | ||||||
|
|
||||||
| <table > | ||||||
|
|
@@ -1102,6 +1102,10 @@ <h1> | |||||
| <td>269</td> | ||||||
| <td><a href="examples/LinkDotNet.Enumeration.html">LinkDotNet.Enumeration</a></td> | ||||||
| </tr> | ||||||
| <tr> | ||||||
| <td>270</td> | ||||||
| <td><a href="examples/AssemblyMetadata.Generators.html">AssemblyMetadata.Generators</a></td> | ||||||
| </tr> | ||||||
| </table> | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "generator":{ | ||
| "name":"AssemblyMetadata.Generators", | ||
| "nuget":[ | ||
| "https://www.nuget.org/packages/AssemblyMetadata.Generators/" | ||
| ], | ||
| "link":"https://github.com/loresoft/AssemblyMetadata.Generators", | ||
| "author":"LoreSoft", | ||
| "source":"https://github.com/loresoft/AssemblyMetadata.Generators" | ||
| }, | ||
| "data":{ | ||
| "goodFor":["Generating assembly metadata attributes at compile time."], | ||
| "csprojDemo":"DemoMeta.csproj", | ||
| "csFiles":["Program.cs"], | ||
| "excludeDirectoryGenerated":[""], | ||
| "includeAdditionalFiles":[""] | ||
| }, | ||
| "links":{ | ||
| "blog":"", | ||
| "video":"" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Source generator to expose assembly attributes as string constants |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,51 @@ | ||||||
| # AssemblyMetadata.Generators | ||||||
|
|
||||||
| Source generator to expose assembly attributes as string constants. | ||||||
|
|
||||||
| [](https://github.com/loresoft/AssemblyMetadata.Generators/actions) | ||||||
|
|
||||||
| [](https://www.nuget.org/packages/AssemblyMetadata.Generators/) | ||||||
|
|
||||||
| [](https://coveralls.io/github/loresoft/AssemblyMetadata.Generators?branch=main) | ||||||
|
|
||||||
| ### 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 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~21-~21: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI Agents |
||||||
|
|
||||||
| ```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 | ||||||
|
|
||||||
| Set the `ThisAssemblyNamespace` MSBuild property to set the namespace of the generated `ThisAssembly` class. Otherwise, it will be in the global namespace. | ||||||
|
|
||||||
| Put `ThisAssembly` in the projects root namespace. | ||||||
|
|
||||||
| ```xml | ||||||
| <PropertyGroup> | ||||||
| <ThisAssemblyNamespace>$(RootNamespace)</ThisAssemblyNamespace> | ||||||
| </PropertyGroup> | ||||||
| ``` | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <Solution> | ||
| <Project Path="DemoMeta/DemoMeta.csproj" /> | ||
| </Solution> | ||
|
Comment on lines
+1
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a
🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="AssemblyMetadata.Generators" Version="2.2.0" OutputItemType="Analyzer" | ||
| ReferenceOutputAssembly="false" /> | ||
| </ItemGroup> | ||
| <PropertyGroup> | ||
| <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> | ||
| <CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath> | ||
| </PropertyGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Console.WriteLine(ThisAssembly.Title); | ||
|
|
||
| Console.WriteLine(ThisAssembly.TargetFramework); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,39 @@ | ||||||||||||||||||
| { | ||||||||||||||||||
| "scriptName": "AssemblyMetadata.Generators", | ||||||||||||||||||
| "steps": | ||||||||||||||||||
| [ | ||||||||||||||||||
| {"typeStep":"exec","arg":"clipchamp.exe launch"}, | ||||||||||||||||||
| {"typeStep":"text","arg": "Welcome to Roslyn Examples"}, | ||||||||||||||||||
| {"typeStep":"text","arg":"If you want to see more examples , see List Of RSCG"}, | ||||||||||||||||||
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG"}, | ||||||||||||||||||
| {"typeStep":"text","arg": "My name is Andrei Ignat and I am deeply fond of Roslyn Source Code Generator. "}, | ||||||||||||||||||
|
|
||||||||||||||||||
| {"typeStep":"text","arg": "Today I will present AssemblyMetadata.Generators . Generating assembly metadata attributes at compile time. ."}, | ||||||||||||||||||
| {"typeStep":"browser","arg":"https://www.nuget.org/packages/AssemblyMetadata.Generators/"}, | ||||||||||||||||||
| {"typeStep":"text","arg": "The whole example is here"}, | ||||||||||||||||||
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators"}, | ||||||||||||||||||
| {"typeStep":"text","arg": "You can download the code from here"}, | ||||||||||||||||||
| {"typeStep":"browser","arg":"https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators#download-example-net--c-"}, | ||||||||||||||||||
| {"typeStep":"text","arg":"Here is the code downloaded "}, | ||||||||||||||||||
| {"typeStep":"exec","arg":"explorer.exe /select,D:\\gth\\RSCG_Examples\\v2\\Generator.sln"}, | ||||||||||||||||||
| {"typeStep":"text","arg": "So , let's start the project with Visual Studio Code "}, | ||||||||||||||||||
| {"typeStep":"stepvscode","arg": "-n D:\\gth\\RSCG_Examples\\v2"}, | ||||||||||||||||||
|
|
||||||||||||||||||
| {"typeStep":"text","arg": "To use it ,you will put the Nuget AssemblyMetadata.Generators into the csproj "}, | ||||||||||||||||||
|
|
||||||||||||||||||
| {"typeStep":"stepvscode","arg": "-r -g D:\\gth\\RSCG_Examples\\v2\\rscg_examples\\AssemblyMetadata.Generators\\src\\DemoMeta\\DemoMeta.csproj"}, | ||||||||||||||||||
|
|
||||||||||||||||||
| {"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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tour path appears inconsistent with the actual tour file location. Line 29 points to 🤖 Prompt for AI Agents |
||||||||||||||||||
| {"typeStep":"text","arg":" And I will execute the project"}, | ||||||||||||||||||
| {"typeStep":"showproj", "arg":"DemoMeta.csproj"}, | ||||||||||||||||||
| {"typeStep":"text","arg":" This concludes the project"}, | ||||||||||||||||||
| {"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"}, | ||||||||||||||||||
| ] | ||||||||||||||||||
|
Comment on lines
+35
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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
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"}
]
}
📝 Committable suggestion
Suggested change
🧰 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 (parse) [error] 36-36: expected (parse) [error] 38-38: Expected an array, an object, or a literal but instead found ']'. (parse) 🤖 Prompt for AI Agents |
||||||||||||||||||
| } | ||||||||||||||||||
|
Comment on lines
+37
to
+39
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| # Author : LoreSoft | ||
|
|
||
| Number RSCG: 1 | ||
| Number RSCG: 2 | ||
|
|
||
|
|
||
| 1 [Injectio](/docs/Injectio) [](https://www.nuget.org/packages/Injectio/)  2023-08-17 | ||
|
|
||
| 2 [AssemblyMetadata.Generators](/docs/AssemblyMetadata.Generators) [](https://www.nuget.org/packages/AssemblyMetadata.Generators/)  2026-05-15 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ignatandrei/RSCG_Examples
Length of output: 51
🏁 Script executed:
Repository: ignatandrei/RSCG_Examples
Length of output: 149
🏁 Script executed:
Repository: ignatandrei/RSCG_Examples
Length of output: 1827
Fix tour step pattern mismatch for
DemoMeta/Program.csrscg_examples/AssemblyMetadata.Generators/src/DemoMeta/Program.cscontains onlyConsole.WriteLine(ThisAssembly.Title);andConsole.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 inProgram.cs(e.g.,ThisAssembly.Title/ThisAssembly.TargetFramework).🤖 Prompt for AI Agents