mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-30 09:58:00 +02:00
* fix some formatter and linter issues * make clang-tidy/clang-format fail with error status and output in github error format * docs, add kmscon thing * and some CI stuff
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Check
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
spellcheck:
|
|
name: Grammar
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
|
with:
|
|
packages: "codespell"
|
|
version: 1.0
|
|
- run: codespell
|
|
|
|
shellcheck:
|
|
name: Shellcheck
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
|
with:
|
|
packages: "shellcheck"
|
|
version: 1.0
|
|
- run: find . -type f -name '*.sh' -not -path './assets/pkg/aur/*/src/*' | xargs shellcheck
|
|
|
|
clangcheck:
|
|
name: Clang
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ubuntu:25.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: apt -y update && apt install -y clang-format clang-tidy make gcc git bear libpam0g-dev
|
|
|
|
- run: bear -- make
|
|
- run: clang-format -version && clang-format -dump-config
|
|
- run: |
|
|
set -euo pipefail
|
|
clang-format -ni src/*.c include/*.h -Werror 2>&1 | \
|
|
sed -E 's/^([^ ]+\.[ch]):([0-9]+):([0-9]+): ([a-z]+): (.*)$/::\4 file=\1,line=\2,col=\3::\5/'
|
|
- run: clang-tidy -version && clang-tidy -dump-config
|
|
- run: |
|
|
set -euo pipefail
|
|
clang-tidy -p . src/*.c include/*.h -warnings-as-errors=\* 2>&1 1>/dev/null |
|
|
sed -E 's/^([^ ]+\.[ch]):([0-9]+):([0-9]+): ([a-z]+): (.*)$/::\4 file=\1,line=\2,col=\3::\5/'
|