You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please read`README.md` for general information about the library, and `CONTRIBUTING.md` for development-related notes.
3
+
Read`README.md` for general information about the library, and `CONTRIBUTING.md` for development-related notes.
4
4
5
-
Keep the code and comments very brief. Be sure every significant code block is preceded with a brief comment.
6
-
7
-
If you need a build directory, create one in the project root named with a `build` prefix;
8
-
you can also use existing build directories if you prefer so,
9
-
but avoid using `cmake-build-*` because these are used by CLion.
10
-
When building the code, don't hesitate to use multiple jobs to use all CPU cores.
5
+
Build directories should be created in the project root named with a `build` prefix. Parallelize compilation.
11
6
12
7
Run all tests in debug build to ensure that all assertion checks are enabled.
13
8
14
-
It is best to use Clang-Format to format the code when done editing.
9
+
## Style conventions
10
+
11
+
Language targets: C99 for the library, C99 and C++20 for the test harness. Strict std only, compiler extensions not allowed.
12
+
13
+
Naming patterns: `canard_*` functions, `canard_*_t` types, `CANARD_*` macros. Internal definitions need no prefixing. Enums and constants are `lower_snake_case`. Uppercase only for macros.
14
+
15
+
Keep code compact and add brief comments before non-obvious logic.
16
+
17
+
Treat warnings as errors and keep compatibility with strict warning flags.
18
+
19
+
For agent-authored commits, set `GIT_AUTHOR_NAME="Agent"` and `GIT_COMMITTER_NAME="Agent"`.
20
+
21
+
## Adversarial validation and verification
22
+
23
+
Practice an adversarial approach to testing: the purpose of a test case is not to provide coverage, but to empirically prove correctness of the tested code. Always treat the code as suspect; you will be rewarded for pointing out flaws in it. If the code does not appear to be correct, refuse to test it and provide evidence of its defects instead of proceeding with testing.
24
+
25
+
When using subagents to implement tests, always instruct them to summarize their findings concerning the correctness of the tested code and its possible limitations at the end of their run. At the end of the turn, provide a summary of the findings.
0 commit comments