feat(i18n): full English translation of demo-epb
Validate / build-test (macos-latest) (push) Failing after 3s
Validate / build-test (windows-latest) (push) Failing after 15s
Validate / build-test (ubuntu-latest) (push) Successful in 17s
Validate / reports (push) Successful in 50s
Release / release (push) Successful in 50s
Validate / build-test (macos-latest) (push) Failing after 3s
Validate / build-test (windows-latest) (push) Failing after 15s
Validate / build-test (ubuntu-latest) (push) Successful in 17s
Validate / reports (push) Successful in 50s
Release / release (push) Successful in 50s
Phase 2 of the English translation: Word documents (filled, EPB-specific): - 8 plans (PID, PM, QA, SWE, Test, Project Manual, CM, RM) - 6 safety docs (HARA, Safety Case, FMEDA, MISRA Compliance, Verification Report, Tool Qualification Cppcheck) - 2 manuals (User, Service) - 3 audit artefacts (Review minutes, NC-001, MISRA-REC-001) - All regenerated via pandoc from English markdown sources Code, tests, headers: - All file headers, struct comments, function docstrings in English - All test names (TEST_BEGIN strings) translated - Inline comments translated - 46 tests still green after translation CI workflows: - All step names in English - Step descriptions, comments, release notes template in English README.md fully rewritten in English with proper guided tour. Phase 3 (still pending): dev-process repo templates + toolstack/setup docs.
This commit is contained in:
@@ -1,52 +1,48 @@
|
||||
---
|
||||
record-id: MISRA-REC-001
|
||||
projekt: demo-epb
|
||||
datum: 2026-05-11
|
||||
project: demo-epb
|
||||
date: 2026-05-11
|
||||
status: Approved
|
||||
---
|
||||
|
||||
# MISRA Deviation Record MISRA-REC-001
|
||||
|
||||
| Feld | Wert |
|
||||
| Field | Value |
|
||||
|-------------------|---------------------------------------------|
|
||||
| Record-ID | MISRA-REC-001 |
|
||||
| Datum | 2026-05-11 |
|
||||
| Datei | `src/apply_controller.c` |
|
||||
| Funktion | `apply_ctrl_step_50ms` |
|
||||
| Zeile | 64 |
|
||||
| Record ID | MISRA-REC-001 |
|
||||
| Date | 2026-05-11 |
|
||||
| File | `src/apply_controller.c` |
|
||||
| Function | `apply_ctrl_step_50ms` |
|
||||
| Line | 64 |
|
||||
| Standard | MISRA C:2012 |
|
||||
| Regel | Rule 15.5 (Advisory) — "A function should have a single point of exit" |
|
||||
| Rule | Rule 15.5 (Advisory) — "A function should have a single point of exit" |
|
||||
| ASIL | D |
|
||||
| Status | Approved |
|
||||
|
||||
---
|
||||
|
||||
## 1. Code-Ausschnitt
|
||||
## 1. Code excerpt
|
||||
|
||||
```c
|
||||
void apply_ctrl_step_50ms(const ApplyInputs* in)
|
||||
{
|
||||
if (in == NULL) {
|
||||
s_ctx.last_error = EPB_EINVAL;
|
||||
return; /* <-- frueher Exit */
|
||||
return; /* <-- early exit */
|
||||
}
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## 2. Begruendung
|
||||
## 2. Rationale
|
||||
|
||||
NULL-Pointer-Check als frueher Exit-Punkt verbessert die Lesbarkeit deutlich
|
||||
gegenueber einer geschachtelten Variante mit einem einzigen `return` am Ende.
|
||||
MISRA Rule 15.5 ist **Advisory**, nicht **Required**.
|
||||
The NULL pointer check as an early exit significantly improves readability versus a nested variant with a single `return` at the end. MISRA Rule 15.5 is **Advisory**, not **Required**.
|
||||
|
||||
Der frueh-Exit hat eine klar definierte Semantik (Input-Validierung) und
|
||||
beeintraechtigt nicht die Verifizierbarkeit; im Gegenteil, der separate
|
||||
Pfad ist im Unit-Test `test_null_input` eindeutig abgedeckt.
|
||||
The early exit has clearly defined semantics (input validation) and does not impair verifiability; on the contrary, the separate path is unambiguously covered in the unit test `test_null_input`.
|
||||
|
||||
## 3. Alternative geprueft
|
||||
## 3. Alternative considered
|
||||
|
||||
Variante mit einzigem Exit:
|
||||
Single-exit variant:
|
||||
|
||||
```c
|
||||
void apply_ctrl_step_50ms(const ApplyInputs* in)
|
||||
@@ -54,28 +50,25 @@ void apply_ctrl_step_50ms(const ApplyInputs* in)
|
||||
if (in == NULL) {
|
||||
s_ctx.last_error = EPB_EINVAL;
|
||||
} else {
|
||||
/* gesamte Step-Logik in else-Branch geschachtelt */
|
||||
/* entire step logic nested in else branch */
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Verworfen, weil die zusaetzliche Schachtelung die State-Machine schwerer
|
||||
lesbar macht und keine Funktionsaequivalenz mit der frueh-Exit-Variante
|
||||
gewinnt.
|
||||
Rejected because the additional nesting makes the state machine harder to read without gaining functional equivalence relative to the early-exit variant.
|
||||
|
||||
## 4. Auswirkung auf Sicherheit
|
||||
## 4. Safety impact
|
||||
|
||||
Keine. Frueher Exit ist deterministisch und im Unit-Test abgedeckt.
|
||||
None. The early exit is deterministic and covered by the unit test.
|
||||
|
||||
## 5. Freigabe
|
||||
## 5. Approval
|
||||
|
||||
| Rolle | Name | Datum | Signatur |
|
||||
|-----------------|------------------|-------------|----------|
|
||||
| Technical Lead | Stefan Lohmaier | 2026-05-11 | (Demo) |
|
||||
| Safety Manager | (im Realprojekt) | 2026-05-11 | (Demo) |
|
||||
| Role | Name | Date | Signature |
|
||||
|-----------------|------------------|-------------|-----------|
|
||||
| Technical Lead | Stefan Lohmaier | 2026-05-11 | (demo) |
|
||||
| Safety Manager | (in real project)| 2026-05-11 | (demo) |
|
||||
|
||||
## 6. Geltungsbereich
|
||||
## 6. Scope
|
||||
|
||||
Nur fuer diese eine Code-Stelle. Andere Stellen mit frueh-Exit benoetigen
|
||||
separate Records.
|
||||
This deviation applies only to this specific code site. Other early-exit sites require separate records.
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user