Add linter + clang-format

This commit is contained in:
2024-08-29 14:58:33 +02:00
parent 77feda0c0f
commit 6c6a60e980
2 changed files with 24 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
---
BasedOnStyle: Microsoft
AlignAfterOpenBracket: Align
ConstructorInitializerIndentWidth: '4'
ContinuationIndentWidth: '4'
TabWidth: '4'
UseTab: Never
...
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
if (( $# < 1 )); then
>&2 echo "Illegal number of parameters"
exit 1
fi
# save unsaved work
git stash --include-untracked
clang-format -i "$@"
git add -A && git commit -m "Lint"
git stash pop