Skip to content

Docs

Docs #60

Workflow file for this run

name: linter
on:
push:
branches:
- main
pull_request:
jobs:
linter-formatter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install clang-format
run: sudo apt update && sudo apt install -y clang-format
- name: Run clang-format
run: cd src && find . \( -name "*.c" -o -name "*.h" \) -exec clang-format -i {} \;
linter-aggressive_flags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install LLVM 21
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
sudo apt install -y clang-21 python3-dev
- name: Build liburing
run: cd requirements/liburing && make
- name: Build with aggressive flags
run: |
CC=clang-21 CFLAGS="-O0 -g3 \
-Wall \
-Wextra \
-Werror \
-Wshadow \
-Wconversion \
-Wcast-align \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wpointer-arith \
-Wformat=2 \
-Wundef \
-Wwrite-strings \
-Wswitch-enum \
-Wunreachable-code \
-Wdouble-promotion \
-Wfloat-equal \
-fstack-protector-strong \
-fno-omit-frame-pointer \
-isystem requirements/liburing/include \
-isystem requirements/liburing/src/include \
-isystem requirements/liburing/src \
-isystem requirements/liburing" \
python3 setup.py build_ext --inplace
linter-cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install cppcheck
run: sudo apt update && sudo apt install -y cppcheck
- name: Run cppcheck
run: |
mkdir -p cpp-check-results
cppcheck \
--cppcheck-build-dir=cpp-check-results \
--enable=all \
--inconclusive \
--force \
--inline-suppr \
--check-level=exhaustive \
--suppress=missingIncludeSystem \
--suppress=missingInclude \
-I ./src ./src