precommit: Add shfmt to format shell scripts

This commit is contained in:
Ole Schütt 2021-02-17 15:58:35 +01:00 committed by Ole Schütt
parent 1a5f6eddc8
commit 2e2218d9a9
4 changed files with 20 additions and 2 deletions

View file

@ -28,6 +28,12 @@ def black():
return run_tool(["black"])
# ======================================================================================
@app.route("/shfmt", methods=["POST"])
def shfmt():
return run_tool(["shfmt", "-i=2", "-ci", "-sr", "-w"])
# ======================================================================================
@app.route("/shellcheck", methods=["POST"])
def shellcheck():