Skip to content

Conversation

samtrion
Copy link
Member

@samtrion samtrion commented Jul 9, 2025

No description provided.

@samtrion samtrion requested a review from Copilot July 9, 2025 22:28
@samtrion samtrion self-assigned this Jul 9, 2025
@samtrion samtrion added state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added. labels Jul 9, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the initial implementation of a CSharpCodeBuilder for constructing C# code snippets with automatic indentation, conditional appending, formatting support, and extensive unit tests.

  • Implements CodeBuilderBase and CSharpCodeBuilder with Append, AppendLine, AppendIf, AppendLineIf, AppendFormat, EnsureCapacity, Clear, and XML-doc methods
  • Adds over 30 test files covering core behavior, properties, indentation, capacity, conditional logic, formatting, and documentation generation
  • Updates project files (Directory.Build.props, Directory.Packages.props), CI workflow, and solution structure to support multi-target frameworks and TUnit

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/NetEvolve.CodeBuilder/CodeBuilderBase.EnsureIndented.cs Added indentation helper and indent level APIs
src/NetEvolve.CodeBuilder/CSharpCodeBuilder.Append.cs Core Append logic with brace-driven indenting
src/NetEvolve.CodeBuilder/CSharpCodeBuilder.AppendLineIf.cs Conditional line-append overloads
src/NetEvolve.CodeBuilder/CSharpCodeBuilder.AppendFormat.cs Culture-aware formatting methods
src/NetEvolve.CodeBuilder/CSharpCodeBuilder.Clear.cs Reset content and indentation
src/NetEvolve.CodeBuilder/CSharpCodeBuilder.Documentation.cs XML documentation comment methods
tests/NetEvolve.CodeBuilder.Tests.Unit/*.cs Comprehensive unit tests for all APIs
.github/workflows/cicd.yml Switched to single-pipeline build step
Comments suppressed due to low confidence (3)

.github/workflows/cicd.yml:34

  • The solution path points to HealthChecks.slnx instead of this repository's CodeBuilder.slnx. Update to the correct solution filename.
      solution: ./HealthChecks.slnx

src/NetEvolve.CodeBuilder/CodeBuilderBase.EnsureIndented.cs:3

  • The Interlocked API is used but System.Threading is not imported. Add using System.Threading; at the top of the file to resolve compilation errors.
using System.Runtime.CompilerServices;

src/NetEvolve.CodeBuilder/CSharpCodeBuilder.Clear.cs:3

  • Interlocked.Exchange is used but System.Threading is not imported. Add using System.Threading; to this file.
public partial record CSharpCodeBuilder

@samtrion samtrion merged commit 7484a5e into main Jul 9, 2025
1 check passed
@samtrion samtrion deleted the feature/initial-implementation branch July 9, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant