pretty-code

This commit is contained in:
Gwenhael Le Moine 2024-09-19 15:22:04 +02:00
parent 65cab00068
commit 69b807fe36
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
4 changed files with 66 additions and 2 deletions

View file

@ -132,7 +132,8 @@ clean-all: mrproper
# Formatting
pretty-code:
clang-format -i src/*.c src/*.h libChf/*.c libChf/*.h
clang-format -i src/*.c src/*.h
make -C libChf pretty-code
# Dependencies
get-roms:

59
libChf/.clang-format Normal file
View file

@ -0,0 +1,59 @@
---
Language: Cpp
ColumnLimit: 140
IndentWidth: 4
PPIndentWidth: 2
UseTab: Never
AlignArrayOfStructures: Left
IndentCaseBlocks: true
IndentCaseLabels: true
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: true
InsertBraces: false
InsertNewlineAtEOF: true
MaxEmptyLinesToKeep: 1
PointerAlignment: Left
ReferenceAlignment: Left
QualifierAlignment: Left
SortIncludes: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesInAngles: true
SpacesInCStyleCastParentheses: true
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
...

View file

@ -48,3 +48,7 @@ mrproper: clean
$(TARGET): $(OBJS)
$(AR) $(ARFLAGS) $@ $?
# Formatting
pretty-code:
clang-format -i src/*.c src/*.h