diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000000000000000000000000000000000..827c89b435020ccdca9a15eb06a972ac5947c742 --- /dev/null +++ b/.clang-format @@ -0,0 +1,13 @@ +{ + BasedOnStyle: Google, + AccessModifierOffset: -4, + AlignConsecutiveAssignments: true, + AllowShortIfStatementsOnASingleLine: false, + AllowShortLoopsOnASingleLine: false, + BreakBeforeBraces: Allman, + ColumnLimit: 80, + ConstructorInitializerAllOnOneLineOrOnePerLine: false, + IndentCaseLabels: true, + IndentWidth: 4, + KeepEmptyLinesAtTheStartOfBlocks: true, +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f9089f616d635b20d0d7eeb6be97ecc0a5bb3a3f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://gitlab.com/daverona/pre-commit/cpp + rev: 0.8.0 + hooks: + - id: cppcheck + args: [ + --quiet, + --language=c++, + --enable=all, + --inline-suppr, + --suppress=unmatchedSuppression, + --suppress=unusedFunction, + --suppress=missingInclude, + --suppress=noExplicitConstructor + ] + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v13.0.0 + hooks: + - id: clang-format + args: [ + -style=file, + --dry-run, + --Werror + ] diff --git a/README.md b/README.md index 9f39cc1cb47c3e89758f0ee907ef0e7e8781571a..6abc0c73a95d90068401db19ea8e401070aaf406 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Miosix Host -API emulation layer of the Miosix embedded real-time operating system compatible with the host system. \ No newline at end of file +API emulation layer of the Miosix embedded real-time operating system compatible with the host system.