Skip to content

Reformat files

Reformat files #1352

Workflow file for this run

name: Lint Check
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
clang-format-checking:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: JCWasmx86/clang-format-github-action@58b126116eef00bd99f9a41fdac8936b1d27ef6e # master
with:
sources: "src/**/*.hpp,src/**/*.cpp,test/**/*.cpp"
rome:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lint using rome
run: |
sudo apt install -y make
wget https://github.com/rome/tools/releases/download/cli%2Fv12.1.2/rome-linux-x64
chmod +x rome-linux-x64
./rome-linux-x64 check Benchmarks/script.js
sudo cp rome-linux-x64 /usr/bin/rome
cd Benchmarks
make format
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git commit -a -m "Failed" || exit 0
git diff HEAD~1 | cat
exit 1
pylint:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lint using pylint
run: |
pip install pylint
pylint scripts/collect_perf_data.py
shellcheck:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lint using shellcheck
run: |
sudo apt install -y xz-utils tar
wget https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz
tar xvf shellcheck-v0.9.0.linux.x86_64.tar.xz
./shellcheck-v0.9.0/shellcheck -x scripts/*.sh Benchmarks/*.sh
shfmt:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Lint using shfmt
run: |
wget https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_amd64
chmod +x ./shfmt_v3.7.0_linux_amd64
./shfmt_v3.7.0_linux_amd64 -w -i 0 scripts/*.sh Benchmarks/*.sh
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git commit -a -m "Failed" || exit 0
git diff HEAD~1 | cat
exit 1