Skip to content

Commit bab0fea

Browse files
committed
KILL SWITCH ACTIVATED: emergency stop
1 parent 8d563b9 commit bab0fea

23 files changed

Lines changed: 2276 additions & 655 deletions

File tree

.clang-tidy

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: MIT
2+
# clang-tidy configuration for arbiter engine C sources.
3+
#
4+
# Run: clang-tidy -p build lib/*.c -- -I include
5+
#
6+
# Checks target safety-critical embedded C patterns:
7+
# bugprone-* — common bug patterns (use-after-move, narrowing, etc.)
8+
# cert-* — CERT C Coding Standard rules
9+
# clang-analyzer-* — Clang Static Analyzer checks
10+
# misc-* — miscellaneous (unused parameters, static asserts, etc.)
11+
# performance-* — unnecessary copies, moves, etc.
12+
# readability-identifier-naming — enforce Zephyr-style naming conventions
13+
14+
Checks: >
15+
-*,
16+
bugprone-*,
17+
cert-*,
18+
clang-analyzer-*,
19+
misc-*,
20+
performance-*,
21+
readability-identifier-naming,
22+
-bugprone-easily-swappable-parameters,
23+
-bugprone-reserved-identifier,
24+
-cert-dcl37-c,
25+
-cert-dcl51-cpp,
26+
-misc-include-cleaner,
27+
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
28+
29+
WarningsAsErrors: '*'
30+
31+
CheckOptions:
32+
# Struct/enum types: UPPER_SNAKE for ARBITER_* types
33+
- key: readability-identifier-naming.TypedefCase
34+
value: UPPER_CASE
35+
# Macros: UPPER_SNAKE
36+
- key: readability-identifier-naming.MacroDefinitionCase
37+
value: UPPER_CASE
38+
# Functions: mixed (ARBITER_* public API, snake_case internal)
39+
- key: readability-identifier-naming.FunctionCase
40+
value: aNy_CasE
41+
# Local variables: snake_case
42+
- key: readability-identifier-naming.LocalVariableCase
43+
value: lower_case
44+
# Parameters: snake_case
45+
- key: readability-identifier-naming.ParameterCase
46+
value: lower_case
47+
# Global constants: UPPER_CASE
48+
- key: readability-identifier-naming.GlobalConstantCase
49+
value: UPPER_CASE
50+
# Enum constants: UPPER_CASE
51+
- key: readability-identifier-naming.EnumConstantCase
52+
value: UPPER_CASE

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,41 @@ jobs:
3838
- name: Validate sample model
3939
run: arbiterc validate samples/battery_policy/models/battery.arb.yaml --strict
4040

41+
- name: Profile validation — compile all samples on standard profile
42+
run: |
43+
for model in samples/*/models/*.arb.yaml; do
44+
echo "--- $model ---"
45+
arbiterc compile "$model" --profile standard --out-c /dev/null --out-h /dev/null
46+
done
47+
48+
clang-tidy:
49+
name: clang-tidy Static Analysis
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Install clang-tidy
55+
run: sudo apt-get install -y --no-install-recommends clang-tidy
56+
57+
- name: Run clang-tidy on engine sources
58+
run: |
59+
clang-tidy \
60+
lib/arbiter_engine.c \
61+
lib/arbiter_eval.c \
62+
lib/arbiter_fact_store.c \
63+
lib/arbiter_trace.c \
64+
lib/arbiter_blob.c \
65+
lib/arbiter_action.c \
66+
-- \
67+
-I include \
68+
-isystem tools/clang-tidy-stubs \
69+
-std=c11 \
70+
-DCONFIG_ARBITER_LOG_LEVEL=3 \
71+
-DCONFIG_ARBITER_MAX_FACTS=64 \
72+
-DCONFIG_ARBITER_MAX_ACTIONS_PER_EVAL=16 \
73+
-DCONFIG_ARBITER_MAX_TRACE_ENTRIES=64 \
74+
-DCONFIG_ARBITER_MAX_TRACE_INPUTS=8
75+
4176
spdx:
4277
name: SPDX Header Check
4378
runs-on: ubuntu-latest

.specsmith/ledger-chain.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ a2c7514ffce939e62da66e41a99eb1daa279b22f963675ff7dd06ff6defc7367
3535
ca42124cb56eade5ea6262ac28dc68824d4333141a0a87f1be9f50efffe37617
3636
15ec9c182dac2256743599464cfa6a970b556ca5d9fa0655f079b0aa1b4b2d3d
3737
93b3525850de7bfd3e044b60b3a90ce069e1a286b5cd6044ca23e9e1d29a3eeb
38+
63c25bfd300d98352d154198e23e5ce803b53ce3c333c6a93e03586952f761ba

0 commit comments

Comments
 (0)