From 553e4aedb5f695e94249c9281df10ad979fd8a75 Mon Sep 17 00:00:00 2001 From: Damon Lu <59256766+WhatDamon@users.noreply.github.com> Date: Wed, 18 Feb 2026 19:56:34 +0800 Subject: [PATCH 1/5] Add more code check --- .github/workflows/check-code.yml | 26 ++++++++++++- index.html | 2 +- tests/check_i18n.py | 53 ++++++++++++++------------ tests/check_json.py | 64 ++++++++++++++++++++++++++++++++ tests/check_trailing_newline.py | 63 +++++++++++++++++++++++++++++++ 5 files changed, 183 insertions(+), 25 deletions(-) create mode 100644 tests/check_json.py create mode 100644 tests/check_trailing_newline.py diff --git a/.github/workflows/check-code.yml b/.github/workflows/check-code.yml index 1841e2b..d933b17 100644 --- a/.github/workflows/check-code.yml +++ b/.github/workflows/check-code.yml @@ -5,7 +5,7 @@ on: jobs: check-i18n: - name: Check Translation Files + name: Check i18n translations runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -15,3 +15,27 @@ jobs: python-version: "3.x" - run: python3 tests/check_i18n.py + + check-json: + name: Validate JSON files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - run: python3 tests/check_json.py + + check-trailing-newline: + name: Check trailing newlines + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - run: python3 tests/check_trailing_newline.py diff --git a/index.html b/index.html index ae2bbbc..fc938e0 100644 --- a/index.html +++ b/index.html @@ -218,4 +218,4 @@