precommit: Add cmake-format

This commit is contained in:
Ole Schütt 2021-11-29 18:50:59 +01:00 committed by Ole Schütt
parent 101ec7dbd9
commit 3120b66bfc
3 changed files with 12 additions and 0 deletions

View file

@ -52,6 +52,12 @@ def clangformat():
return run_tool(["clang-format", "--style=llvm", "-i"])
# ======================================================================================
@app.route("/cmakeformat", methods=["POST"])
def cmakeformat():
return run_tool(["cmake-format", "-i"])
# ======================================================================================
def run_tool(cmd, timeout=30):
assert len(request.files) == 1