Skip to content

Commit 3e95efc

Browse files
agents
1 parent 6bce726 commit 3e95efc

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `include/olga_scheduler/`: public single-file headers.
5+
- `tests/`: GoogleTest suites (`test_*.cpp`, `test_*.c`) plus demos.
6+
- `lib/cavl/`: vendored CAVL header-only dependency used by the scheduler.
7+
- `CMakeLists.txt`: build, test, formatting, static-analysis, and coverage wiring.
8+
9+
## Build, Test, and Development Commands
10+
Common CMake workflow:
11+
```sh
12+
cmake -S . -B build
13+
cmake --build build
14+
ctest --test-dir build --output-on-failure
15+
```
16+
Format sources (requires `clang-format`):
17+
```sh
18+
cmake --build build --target format
19+
```
20+
Static analysis is enabled by default and requires `clang-tidy`. Disable with:
21+
```sh
22+
cmake -S . -B build -DNO_STATIC_ANALYSIS=1
23+
```
24+
Coverage build (requires `gcovr` and GCC/Clang):
25+
```sh
26+
cmake -S . -B build-coverage -DOLGA_ENABLE_COVERAGE=ON
27+
cmake --build build-coverage --target coverage
28+
```
29+
Build the C demo:
30+
```sh
31+
cmake --build build --target olga_scheduler_c_demo
32+
```
33+
34+
## Coding Style & Naming Conventions
35+
- C99 for C code and C++20 for C++ code.
36+
- Formatting is defined in `.clang-format` (Mozilla base, 4-space indent, 120 column limit). Use `clang-format` via the `format` target.
37+
- `clang-tidy` is enforced (warnings as errors). Keep code warning-free; the project builds with `-Wall -Wextra -Werror -pedantic`.
38+
- Tests are named `test_*.c` / `test_*.cpp`. Headers stay in `include/olga_scheduler/`.
39+
40+
## Testing Guidelines
41+
- Tests use GoogleTest (fetched via CMake `FetchContent`).
42+
- Run with `ctest` from the build directory (see commands above).
43+
- Coverage target enforces 100% line and branch coverage for `include/olga_scheduler/olga_scheduler.h` (C API only), so keep coverage updates in sync with header changes.
44+
45+
## Commit & Pull Request Guidelines
46+
- Commit history on feature branches is irrelevant as we use squash merging only.
47+
- PRs should clearly describe behavioral changes, list tests run (e.g., `ctest --test-dir build`), and link related issues/PRs when applicable.

0 commit comments

Comments
 (0)