Skip to content

Fixed defined but never used warning #49

Fixed defined but never used warning

Fixed defined but never used warning #49

Workflow file for this run

name: Lint
on: [workflow_dispatch, pull_request]
env:
TERM: xterm-256color
jobs:
clang-format:
name: Clang-Format
runs-on: ubuntu-latest
steps:
- name: Install clang-format
run: |
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-14 main'
sudo apt update
sudo apt install -y clang-format-14
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Run clang-format
run: |
output=$(git clang-format-14 --binary=clang-format-14 --diff --commit=origin/dev)
grep '^no modified files to format$' <<< "$output" && exit 0
grep '^clang-format did not modify any files$' <<< "$output" && exit 0
echo "$output"
echo -e "\033[1;31mCode style does not match clang-format"
exit 1