Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Jake Goodwin | 9343842eae | |
Jake Goodwin | b83b28af84 | |
Jake Goodwin | c734ede4e6 | |
Jake Goodwin | 0a9d348710 | |
Jake Goodwin | 0723cb259b | |
Jake Goodwin | 77364c22d1 | |
Jake Goodwin | 385abf37ea |
|
@ -0,0 +1,48 @@
|
|||
# ---
|
||||
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
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PointerBindsToType: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
|
18
otto.sh
18
otto.sh
|
@ -10,6 +10,23 @@ TEMPLATE_FILES=".template_files"
|
|||
MODULE_DIR="${TEMPLATE_FILES}/modules"
|
||||
|
||||
|
||||
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=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=file $f
|
||||
done
|
||||
|
||||
echo "Applying Formating standard!"
|
||||
}
|
||||
|
||||
|
||||
add_compile_commands () {
|
||||
if [ -f ./compile_commands.json ]; then
|
||||
echo "compile_commands.json already exists!\n"
|
||||
|
@ -172,6 +189,7 @@ build_main () {
|
|||
}
|
||||
|
||||
run_c_tests () {
|
||||
format_source_code
|
||||
clear_cmake_cache
|
||||
cmake -DUNIT_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
|
||||
make AllTests && ./tests/AllTests
|
||||
|
|
|
@ -5,4 +5,3 @@ int main(int argc, char **argv)
|
|||
printf("Hello!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue