Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 8, 2025

Implements mandatory dotnet format pre-commit hook and remediates all existing whitespace formatting violations across the codebase.

Changes

Pre-Commit Hook Infrastructure

  • scripts/pre-commit - Bash hook that runs dotnet format on staged C# files, re-stages formatted output
  • scripts/install-git-hooks.{sh,ps1} - Cross-platform installers with single-command setup
  • Formats only changed files; handles multiple solutions; provides colored output

Development Standards

  • TODO/DEVELOPMENT_RULES.md - 15 mandatory rules with Rule Bump the major group with 9 updates #1: Always run dotnet format before committing
  • Updated CONTRIBUTING.md to promote automated hook installation
  • Added scripts/README.md and docs/pre-commit-hook-testing.md for maintainability

Formatting Fixes

  • Fixed 70 files with whitespace violations (1,676+/1,152- lines)
  • FlinkDotNet: 48 files, LocalTesting: 19 files, NativeFlinkDotnetTesting: 3 files
  • All solutions now pass dotnet format --verify-no-changes

Installation

# Linux/macOS
./scripts/install-git-hooks.sh

# Windows
.\scripts\install-git-hooks.ps1

Pre-Commit Behavior

$ git commit -m "feat: add feature"
Running pre-commit checks...
Formatting changed C# files...
✓ Formatted: FlinkDotNet/FlinkDotNet.sln
  ↳ Restaging: FlinkDotNet/Some/File.cs
✓ Pre-commit checks passed!

Bypass (emergency use only): git commit --no-verify

Original prompt

Continue implement root/TODO. Add another rule to TODO that always run dotnet format before commit changes.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 8, 2025
Copilot AI and others added 4 commits November 8, 2025 07:54
Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
Copilot AI changed the title [WIP] Add rule to run dotnet format before commit changes Add dotnet format pre-commit enforcement and fix 70 SonarCloud formatting violations Nov 8, 2025
Copilot AI requested a review from devstress November 8, 2025 08:07
@devstress devstress marked this pull request as ready for review November 8, 2025 08:10
@devstress devstress merged commit a314538 into main Nov 8, 2025
4 checks passed
@devstress devstress deleted the copilot/add-dotnet-format-rule branch November 8, 2025 08:11
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.

2 participants