KNOTS-TEST-COMPLEXITY(1)

NAME
knots-test-complexity - test quality analyzer for C/C++/Rust/Python/JavaScript unit tests

SYNOPSIS
knots-test-complexity [OPTIONS] <TEST_FILE> <SOURCE_FILE>

DESCRIPTION
knots-test-complexity validates that unit tests have sufficient complexity and boundary coverage relative to the source code they test. It compares the complexity of test functions against source functions and checks for boundary value testing patterns.

This tool is designed for use in CI/CD pipelines and pre-commit hooks to enforce test quality standards.

OPTIONS

-t, --threshold VALUE
    Minimum test-to-source complexity ratio. Default: 0.70 (70%). Must be between 0.0 and 2.0.

-b, --boundary-threshold VALUE
    Minimum boundary test coverage ratio. Default: 0.80 (80%). Must be between 0.0 and 1.0.

-l, --level LEVEL
    Enforcement level. Valid values are warn (print warnings but exit 0) and error (exit 1 on failure). Default: warn.

--no-check-boundaries
    Disable boundary value checking. By default, boundary checking is enabled.

-v, --verbose
    Show detailed per-function analysis.

-h, --help
    Print help message.

-V, --version
    Print version information.

EXIT STATUS

0   Tests meet quality thresholds, or enforcement level is set to warn.

1   Tests do not meet quality thresholds and enforcement level is error, or an error occurred (file not found, invalid arguments).

EXAMPLES
Check test quality with default thresholds:
    knots-test-complexity test/test_module.c src/module.c

Strict mode with custom thresholds:
    knots-test-complexity -t 0.90 -b 0.90 -l error test/test_module.c src/module.c

Skip boundary checking:
    knots-test-complexity --no-check-boundaries test/test_module.c src/module.c

Verbose output:
    knots-test-complexity -v test/test_module.c src/module.c

AUTHORS
Brandon Arrendondo <brandon@arrendondo.dev>

BUGS
Report bugs at: https://github.com/brandon-arrendondo/knots/issues

SEE ALSO
knots(1)