Quality Commands
dcr test
Runs tests.
dcr test # debug profile
dcr test --release # release profile
dcr test --debug # explicit debug
dcr test --help # detailed help
Before first use, initialize tests:
dcr test --init
This creates tests/dcr_test.h (framework) and tests/test.c (template).
What dcr test does:
- Builds the project
- Collects
tests/*.cfiles (.conly, not.cpp) - Compiles and links each test file
- Runs each test binary
- Prints summary: TOTAL, PASS, SKIP, FAIL
- Returns non-zero exit code on any FAIL
dcr fmt
Formats C/C++ source files using clang-format.
dcr fmt
Processes: src/**/*.{c,cpp,cxx,cc,h,hpp,hxx,hh} and tests/**/*.{c,cpp,cxx,cc,h,hpp,hxx,hh}.
Uses .clang-format at the project root (if present), otherwise default clang-format style.
dcr lint
Runs clang-tidy on C/C++ source files for static analysis.
dcr lint # show diagnostics
dcr lint --fix # apply fixes automatically
dcr lint --help # detailed help
Processes: src/**/*.{c,cpp,cxx,cc} and tests/**/*.{c,cpp,cxx,cc}.
Without --fix, clang-tidy reports warnings and errors without modifying files.
With --fix, clang-tidy applies automatic suggestions in place.