feat: standard release things added#5
Conversation
WalkthroughThis change set introduces a comprehensive initial project setup for a .NET-based library and its documentation. It adds GitHub workflow automation, Husky hooks, commit linting configuration, and standardized issue templates. The documentation system is established using DocFX, with extensive markdown articles covering usage, syntax, and rules. Sample template methods are added, and solution/project files are updated to integrate the new documentation project. Minor formatting corrections are made to existing README files. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub
participant Husky
participant CommitLint
participant CI_Workflow
participant Docs_Builder
Developer->>GitHub: Push or PR
GitHub->>CI_Workflow: Trigger workflows (build, lint, test, docs)
Developer->>Husky: Pre-commit/commit-msg hooks
Husky->>CommitLint: Lint commit message
CI_Workflow->>Docs_Builder: Build & deploy docs (on main)
Docs_Builder->>GitHub: Publish documentation site
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Test Results81 tests 81 ✅ 6s ⏱️ Results for commit 6bc25ba. ♻️ This comment has been updated with latest results. |
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Actionable comments posted: 40
🔭 Outside diff range comments (5)
.husky/pre-commit (1)
22-23: Add trailing newline to follow shell script conventions.The file should end with a newline character for better POSIX compliance and to avoid potential issues with some tools.
dotnet husky run +.github/workflows/check-code-format.yml (1)
12-13: Add trailing newline for consistency.The file should end with a newline character following YAML conventions.
- uses: bmazzarol/bmazzarol/.github/actions/check-code-format@main +Cutout.Docs/articles/template/while.md (1)
20-20: Add trailing newline for consistency.The file should end with a newline character following markdown conventions.
{% end %}
</blockquote></details> <details> <summary>Cutout.Docs/articles/template/foreach.md (1)</summary><blockquote> `21-21`: **Add trailing newline for consistency.** The file should end with a newline character following markdown conventions and to match other documentation files. ```diff {% end %}
</blockquote></details> <details> <summary>.github/workflows/cd-build.yml (1)</summary><blockquote> `24-24`: **Terminate file with a newline** Keeps linters quiet and aligns with POSIX text-file convention. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: ASSERTIVE** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 5b72dabe7312356201e6aa16cd76ab8784e8347b and 7d435b1892492fdf6933267007927ecc39786e07. </details> <details> <summary>⛔ Files ignored due to path filters (2)</summary> * `Cutout.Docs/images/favicon.ico` is excluded by `!**/*.ico` * `Cutout.Docs/images/scissors-icon.png` is excluded by `!**/*.png` </details> <details> <summary>📒 Files selected for processing (42)</summary> * `.config/dotnet-tools.json` (1 hunks) * `.github/CODEOWNERS` (1 hunks) * `.github/ISSUE_TEMPLATE/bug_report.md` (1 hunks) * `.github/ISSUE_TEMPLATE/feature_request.md` (1 hunks) * `.github/workflows/build-deploy-docs.yml` (1 hunks) * `.github/workflows/cd-build.yml` (1 hunks) * `.github/workflows/check-code-format.yml` (1 hunks) * `.github/workflows/check-commit-message.yml` (1 hunks) * `.github/workflows/check-docs.yml` (1 hunks) * `.github/workflows/check-markdown.yml` (1 hunks) * `.github/workflows/ci-build.yml` (1 hunks) * `.github/workflows/test-reporter.yml` (1 hunks) * `.husky/commit-msg` (1 hunks) * `.husky/pre-commit` (1 hunks) * `.husky/task-runner.json` (1 hunks) * `Cutout.Docs/.config/dotnet-tools.json` (1 hunks) * `Cutout.Docs/.gitignore` (1 hunks) * `Cutout.Docs/Cutout.Docs.csproj` (1 hunks) * `Cutout.Docs/articles/getting-started.md` (1 hunks) * `Cutout.Docs/articles/rules/CUTOUT001.md` (1 hunks) * `Cutout.Docs/articles/rules/toc.yml` (1 hunks) * `Cutout.Docs/articles/template/break.md` (1 hunks) * `Cutout.Docs/articles/template/call.md` (1 hunks) * `Cutout.Docs/articles/template/continue.md` (1 hunks) * `Cutout.Docs/articles/template/for.md` (1 hunks) * `Cutout.Docs/articles/template/foreach.md` (1 hunks) * `Cutout.Docs/articles/template/if.md` (1 hunks) * `Cutout.Docs/articles/template/return.md` (1 hunks) * `Cutout.Docs/articles/template/syntax.md` (1 hunks) * `Cutout.Docs/articles/template/toc.yml` (1 hunks) * `Cutout.Docs/articles/template/var.md` (1 hunks) * `Cutout.Docs/articles/template/while.md` (1 hunks) * `Cutout.Docs/docfx.json` (1 hunks) * `Cutout.Docs/index.md` (1 hunks) * `Cutout.Docs/template/public/main.css` (1 hunks) * `Cutout.Docs/template/public/main.js` (1 hunks) * `Cutout.Docs/toc.yml` (1 hunks) * `Cutout.Sample/Examples.cs` (1 hunks) * `Cutout.sln` (2 hunks) * `Cutout/README.md` (1 hunks) * `README.md` (1 hunks) * `commitlint.config.js` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧠 Learnings (2)</summary> <details> <summary>📚 Learning: the cutout parser (cutout/parser/parser.cs) is specifically designed for use in a source generator c...</summary>Learnt from: bmazzarol
PR: #3
File: Cutout/Parser/Parser.cs:20-36
Timestamp: 2025-08-02T15:10:00.521Z
Learning: The Cutout Parser (Cutout/Parser/Parser.cs) is specifically designed for use in a source generator context, where it runs during compilation rather than at runtime. This context makes memory optimization concerns around thread-static contexts less relevant since source generators have limited lifespans during the build process.**Applied to files:** - `Cutout.Docs/Cutout.Docs.csproj` - `Cutout.Docs/articles/getting-started.md` - `Cutout.Docs/index.md` - `Cutout.Docs/articles/template/syntax.md` </details> <details> <summary>📚 Learning: in the cutout lexer (cutout/lexer/lexer.cs), tokens never span multiple lines because the lexer desi...</summary>Learnt from: bmazzarol
PR: #3
File: Cutout/Lexer/Lexer.Context.cs:79-88
Timestamp: 2025-08-02T15:08:33.507Z
Learning: In the Cutout lexer (Cutout/Lexer/Lexer.cs), tokens never span multiple lines because the lexer design processes newlines immediately via TryProcessNewline() before any other token accumulation, causing any collected content to be flushed as a separate token before the newline token is added. The Token() method in Context can safely assume single-line tokens due to this architectural guarantee.**Applied to files:** - `Cutout.Docs/index.md` </details> </details><details> <summary>🧬 Code Graph Analysis (5)</summary> <details> <summary>Cutout.Docs/articles/rules/CUTOUT001.md (1)</summary><blockquote> <details> <summary>Cutout.Tests/TemplateTests.cs (1)</summary> * `TemplateTests` (49-162) </details> </blockquote></details> <details> <summary>Cutout.Docs/articles/template/break.md (3)</summary><blockquote> <details> <summary>Cutout/Parser/Syntax.cs (2)</summary> * `BreakStatement` (73-73) * `BreakStatement` (71-76) </details> <details> <summary>Cutout.Tests/ParserTests.cs (1)</summary> * `Case8` (202-211) </details> <details> <summary>Cutout.Tests/ForStatementTests.cs (1)</summary> * `Case3a` (141-146) </details> </blockquote></details> <details> <summary>Cutout.Docs/articles/template/for.md (3)</summary><blockquote> <details> <summary>Cutout.Tests/ForStatementTests.cs (5)</summary> * `ForStatementTests` (66-147) * `ForTemplates` (6-64) * `Case1a` (101-106) * `Case1` (68-99) * `Case3a` (141-146) </details> <details> <summary>Cutout/Parser/Syntax.cs (2)</summary> * `ForStatement` (58-59) * `ForeachStatement` (61-62) </details> <details> <summary>Cutout.Tests/ParserTests.cs (1)</summary> * `Case20` (492-506) </details> </blockquote></details> <details> <summary>Cutout.Docs/articles/template/var.md (3)</summary><blockquote> <details> <summary>Cutout/Parser/Parser.cs (1)</summary> * `TryParseVarStatement` (206-228) </details> <details> <summary>Cutout.Tests/ParserTests.cs (2)</summary> * `Case11` (235-282) * `Case12` (284-296) </details> <details> <summary>Cutout/Parser/Syntax.cs (1)</summary> * `VarStatement` (67-67) </details> </blockquote></details> <details> <summary>Cutout.Sample/Examples.cs (3)</summary><blockquote> <details> <summary>Cutout.Tests/TemplateTests.cs (7)</summary> * `Template` (8-9) * `Template` (11-12) * `Template` (14-21) * `Template` (25-28) * `Template` (42-46) * `Examples` (6-47) * `Case2a` (74-79) </details> <details> <summary>Cutout.Tests/TemplateTests.Case2a#Test.TestWithParameter.g.verified.cs (1)</summary> * `Test` (11-18) </details> <details> <summary>Cutout.Tests/TemplateTests.Case3a#Test.TestWithTwoParameters.g.verified.cs (1)</summary> * `Test` (11-20) </details> </blockquote></details> </details><details> <summary>🪛 LanguageTool</summary> <details> <summary>Cutout.Docs/articles/rules/CUTOUT001.md</summary> [grammar] ~1-~1: Use correct spacing Context: # CUTOUT001 - Invalid Template The template used is not valid in some w... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [style] ~4-~4: Consider using “incompatible” to avoid wordiness. Context: ...or, or it could be that the template is not compatible with the Cutout version of the liquid l... (NOT_ABLE_PREMIUM) --- [grammar] ~5-~5: Use correct spacing Context: ...e with the Cutout version of the liquid language. The error will indicate the line number ... (QB_NEW_EN_OTHER_ERROR_IDS_5) </details> <details> <summary>Cutout.Docs/articles/template/while.md</summary> [grammar] ~1-~1: Avoid extra words Context: # While Statement The `while` statement ... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # While Statement The `while` statement allows you to writ... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~3-~3: There might be a problem here. Context: ...u to write C#-style while loops in your template. ## Syntax ```c# {% while condition %} ... {% end %} ``` ## Example ```c# {% while i < 10 %} Value: {{ i }} {% end %} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>Cutout.Docs/articles/template/break.md</summary> [grammar] ~1-~1: Avoid extra words Context: # Break Statement The `break` statement ... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # Break Statement The `break` statement can be used inside... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~4-~4: There might be a problem here. Context: ...s to exit the loop early, just like in C#. ## Syntax ```c# {% break %} ``` ## Example ```c# {% for i = 0; i < 10; i++ %} {% if i == 5 %} {% break %} {% end %} Value: {{ i }} {% end %} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>Cutout.Docs/articles/template/foreach.md</summary> [grammar] ~1-~1: Avoid extra words Context: # Foreach Statement The `foreach` statem... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # Foreach Statement The `foreach` statement allows you to it... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~4-~4: There might be a problem here. Context: ...r collections in your template using C# syntax. ## Syntax ```c# {% foreach item in items %} ... {% end %} ``` ## Example ```c# {% foreach item in items %} Item: {{ item }} {% end %} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>Cutout.Docs/articles/template/continue.md</summary> [grammar] ~1-~1: Avoid extra words Context: # Continue Statement The `continue` stat... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # Continue Statement The `continue` statement can be used ins... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~3-~3: There might be a mistake here. Context: ...e used inside loops to skip to the next iteration , just like in C#. ## Syntax ```c# {% ... (QB_NEW_EN_OTHER) --- [grammar] ~4-~4: There might be a problem here. Context: ...p to the next iteration , just like in C#. ## Syntax ```c# {% continue %} ``` ## Example ```c# {% for i = 0; i < 10; i++ %} {% if i % 2 == 0 %} {% continue %} {% end %} Odd: {{ i }} {% end %} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>Cutout.Docs/articles/template/for.md</summary> [grammar] ~1-~1: Avoid extra words Context: # For Statement The `for` statement allo... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # For Statement The `for` statement allows you to write ... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~3-~3: There might be a problem here. Context: ...you to write C#-style for loops in your template. ## Syntax ```c# {% for i = 0; i < items.Count; i++ %} ... {% end %} ``` ## Example ```c# {% for i = 0; i < items.Count; i++ %} Item: {{ items[i] }} {% end %} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>Cutout.Docs/articles/template/var.md</summary> [grammar] ~1-~1: Avoid extra words Context: # Var Statement The `var` statement allo... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # Var Statement The `var` statement allows you to declar... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~4-~4: There might be a problem here. Context: ...variables within your template using C# syntax. ## Syntax ```c# {% var x = 10 %} ``` ## Example ```c# {% var greeting = "Hello" %} {{ greeting }} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>.github/ISSUE_TEMPLATE/bug_report.md</summary> [style] ~27-~27: A comma is missing here. Context: ...e the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] ... (EG_NO_COMMA) --- [style] ~28-~28: A comma is missing here. Context: ...ation):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] *... (EG_NO_COMMA) --- [style] ~29-~29: A comma is missing here. Context: ...owser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the ... (EG_NO_COMMA) --- [style] ~32-~32: A comma is missing here. Context: ...e following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browse... (EG_NO_COMMA) --- [style] ~33-~33: A comma is missing here. Context: ...n):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser,... (EG_NO_COMMA) --- [style] ~34-~34: A comma is missing here. Context: ...hone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g.... (EG_NO_COMMA) --- [style] ~35-~35: A comma is missing here. Context: ...e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any oth... (EG_NO_COMMA) </details> <details> <summary>Cutout.Docs/articles/template/if.md</summary> [grammar] ~1-~1: Avoid extra words Context: # If/Else Statement The `if` statement a... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # If/Else Statement The `if` statement allows conditional re... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~4-~4: There might be a problem here. Context: ...he condition must be a valid C# boolean expression. ## Syntax ```c# {% if condition %} ... {% elseif otherCondition %} ... {% else %} ... {% end %} ``` ## Example ```c# {% if name == "Bob" %} Hello Bob {% else %} Hello {{ name }} {% end %} ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>.github/ISSUE_TEMPLATE/feature_request.md</summary> [grammar] ~10-~10: There might be a mistake here. Context: ...re request related to a problem? Please describe.** A clear and concise description of w... (QB_NEW_EN_OTHER) --- [style] ~11-~11: This word has been used in one of the immediately preceding sentences. Using a synonym could make your text more interesting to read, unless the repetition is intentional. Context: ...ear and concise description of what the problem is. Ex. I'm always frustrated when (...... (EN_REPEATEDWORDS_PROBLEM) --- [grammar] ~11-~11: Use correct spacing Context: ...blem is. Ex. I'm always frustrated when (...) **Describe the solution you'd like** A cle... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~13-~13: There might be a mistake here. Context: ...en (...) **Describe the solution you'd like** A clear and concise description of wh... (QB_NEW_EN_OTHER) --- [grammar] ~14-~14: Use correct spacing Context: ...concise description of what you want to happen. **Describe alternatives you've considered*... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~16-~16: There might be a mistake here. Context: ...happen. **Describe alternatives you've considered** A clear and concise description of an... (QB_NEW_EN_OTHER) --- [grammar] ~17-~17: Use correct spacing Context: ...lternative solutions or features you've considered. **Additional context** Add any other conte... (QB_NEW_EN_OTHER_ERROR_IDS_5) </details> <details> <summary>Cutout.Docs/articles/getting-started.md</summary> [grammar] ~1-~1: Use correct spacing Context: # Getting Started To use this library, simply include `Cut... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~4-~4: Use correct spacing Context: ...ckages/Cutout/), and add a reference to it. ```xml <ItemGroup> <PackageReference Include="Cutout" Version="x.x.x"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> </ItemGroup> ``` Then use the `Cutout.Template` attribute... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~15-~15: Use correct spacing Context: ...emplate` attribute to define a template method. [!code-csharp[](../../Cutout.Sample/Exam... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~17-~17: Use correct spacing Context: ...define a template method. [!code-csharp[](../../Cutout.Sample/Examples.cs#ParameterExample)] The first parameter is the `StringBuilde... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~20-~20: Use correct spacing Context: ...erything else passed can be used in the template. The template must be a compile-time cons... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~23-~23: Use correct spacing Context: ...ned as a `const` field or inline in the attribute. [!code-csharp[](../../Cutout.Sample/Exam... (QB_NEW_EN_OTHER_ERROR_IDS_5) </details> <details> <summary>Cutout.Docs/index.md</summary> [grammar] ~6-~6: Use correct spacing Context: ...on.png" alt="Cutout" width="150px"/> # Cutout --- [](https://www.nuget.org/packages/Cutout/) [ --- [style] ~10-~10: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1458 characters long) Context: ...https://www.nuget.org/packages/Cutout/) [](https://sonarcloud.io/summary/new_code?id=bmazzarol_Cutout) [](https://sonarcloud.io/summary/new_code?id=bmazzarol_Cutout) [ --- [grammar] ~16-~16: Use hyphens correctly Context: ...check-markdown.yml) Zero cost :muscle: source generated templating for .NET --- </di... (QB_NEW_EN_OTHER_ERROR_IDS_29) --- [grammar] ~16-~16: Use correct spacing Context: ...muscle: source generated templating for .NET --- </div> ## Why? When building source generators th... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~24-~24: Use a comma after introductory words or phrases Context: ... </div> ## Why? When building source generators there is a requirement to generate sour... (QB_NEW_EN_OTHER_ERROR_IDS_19) --- [grammar] ~26-~26: Use correct spacing Context: ...s possible to not impact users in large repositories. The recommended approach is to use the [... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~30-~30: There might be a mistake here. Context: ...view=net-9.0) . This class is simple to use, but is low level. A standard template... (QB_NEW_EN_OTHER) --- [grammar] ~30-~30: Use correct spacing Context: ...This class is simple to use, but is low level. A standard template engine is a better a... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~33-~33: Use correct spacing Context: ...spective, but the performance is not as good. This aims to provide the best of both wo... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~35-~35: Use correct spacing Context: ... This aims to provide the best of both worlds. It's a source generator, so can be used ... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~37-~37: Use the right pronoun Context: ... both worlds. It's a source generator, so can be used in other source generators ... (QB_NEW_EN_OTHER_ERROR_IDS_9) </details> <details> <summary>Cutout.Docs/articles/template/return.md</summary> [grammar] ~1-~1: Avoid extra words Context: # Return Statement The `return` statemen... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # Return Statement The `return` statement can be used to ex... (QB_NEW_EN_MERGED_MATCH) --- [style] ~3-~3: This phrase is redundant. Consider writing “exit”. Context: ... The `return` statement can be used to exit from a template method early, similar to C#.... (EXIT_FROM) --- [grammar] ~4-~4: There might be a problem here. Context: ...om a template method early, similar to C#. ## Syntax ```c# {% return %} ``` ## Example ```c# {% if shouldExit %} {% return %} {% end %} Continue rendering... ``` (QB_NEW_EN_MERGED_MATCH) </details> <details> <summary>Cutout.Docs/articles/template/syntax.md</summary> [grammar] ~1-~1: Avoid extra words Context: # Template Definition Cutout templates u... (QB_NEW_EN_OTHER_ERROR_IDS_12) --- [grammar] ~1-~1: There might be a problem here. Context: # Template Definition Cutout templates use a syntax inspired b... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~6-~6: There might be a mistake here. Context: ...ates that are both powerful and easy to read, while leveraging the full capabilities... (QB_NEW_EN_OTHER) --- [grammar] ~7-~7: There might be a problem here. Context: ...le leveraging the full capabilities of C#. ## Syntax Overview * **Literals:** Any text outside of `{{ ...... (QB_NEW_EN_MERGED_MATCH) --- [style] ~11-~11: This phrase is redundant. Consider using “outside”. Context: ...ntax Overview * **Literals:** Any text outside of `{{ ... }}` or `{% ... %}` is treated a... (OUTSIDE_OF) --- [style] ~11-~11: Consider using the typographical ellipsis character here instead. Context: ...iew * **Literals:** Any text outside of `{{ ... }}` or `{% ... %}` is treated as a st... (ELLIPSIS) --- [style] ~11-~11: Consider using the typographical ellipsis character here instead. Context: ...ls:** Any text outside of `{{ ... }}` or `{% ... %}` is treated as a string literal an... (ELLIPSIS) --- [grammar] ~11-~11: Use correct spacing Context: ...{{ ... }}` or `{% ... %}` is treated as a string literal and written directly to the out... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~12-~12: There might be a mistake here. Context: ...ing literal and written directly to the output. * **Expressions:** Use `{{ ... }}` to inser... (QB_NEW_EN_OTHER) --- [style] ~13-~13: Consider using the typographical ellipsis character here instead. Context: ...ly to the output. * **Expressions:** Use `{{ ... }}` to insert the value of any valid C#... (ELLIPSIS) --- [grammar] ~13-~13: Use correct spacing Context: ..... }}` to insert the value of any valid C# expression. ***Blocks:** Use `{% ... %}` for contro... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [style] ~15-~15: Consider using the typographical ellipsis character here instead. Context: ... valid C# expression. ***Blocks:** Use `{% ... %}` for control flow (e.g., if, for, fo... (ELLIPSIS) --- [grammar] ~15-~15: Use correct spacing Context: ...r control flow (e.g., if, for, foreach, while) and function calls. ***Whitespace Control:*... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~17-~17: Use correct spacing Context: ...Whitespace can be managed using the `-` character, similar to Liquid. For example, `{%- ... -%}` t... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [style] ~18-~18: Consider using the typographical ellipsis character here instead. Context: ...acter, similar to Liquid. For example, `{%- ... -%}` trims whitespace around the bloc... (ELLIPSIS) --- [grammar] ~18-~18: Use correct spacing Context: ..., `{%- ... -%}` trims whitespace around the block. ### Example ```csharp private const ... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~21-~21: There might be a problem here. Context: ...rims whitespace around the block. ### Example ```csharp private const string Template = """ {% if name == "Bob" %} Hello Bob {% else %} Hello {{ name }} {% end %} """; [Cutout.Template(Template)] public static partial void MyTemplateMethod(StringBuilder sb, string name); ``` ## Whitespace Handling Cutout supports wh... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~36-~36: There might be a problem here. Context: ...er sb, string name); ``` ## Whitespace Handling Cutout supports whitespace control simil... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~45-~45: Use correct spacing Context: ...ms whitespace both before and after the block. * The same applies to output tags: `{{ ... }}... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [style] ~46-~46: Consider using the typographical ellipsis character here instead. Context: ...lock. * The same applies to output tags: `{{ ... }}`, `{{- ... }}`, `{{ ... -}}`, `{{-... (ELLIPSIS) --- [style] ~46-~46: Consider using the typographical ellipsis character here instead. Context: ...ame applies to output tags: `{{ ... }}`, `{{- ... }}`, `{{ ... -}}`, `{{- ... -}}`. Th... (ELLIPSIS) --- [grammar] ~46-~46: Use correct spacing Context: ... output tags: `{{ ... }}`, `{{- ... }}`, `{{ ... -}}`, `{{- ... -}}`. This allows for fine-grained control ove... (QB_NEW_EN_OTHER_ERROR_IDS_5) --- [grammar] ~50-~50: There might be a problem here. Context: ...ier to maintain correct indentation and spacing. ## Deviations from Liquid Standard <!-- markdownlint-... (QB_NEW_EN_MERGED_MATCH) --- [grammar] ~52-~52: There might be a problem here. Context: ...and spacing. ## Deviations from Liquid Standard <!-- markdownlint-disable MD013 --> | Feature | Cutout Implementa... (QB_NEW_EN_MERGED_MATCH) --- [style] ~59-~59: Consider using the typographical ellipsis character here instead. Context: ...ch`, `while`) | Liquid style (`for ... in ...`) | | Whitespa... (ELLIPSIS) </details> </details> <details> <summary>🪛 markdownlint-cli2 (0.17.2)</summary> <details> <summary>.github/ISSUE_TEMPLATE/bug_report.md</summary> 15-15: Lists should be surrounded by blank lines (MD032, blanks-around-lists) --- 27-27: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) --- 27-27: Lists should be surrounded by blank lines (MD032, blanks-around-lists) --- 28-28: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) --- 29-29: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) --- 32-32: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) --- 32-32: Lists should be surrounded by blank lines (MD032, blanks-around-lists) --- 33-33: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) --- 34-34: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) --- 35-35: Unordered list indentation Expected: 0; Actual: 1 (MD007, ul-indent) </details> </details> <details> <summary>🪛 YAMLlint (1.37.1)</summary> <details> <summary>.github/workflows/check-markdown.yml</summary> [warning] 3-3: truthy value should be one of [false, true] (truthy) --- [error] 21-21: no new line character at the end of file (new-line-at-end-of-file) </details> <details> <summary>.github/workflows/ci-build.yml</summary> [warning] 3-3: truthy value should be one of [false, true] (truthy) --- [error] 22-22: no new line character at the end of file (new-line-at-end-of-file) </details> </details> <details> <summary>🪛 Biome (2.1.2)</summary> <details> <summary>Cutout.Docs/template/public/main.css</summary> [error] 1-1: Unknown type selector is not allowed. See MDN web docs for more details. Consider replacing the unknown type selector with valid one. (lint/correctness/noUnknownTypeSelector) </details> </details> </details> <details> <summary>🔇 Additional comments (29)</summary><blockquote> <details> <summary>Cutout/README.md (1)</summary> `54-55`: **Whitespace clean-up acknowledged** The stray trailing space has been removed – good maintenance hygiene. </details> <details> <summary>README.md (1)</summary> `70-71`: **Whitespace clean-up acknowledged** Same minor whitespace fix as in the sibling README – no further action required. </details> <details> <summary>.config/dotnet-tools.json (1)</summary> `1-18`: **Tool manifest looks correct – verify version alignment** `husky` 0.7.2 and `csharpier` 1.0.3 match the versions invoked in the Husky hooks and GitHub workflows, so the manifest is consistent. If you bump the CLI tool versions in workflows later, remember to keep this manifest in sync to prevent “tool not found” CI failures. </details> <details> <summary>.github/ISSUE_TEMPLATE/feature_request.md (1)</summary> `2-7`: **LGTM – template front-matter is valid** Front-matter keys match GitHub’s schema, and empty fields allow later automation to populate labels/assignees. </details> <details> <summary>Cutout.Docs/.gitignore (1)</summary> `1-3`: **LGTM – ignores build artefacts correctly** `_site`, `api`, and `doctests` are the main DocFX outputs; excluding them keeps the repo clean. </details> <details> <summary>Cutout.Docs/.config/dotnet-tools.json (1)</summary> `5-8`: **LGTM – tool manifest correctly pins DocFX** The manifest is minimal and valid; no issues spotted. </details> <details> <summary>Cutout.Docs/articles/rules/toc.yml (1)</summary> `1-3`: **Table-of-contents entry looks fine** Structure and indentation align with DocFX expectations. </details> <details> <summary>Cutout.Docs/template/public/main.js (1)</summary> `1-9`: **Clean JavaScript configuration module.** The module structure is well-organized and follows ES6 standards. The GitHub link configuration is appropriate for documentation site navigation. </details> <details> <summary>Cutout.Docs/articles/template/while.md (1)</summary> `1-20`: **Well-structured documentation for while statement.** The documentation clearly explains the while loop construct with appropriate syntax examples and usage patterns. The content follows good documentation practices. </details> <details> <summary>Cutout.Docs/articles/template/foreach.md (1)</summary> `1-21`: **Consistent and clear documentation for foreach statement.** The documentation follows the established pattern from other template articles and clearly explains the foreach loop construct. The structure and examples are appropriate for user guidance. </details> <details> <summary>Cutout.Docs/toc.yml (1)</summary> `1-9`: **LGTM – structure looks correct** The DocFX TOC is well-formed and paths resolve to the new articles. No issues spotted. </details> <details> <summary>.husky/commit-msg (2)</summary> `1-2`: **LGTM: Standard Husky hook setup.** The shebang and Husky environment sourcing are correctly implemented for a Git commit message hook. --- `22-22`: **LGTM: Proper commitlint integration.** The commitlint command is correctly configured to validate commit messages using the provided commit file path. </details> <details> <summary>Cutout.Docs/articles/getting-started.md (3)</summary> `6-13`: **LGTM: Proper NuGet package reference configuration.** The XML configuration correctly sets up the Cutout package as a build-time dependency with appropriate asset inclusion settings for a source generator. --- `25-25`: **DocFX code reference validated** The region `ExampleWithConditionAndConstTemplate` exists in `Cutout.Sample/Examples.cs` as expected. No further action is required. --- `17-17`: **DocFX code reference path is valid.** The file `Cutout.Sample/Examples.cs` exists and includes the `#region ParameterExample` with the expected content. No further changes are needed. </details> <details> <summary>Cutout.sln (2)</summary> `9-10`: **LGTM: Proper project addition to solution.** The Cutout.Docs project is correctly added with appropriate GUID and project file path. --- `29-32`: **LGTM: Complete project configuration setup.** All required build configurations (Debug/Release) are properly configured for the new documentation project. </details> <details> <summary>.husky/task-runner.json (3)</summary> `1-11`: **LGTM: C# formatting task is properly configured.** The CSharpier formatting task correctly uses the dotnet tool to format all C# code in the repository. --- `12-22`: **LGTM: Markdown linting configuration is well-structured.** The markdownlint task appropriately targets relevant markdown files while excluding LICENSE.md, which typically doesn't follow standard markdown conventions. --- `23-29`: **LGTM: Test task is correctly configured.** Simple and effective dotnet test command that will run all tests in the solution. </details> <details> <summary>Cutout.Docs/template/public/main.css (3)</summary> `1-4`: **LGTM: Proper logo styling.** The logo styles provide appropriate spacing and sizing for a documentation site header. --- `6-8`: **LGTM: Consistent navbar theming.** Using CSS custom properties for background color ensures consistent theming across the documentation site. --- `10-18`: **LGTM: Well-structured footer styling.** The footer styles provide good visual separation and consistent theming with appropriate padding and background colors. </details> <details> <summary>Cutout.Sample/Examples.cs (2)</summary> `10-15`: **LGTM! Clean template method implementation.** The `Test2` method follows the established pattern for Cutout template methods. The inline template syntax with parameter interpolation is correct and consistent with the library's approach. --- `17-34`: **Excellent demonstration of advanced template features.** The `Test3` method showcases several important Cutout template capabilities: - Multi-line template using a constant string for better maintainability - Parameter interpolation with `{{parameter}}` - Conditional logic using C# expressions in `{% if parameter == "INVALID" %}` - Proper whitespace control with `{%- -%}` syntax - Clean organization with region markers This serves as a great example for users learning the more advanced template features. </details> <details> <summary>Cutout.Docs/articles/template/syntax.md (3)</summary> `21-34`: **Excellent practical example.** The code example effectively demonstrates key Cutout template features including conditional logic, parameter interpolation, and the `[Template]` attribute usage. This aligns well with the sample code in `Examples.cs`. --- `36-50`: **Comprehensive whitespace handling documentation.** This section provides clear and essential information about whitespace control in templates. The reference to Liquid's whitespace basics and the detailed examples will help users understand how to control formatting in their generated output. --- `52-61`: **Valuable comparison table for Liquid users.** The deviations table effectively highlights key differences between Cutout and Liquid syntax. This is particularly helpful for users familiar with Liquid templating who need to understand Cutout's C#-focused approach. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
|
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
Cutout.Docs/articles/rules/CUTOUT001.md(1 hunks)Cutout.Docs/articles/template/syntax.md(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: the cutout parser (cutout/parser/parser.cs) is specifically designed for use in a source generator c...
Learnt from: bmazzarol
PR: bmazzarol/Cutout#3
File: Cutout/Parser/Parser.cs:20-36
Timestamp: 2025-08-02T15:10:00.574Z
Learning: The Cutout Parser (Cutout/Parser/Parser.cs) is specifically designed for use in a source generator context, where it runs during compilation rather than at runtime. This context makes memory optimization concerns around thread-static contexts less relevant since source generators have limited lifespans during the build process.
Applied to files:
Cutout.Docs/articles/template/syntax.md
🪛 LanguageTool
Cutout.Docs/articles/rules/CUTOUT001.md
[grammar] ~1-~1: Use correct spacing
Context: # CUTOUT001 - Invalid Template The template used is not valid in some w...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[style] ~4-~4: Consider using “incompatible” to avoid wordiness.
Context: ...or, or it could be that the template is not compatible with the Cutout version of the liquid l...
(NOT_ABLE_PREMIUM)
[grammar] ~5-~5: Use correct spacing
Context: ...e with the Cutout version of the liquid language. The error will indicate the line number ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
Cutout.Docs/articles/template/syntax.md
[grammar] ~1-~1: Avoid extra words
Context: # Template Definition Cutout templates u...
(QB_NEW_EN_OTHER_ERROR_IDS_12)
[grammar] ~1-~1: There might be a problem here.
Context: # Template Definition Cutout templates use a syntax inspired b...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~6-~6: There might be a mistake here.
Context: ...ates that are both powerful and easy to read, while leveraging the full capabilities...
(QB_NEW_EN_OTHER)
[grammar] ~7-~7: There might be a problem here.
Context: ...le leveraging the full capabilities of C#. ## Syntax Overview * Literals: Any text outside of `{{ ......
(QB_NEW_EN_MERGED_MATCH)
[style] ~11-~11: This phrase is redundant. Consider using “outside”.
Context: ...ntax Overview * Literals: Any text outside of {{ ... }} or {% ... %} is treated a...
(OUTSIDE_OF)
[style] ~11-~11: Consider using the typographical ellipsis character here instead.
Context: ...iew * Literals: Any text outside of {{ ... }} or {% ... %} is treated as a st...
(ELLIPSIS)
[style] ~11-~11: Consider using the typographical ellipsis character here instead.
Context: ...ls:** Any text outside of {{ ... }} or {% ... %} is treated as a string literal an...
(ELLIPSIS)
[grammar] ~11-~11: Use correct spacing
Context: ...{{ ... }}or{% ... %}` is treated as a string literal and written directly to the out...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~12-~12: There might be a mistake here.
Context: ...ing literal and written directly to the output. * Expressions: Use {{ ... }} to inser...
(QB_NEW_EN_OTHER)
[style] ~13-~13: Consider using the typographical ellipsis character here instead.
Context: ...ly to the output. * Expressions: Use {{ ... }} to insert the value of any valid C#...
(ELLIPSIS)
[grammar] ~13-~13: Use correct spacing
Context: ..... }}to insert the value of any valid C# expression. * **Blocks:** Use{% ... %}` for cont...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[style] ~15-~15: Consider using the typographical ellipsis character here instead.
Context: ...valid C# expression. * Blocks: Use {% ... %} for control flow (e.g., if, for, fo...
(ELLIPSIS)
[grammar] ~15-~15: Use correct spacing
Context: ...r control flow (e.g., if, for, foreach, while) and function calls. * **Whitespace Control:...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~16-~16: There might be a mistake here.
Context: ...if, for, foreach, while) and function calls. * Whitespace Control: Whitespace can be...
(QB_NEW_EN_OTHER)
[grammar] ~17-~17: Use correct spacing
Context: ...Whitespace can be managed using the - character, similar to Liquid. For example, {%- ... -%} t...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[style] ~18-~18: Consider using the typographical ellipsis character here instead.
Context: ...acter, similar to Liquid. For example, {%- ... -%} trims whitespace around the bloc...
(ELLIPSIS)
[grammar] ~18-~18: Use correct spacing
Context: ..., {%- ... -%} trims whitespace around the block. ### Example ```csharp private const ...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~21-~21: There might be a problem here.
Context: ...rims whitespace around the block. ### Example csharp private const string Template = """ {% if name == "Bob" %} Hello Bob {% else %} Hello {{ name }} {% end %} """; [Cutout.Template(Template)] public static partial void MyTemplateMethod(StringBuilder sb, string name); ## Whitespace Handling Cutout supports wh...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~36-~36: There might be a problem here.
Context: ...er sb, string name); ``` ## Whitespace Handling Cutout supports whitespace control simil...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~45-~45: Use correct spacing
Context: ...ms whitespace both before and after the block. * The same applies to output tags: `{{ ... }}...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[style] ~46-~46: Consider using the typographical ellipsis character here instead.
Context: ...lock. * The same applies to output tags: {{ ... }}, {{- ... }}, {{ ... -}}, `{{-...
(ELLIPSIS)
[style] ~46-~46: Consider using the typographical ellipsis character here instead.
Context: ...ame applies to output tags: {{ ... }}, {{- ... }}, {{ ... -}}, {{- ... -}}. Th...
(ELLIPSIS)
[grammar] ~46-~46: Use correct spacing
Context: ... output tags: {{ ... }}, {{- ... }}, {{ ... -}}, {{- ... -}}. This allows for fine-grained control ove...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
[grammar] ~50-~50: There might be a problem here.
Context: ...ier to maintain correct indentation and spacing. ## Deviations from Liquid Standard <!-- markdownlint-...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~52-~52: There might be a problem here.
Context: ...and spacing. ## Deviations from Liquid Standard | Feature | Cutout Implementa...
(QB_NEW_EN_MERGED_MATCH)
[style] ~59-~59: Consider using the typographical ellipsis character here instead.
Context: ...ch, while) | Liquid style (for ... in ...`) | | Whitespa...
(ELLIPSIS)



Summary by CodeRabbit
New Features
Chores
Documentation