diff --git a/.clang-format b/.clang-format index 0bfe8f9a7..169bc05f2 100644 --- a/.clang-format +++ b/.clang-format @@ -23,7 +23,7 @@ AlignConsecutiveDeclarations: AlignCompound: false PadOperators: false AlignConsecutiveMacros: - Enabled: false + Enabled: true AcrossEmptyLines: false AcrossComments: false AlignCompound: false @@ -35,11 +35,11 @@ AlignTrailingComments: OverEmptyLines: 0 AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: Never -AllowShortCaseLabelsOnASingleLine: false +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Never +AllowShortIfStatementsOnASingleLine: WithoutElse AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None @@ -81,7 +81,7 @@ BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeColon BreakInheritanceList: BeforeColon BreakStringLiterals: true -ColumnLimit: 80 +ColumnLimit: 0 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerIndentWidth: 4 @@ -170,7 +170,7 @@ RequiresClausePosition: OwnLine RequiresExpressionIndentation: OuterScope SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 -SortIncludes: CaseSensitive +SortIncludes: false SortJavaStaticImport: Before SortUsingDeclarations: LexicographicNumeric SpaceAfterCStyleCast: false @@ -182,7 +182,7 @@ SpaceBeforeCaseColon: false SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatements +SpaceBeforeParens: Never SpaceBeforeParensOptions: AfterControlStatements: true AfterForeachMacros: true diff --git a/format.sh b/format.sh index 7c42ce63b..68ee7a2a6 100755 --- a/format.sh +++ b/format.sh @@ -4,4 +4,4 @@ # This is a script as to not accidentally format vendored files. # Every new file belonging to our code should be included into this one for formatting purposes. -clang-format -i src/main.c src/gb.h src/gba.h src/arm7.h src/gba_bios.h src/ios_support.h src/lcd_shaders.h src/localization.c src/localization.h src/nds.h src/nds_rom_database.h +clang-format -i src/main.c src/gb.h src/gba.h src/arm7.h src/ios_support.h src/localization.c src/localization.h src/nds.h