From f8c01e7fb379971b42a6dca809a67cfa8d151009 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 30 Jan 2020 22:37:31 +0000 Subject: [PATCH] lint:pre-commit shfmt hook --- .pre-commit-config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1cc91e222..bbd114d08 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,3 +9,14 @@ repos: hooks: - id: flake8 language_version: python3 +- repo: https://github.com/casperdcl/sh + rev: master + hooks: + - id: shfmt + language: golang + args: + - -l # list files whose formatting differs from shfmt's + - -d # error with a diff when the formatting differs + - -i # indentation + - '2' # 2 spaces + - -ci # switch cases will be indented