Add a github action and config file for running CMake-format (#6849)

* Add a github action and config file for running CMake-format
This commit is contained in:
Gaute Lindkvist
2020-10-30 11:51:13 +01:00
committed by GitHub
parent 514cca5f95
commit 3cd3b319d4
2 changed files with 48 additions and 0 deletions

20
cmake/cmake-format.py Normal file
View File

@@ -0,0 +1,20 @@
# -----------------------------
# Options effecting formatting.
# See: https://github.com/cheshirekow/cmake_format
# -----------------------------
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 = False