mirror of
https://github.com/mas-cli/mas
synced 2025-02-16 12:38:30 +00:00
🔨 Include YAML in lint, format scripts
This commit is contained in:
parent
08697a84cd
commit
7415f738d0
2 changed files with 18 additions and 19 deletions
|
@ -13,18 +13,13 @@
|
|||
|
||||
echo "==> 🚨 Formatting mas"
|
||||
|
||||
for LINTER in markdownlint shfmt swiftformat swiftlint; do
|
||||
for LINTER in markdownlint prettier shfmt swiftformat swiftlint yamllint; do
|
||||
if [[ ! -x "$(command -v ${LINTER})" ]]; then
|
||||
echo "error: ${LINTER} is not installed. Run 'script/bootstrap' or 'brew install ${LINTER}'."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
echo "--> 🖊 Markdown"
|
||||
markdownlint --config .markdownlint.json --fix .github .
|
||||
|
||||
echo
|
||||
echo "--> 🕊️ Swift"
|
||||
for SOURCE in Package.swift Sources Tests; do
|
||||
swiftformat ${SOURCE}
|
||||
|
@ -32,8 +27,12 @@ for SOURCE in Package.swift Sources Tests; do
|
|||
swiftlint lint --fix --strict ${SOURCE}
|
||||
done
|
||||
|
||||
echo
|
||||
echo "--> 〽️ Markdown"
|
||||
markdownlint --config .markdownlint.json --fix .github .
|
||||
|
||||
echo "--> 🖊 YAML"
|
||||
# shellcheck disable=SC2046
|
||||
prettier --write $(yamllint --list-files .)
|
||||
|
||||
echo "--> 📜 Bash"
|
||||
shfmt -i 2 -l -w contrib/ script/
|
||||
|
||||
script/lint
|
||||
|
|
20
script/lint
20
script/lint
|
@ -12,21 +12,13 @@
|
|||
|
||||
echo "==> 🚨 Linting mas"
|
||||
|
||||
for LINTER in git markdownlint periphery shfmt swiftformat swiftlint; do
|
||||
for LINTER in git markdownlint periphery shfmt swiftformat swiftlint yamllint; do
|
||||
if [[ ! -x "$(command -v ${LINTER})" ]]; then
|
||||
echo "error: ${LINTER} is not installed. Run 'script/bootstrap' or 'brew install ${LINTER}'."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "--> 🌳 Git"
|
||||
git diff --check
|
||||
|
||||
echo
|
||||
echo "--> 🖊 Markdown"
|
||||
markdownlint --config .markdownlint.json .github .
|
||||
|
||||
echo
|
||||
echo "--> 🕊️ Swift"
|
||||
for SOURCE in Package.swift Sources Tests; do
|
||||
swiftformat --lint ${SOURCE}
|
||||
|
@ -35,7 +27,15 @@ for SOURCE in Package.swift Sources Tests; do
|
|||
done
|
||||
periphery scan
|
||||
|
||||
echo
|
||||
echo "--> 🌳 Git"
|
||||
git diff --check
|
||||
|
||||
echo "--> 〽️ Markdown"
|
||||
markdownlint --config .markdownlint.json .github .
|
||||
|
||||
echo "--> 🖊 YAML"
|
||||
yamllint .
|
||||
|
||||
echo "--> 📜 Bash"
|
||||
shellcheck --shell=bash script/*
|
||||
shfmt -d -i 2 -l contrib/ script/
|
||||
|
|
Loading…
Add table
Reference in a new issue