forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-hooks.yaml
More file actions
40 lines (36 loc) · 1.08 KB
/
.pre-commit-hooks.yaml
File metadata and controls
40 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# QGroundControl Custom Pre-commit Hooks
# These hooks are loaded by .pre-commit-config.yaml via "repo: ."
#
# To use in another repo:
# - repo: https://github.com/mavlink/qgroundcontrol
# rev: master
# hooks:
# - id: qmllint
- id: qmllint
name: Lint QML files
entry: ./tools/analyze.sh --tool qmllint
language: system
files: \.qml$
exclude: ^build/
pass_filenames: false
- id: clazy
name: Qt static analysis (clazy)
entry: ./tools/analyze.sh --tool clazy
language: system
types: [c++]
exclude: ^(build/|libs/|test/)
pass_filenames: false
- id: check-no-qassert
name: Check for Q_ASSERT in production code
entry: bash -c 'if grep -n "Q_ASSERT" "$@" 2>/dev/null; then echo "::warning::Q_ASSERT found. Consider defensive checks with early returns instead." >&2; fi; exit 0' --
language: system
types: [c++]
exclude: ^test/
pass_filenames: true
- id: vehicle-null-check
name: Check vehicle null safety
entry: python3 tools/analyzers/vehicle_null_check.py
language: system
types: [c++]
exclude: ^(build/|libs/|test/)
pass_filenames: true