From 734b82eb092e20e254c51541db7fa5dc17d49b55 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 25 Jul 2021 23:01:08 +0200 Subject: [PATCH] Changed default config file name to .clang-uml --- .clanguml.example | 39 --------------------------------------- README.md | 4 ++-- src/main.cc | 2 +- tests/CMakeLists.txt | 2 +- tests/t00002/.clanguml | 15 --------------- tests/t00003/.clanguml | 12 ------------ tests/t00004/.clanguml | 14 -------------- tests/t00005/.clanguml | 12 ------------ tests/t00006/.clanguml | 12 ------------ tests/t00007/.clanguml | 12 ------------ tests/t00008/.clanguml | 12 ------------ tests/t00009/.clanguml | 12 ------------ tests/t00010/.clanguml | 12 ------------ tests/t00011/.clanguml | 12 ------------ tests/t00012/.clanguml | 15 --------------- tests/t00013/.clanguml | 13 ------------- tests/t00014/.clanguml | 16 ---------------- tests/t00015/.clanguml | 12 ------------ tests/t00016/.clanguml | 12 ------------ tests/t00017/.clanguml | 13 ------------- tests/t00018/.clanguml | 13 ------------- tests/t00019/.clanguml | 18 ------------------ tests/t00020/.clanguml | 18 ------------------ tests/t00021/.clanguml | 12 ------------ tests/t00022/.clanguml | 12 ------------ tests/t00023/.clanguml | 12 ------------ tests/t00024/.clanguml | 12 ------------ tests/t00025/.clanguml | 12 ------------ tests/t00026/.clanguml | 12 ------------ tests/t00027/.clanguml | 12 ------------ tests/t20001/.clanguml | 22 ---------------------- tests/t90000/.clanguml | 20 -------------------- tests/test_cases.cc | 4 ++-- 33 files changed, 6 insertions(+), 426 deletions(-) delete mode 100644 .clanguml.example delete mode 100644 tests/t00002/.clanguml delete mode 100644 tests/t00003/.clanguml delete mode 100644 tests/t00004/.clanguml delete mode 100644 tests/t00005/.clanguml delete mode 100644 tests/t00006/.clanguml delete mode 100644 tests/t00007/.clanguml delete mode 100644 tests/t00008/.clanguml delete mode 100644 tests/t00009/.clanguml delete mode 100644 tests/t00010/.clanguml delete mode 100644 tests/t00011/.clanguml delete mode 100644 tests/t00012/.clanguml delete mode 100644 tests/t00013/.clanguml delete mode 100644 tests/t00014/.clanguml delete mode 100644 tests/t00015/.clanguml delete mode 100644 tests/t00016/.clanguml delete mode 100644 tests/t00017/.clanguml delete mode 100644 tests/t00018/.clanguml delete mode 100644 tests/t00019/.clanguml delete mode 100644 tests/t00020/.clanguml delete mode 100644 tests/t00021/.clanguml delete mode 100644 tests/t00022/.clanguml delete mode 100644 tests/t00023/.clanguml delete mode 100644 tests/t00024/.clanguml delete mode 100644 tests/t00025/.clanguml delete mode 100644 tests/t00026/.clanguml delete mode 100644 tests/t00027/.clanguml delete mode 100644 tests/t20001/.clanguml delete mode 100644 tests/t90000/.clanguml diff --git a/.clanguml.example b/.clanguml.example deleted file mode 100644 index b77bdd97..00000000 --- a/.clanguml.example +++ /dev/null @@ -1,39 +0,0 @@ -compilation_database_dir: build -output_directory: puml -diagrams: - myproject_class: - type: class - glob: - - src/**.h - - src/**.cc - using_namespace: - - myproject - include: - namespaces: - - myproject - exclude: - namespaces: - - myproject::detail - plantuml: - after: - - 'note left of @A(MyProjectMain) : Main class of myproject library.' - main_sequence_diagram: - type: sequence - glob: - - src/main.cc - using_namespace: - - "" - start_from: - - usr: "c:@F@main#I#**1C#" - include: - namespaces: - - clanguml - exclude: - namespaces: - - std - - CLI - plantuml: - before: - - "' main test sequence diagram" - after: - - "' end" diff --git a/README.md b/README.md index 00434b50..b57928a5 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Nowadays, this file can be generated rather easily using multiple methods: * For Boost-based projects try [commands_to_compilation_database](https://github.com/tee3/commands_to_compilation_database) ### Invocation -By default, `config-uml` will assume that the configuration file `.clanguml` +By default, `config-uml` will assume that the configuration file `.clang-uml` and compilation database `compile_commands.json` files are in the current directory, so if they are in the top level directory of a project, simply run: @@ -68,7 +68,7 @@ clang-uml ``` The output path for diagrams, as well as alternative location of -compilation database can be specified in `.clanguml` configuration file. +compilation database can be specified in `.clang-uml` configuration file. For other options checkout help: ```bash diff --git a/src/main.cc b/src/main.cc index 640b8208..f58014e8 100644 --- a/src/main.cc +++ b/src/main.cc @@ -50,7 +50,7 @@ int main(int argc, const char *argv[]) { CLI::App app{"Clang-based PlantUML generator from C++ sources"}; - std::string config_path{".clanguml"}; + std::string config_path{".clang-uml"}; std::string compilation_database_dir{'.'}; std::vector diagram_names{}; bool verbose{false}; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 02294575..26404886 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 17) file(GLOB_RECURSE TEST_CASE_SOURCES t*/*.cc) -file(GLOB_RECURSE TEST_CASE_CONFIGS t*/.clanguml) +file(GLOB_RECURSE TEST_CASE_CONFIGS t*/.clang-uml) set(CLANG_UML_TEST_UTIL_SRC test_util.cc diff --git a/tests/t00002/.clanguml b/tests/t00002/.clanguml deleted file mode 100644 index 7e8d802a..00000000 --- a/tests/t00002/.clanguml +++ /dev/null @@ -1,15 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00002_class: - type: class - glob: - - ../../tests/t00002/t00002.cc - using_namespace: - - clanguml::t00002 - include: - namespaces: - - clanguml::t00002 - plantuml: - after: - - 'note left of @A(A) : Base abstract interface.' diff --git a/tests/t00003/.clanguml b/tests/t00003/.clanguml deleted file mode 100644 index b543b19e..00000000 --- a/tests/t00003/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00003_class: - type: class - glob: - - ../../tests/t00003/t00003.cc - using_namespace: - - clanguml::t00003 - include: - namespaces: - - clanguml::t00003 diff --git a/tests/t00004/.clanguml b/tests/t00004/.clanguml deleted file mode 100644 index d9231e66..00000000 --- a/tests/t00004/.clanguml +++ /dev/null @@ -1,14 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00004_class: - type: class - glob: - - ../../tests/t00004/t00004.cc - using_namespace: - - clanguml::t00004 - - clanguml::t00004::A - - clanguml::t00004::A::AA - include: - namespaces: - - clanguml::t00004 diff --git a/tests/t00005/.clanguml b/tests/t00005/.clanguml deleted file mode 100644 index d433a5d5..00000000 --- a/tests/t00005/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00005_class: - type: class - glob: - - ../../tests/t00005/t00005.cc - using_namespace: - - clanguml::t00005 - include: - namespaces: - - clanguml::t00005 diff --git a/tests/t00006/.clanguml b/tests/t00006/.clanguml deleted file mode 100644 index 9b44b117..00000000 --- a/tests/t00006/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00006_class: - type: class - glob: - - ../../tests/t00006/t00006.cc - using_namespace: - - clanguml::t00006 - include: - namespaces: - - clanguml::t00006 diff --git a/tests/t00007/.clanguml b/tests/t00007/.clanguml deleted file mode 100644 index 6bd80b76..00000000 --- a/tests/t00007/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00007_class: - type: class - glob: - - ../../tests/t00007/t00007.cc - using_namespace: - - clanguml::t00007 - include: - namespaces: - - clanguml::t00007 diff --git a/tests/t00008/.clanguml b/tests/t00008/.clanguml deleted file mode 100644 index 07c18890..00000000 --- a/tests/t00008/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00008_class: - type: class - glob: - - ../../tests/t00008/t00008.cc - using_namespace: - - clanguml::t00008 - include: - namespaces: - - clanguml::t00008 diff --git a/tests/t00009/.clanguml b/tests/t00009/.clanguml deleted file mode 100644 index fd2b5b38..00000000 --- a/tests/t00009/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00009_class: - type: class - glob: - - ../../tests/t00009/t00009.cc - using_namespace: - - clanguml::t00009 - include: - namespaces: - - clanguml::t00009 diff --git a/tests/t00010/.clanguml b/tests/t00010/.clanguml deleted file mode 100644 index 1388e6f1..00000000 --- a/tests/t00010/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00010_class: - type: class - glob: - - ../../tests/t00010/t00010.cc - using_namespace: - - clanguml::t00010 - include: - namespaces: - - clanguml::t00010 diff --git a/tests/t00011/.clanguml b/tests/t00011/.clanguml deleted file mode 100644 index 69ef8449..00000000 --- a/tests/t00011/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00011_class: - type: class - glob: - - ../../tests/t00011/t00011.cc - using_namespace: - - clanguml::t00011 - include: - namespaces: - - clanguml::t00011 diff --git a/tests/t00012/.clanguml b/tests/t00012/.clanguml deleted file mode 100644 index a841c472..00000000 --- a/tests/t00012/.clanguml +++ /dev/null @@ -1,15 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00012_class: - type: class - glob: - - ../../tests/t00012/t00012.cc - using_namespace: - - clanguml::t00012 - include: - namespaces: - - clanguml::t00012 - plantuml: - after: - - 'note right of @A(C>>>,3,3,3>) : Long template annotation' diff --git a/tests/t00013/.clanguml b/tests/t00013/.clanguml deleted file mode 100644 index 0b71bf39..00000000 --- a/tests/t00013/.clanguml +++ /dev/null @@ -1,13 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00013_class: - type: class - glob: - - ../../tests/t00013/t00013.cc - using_namespace: - - clanguml::t00013 - include: - namespaces: - - clanguml::t00013 - - ABCD diff --git a/tests/t00014/.clanguml b/tests/t00014/.clanguml deleted file mode 100644 index 2534f83f..00000000 --- a/tests/t00014/.clanguml +++ /dev/null @@ -1,16 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00014_class: - type: class - glob: - - ../../tests/t00014/t00014.cc - using_namespace: - - clanguml::t00014 - include: - namespaces: - - clanguml::t00014 - exclude: - namespaces: - - std - - clanguml::t00014::std diff --git a/tests/t00015/.clanguml b/tests/t00015/.clanguml deleted file mode 100644 index 38a6ceb5..00000000 --- a/tests/t00015/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00015_class: - type: class - glob: - - ../../tests/t00015/t00015.cc - using_namespace: - - clanguml::t00015 - include: - namespaces: - - clanguml::t00015 diff --git a/tests/t00016/.clanguml b/tests/t00016/.clanguml deleted file mode 100644 index 31881559..00000000 --- a/tests/t00016/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00016_class: - type: class - glob: - - ../../tests/t00016/t00016.cc - using_namespace: - - clanguml::t00016 - include: - namespaces: - - clanguml::t00016 diff --git a/tests/t00017/.clanguml b/tests/t00017/.clanguml deleted file mode 100644 index e6942ec3..00000000 --- a/tests/t00017/.clanguml +++ /dev/null @@ -1,13 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00017_class: - type: class - include_relations_also_as_members: false - glob: - - ../../tests/t00017/t00017.cc - using_namespace: - - clanguml::t00017 - include: - namespaces: - - clanguml::t00017 diff --git a/tests/t00018/.clanguml b/tests/t00018/.clanguml deleted file mode 100644 index e3692346..00000000 --- a/tests/t00018/.clanguml +++ /dev/null @@ -1,13 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00018_class: - type: class - glob: - - ../../tests/t00018/**.h - - ../../tests/t00018/**.cc - using_namespace: - - clanguml::t00018 - include: - namespaces: - - clanguml::t00018 diff --git a/tests/t00019/.clanguml b/tests/t00019/.clanguml deleted file mode 100644 index 16412e73..00000000 --- a/tests/t00019/.clanguml +++ /dev/null @@ -1,18 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00019_class: - type: class - glob: - - ../../tests/t00019/**.h - - ../../tests/t00019/**.cc - using_namespace: - - clanguml::t00019 - include: - namespaces: - - clanguml::t00019 - plantuml: - after: - - '@A(Base) <|-- @A(Layer3)' - - '@A(Layer3) <|-- @A(Layer2)' - - '@A(Layer2) <|-- @A(Layer1)' diff --git a/tests/t00020/.clanguml b/tests/t00020/.clanguml deleted file mode 100644 index fcd04dcd..00000000 --- a/tests/t00020/.clanguml +++ /dev/null @@ -1,18 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00020_class: - type: class - glob: - - ../../tests/t00020/t00020.cc - using_namespace: - - clanguml::t00020 - include: - namespaces: - - clanguml::t00020 - plantuml: - after: - - '@A(ProductA1) <.. @A(Factory1)' - - '@A(ProductB1) <.. @A(Factory1)' - - '@A(ProductA2) <.. @A(Factory2)' - - '@A(ProductB2) <.. @A(Factory2)' diff --git a/tests/t00021/.clanguml b/tests/t00021/.clanguml deleted file mode 100644 index 0f7c063a..00000000 --- a/tests/t00021/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00021_class: - type: class - glob: - - ../../tests/t00021/t00021.cc - using_namespace: - - clanguml::t00021 - include: - namespaces: - - clanguml::t00021 diff --git a/tests/t00022/.clanguml b/tests/t00022/.clanguml deleted file mode 100644 index 6cebb830..00000000 --- a/tests/t00022/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00022_class: - type: class - glob: - - ../../tests/t00022/t00022.cc - using_namespace: - - clanguml::t00022 - include: - namespaces: - - clanguml::t00022 diff --git a/tests/t00023/.clanguml b/tests/t00023/.clanguml deleted file mode 100644 index 90645897..00000000 --- a/tests/t00023/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00023_class: - type: class - glob: - - ../../tests/t00023/t00023.cc - using_namespace: - - clanguml::t00023 - include: - namespaces: - - clanguml::t00023 diff --git a/tests/t00024/.clanguml b/tests/t00024/.clanguml deleted file mode 100644 index f8750c86..00000000 --- a/tests/t00024/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00024_class: - type: class - glob: - - ../../tests/t00024/t00024.cc - using_namespace: - - clanguml::t00024 - include: - namespaces: - - clanguml::t00024 diff --git a/tests/t00025/.clanguml b/tests/t00025/.clanguml deleted file mode 100644 index 4a32003c..00000000 --- a/tests/t00025/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00025_class: - type: class - glob: - - ../../tests/t00025/t00025.cc - using_namespace: - - clanguml::t00025 - include: - namespaces: - - clanguml::t00025 diff --git a/tests/t00026/.clanguml b/tests/t00026/.clanguml deleted file mode 100644 index 33224cee..00000000 --- a/tests/t00026/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00026_class: - type: class - glob: - - ../../tests/t00026/t00026.cc - using_namespace: - - clanguml::t00026 - include: - namespaces: - - clanguml::t00026 diff --git a/tests/t00027/.clanguml b/tests/t00027/.clanguml deleted file mode 100644 index 27103b8e..00000000 --- a/tests/t00027/.clanguml +++ /dev/null @@ -1,12 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t00027_class: - type: class - glob: - - ../../tests/t00027/t00027.cc - using_namespace: - - clanguml::t00027 - include: - namespaces: - - clanguml::t00027 diff --git a/tests/t20001/.clanguml b/tests/t20001/.clanguml deleted file mode 100644 index 2748c867..00000000 --- a/tests/t20001/.clanguml +++ /dev/null @@ -1,22 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t20001_sequence: - type: sequence - glob: - - ../../tests/t20001/t20001.cc - include: - namespaces: - - clanguml::t20001 - exclude: - namespaces: - - clanguml::t20001::detail - using_namespace: - - clanguml::t20001 - start_from: - - usr: "c:@N@clanguml@N@t20001@F@tmain#" - plantuml: - before: - - "' t20001 test sequence diagram" - after: - - 'note over "tmain()": Main test function' diff --git a/tests/t90000/.clanguml b/tests/t90000/.clanguml deleted file mode 100644 index 86079718..00000000 --- a/tests/t90000/.clanguml +++ /dev/null @@ -1,20 +0,0 @@ -compilation_database_dir: .. -output_directory: puml -diagrams: - t90000_class: - type: class - plantuml: - before: - - 'class "Foo" as C_001' - - 'class C_001 {' - - ' +int value' - - '}' - - 'C_001 <|-- ArrayList' - - 'note top of C_001: This is a very important class.' - - 'note "This is a\nfloating note" as N1' - - 'note "This note is connected\nto several objects." as N2' - - 'C_001 .. N2' - - 'N2 .. ArrayList' - - 'class "Boo" as C_002' - - 'class C_002 {' - - '}' diff --git a/tests/test_cases.cc b/tests/test_cases.cc index a7733757..c7455c3e 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -22,7 +22,7 @@ std::pair load_config(const std::string &test_name) { - auto config = clanguml::config::load(test_name + "/.clanguml"); + auto config = clanguml::config::load(test_name + "/.clang-uml"); cppast::libclang_compilation_database db(config.compilation_database_dir); @@ -32,7 +32,7 @@ load_config(const std::string &test_name) std::pair load_config2( const std::string &test_name) { - auto config = clanguml::config::load(test_name + "/.clanguml"); + auto config = clanguml::config::load(test_name + "/.clang-uml"); auto db = clanguml::cx::compilation_database::from_directory( config.compilation_database_dir);