lint: Add .bash extension for tools/lib/git-tools.bash.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-06-24 18:49:14 -07:00
committed by Tim Abbott
parent 678526881b
commit d428c0e0dd
2 changed files with 25 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
# See git.git commit 92c62a3f4 (from 2010!); as of 2020 with Git 2.26, # See git.git commit 92c62a3f4 (from 2010!); as of 2020 with Git 2.26,
# this function has only needed one edit since then, adding localization # this function has only needed one edit since then, adding localization
# with gettext, which we can omit. # with gettext, which we can omit.
require_clean_work_tree () { require_clean_work_tree() {
local action="$1" local action="$1"
git rev-parse --verify HEAD >/dev/null || exit 1 git rev-parse --verify HEAD >/dev/null || exit 1

View File

@@ -45,8 +45,28 @@ def run() -> None:
by_lang = linter_config.list_files( by_lang = linter_config.list_files(
groups={ groups={
"backend": ["py", "sh", "pp", "json", "md", "txt", "text", "yaml", "rst", "yml"], "backend": [
"frontend": ["js", "ts", "flow", "css", "hbs", "html", "lock"], "bash",
"json",
"md",
"pp",
"py",
"rst",
"sh",
"text",
"txt",
"yaml",
"yml",
],
"frontend": [
"css",
"flow",
"hbs",
"html",
"js",
"lock",
"ts",
],
}, },
exclude=EXCLUDED_FILES, exclude=EXCLUDED_FILES,
) )
@@ -95,13 +115,13 @@ def run() -> None:
linter_config.external_linter( linter_config.external_linter(
"shellcheck", "shellcheck",
["shellcheck", "-x", "-P", "SCRIPTDIR"], ["shellcheck", "-x", "-P", "SCRIPTDIR"],
["sh"], ["bash", "sh"],
description="Standard shell script linter", description="Standard shell script linter",
) )
linter_config.external_linter( linter_config.external_linter(
"shfmt", "shfmt",
["shfmt"], ["shfmt"],
["sh"], ["bash", "sh"],
check_arg="-d", check_arg="-d",
fix_arg="-w", fix_arg="-w",
description="Formats shell scripts", description="Formats shell scripts",