Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,43 @@ To open SARIF results in VS Code: install the **SARIF Viewer** extension, then

## 💡 Examples

### Clang-tidy

```sh
bazel test --config=clang-tidy //score/...
```

### CodeQL — MISRA C++:2023 static analysis

Runs a full build-traced MISRA C++:2023 scan using the vendored CodeQL CLI and
pre-compiled query pack. The first run downloads ~1 GB of tooling (CodeQL CLI +
MISRA pack) into the Bazel repository cache; subsequent runs reuse the cache.

```sh
bazel run //tools/static_analysis:codeql_lint -- \
--output-dir /tmp/codeql-results \
--output-prefix codeql-time \
--target //score/...
```

**Results** are written to `--output-dir` on completion:

| File | Contents |
| ---- | -------- |
| `codeql-time.sarif` | SARIF v2.1 — import into VS Code ([SARIF Viewer extension](https://marketplace.visualstudio.com/items?itemName=MS-SarifVSCode.sarif-viewer)) or any SARIF-aware tool |
| `codeql-time.csv` | Flat findings table: rule, file, line, message |
| `analysis_reports/database_integrity_report.md` | Extraction errors (external deps are expected) |
| `analysis_reports/deviations_report.md` | Active MISRA C++:2023 deviations |
| `analysis_reports/guideline_compliance_summary.md` | Per-rule compliance summary |
| `analysis_reports/guideline_recategorizations_report.md` | Rule recategorization log |

To open SARIF results in VS Code: install the **SARIF Viewer** extension, then
`Ctrl+Shift+P` → *SARIF: Open SARIF file* → select `codeql-time.sarif`.

---

## 💡 Examples

Working examples demonstrating clock usage patterns, testing approaches, and integration techniques are available in the [examples/](examples/) directory:

- **examples/time/system_time** — SystemTime usage for wall-clock timestamps
Expand Down
1 change: 0 additions & 1 deletion docs/features/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ Features
:caption: Features:

time/index
time_daemon/index
time_slave/index
test_cases
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml application_class_diagram

title Application: Class Diagram
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml app_init_seq_diagram

title Application: Initialization Sequence
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml app_init_seq_diagram

title Application: Initialization Sequence
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml control_flow_divider_class_diagram

title ControlFlowDivider: Class Diagram
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml ctrlflow_init_seq_diagram

title ControlFlowDivider: Initialization Sequence
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml control_flow_divider_workflow

title ControlFlowDivider: Main Workflow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_class_diagram

title TimeDaemon: Class Diagram Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_data_control_flow_diagram

title TimeDaemon: Data and Control Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_deployment_diagram

title Deployment view
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_data_control_flow_diagram

title VehicleTimeDaemon: Multi-Timebase Data Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_deployment_diagram

title Deployment view
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_data_control_flow_diagram

title VehicleTimeDaemon: Data and Control Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml dd_deployment_diagram

title Deployment view
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml ipc_class_diagram

title IPC: Class Diagram
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml ipc_init_seq_diagram

title IPC Machine: Initialization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml ipc_publish_seq_diagram

title IPC Machine: Publishing new TimeInfo data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml ipc_receive_seq_diagram

title IPC Machine: Receiving new TimeInfo data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml message_broker_class_diagram

title MessageBroker: Class Diagram
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml message_broker_initialization_sequence_diagram

title MessageBroker: Initialization Sequence
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml message_broker_workflow_sequence_diagram

title Message Broker: Workflow Diagram
Expand Down
Loading
Loading