Repository navigation
chore: adopt clang-format and pre-commit - #1128
Closed
prompterror wants to merge 1 commit into
Closed
prompterror wants to merge 1 commit into
prompterror wants to merge 1 commit into
Conversation
Tooling baseline for the whole tree: - .clang-format: LLVM base, 4-space indent, 120-column limit (long shader and profile lines stay atomic), pointer alignment left, include sorting off (include order is load-bearing here), namespace comments off. - .editorconfig: lf, utf-8, 4-space indent, final newline, no trailing whitespace; mirrors the hooks. - .pre-commit-config.yaml: pre-commit-hooks v6.0.0 (trailing-whitespace, end-of-file-fixer, check-yaml, check-merge-conflict, check-case-conflict, check-added-large-files, check-executables-have-shebangs, mixed-line-ending lf) and mirrors-clang-format v21.1.8. Vendored 3rdparty/ is excluded. - .github/workflows/pre-commit.yml: CI job enforcing `pre-commit run --all-files` on push and pull_request. - CONTRIBUTING.md: documents the hooks and the format requirement. - Reformat core/ with clang-format 21.1.8. Mechanical, no semantic changes (e.g. git diff -w on the reformatting commit is smallest possible).
This was referenced Oct 7, 2026
This was referenced Oct 7, 2026
Merged
This was referenced Oct 8, 2026
This was referenced Oct 8, 2026
feat(libkernel): deliver guest signals on Linux and keep signal masks per thread
Zaid-Talib/AnyPS5#1
Open
Collaborator
|
Thanks for the work here. This is a tree-wide policy change, so it needs a maintainer decision before a code review:
|
9 tasks done
9 tasks done
9 tasks done
9 tasks done
This was referenced Oct 8, 2026
8 of 9 tasks
9 tasks done
This was referenced Oct 8, 2026
9 tasks done
9 tasks done
9 tasks done
9 tasks done
Collaborator
|
No from me: there's no formatter rule in CONTRIBUTING, and a whole-tree reformat would conflict with almost every open PR. I'd close this unless the owner wants one. |
9 tasks done
9 tasks done
9 tasks done
9 tasks done
This was referenced Oct 9, 2026
Collaborator
|
Closing: a whole-tree reformat conflicts with nearly every open pull request, and we don't want a formatter rule for now. Thanks for the work on it. |
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.
What
Adopts a formatting/tooling baseline for the whole tree so style is enforced mechanically instead of by review:
.clang-format— LLVM base + deliberate deviations, all documented in the file:IndentWidth: 4(the tree is 4-space indented),ColumnLimit: 120(long shader-dump/profile lines are atomic; the tree already has 500-char lines),PointerAlignment: Left(matches the tree),SortIncludes: Never(include order is load-bearing here),FixNamespaceComments: false..editorconfig— LF, UTF-8, 4-space indent, final newline, no trailing whitespace; mirrors the hooks..pre-commit-config.yaml—pre-commit/pre-commit-hooksv6.0.0 (trailing-whitespace, end-of-file-fixer, check-yaml, check-merge-conflict, check-case-conflict, check-added-large-files, check-executables-have-shebangs, mixed-line-ending → LF) andpre-commit/mirrors-clang-formatv21.1.8. Vendored code under3rdparty/is excluded from every hook..github/workflows/pre-commit.yml— CI job that runspre-commit run --all-fileson push tomainand on pull requests, matching the existing Build workflow's checkout conventions.CONTRIBUTING.md— documentspre-commit installand the format requirement.core/—clang-format -i(21.1.8, the pinned revision). Mechanical: line-wrapping at 120 columns, brace/indent normalization, single-statement blocks. No semantic changes (the working tree before this commit was already hook-clean, so CI--all-filespasses).The reformatting commit includes
GuestMemory.cpp/ShaderMemory.cpp, which #1114 also touches — whichever merges second needs only a trivial rebase (git clang-formatcan't auto-merge formatting-only hunks, but the conflict is mechanical).Testing
pre-commit run --all-filespasses locally with the pinned revisions (provides the exact baseline CI will check).if (x) return y;→ two lines, one( "typo in a profile string).Note: CI runs on this fork PR are held by the first-time-contributor approval gate until a maintainer approves once (same as #1114).
Written with AI assistance; the config deviations and the baseline are reviewed per CONTRIBUTING.md.