Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorLeitwolf112026-10-18 20:05:46 +0300
committerLeitwolf112026-10-18 20:05:46 +0300
commit15a812a9d2e42727ba7af3c2d13731c2e1d9e47b (patch)
treed905c0f2fd853426483973e556fc584abaf4489c /docs
parent1b3c5f5b43372b6f7ba3be46dc363ebe0f83224e (diff)
downloadcatch3-15a812a9d2e42727ba7af3c2d13731c2e1d9e47b.tar.gz
Point the Progmasoft-authored code at Progmasoft C++ Style
The contributing guide described only the style of the code derived from Catch2. The code under src/Progmasoft/ and tests/Progmasoft/ is not derived from it and follows Progmasoft C++ Style (https://github.com/Progmasoft/progmasoft-cpp), the C++ guide of the other Progmasoft projects. A new section under "Writing code" says so, keeps the upstream style for the Catch2-derived code so upstream changes still apply cleanly, and records the two deviations the Catch2 API requires: the namespace Progmasoft::Catch3, and exceptions, which report a failed assertion and stay inside the library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/contributing.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/contributing.md b/docs/contributing.md
index 30254416..e67ea237 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -243,6 +243,25 @@ the size of your diffs reasonable, you should only use clang-format
on the newly changed code.
+### Progmasoft-authored code
+
+The code under `src/Progmasoft/` and `tests/Progmasoft/` is not derived
+from Catch2 and follows
+[Progmasoft C++ Style](https://github.com/Progmasoft/progmasoft-cpp):
+its naming, its formatting profile, its language and documentation
+rules. The code derived from Catch2 keeps the upstream style described
+on this page, so that changes from upstream still apply cleanly.
+
+Progmasoft-authored code deviates from the guide where the Catch2 API
+requires it:
+
+* It lives in the namespace `Progmasoft::Catch3`, with helpers in
+ `Progmasoft::Catch3::Detail`.
+* It may throw, because a failed assertion is reported by an exception,
+ as everywhere in Catch2. Exceptions stay inside the library and never
+ cross into the code under test.
+
+
### Code constructs to watch out for
This section is a (sadly incomplete) listing of various constructs that