Added default diagram generation error for empty diagrams (#246)

This commit is contained in:
Bartek Kryza
2024-03-04 19:55:55 +01:00
parent cb44c3ded4
commit baef768f6c
27 changed files with 315 additions and 10 deletions

View File

@@ -107,6 +107,8 @@ cli_flow_t cli_handler::parse(int argc, const char **argv)
"Query the specific compiler driver to extract system paths and add to "
"compile commands (e.g. arm-none-eabi-g++)");
#endif
app.add_flag("--allow-empty-diagrams", allow_empty_diagrams,
"Do not raise an error when generated diagram model is empty");
app.add_option(
"--add-class-diagram", add_class_diagram, "Add class diagram config");
app.add_option("--add-sequence-diagram", add_sequence_diagram,
@@ -302,6 +304,10 @@ cli_flow_t cli_handler::handle_post_config_options()
LOG_INFO("Loaded clang-uml config from {}", config_path);
if (allow_empty_diagrams) {
config.allow_empty_diagrams.set(true);
}
//
// Override selected config options from command line
//

View File

@@ -165,6 +165,7 @@ public:
bool list_diagrams{false};
bool quiet{false};
bool initialize{false};
bool allow_empty_diagrams{false};
std::optional<std::vector<std::string>> add_compile_flag;
std::optional<std::vector<std::string>> remove_compile_flag;
#if !defined(_WIN32)