From 7381f2f181b5df45a49fa73b9b87c7256285fb9b Mon Sep 17 00:00:00 2001 From: Seppo Yli-Olli Date: Thu, 19 Feb 2026 10:22:11 +0100 Subject: [PATCH] Enhance coverage guidelines in copilot instructions Added details on coverage expectations and failure handling. --- .github/copilot-instructions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 06c26af..113ff24 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -15,6 +15,8 @@ Follow the development, linting, and testing process described in the 79‑character limit. - **Testing**: Run tests with `pytest -v --cov=simplecpreprocessor --cov-config .coveragerc --cov-report=term-missing` -- **Coverage**: Maintain or improve test coverage; never decrease it. +- **Coverage**: Maintain or improve test coverage; never decrease it. This includew branch coverage. +- Failure handling in branches is expected to be handled by creating invalid C code. If it's not possible to cover branch with streaming input and hitting it requires direct manipulation, the branch needs to be marked as no cover. +- Evaluate earlier no cover cases as to whether they should be covered by tests when implementing new functionality. When generating code, apply these rules before returning the final output.