Skip to content

Commit bb9cdd0

Browse files
author
Luigi Cocozza
committed
[CI] Addind workflow for linting
1 parent 1611c8c commit bb9cdd0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint and Format
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
name: Code Quality Check
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y meson ninja-build pkg-config clang clang-tidy clang-format just
22+
23+
- name: Configure project
24+
run: meson setup .build
25+
26+
- name: Check code formatting
27+
run: |
28+
just format
29+
if [ -n "$(git diff --name-only)" ]; then
30+
echo "Code is not properly formatted. Please run 'just format' locally."
31+
git diff
32+
exit 1
33+
fi
34+
35+
- name: Run static analysis
36+
run: just lint

0 commit comments

Comments
 (0)