From 44e28229f8baf5ca6bb30fc67b0810810296f0eb Mon Sep 17 00:00:00 2001 From: christophkloeffel <christoph.kloeffel@accenture.com> Date: Mon, 24 Jun 2024 17:17:04 +0200 Subject: [PATCH] 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 <string> +class Potato { +public: + std::string potato() { + // lobster-trace: something.example + return "potato"; + } +}; +``` + +You can add justifications as well: + +```cpp +#include <string> +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