-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: add clang-format and reformat managarm sysdeps
- Loading branch information
Showing
31 changed files
with
3,297 additions
and
3,059 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
Language: Cpp | ||
|
||
ColumnLimit: 100 | ||
IndentWidth: 4 | ||
TabWidth: 4 | ||
UseTab: ForIndentation | ||
|
||
ContinuationIndentWidth: 4 | ||
ConstructorInitializerIndentWidth: 0 | ||
IndentCaseLabels: true | ||
# Do not indent "public", "private", etc. | ||
AccessModifierOffset: -4 | ||
|
||
AlignAfterOpenBracket: BlockIndent | ||
|
||
# Put template<> on its own line. | ||
BreakTemplateDeclarations: Yes | ||
# Put long return types on their own line. | ||
BreakAfterReturnType: Automatic | ||
# Put binary operators at the start of the line. | ||
BreakBeforeBinaryOperators: NonAssignment | ||
|
||
# Put all initializers onto their own lines. | ||
PackConstructorInitializers: CurrentLine | ||
|
||
# Put all function arguments on their own lines. | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
|
||
# Format braces as {1, 2, 3}, not as { 1, 2, 3 }. | ||
Cpp11BracedListStyle: true | ||
|
||
# Force \n at EOF. | ||
InsertNewlineAtEOF: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: pre-commit | ||
|
||
on: [merge_group, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Check .clang-format is up to date | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: 'managarm/common-config' | ||
path: common-config | ||
- run: 'cmp .clang-format common-config/.clang-format' | ||
name: 'Check .clang-format is up to date' | ||
|
||
# Check formatting | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/pocc/pre-commit-hooks | ||
rev: 336fdd7c3cab698ead0b1c95157b9e74d3906b62 | ||
hooks: | ||
- id: clang-format | ||
additional_dependencies: [clang-format==19.1.3] | ||
args: ["-i"] | ||
exclude: > | ||
(?x)^( | ||
options/ansi/musl-generic-math/.*| | ||
options/ansi/generic/complex/.*| | ||
options/posix/musl-generic-regex/.* | ||
) | ||
# Only enable on Managarm sysdeps for now. | ||
files: | ||
sysdeps/managarm/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
DisableFormat: true |
This file contains 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
Oops, something went wrong.