mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Meta: Invoke markdown-checker if available while linting
This commit is contained in:
parent
c06a0bae04
commit
a296f6bb8d
Notes:
sideshowbarker
2024-07-18 02:50:07 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/a296f6bb8d9 Pull-request: https://github.com/SerenityOS/serenity/pull/10420 Reviewed-by: https://github.com/petelliott ✅
2 changed files with 22 additions and 0 deletions
21
Meta/check-markdown.sh
Executable file
21
Meta/check-markdown.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||||
|
cd "${script_path}/.."
|
||||||
|
|
||||||
|
if [ -z "${CHECK_MARKDOWN_BINARY:-}" ] ; then
|
||||||
|
if ! [ -d Build/lagom/ ] ; then
|
||||||
|
echo "Directory Build/lagom/ does not exist. Skipping markdown check."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! [ -r Build/lagom/markdown-check ] ; then
|
||||||
|
echo "Lagom executable markdown-check was not built. Skipping markdown check."
|
||||||
|
echo "To enable this check, you may need to run './Meta/serenity.sh build lagom' first."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
CHECK_MARKDOWN_BINARY="Build/lagom/markdown-check"
|
||||||
|
fi
|
||||||
|
|
||||||
|
find AK Base Documentation Kernel Meta Ports Tests Userland -path 'Ports/*/*' -prune -o -type f -name '*.md' -print0 | xargs -0 "${CHECK_MARKDOWN_BINARY}" README.md
|
|
@ -22,6 +22,7 @@ set +e
|
||||||
for cmd in \
|
for cmd in \
|
||||||
Meta/check-ak-test-files.sh \
|
Meta/check-ak-test-files.sh \
|
||||||
Meta/check-debug-flags.sh \
|
Meta/check-debug-flags.sh \
|
||||||
|
Meta/check-markdown.sh \
|
||||||
Meta/check-newlines-at-eof.py \
|
Meta/check-newlines-at-eof.py \
|
||||||
Meta/check-style.sh \
|
Meta/check-style.sh \
|
||||||
Meta/lint-executable-resources.sh \
|
Meta/lint-executable-resources.sh \
|
||||||
|
|
Loading…
Reference in a new issue