Meta: Move linter helpers to a subdirectory

Continuing some organization of the Meta directory. lint-ci.sh and
lint-commits.sh are left alone as "top-level" linters.
This commit is contained in:
Timothy Flynn
2026-04-22 18:04:11 -04:00
committed by Tim Flynn
parent 5c34c7f554
commit 3f73528cad
Notes: github-actions[bot] 2026-04-23 11:32:40 +00:00
15 changed files with 28 additions and 28 deletions

View File

@@ -168,11 +168,11 @@ if (ENABLE_GUI_TARGETS)
endif()
add_custom_target(lint-shell-scripts
COMMAND "${ladybird_SOURCE_DIR}/Meta/lint-shell-scripts.sh"
COMMAND "${ladybird_SOURCE_DIR}/Meta/Linters/lint_shell_scripts.sh"
USES_TERMINAL
)
add_custom_target(check-style
COMMAND ${Python3_EXECUTABLE} "${ladybird_SOURCE_DIR}/Meta/check-style.py"
COMMAND ${Python3_EXECUTABLE} "${ladybird_SOURCE_DIR}/Meta/Linters/check_style.py"
USES_TERMINAL
)

View File

@@ -4,7 +4,7 @@ For low-level styling (spaces, parentheses, brace placement, etc), all code shou
**Important: Make sure you use the correct version of `clang-format`!**
See [lint-clang-format.py](../Meta/lint-clang-format.py) for the version enforced in CI.
See [lint_clang_format.py](../Meta/Linters/lint_clang_format.py) for the version enforced in CI.
See [AdvancedBuildInstructions.md](AdvancedBuildInstructions.md#clang-format-updates) for instructions on how to get an
up-to-date version if your OS distribution does not ship the correct version.

View File

@@ -3,7 +3,7 @@
set -eo pipefail
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "${script_path}/.."
cd "${script_path}/../.." || exit 1
MISSING_FLAGS=n

View File

@@ -52,5 +52,5 @@ def run():
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__) + "/..")
os.chdir(os.path.dirname(__file__) + "/../..")
run()

View File

@@ -99,5 +99,5 @@ def run():
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__) + "/..")
os.chdir(os.path.dirname(__file__) + "/../..")
run()

View File

@@ -68,5 +68,5 @@ def run():
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__) + "/..")
os.chdir(os.path.dirname(__file__) + "/../..")
run()

View File

@@ -6,7 +6,7 @@ set -eo pipefail
: "${MINIMUM_OPTIMIZATION_BYTES:=1024}"
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "${script_path}/.."
cd "${script_path}/../.." || exit 1
if ! command -v optipng >/dev/null ; then
if [[ "$GITHUB_ACTIONS" == "true" ]]; then

View File

@@ -203,5 +203,5 @@ def run():
if __name__ == "__main__":
os.chdir(os.path.dirname(__file__) + "/..")
os.chdir(os.path.dirname(__file__) + "/../..")
run()

View File

@@ -13,7 +13,7 @@ from pathlib import Path
from typing import List
from typing import Optional
sys.path.append(str(Path(__file__).resolve().parent.parent))
sys.path.append(str(Path(__file__).resolve().parent.parent.parent))
from Meta.host_platform import HostSystem
from Meta.host_platform import Platform

View File

@@ -3,7 +3,7 @@
set -eo pipefail
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."
cd "${script_path}/../.." || exit 1
if [ "$(uname -s)" = "Darwin" ]; then
# MacOS's find does not support '-executable' OR '-perm /mode'.

View File

@@ -3,7 +3,7 @@
set -e
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "${script_path}/.." || exit 1
cd "${script_path}/../.." || exit 1
if [ "$#" -eq "0" ]; then
files=()

View File

@@ -3,7 +3,7 @@
set -e
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "${script_path}/.." || exit 1
cd "${script_path}/../.." || exit 1
overwrite=0

View File

@@ -3,7 +3,7 @@
set -eo pipefail
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd "$script_path/.."
cd "${script_path}/../.." || exit 1
if [ "$#" -eq "0" ]; then
files=()

View File

@@ -14,17 +14,17 @@ FAILURES=0
set +e
for cmd in \
Meta/check-debug-flags.sh \
Meta/check-flatpak.py \
Meta/check-html-doctype.py \
Meta/check-idl-files.py \
Meta/check-newlines-at-eof.py \
Meta/check-png-sizes.sh \
Meta/check-style.py \
Meta/lint-executable-resources.sh \
Meta/lint-prettier.sh \
Meta/lint-python.sh \
Meta/lint-shell-scripts.sh; do
Meta/Linters/check_debug_flags.sh \
Meta/Linters/check_flatpak.py \
Meta/Linters/check_html_doctype.py \
Meta/Linters/check_idl_files.py \
Meta/Linters/check_newlines_at_eof.py \
Meta/Linters/check_png_sizes.sh \
Meta/Linters/check_style.py \
Meta/Linters/lint_executable_resources.sh \
Meta/Linters/lint_prettier.sh \
Meta/Linters/lint_python.sh \
Meta/Linters/lint_shell_scripts.sh; do
if "${cmd}" "$@"; then
echo -e "[${GREEN}OK${NC}]: ${cmd}"
else
@@ -44,10 +44,10 @@ else
echo -e "[${GREEN}SKIP${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)"
fi
if Meta/lint-clang-format.py --overwrite-inplace "$@" && git diff --exit-code -- ':*.cpp' ':*.h' ':*.mm'; then
echo -e "[${GREEN}OK${NC}]: Meta/lint-clang-format.py"
if Meta/Linters/lint_clang_format.py --overwrite-inplace "$@" && git diff --exit-code -- ':*.cpp' ':*.h' ':*.mm'; then
echo -e "[${GREEN}OK${NC}]: Meta/Linters/lint_clang_format.py"
else
echo -e "[${BOLD_RED}FAIL${NC}]: Meta/lint-clang-format.py"
echo -e "[${BOLD_RED}FAIL${NC}]: Meta/Linters/lint_clang_format.py"
((FAILURES+=1))
fi