git clone https://github.com/SoundMatt/c-FuSa.git
cd c-FuSa
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --parallel
ctest --test-dir build -V- C99 — no C11 or compiler extensions unless gated behind a macro
- Follow MISRA-C:2012 where practical (c-FuSa must pass its own lint)
- No dynamic memory in the rule engine paths
- One function per command file; keep functions under 50 lines
- No global mutable state outside
engine.c
- Add the rule function and registration call to the appropriate
cmd_lint.c,cmd_analyze.c, orcmd_cyber.c - Follow the existing
static int rule_XXXX(...)pattern - Add the rule to the static rule table and to
XXXX_register_rules() - Document the rule ID, standard reference, and description
- Add a test in
tests/test_rules.c
- Create
cmd/cfusa/cmd_<name>.cwithint cmd_<name>(int argc, char **argv) - Add the declaration to
include/cfusa/commands.h - Add the entry to
CFUSA_COMMANDS[]incmd/cfusa/main.c - Add the source file to
CMakeLists.txt - Add docs to
docs/commands/<name>.md
All new code must have tests using the Unity framework in tests/.
cmake --build build && ctest --test-dir build -V<type>(<scope>): <short summary>
Types: feat, fix, docs, test, refactor, build, ci
- Run
cfusa check --dir .before opening a PR - All CI checks must pass
- SARIF findings in the Security tab must be reviewed
All contributions are made under the Mozilla Public License 2.0.