Skip to content

Add explicit treefmt formatting instruction to copilot-instructions.md#1370

Merged
brianmcgillion merged 2 commits intomainfrom
copilot/fix-1369
Sep 4, 2025
Merged

Add explicit treefmt formatting instruction to copilot-instructions.md#1370
brianmcgillion merged 2 commits intomainfrom
copilot/fix-1369

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 4, 2025

This PR enhances the GitHub Copilot instructions to explicitly emphasize the requirement for proper code formatting using treefmt before making pull requests.

Changes Made

Enhanced Development Workflow Section

  • Renamed "Code Quality Checks" to "Code Formatting and Quality Checks" for better clarity
  • Added a CRITICAL instruction: "All commits must be properly formatted using treefmt before making a PR"
  • Added detailed explanation of treefmt's multi-language support:
    • Nix files: nixfmt-rfc-style (RFC 166 standard)
    • Python files: ruff formatter and linter
    • Shell scripts: shellcheck linting
    • JavaScript/TypeScript: prettier formatting
  • Clarified the difference between nix fmt (to format code) and nix fmt -- --fail-on-change (to validate formatting)

Updated Validation Steps

  • Changed "Run format check" to "Run treefmt format check" in Post-Build Validation Steps
  • Updated Final Validation Checklist to explicitly mention "Code properly formatted with treefmt"

Why This Matters

The previous instructions mentioned nix fmt -- --fail-on-change but didn't explicitly connect it to treefmt or emphasize the critical importance of formatting commits before PRs. This enhancement makes it crystal clear that:

  1. Treefmt formatting is mandatory for all commits
  2. The project uses treefmt for consistent formatting across multiple languages
  3. Developers must format their code before submitting PRs

This will help prevent formatting-related CI failures and ensure consistent code style across the Ghaf Framework codebase.

Fixes #1369.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: brianmcgillion <1044263+brianmcgillion@users.noreply.github.com>
Copilot AI changed the title [WIP] fix copilot-instructions.md to ensure formatting Add explicit treefmt formatting instruction to copilot-instructions.md Sep 4, 2025
Copilot AI requested a review from brianmcgillion September 4, 2025 05:22
@brianmcgillion brianmcgillion marked this pull request as ready for review September 4, 2025 05:30
@brianmcgillion brianmcgillion merged commit 4138849 into main Sep 4, 2025
35 of 51 checks passed
@brianmcgillion brianmcgillion deleted the copilot/fix-1369 branch September 4, 2025 05:30
Copilot AI added a commit that referenced this pull request Sep 4, 2025
#1370)

* Initial plan

* Add explicit treefmt formatting instruction to copilot-instructions.md

Co-authored-by: brianmcgillion <1044263+brianmcgillion@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: brianmcgillion <1044263+brianmcgillion@users.noreply.github.com>
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.

fix copilot-instructions.md to ensure formatting

2 participants