Add clang-format configuration and apply to sampsharp-component C++ source files - #554
Merged
Merged
Conversation
Closed
Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/3251c519-d370-4e30-8b2b-1707792a2b47 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
Owner
|
@copilot do not touch the legacy code; the |
Copilot
AI
changed the title
[WIP] Add clang-format file and format src code
Add clang-format configuration and apply to all C++ source files
May 12, 2026
…e for legacy tree Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/5a2292e5-020c-4592-9ef6-c99d3d622f63 Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
Contributor
Author
Done in 90fb133. All formatting changes to |
Copilot
AI
changed the title
Add clang-format configuration and apply to all C++ source files
Add clang-format configuration and apply to sampsharp-component C++ source files
May 12, 2026
ikkentim
reviewed
May 12, 2026
ikkentim
requested changes
May 12, 2026
…-format) Agent-Logs-Url: https://github.com/ikkentim/SampSharp/sessions/77f277a6-3474-4b98-a3f1-45953ea3519d Co-authored-by: ikkentim <2820647+ikkentim@users.noreply.github.com>
ikkentim
approved these changes
May 12, 2026
ikkentim
added a commit
that referenced
this pull request
May 14, 2026
* origin/main: Disable IDE0290 configuration and revert public primary constructors (#560) Clean up legacy editorconfig Sonar overrides and eliminate TODO markers in `src/legacy` (#562) Add implicit usings to SampSharp.Sdk (#558) Add `dotnet new` template package for open.mp ECS gamemodes (#556) Add clang-format configuration and apply to sampsharp-component C++ source files (#554) Implement SafeComponentHandle and earlier managed cleanup (#552)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Establishes a consistent C++ code style across the active codebase by introducing a
.clang-formatfile and applying it to first-party sources undersrc/sampsharp-component/.Configuration (
.clang-format)sampsharp-componentconvention)type*nottype *if (...)notif(...)SortIncludes: Never— preserves include order intentionally (SDK headers have load-order constraints)Legacy code exclusion
The legacy code under
src/legacy/is explicitly excluded from formatting. Asrc/legacy/.clang-formatfile withDisableFormat: trueensures the entire legacy tree is never touched by clang-format tooling..editorconfigAdded
[*.{cpp,hpp,h,c}]section (4-space indent, LF) so editors align with the formatter without relying on project-level IDE config.Applied formatting
All
.cpp/.hppfiles undersrc/sampsharp-component/have been reformatted. The primary visible changes are pointer alignment normalization and minor whitespace adjustments. The legacy code undersrc/legacy/is left entirely unchanged.