From aabda94fb8a6bbf5f371f167853b0f6baf64df47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Kl=C3=B6ffel?= <145490354+christophkloeffel@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:00:11 +0200 Subject: [PATCH] adds usage section for cpp converter (#44) adds usage section --- lobster/tools/cpp/cpp.py | 2 +- packages/lobster-tool-cpp/README.md | 30 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lobster/tools/cpp/cpp.py b/lobster/tools/cpp/cpp.py index cb2f87da..2adc66d0 100755 --- a/lobster/tools/cpp/cpp.py +++ b/lobster/tools/cpp/cpp.py @@ -164,7 +164,7 @@ def main(): kind = kind, name = function_name) - db[tag.key].just_up.append(reason) + db[tag.key()].just_up.append(reason) continue diff --git a/packages/lobster-tool-cpp/README.md b/packages/lobster-tool-cpp/README.md index a260b4ab..b7b1fa27 100644 --- a/packages/lobster-tool-cpp/README.md +++ b/packages/lobster-tool-cpp/README.md @@ -22,6 +22,36 @@ future. * `lobster-cpp`: Extract requirements from C/C++ code using a clang-tidy hack +## Usage + +This tool supports C/C++ code. + +For this you can embedd tracing tags like this: + +```cpp +#include +class Potato { +public: + std::string potato() { + // lobster-trace: something.example + return "potato"; + } +}; +``` + +You can add justifications as well: + +```cpp +#include +class Potato { +public: + std::string potato() { + // lobster-exclude: Reason to justify the exlude + return "potato"; + } +}; +``` + ## Copyright & License information The copyright holder of LOBSTER is the Bayerische Motoren Werke