[PR #1141] [MERGED] add clang-format conf to the project, format the c++ code #24500

Open
opened 2026-01-31 09:03:40 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1141
Author: @adiviness
Created: 6/4/2019
Status: Merged
Merged: 6/11/2019
Merged by: @adiviness

Base: masterHead: dev/austdi/clang-format


📝 Commits (10+)

📊 Changes

523 files changed (+11569 additions, -12674 deletions)

View changed files

.clang-format (+93 -0)
📝 doc/building.md (+4 -0)
📝 src/buffer/out/AttrRow.cpp (+12 -15)
📝 src/buffer/out/AttrRow.hpp (+4 -7)
📝 src/buffer/out/AttrRowIterator.hpp (+1 -2)
📝 src/buffer/out/CharRow.cpp (+3 -4)
📝 src/buffer/out/CharRow.hpp (+4 -6)
📝 src/buffer/out/CharRowCell.cpp (+0 -1)
📝 src/buffer/out/CharRowCell.hpp (+1 -2)
📝 src/buffer/out/CharRowCellReference.cpp (+0 -2)
📝 src/buffer/out/CharRowCellReference.hpp (+0 -2)
📝 src/buffer/out/DbcsAttribute.hpp (+3 -2)
📝 src/buffer/out/OutputCell.cpp (+0 -1)
📝 src/buffer/out/OutputCell.hpp (+2 -2)
📝 src/buffer/out/OutputCellIterator.cpp (+1 -10)
📝 src/buffer/out/OutputCellIterator.hpp (+9 -9)
📝 src/buffer/out/OutputCellRect.cpp (+2 -3)
📝 src/buffer/out/OutputCellRect.hpp (+1 -1)
📝 src/buffer/out/OutputCellView.cpp (+3 -4)
📝 src/buffer/out/OutputCellView.hpp (+0 -1)

...and 80 more files

📄 Description

Summary of the Pull Request

  • Adds a .clang-format conf file to the project
  • Formats all C++ code to be in compliance with the style
  • Adds runformat.cmd for users to format from the cmd prompt
  • Adds Invoke-CodeFormat for users to format from powershell
  • Adds steps for setting up a custom path to clang-format.exe for Visual Studio users

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/1141 **Author:** [@adiviness](https://github.com/adiviness) **Created:** 6/4/2019 **Status:** ✅ Merged **Merged:** 6/11/2019 **Merged by:** [@adiviness](https://github.com/adiviness) **Base:** `master` ← **Head:** `dev/austdi/clang-format` --- ### 📝 Commits (10+) - [`612e471`](https://github.com/microsoft/terminal/commit/612e4719a40e6e9b708398ef37a3347c6c10d7be) inc is formatted - [`09f5ba3`](https://github.com/microsoft/terminal/commit/09f5ba36217d96fd82a2640242b3afe22f9ffbda) types is clang-formatted - [`a4b0f4b`](https://github.com/microsoft/terminal/commit/a4b0f4bda96c9c35b099064b14f1c146a2e90772) buffor/out is formatted - [`43e6f5e`](https://github.com/microsoft/terminal/commit/43e6f5e192cb4086df224834b7dd108e4161c575) formatted host cpp files - [`8a997e7`](https://github.com/microsoft/terminal/commit/8a997e7804b53a1a190f83414de91e4352f3eaf5) formatted server - [`f6d39e1`](https://github.com/microsoft/terminal/commit/f6d39e1c4b6f6c44fc3c1ab0f26393e664f2ac35) formatted renderer cpp files - [`0e0bc30`](https://github.com/microsoft/terminal/commit/0e0bc309742d8266da0b2cb3daf691b5182e3169) formatted tsf cpp files - [`3033f3c`](https://github.com/microsoft/terminal/commit/3033f3cf8c3322f5607eef3cabddbb4cfe1afa8e) tools cpp files formatted - [`71cc5b4`](https://github.com/microsoft/terminal/commit/71cc5b4782c31047197d21c42790b6256e56f4b1) propsheet cpp files formatted - [`3506189`](https://github.com/microsoft/terminal/commit/3506189992be276cc5b774a2dc1c5de9ad08d69a) propslib cpp formatted ### 📊 Changes **523 files changed** (+11569 additions, -12674 deletions) <details> <summary>View changed files</summary> ➕ `.clang-format` (+93 -0) 📝 `doc/building.md` (+4 -0) 📝 `src/buffer/out/AttrRow.cpp` (+12 -15) 📝 `src/buffer/out/AttrRow.hpp` (+4 -7) 📝 `src/buffer/out/AttrRowIterator.hpp` (+1 -2) 📝 `src/buffer/out/CharRow.cpp` (+3 -4) 📝 `src/buffer/out/CharRow.hpp` (+4 -6) 📝 `src/buffer/out/CharRowCell.cpp` (+0 -1) 📝 `src/buffer/out/CharRowCell.hpp` (+1 -2) 📝 `src/buffer/out/CharRowCellReference.cpp` (+0 -2) 📝 `src/buffer/out/CharRowCellReference.hpp` (+0 -2) 📝 `src/buffer/out/DbcsAttribute.hpp` (+3 -2) 📝 `src/buffer/out/OutputCell.cpp` (+0 -1) 📝 `src/buffer/out/OutputCell.hpp` (+2 -2) 📝 `src/buffer/out/OutputCellIterator.cpp` (+1 -10) 📝 `src/buffer/out/OutputCellIterator.hpp` (+9 -9) 📝 `src/buffer/out/OutputCellRect.cpp` (+2 -3) 📝 `src/buffer/out/OutputCellRect.hpp` (+1 -1) 📝 `src/buffer/out/OutputCellView.cpp` (+3 -4) 📝 `src/buffer/out/OutputCellView.hpp` (+0 -1) _...and 80 more files_ </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Adds a .clang-format conf file to the project - Formats all C++ code to be in compliance with the style - Adds `runformat.cmd` for users to format from the cmd prompt - Adds `Invoke-CodeFormat` for users to format from powershell - Adds steps for setting up a custom path to clang-format.exe for Visual Studio users <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:03:40 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24500