Skip to content

Commit 3ca0a6a

Browse files
committed
Add AGENTS.md
1 parent 021526f commit 3ca0a6a

4 files changed

Lines changed: 42 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
build/
2+
temp/
3+
.env

AGENTS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## fb-cpp Agent Guide
2+
3+
### Code style
4+
- Classes names uses PascalCase.
5+
- Method names uses camelCase.
6+
- Variable names uses camelCase.
7+
- When using statements like `if`, `for`, `while`, etc, if the condition plus the sub-statement takes more than two
8+
lines, then the sub-statement should use braces. Otherwise, braces should be avoided.
9+
- A C++ source file should be formatted with `clang-format`.
10+
- Documentation uses doxygen with `///` comments. Empty lines with only `///` should be used before and after the
11+
documentation.
12+
- When scopes are introduced for RAII purposes, they should be commented as such:
13+
```cpp
14+
{ // scope
15+
}
16+
```
17+
18+
### Build
19+
- If .cpp files are added, it's necessary to run `./gen-linux-debug.sh` (non-Windows) or `gen-windows.bat` (Windows) from the repo root.
20+
- Use `cmake --build build/Debug/` (non-Windows) or `cmake --build build --config Debug` (Windows) from the repo root.
21+
22+
### Tests
23+
- Test code can use Boost.Multiprecision without conditional compilation.
24+
- Run the Boost.Test suite with `./run-tests.sh` (non-Windows) or `run-tests.bat` (Windows).
25+
Boost.Test options can be used (for example, `./run-tests.sh --log_level=all` or `run-tests.bat --log_level=all`).

run-tests.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
build\out\bin\Debug\fb-cpp-test.exe %*

run-tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -a
4+
env_file="$(dirname "$0")/.env"
5+
if [ -f "$env_file" ]; then
6+
source "$env_file"
7+
fi
8+
set +a
9+
10+
mkdir -p $(dirname "$0")/temp/lock
11+
export FIREBIRD_LOCK=$(dirname "$0")/temp/lock
12+
13+
./build/Debug/out/bin/fb-cpp-test "$@"

0 commit comments

Comments
 (0)