Skip to content

feat: add script for automatic code formatting#1636

Open
Cyberhan123 wants to merge 1 commit into
leejet:masterfrom
Cyberhan123:code-format
Open

feat: add script for automatic code formatting#1636
Cyberhan123 wants to merge 1 commit into
leejet:masterfrom
Cyberhan123:code-format

Conversation

@Cyberhan123

@Cyberhan123 Cyberhan123 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This is part of #1368.
This pull request adds a new PowerShell script, format-code.ps1, to automate code formatting for the project. The script recursively searches for C++ source and header files across various directories and applies clang-format to each file, ensuring consistent code style throughout the codebase.

Automation of code formatting:

  • Added format-code.ps1 script that locates .cpp, .h, and .hpp files in key source and example directories, and formats them using clang-format. This helps maintain consistent code style across the project.

Checklist

Copilot AI review requested due to automatic review settings June 11, 2026 05:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a PowerShell utility script to run clang-format across selected C/C++ source directories using a set of glob patterns.

Changes:

  • Introduces format-code.ps1 with explicit path patterns for .cpp/.h/.hpp files.
  • Computes repo-relative paths for logging and formatting.
  • Attempts to skip files under a vocab path while formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread format-code.ps1
Comment thread format-code.ps1
Comment thread format-code.ps1
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