mirror of https://github.com/zulip/zulip.git
lint: Add .bash extension for tools/lib/git-tools.bash.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
678526881b
commit
d428c0e0dd
|
@ -5,7 +5,7 @@
|
|||
# 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
|
||||
# with gettext, which we can omit.
|
||||
require_clean_work_tree () {
|
||||
require_clean_work_tree() {
|
||||
local action="$1"
|
||||
|
||||
git rev-parse --verify HEAD >/dev/null || exit 1
|
||||
|
|
28
tools/lint
28
tools/lint
|
@ -45,8 +45,28 @@ def run() -> None:
|
|||
|
||||
by_lang = linter_config.list_files(
|
||||
groups={
|
||||
"backend": ["py", "sh", "pp", "json", "md", "txt", "text", "yaml", "rst", "yml"],
|
||||
"frontend": ["js", "ts", "flow", "css", "hbs", "html", "lock"],
|
||||
"backend": [
|
||||
"bash",
|
||||
"json",
|
||||
"md",
|
||||
"pp",
|
||||
"py",
|
||||
"rst",
|
||||
"sh",
|
||||
"text",
|
||||
"txt",
|
||||
"yaml",
|
||||
"yml",
|
||||
],
|
||||
"frontend": [
|
||||
"css",
|
||||
"flow",
|
||||
"hbs",
|
||||
"html",
|
||||
"js",
|
||||
"lock",
|
||||
"ts",
|
||||
],
|
||||
},
|
||||
exclude=EXCLUDED_FILES,
|
||||
)
|
||||
|
@ -95,13 +115,13 @@ def run() -> None:
|
|||
linter_config.external_linter(
|
||||
"shellcheck",
|
||||
["shellcheck", "-x", "-P", "SCRIPTDIR"],
|
||||
["sh"],
|
||||
["bash", "sh"],
|
||||
description="Standard shell script linter",
|
||||
)
|
||||
linter_config.external_linter(
|
||||
"shfmt",
|
||||
["shfmt"],
|
||||
["sh"],
|
||||
["bash", "sh"],
|
||||
check_arg="-d",
|
||||
fix_arg="-w",
|
||||
description="Formats shell scripts",
|
||||
|
|
Loading…
Reference in New Issue