diff --git a/.github/workflows/.clang-format b/.github/workflows/.clang-format new file mode 100644 index 00000000..b8cef3e9 --- /dev/null +++ b/.github/workflows/.clang-format @@ -0,0 +1,9 @@ +# Documentation about the style options and their meaning +# https://releases.llvm.org/12.0.0/tools/clang/docs/ClangFormatStyleOptions.html + +Language: Cpp +AccessModifierOffset: 0 +AlignConsecutiveMacros: true +BreakBeforeBraces: Linux +ColumnLimit: 150 +ConstructorInitializerIndentWidth: 2 diff --git a/.github/workflows/.cmake-format.py b/.github/workflows/.cmake-format.py new file mode 100644 index 00000000..2fb7cd4b --- /dev/null +++ b/.github/workflows/.cmake-format.py @@ -0,0 +1,19 @@ +# -*- Python -*- + +with section("format"): + + # How wide to allow formatted cmake files + line_width = 80 + + # How many spaces to tab for indent + tab_size = 2 + + # If true, separate flow control names from their parentheses with a space + separate_ctrl_name_with_space = False + + # If true, separate function names from parentheses with a space + separate_fn_name_with_space = False + + # If a statement is wrapped to more than one line, than dangle the closing + # parenthesis on its own line. + dangle_parens = True