-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup formatting with clang-format. (#558)
Bring in .clang-format file from zeldaret/mm. Include other clang format changes. Per review adjustments from @Kewlan and @HylianFreddy Update clang format for short enums. Update trickNameTable with custom formatting.
- Loading branch information
1 parent
0fda313
commit 152ac39
Showing
239 changed files
with
39,692 additions
and
35,135 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,28 @@ | ||
# Respectfully taken from https://github.com/zeldaret/mm/blob/master/.clang-format | ||
# This is to ensure parity between Zelda projects. | ||
IndentWidth: 4 | ||
Language: Cpp | ||
UseTab: Never | ||
ColumnLimit: 120 | ||
PointerAlignment: Left | ||
BreakBeforeBraces: Attach | ||
SpaceAfterCStyleCast: false | ||
Cpp11BracedListStyle: false | ||
IndentCaseLabels: true | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
AlignAfterOpenBracket: Align | ||
AlignOperands: true | ||
BreakBeforeTernaryOperators: true | ||
BreakBeforeBinaryOperators: None | ||
AllowShortBlocksOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: false | ||
AlignEscapedNewlines: Left | ||
AlignTrailingComments: true | ||
SortIncludes: false | ||
IndentPPDirectives: BeforeHash | ||
AlignConsecutiveAssignments: true | ||
AllowShortEnumsOnASingleLine: false |
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,35 @@ | ||
name: Code Linting On Push To Main and Development | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- development | ||
|
||
jobs: | ||
auto-formatter-on-main: | ||
name: Auto Format Code and Commit If Any Changes | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: DoozyX/[email protected] | ||
with: | ||
source: "./code ./source" | ||
extensions: 'h,cpp,c,hpp' | ||
clangFormatVersion: 14 | ||
style: file | ||
inplace: True | ||
|
||
- uses: EndBug/[email protected] | ||
with: | ||
committer_name: GitHub Actions | ||
committer_email: 41898282+github-actions[bot]@users.noreply.github.com | ||
message: | | ||
Run automatic format script as code does not match clang format rules. | ||
Developers please rebase to avoid merge conflicts! | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Oops, something went wrong.