fixed cli flags

The style flag/option needed to be changed. Also removed problamatic line from config.
This commit is contained in:
Jake Goodwin 2024-08-04 09:27:15 -07:00
parent 0a9d348710
commit c734ede4e6
2 changed files with 41 additions and 5 deletions

View File

@ -1,5 +1,40 @@
BasedOnStyle: None
# ---
Language: Cpp
# The Based on style flag causes nothing to work.
#BasedOnStyle: None
AlignTrailingComments: true
AlignArrayOfStructures: Left
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: true
AcrossComments: false
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: true
AcrossComments: false
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: true
AcrossComments: false
AlignConsecutiveShortCaseStatements:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCaseColons: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Allman
ColumnLimit: 0
IndentWidth: 4
@ -9,4 +44,5 @@ ObjCSpaceBeforeProtocolList: true
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
TabWidth: 8
UseTab: Neve
UseTab: Never

View File

@ -19,13 +19,13 @@ format_source_code () {
#Get a list of all C files
source_c_files=$(find ./src -name '*.c')
for f in $source_c_files; do
clang-format -i -style=.clang-format $f
clang-format -i -style=file $f
done
#Get a list of all H files
source_h_files=$(find ./src -name '*.h')
for f in $source_h_files; do
clang-format -i -style=.clang-format $f
clang-format -i -style=file $f
done
echo "Applying Formating standard!"
@ -194,8 +194,8 @@ build_main () {
}
run_c_tests () {
clear_cmake_cache
format_source_code
clear_cmake_cache
cmake -DUNIT_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
make AllTests && ./tests/AllTests
}