mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 00:57:44 -04:00
5eeaffcde0
Removes trailing whitespace from goal_src files, eventually the formatter will do this as well but it's not ready yet so this is a decent interim solution. A competent text editor will also do this / flag it for you.
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
merge_group: {}
|
|
|
|
jobs:
|
|
formatting:
|
|
name: 📝 Formatting
|
|
runs-on: ubuntu-20.04
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
# sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main'
|
|
# sudo apt install clang-format-15
|
|
# --clang-format-executable $(which clang-format-15)
|
|
- name: Get Package Dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install clang-format
|
|
clang-format -version
|
|
|
|
- name: Check Clang-Formatting
|
|
run: |
|
|
chmod +x ./third-party/run-clang-format/run-clang-format.py
|
|
./third-party/run-clang-format/run-clang-format.py -r common decompiler game goalc test tools lsp --color always
|
|
|
|
required-checks:
|
|
name: 📝 Required Checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check for Trailing Whitespace in goal_src
|
|
run: python ./scripts/ci/lint-trailing-whitespace.py
|
|
|
|
- name: Check for Unresolved Conflicts
|
|
run: python ./scripts/gsrc/check-for-conflicts.py
|
|
|
|
- name: Check for Incorrect Asserts
|
|
run: python ./scripts/ci/check-for-asserts.py
|
|
|
|
- name: Check for Invalid Translation Characters
|
|
run: python ./scripts/ci/lint-characters.py
|
|
|
|
optional-checks:
|
|
name: 📝 Optional Checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Python Dependencies
|
|
run: pip install unidiff colorama
|
|
|
|
- name: Check for Removed goal_src/ Code
|
|
# FYI - if you run this `git diff` on windows, it creates a utf-16 LE file
|
|
run: |
|
|
git fetch origin
|
|
git diff origin/master > lint-changes.diff
|
|
python ./scripts/ci/lint-gsrc-removals.py
|