Added default diagram generation error for empty diagrams (#246)
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user