Kaynağa Gözat

Merge pull request #46 from Reisz/master

Improve C/C++ number parsing
Andrey 3 yıl önce
ebeveyn
işleme
1273190190
28 değiştirilmiş dosya ile 241 ekleme ve 206 silme
  1. 1 1
      metrixpp/ext/std/code/cpp.py
  2. 17 2
      metrixpp/ext/std/code/magic.py
  3. 16 0
      metrixpp/tests/general/test_basic/sources/simple.cpp
  4. 7 6
      metrixpp/tests/general/test_basic/test_std_code_magic_view_default_stdout.gold.txt
  5. 14 13
      metrixpp/tests/general/test_basic/test_std_code_magic_view_nest_per_file_stdout.gold.txt
  6. 12 11
      metrixpp/tests/general/test_basic/test_std_code_magic_view_nozeros_nest_per_file_stdout.gold.txt
  7. 5 4
      metrixpp/tests/general/test_basic/test_std_code_magic_view_nozeros_stdout.gold.txt
  8. 6 6
      metrixpp/tests/general/test_basic/test_std_complexity_maxindent_view_nest_per_file_stdout.gold.txt
  9. 18 18
      metrixpp/tests/general/test_basic/test_std_filelines_metrics_view_nest_per_file_stdout.gold.txt
  10. 8 8
      metrixpp/tests/general/test_basic/test_std_filelines_metrics_view_txt_stdout.gold.txt
  11. 12 12
      metrixpp/tests/general/test_basic/test_std_general_metrics_view_nest_per_file_stdout.gold.txt
  12. 4 4
      metrixpp/tests/general/test_basic/test_std_general_metrics_view_txt_stdout.gold.txt
  13. 22 21
      metrixpp/tests/general/test_basic/test_std_lines_metrics_view_nest_per_file_stdout.gold.txt
  14. 16 15
      metrixpp/tests/general/test_basic/test_std_lines_metrics_view_txt_stdout.gold.txt
  15. 13 11
      metrixpp/tests/general/test_basic/test_std_longlines_metrics_view_nest_per_file_stdout.gold.txt
  16. 6 5
      metrixpp/tests/general/test_basic/test_std_longlines_metrics_view_txt_stdout.gold.txt
  17. 7 7
      metrixpp/tests/general/test_basic/test_std_maintindex_view_txt_stdout.gold.txt
  18. 6 6
      metrixpp/tests/general/test_basic/test_std_member_metrics_view_nest_per_file_stdout.gold.txt
  19. 4 4
      metrixpp/tests/general/test_basic/test_workflow_export_default_stdout.gold.txt
  20. 1 1
      metrixpp/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt
  21. 5 4
      metrixpp/tests/general/test_basic/test_workflow_view_default_stdout.gold.txt
  22. 4 5
      metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_stdout.gold.txt
  23. 9 10
      metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_txt_all_stdout.gold.txt
  24. 2 2
      metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_txt_new_stdout.gold.txt
  25. 9 10
      metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_txt_touched_stdout.gold.txt
  26. 3 4
      metrixpp/tests/general/test_basic/test_workflow_view_second_stdout.gold.txt
  27. 7 8
      metrixpp/tests/general/test_basic/test_workflow_view_second_txt_all_stdout.gold.txt
  28. 7 8
      metrixpp/tests/general/test_basic/test_workflow_view_second_txt_touched_stdout.gold.txt

+ 1 - 1
metrixpp/ext/std/code/cpp.py

@@ -51,7 +51,7 @@ class CppCodeParser(object):
                                                                       # Need to support new line separators in expense of efficiency?
                 | /\*\*/                                              # Match C style comments (empty comment line)
                 | /([\\](?:\n|\r\n|\r))*\*.*?\*([\\](?:\n|\r\n|\r))*/ # Match C style comments
-                | \'(?:\\.|[^\\\'])*\'                                # Match quoted strings
+                | (?<![0-9a-fA-F])\'(?:\\.|[^\\\'])*\'                                # Match quoted strings
                 | "(?:\\.|[^\\"])*"                                   # Match double quoted strings
                 | (((?<=\n|\r)|^)[ \t]*[#].*?[^\\](?=\n|\r\n|\r))     # Match preprocessor
                                                                       # NOTE: end of line is NOT consumed

+ 17 - 2
metrixpp/ext/std/code/magic.py

@@ -27,14 +27,29 @@ class Plugin(api.Plugin,
         self.is_active_numbers_simplier = options.__dict__['std.code.magic.numbers.simplier']
     
     def initialize(self):
+        # C++ Source: https://en.cppreference.com/w/cpp/language/integer_literal
+        # C Source: https://en.cppreference.com/w/c/language/integer_constant
+        cpp_number_patterns = []
+        cpp_number_patterns.append(r'''[1-9]('?[0-9])*''')
+        cpp_number_patterns.append(r'''0('?[0-7])*''')  # 0 is here
+        cpp_number_patterns.append(r'''0[xX][0-9a-fA-F]('?[0-9a-fA-F])*''')
+        cpp_number_patterns.append(r'''0[bB][01]('?[01])*''')
+
+        cpp_number_suffix = r'(ll|LL|[lLzZ])'
+        cpp_number_suffix = r'([uU]?{s}?|{s}[uU])'.format(s=cpp_number_suffix)
+
+        cpp_number_pattern = r'({}){}'.format(r'|'.join(cpp_number_patterns),
+                                              cpp_number_suffix)
+
         pattern_to_search_java = re.compile(
             r'''((const(\s+[_$a-zA-Z][_$a-zA-Z0-9]*)+\s*[=]\s*)[-+]?[0-9]+\b)'''
             r'''|(\b[0-9]+\b)''')
         pattern_to_search_cpp = re.compile(
-            r'''((const(\s+[_a-zA-Z][_a-zA-Z0-9]*)+\s*[=]\s*)[-+]?[0-9]+\b)'''
+            r'''((const(expr)?(\s+[_a-zA-Z][_a-zA-Z0-9]*)+\s*[=]\s*)[-+]?''' +
+            cpp_number_pattern + r'''\b)'''
             r'''|(virtual\s+.*\s*[=]\s*[0]\s*[,;])'''
             r'''|(override\s+[=]\s*[0]\s*[,;])'''
-            r'''|(\b[0-9]+\b)''')
+            r'''|(\b''' + cpp_number_pattern + r'''\b)''')
         pattern_to_search_cs = re.compile(
             r'''((const(\s+[_a-zA-Z][_a-zA-Z0-9]*)+\s*[=]\s*)[-+]?[0-9]+\b)'''
             r'''|(\b[0-9]+\b)''')

+ 16 - 0
metrixpp/tests/general/test_basic/sources/simple.cpp

@@ -68,6 +68,22 @@ class A
     int pure_virtual_overrider() override = 0;
 
 	int m_me88er = 10;
+
+    int hex_number = 0xaBc78;
+    unsigned int binary_number = 0b00110u;
+    unsigned long long int octal_number = 074uLL;
+    unsigned long long int different_order = 123llU;
+    long int just_l = 42l;
+    int one_separator = 123'456;
+    int two_separators = 123'456'789;
+
+    constexpr int const_hex_number = 0xaBc78;
+    const unsigned int const_binary_number = 0b00110u;
+    const unsigned long long int const_octal_number = 074uLL;
+    const unsigned long long int const_different_order = 123llU;
+    const long int const_just_l = 42l;
+    constexpr int one_separator = 123'456;
+    const int two_separators = 123'456'789;
 };
 
 }

+ 7 - 6
metrixpp/tests/general/test_basic/test_std_code_magic_view_default_stdout.gold.txt

@@ -1,13 +1,14 @@
 ./:: info: Overall metrics for 'std.code.magic:numbers' metric
-	Average        : 1.55555556 (excluding zero metric values)
+	Average        : 2.33333333 (excluding zero metric values)
 	Minimum        : 1
-	Maximum        : 4
-	Total          : 14.0
+	Maximum        : 8
+	Total          : 21.0
 	Distribution   : 9 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 0.667 : 0.667 : 6	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-	             2 : 0.222 : 0.889 : 2	||||||||||||||||||||||
-	             4 : 0.111 : 1.000 : 1	|||||||||||
+	             1 : 0.556 : 0.556 : 5	|||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.222 : 0.778 : 2	||||||||||||||||||||||
+	             4 : 0.111 : 0.889 : 1	|||||||||||
+	             8 : 0.111 : 1.000 : 1	|||||||||||
 
 ./:: info: Directory content:
 	File           : file_deleted_in_new_sources.cpp

+ 14 - 13
metrixpp/tests/general/test_basic/test_std_code_magic_view_nest_per_file_stdout.gold.txt

@@ -1,24 +1,24 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
 
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
-        	std.code.magic:numbers: 1
+        	std.code.magic:numbers: 8
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region
             	Region name    : A
@@ -83,14 +83,15 @@
             	std.code.magic:numbers: 2
 
 ./simple.cpp:: info: Overall metrics for 'std.code.magic:numbers' metric
-	Average        : 1.57142857 (excluding zero metric values)
+	Average        : 2.57142857 (excluding zero metric values)
 	Minimum        : 1
-	Maximum        : 4
-	Total          : 11.0
+	Maximum        : 8
+	Total          : 18.0
 	Distribution   : 7 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 0.714 : 0.714 : 5	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-	             2 : 0.143 : 0.857 : 1	||||||||||||||
-	             4 : 0.143 : 1.000 : 1	||||||||||||||
+	             1 : 0.571 : 0.571 : 4	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.143 : 0.714 : 1	||||||||||||||
+	             4 : 0.143 : 0.857 : 1	||||||||||||||
+	             8 : 0.143 : 1.000 : 1	||||||||||||||
 
 

+ 12 - 11
metrixpp/tests/general/test_basic/test_std_code_magic_view_nozeros_nest_per_file_stdout.gold.txt

@@ -1,24 +1,24 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
 
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
-        	std.code.magic:numbers: 1
+        	std.code.magic:numbers: 8
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region
             	Region name    : A
@@ -83,12 +83,13 @@
             	std.code.magic:numbers: 1
 
 ./simple.cpp:: info: Overall metrics for 'std.code.magic:numbers' metric
-	Average        : 1.0 (excluding zero metric values)
+	Average        : 2.0 (excluding zero metric values)
 	Minimum        : 1
-	Maximum        : 1
-	Total          : 7.0
+	Maximum        : 8
+	Total          : 14.0
 	Distribution   : 7 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 1.000 : 1.000 : 7	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.857 : 0.857 : 6	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             8 : 0.143 : 1.000 : 1	||||||||||||||
 
 

+ 5 - 4
metrixpp/tests/general/test_basic/test_std_code_magic_view_nozeros_stdout.gold.txt

@@ -1,11 +1,12 @@
 ./:: info: Overall metrics for 'std.code.magic:numbers' metric
-	Average        : 1.0 (excluding zero metric values)
+	Average        : 1.77777778 (excluding zero metric values)
 	Minimum        : 1
-	Maximum        : 1
-	Total          : 9.0
+	Maximum        : 8
+	Total          : 16.0
 	Distribution   : 9 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 1.000 : 1.000 : 9	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.889 : 0.889 : 8	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             8 : 0.111 : 1.000 : 1	|||||||||||
 
 ./:: info: Directory content:
 	File           : file_deleted_in_new_sources.cpp

+ 6 - 6
metrixpp/tests/general/test_basic/test_std_complexity_maxindent_view_nest_per_file_stdout.gold.txt

@@ -1,22 +1,22 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
 
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region

+ 18 - 18
metrixpp/tests/general/test_basic/test_std_filelines_metrics_view_nest_per_file_stdout.gold.txt

@@ -1,22 +1,22 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
 
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region
@@ -76,19 +76,19 @@
             	Modified       : None
 
 ./simple.cpp:0: info: Metrics per file
-	std.code.filelines:code: 55
+	std.code.filelines:code: 69
 	std.code.filelines:comments: 5
 	std.code.filelines:preprocessor: 1
-	std.code.filelines:total: 60
+	std.code.filelines:total: 74
 
 ./simple.cpp:: info: Overall metrics for 'std.code.filelines:code' metric
-	Average        : 55.0
-	Minimum        : 55
-	Maximum        : 55
-	Total          : 55.0
+	Average        : 69.0
+	Minimum        : 69
+	Maximum        : 69
+	Total          : 69.0
 	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
-	            55 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	            69 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.filelines:comments' metric
 	Average        : 5.0
@@ -109,12 +109,12 @@
 	             1 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.filelines:total' metric
-	Average        : 60.0
-	Minimum        : 60
-	Maximum        : 60
-	Total          : 60.0
+	Average        : 74.0
+	Minimum        : 74
+	Maximum        : 74
+	Total          : 74.0
 	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
-	            60 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	            74 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 

+ 8 - 8
metrixpp/tests/general/test_basic/test_std_filelines_metrics_view_txt_stdout.gold.txt

@@ -1,12 +1,12 @@
 ./:: info: Overall metrics for 'std.code.filelines:code' metric
-	Average        : 38.0
+	Average        : 45.0
 	Minimum        : 21
-	Maximum        : 55
-	Total          : 76.0
+	Maximum        : 69
+	Total          : 90.0
 	Distribution   : 2 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	            21 : 0.500 : 0.500 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
-	            55 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
+	            69 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./:: info: Overall metrics for 'std.code.filelines:comments' metric
 	Average        : 5.0
@@ -28,14 +28,14 @@
 	             1 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./:: info: Overall metrics for 'std.code.filelines:total' metric
-	Average        : 42.5
+	Average        : 49.5
 	Minimum        : 25
-	Maximum        : 60
-	Total          : 85.0
+	Maximum        : 74
+	Total          : 99.0
 	Distribution   : 2 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	            25 : 0.500 : 0.500 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
-	            60 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
+	            74 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./:: info: Directory content:
 	File           : file_deleted_in_new_sources.cpp

+ 12 - 12
metrixpp/tests/general/test_basic/test_std_general_metrics_view_nest_per_file_stdout.gold.txt

@@ -1,22 +1,22 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
 
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region
@@ -77,7 +77,7 @@
 
 ./simple.cpp:0: info: Metrics per file
 	std.general:proctime: 0.01
-	std.general:size: 788
+	std.general:size: 1418
 
 ./simple.cpp:: info: Overall metrics for 'std.general:procerrors' metric
 	Average        : None
@@ -97,12 +97,12 @@
 	        0.0100 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.general:size' metric
-	Average        : 788.0
-	Minimum        : 788
-	Maximum        : 788
-	Total          : 788.0
+	Average        : 1418.0
+	Minimum        : 1418
+	Maximum        : 1418
+	Total          : 1418.0
 	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
-	           788 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	          1418 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 

+ 4 - 4
metrixpp/tests/general/test_basic/test_std_general_metrics_view_txt_stdout.gold.txt

@@ -16,14 +16,14 @@
 	        0.0100 : 1.000 : 1.000 : 2	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./:: info: Overall metrics for 'std.general:size' metric
-	Average        : 533.5
+	Average        : 848.5
 	Minimum        : 279
-	Maximum        : 788
-	Total          : 1067.0
+	Maximum        : 1418
+	Total          : 1697.0
 	Distribution   : 2 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	           279 : 0.500 : 0.500 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
-	           788 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
+	          1418 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./:: info: Directory content:
 	File           : file_deleted_in_new_sources.cpp

+ 22 - 21
metrixpp/tests/general/test_basic/test_std_lines_metrics_view_nest_per_file_stdout.gold.txt

@@ -1,8 +1,8 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 	std.code.lines:code: 0
 	std.code.lines:comments: 0
@@ -12,8 +12,8 @@
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
     	std.code.lines:code: 4
     	std.code.lines:comments: 1
@@ -23,13 +23,13 @@
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
-        	std.code.lines:code: 6
+        	std.code.lines:code: 20
         	std.code.lines:comments: 0
         	std.code.lines:preprocessor: 0
-        	std.code.lines:total: 6
+        	std.code.lines:total: 20
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region
             	Region name    : A
@@ -120,19 +120,19 @@
             	std.code.lines:total: 7
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.27272727
+	Average        : 6.54545455
 	Minimum        : 0
-	Maximum        : 11
-	Total          : 58.0
+	Maximum        : 20
+	Total          : 72.0
 	Distribution   : 11 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.091 : 0.091 :  1	|||||||||
 	             3 : 0.182 : 0.273 :  2	||||||||||||||||||
 	             4 : 0.091 : 0.364 :  1	|||||||||
 	             5 : 0.182 : 0.545 :  2	||||||||||||||||||
-	             6 : 0.091 : 0.636 :  1	|||||||||
-	             7 : 0.273 : 0.909 :  3	|||||||||||||||||||||||||||
-	            11 : 0.091 : 1.000 :  1	|||||||||
+	             7 : 0.273 : 0.818 :  3	|||||||||||||||||||||||||||
+	            11 : 0.091 : 0.909 :  1	|||||||||
+	            20 : 0.091 : 1.000 :  1	|||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:comments' metric
 	Average        : 0.45454545
@@ -156,18 +156,19 @@
 	             1 : 0.091 : 1.000 :  1	|||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.72727273
+	Average        : 7.0
 	Minimum        : 0
-	Maximum        : 12
-	Total          : 63.0
+	Maximum        : 20
+	Total          : 77.0
 	Distribution   : 11 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.091 : 0.091 :  1	|||||||||
 	             3 : 0.182 : 0.273 :  2	||||||||||||||||||
 	             5 : 0.182 : 0.455 :  2	||||||||||||||||||
-	             6 : 0.182 : 0.636 :  2	||||||||||||||||||
-	             7 : 0.091 : 0.727 :  1	|||||||||
-	             8 : 0.182 : 0.909 :  2	||||||||||||||||||
-	            12 : 0.091 : 1.000 :  1	|||||||||
+	             6 : 0.091 : 0.545 :  1	|||||||||
+	             7 : 0.091 : 0.636 :  1	|||||||||
+	             8 : 0.182 : 0.818 :  2	||||||||||||||||||
+	            12 : 0.091 : 0.909 :  1	|||||||||
+	            20 : 0.091 : 1.000 :  1	|||||||||
 
 

+ 16 - 15
metrixpp/tests/general/test_basic/test_std_lines_metrics_view_txt_stdout.gold.txt

@@ -1,18 +1,18 @@
 ./:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.0
+	Average        : 5.875
 	Minimum        : 0
-	Maximum        : 11
-	Total          : 80.0
+	Maximum        : 20
+	Total          : 94.0
 	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 :  2	||||||||||||
 	             3 : 0.188 : 0.312 :  3	||||||||||||||||||
 	             4 : 0.125 : 0.438 :  2	||||||||||||
 	             5 : 0.125 : 0.562 :  2	||||||||||||
-	             6 : 0.062 : 0.625 :  1	||||||
-	             7 : 0.250 : 0.875 :  4	|||||||||||||||||||||||||
-	             8 : 0.062 : 0.938 :  1	||||||
-	            11 : 0.062 : 1.000 :  1	||||||
+	             7 : 0.250 : 0.812 :  4	|||||||||||||||||||||||||
+	             8 : 0.062 : 0.875 :  1	||||||
+	            11 : 0.062 : 0.938 :  1	||||||
+	            20 : 0.062 : 1.000 :  1	||||||
 
 ./:: info: Overall metrics for 'std.code.lines:comments' metric
 	Average        : 0.625
@@ -37,20 +37,21 @@
 	             1 : 0.062 : 1.000 :  1	||||||
 
 ./:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.5625
+	Average        : 6.4375
 	Minimum        : 0
-	Maximum        : 12
-	Total          : 89.0
+	Maximum        : 20
+	Total          : 103.0
 	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 :  2	||||||||||||
 	             3 : 0.188 : 0.312 :  3	||||||||||||||||||
 	             5 : 0.125 : 0.438 :  2	||||||||||||
-	             6 : 0.125 : 0.562 :  2	||||||||||||
-	             7 : 0.188 : 0.750 :  3	||||||||||||||||||
-	             8 : 0.125 : 0.875 :  2	||||||||||||
-	             9 : 0.062 : 0.938 :  1	||||||
-	            12 : 0.062 : 1.000 :  1	||||||
+	             6 : 0.062 : 0.500 :  1	||||||
+	             7 : 0.188 : 0.688 :  3	||||||||||||||||||
+	             8 : 0.125 : 0.812 :  2	||||||||||||
+	             9 : 0.062 : 0.875 :  1	||||||
+	            12 : 0.062 : 0.938 :  1	||||||
+	            20 : 0.062 : 1.000 :  1	||||||
 
 ./:: info: Directory content:
 	File           : file_deleted_in_new_sources.cpp

+ 13 - 11
metrixpp/tests/general/test_basic/test_std_longlines_metrics_view_nest_per_file_stdout.gold.txt

@@ -1,23 +1,24 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
 
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
+        	std.code.longlines:numbers: 4
 
 .   .   .   ./simple.cpp:12: info: Metrics per 'A' region
             	Region name    : A
@@ -77,12 +78,13 @@
             	Modified       : None
 
 ./simple.cpp:: info: Overall metrics for 'std.code.longlines:numbers' metric
-	Average        : 1.0 (excluding zero metric values)
+	Average        : 2.5 (excluding zero metric values)
 	Minimum        : 1
-	Maximum        : 1
-	Total          : 1.0
-	Distribution   : 1 regions in total (including 0 suppressed)
+	Maximum        : 4
+	Total          : 5.0
+	Distribution   : 2 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.500 : 0.500 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             4 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 

+ 6 - 5
metrixpp/tests/general/test_basic/test_std_longlines_metrics_view_txt_stdout.gold.txt

@@ -1,11 +1,12 @@
 ./:: info: Overall metrics for 'std.code.longlines:numbers' metric
-	Average        : 1.0 (excluding zero metric values)
+	Average        : 2.5 (excluding zero metric values)
 	Minimum        : 1
-	Maximum        : 1
-	Total          : 1.0
-	Distribution   : 1 regions in total (including 0 suppressed)
+	Maximum        : 4
+	Total          : 5.0
+	Distribution   : 2 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.500 : 0.500 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             4 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./:: info: Directory content:
 	File           : file_deleted_in_new_sources.cpp

+ 7 - 7
metrixpp/tests/general/test_basic/test_std_maintindex_view_txt_stdout.gold.txt

@@ -10,20 +10,20 @@
 	             3 : 0.125 : 1.000 : 1	||||||||||||
 
 ./:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.0
+	Average        : 5.875
 	Minimum        : 0
-	Maximum        : 11
-	Total          : 80.0
+	Maximum        : 20
+	Total          : 94.0
 	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 :  2	||||||||||||
 	             3 : 0.188 : 0.312 :  3	||||||||||||||||||
 	             4 : 0.125 : 0.438 :  2	||||||||||||
 	             5 : 0.125 : 0.562 :  2	||||||||||||
-	             6 : 0.062 : 0.625 :  1	||||||
-	             7 : 0.250 : 0.875 :  4	|||||||||||||||||||||||||
-	             8 : 0.062 : 0.938 :  1	||||||
-	            11 : 0.062 : 1.000 :  1	||||||
+	             7 : 0.250 : 0.812 :  4	|||||||||||||||||||||||||
+	             8 : 0.062 : 0.875 :  1	||||||
+	            11 : 0.062 : 0.938 :  1	||||||
+	            20 : 0.062 : 1.000 :  1	||||||
 
 ./:: info: Overall metrics for 'std.code.mi:simple' metric
 	Average        : 1.0

+ 6 - 6
metrixpp/tests/general/test_basic/test_std_member_metrics_view_nest_per_file_stdout.gold.txt

@@ -1,16 +1,16 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-788
-	Line numbers   : 1-74
+	Offsets        : 0-1418
+	Line numbers   : 1-90
 	Modified       : None
 	std.code.member:namespaces: 1
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-787
-    	Line numbers   : 3-73
+    	Offsets        : 2-1417
+    	Line numbers   : 3-89
     	Modified       : None
     	std.code.member:classes: 1
     	std.code.member:types: 1
@@ -18,8 +18,8 @@
 .   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 94-783
-        	Line numbers   : 9-71
+        	Offsets        : 94-1413
+        	Line numbers   : 9-87
         	Modified       : None
         	std.code.member:methods: 4
 

+ 4 - 4
metrixpp/tests/general/test_basic/test_workflow_export_default_stdout.gold.txt

@@ -5,9 +5,9 @@ file,region,type,modified,line start,line end,std.code.complexity:cyclomatic,std
 ./file_deleted_in_new_sources.cpp,B,function,,12,20,1,8,2,0,9,,,,
 ./file_deleted_in_new_sources.cpp,never_old,function,,26,33,1,7,0,0,7,,,,
 ./file_deleted_in_new_sources.cpp,,file,,1,34,,,,,,,,,
-./simple.cpp,__global__,global,,1,74,,0,0,0,0,,,,
-./simple.cpp,hmm,namespace,,3,73,,4,1,1,6,,,,
-./simple.cpp,A,class,,9,71,,6,0,0,6,,,,
+./simple.cpp,__global__,global,,1,90,,0,0,0,0,,,,
+./simple.cpp,hmm,namespace,,3,89,,4,1,1,6,,,,
+./simple.cpp,A,class,,9,87,,20,0,0,20,,,,
 ./simple.cpp,A,function,,12,23,3,11,2,0,12,,,,
 ./simple.cpp,func,function,,26,40,1,5,0,0,5,,,,
 ./simple.cpp,embeded,class,,28,38,,3,0,0,3,,,,
@@ -16,4 +16,4 @@ file,region,type,modified,line start,line end,std.code.complexity:cyclomatic,std
 ./simple.cpp,embeded,class,,44,54,,3,0,0,3,,,,
 ./simple.cpp,embeded,function,,46,53,1,7,1,0,8,,,,
 ./simple.cpp,never,function,,58,65,1,7,0,0,7,,,,
-./simple.cpp,,file,,1,74,,,,,,,,,
+./simple.cpp,,file,,1,90,,,,,,,,,

+ 1 - 1
metrixpp/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt

@@ -27,5 +27,5 @@ test_workflow.db:: info: Collected metrics:
 
 ./:: info: Processed files and checksums:
 	./file_deleted_in_new_sources.cpp: 0xfd51c243
-	./simple.cpp   : 0x9242fb5d
+	./simple.cpp   : 0xe4c3a5ef
 

+ 5 - 4
metrixpp/tests/general/test_basic/test_workflow_view_default_stdout.gold.txt

@@ -12,16 +12,16 @@
                 </cyclomatic>
             </std.code.complexity>
             <std.code.lines>
-                <code avg="5.0" count="16" max="11" min="0" nonzero="False" sup="0" total="80.0">
+                <code avg="5.875" count="16" max="20" min="0" nonzero="False" sup="0" total="94.0">
                     <distribution-bars>
                         <distribution-bar count="2" metric="0" ratio="0.125" />
                         <distribution-bar count="3" metric="3" ratio="0.1875" />
                         <distribution-bar count="2" metric="4" ratio="0.125" />
                         <distribution-bar count="2" metric="5" ratio="0.125" />
-                        <distribution-bar count="1" metric="6" ratio="0.0625" />
                         <distribution-bar count="4" metric="7" ratio="0.25" />
                         <distribution-bar count="1" metric="8" ratio="0.0625" />
                         <distribution-bar count="1" metric="11" ratio="0.0625" />
+                        <distribution-bar count="1" metric="20" ratio="0.0625" />
                     </distribution-bars>
                 </code>
                 <comments avg="0.625" count="16" max="3" min="0" nonzero="False" sup="0" total="10.0">
@@ -38,16 +38,17 @@
                         <distribution-bar count="1" metric="1" ratio="0.0625" />
                     </distribution-bars>
                 </preprocessor>
-                <total avg="5.5625" count="16" max="12" min="0" nonzero="False" sup="0" total="89.0">
+                <total avg="6.4375" count="16" max="20" min="0" nonzero="False" sup="0" total="103.0">
                     <distribution-bars>
                         <distribution-bar count="2" metric="0" ratio="0.125" />
                         <distribution-bar count="3" metric="3" ratio="0.1875" />
                         <distribution-bar count="2" metric="5" ratio="0.125" />
-                        <distribution-bar count="2" metric="6" ratio="0.125" />
+                        <distribution-bar count="1" metric="6" ratio="0.0625" />
                         <distribution-bar count="3" metric="7" ratio="0.1875" />
                         <distribution-bar count="2" metric="8" ratio="0.125" />
                         <distribution-bar count="1" metric="9" ratio="0.0625" />
                         <distribution-bar count="1" metric="12" ratio="0.0625" />
+                        <distribution-bar count="1" metric="20" ratio="0.0625" />
                     </distribution-bars>
                 </total>
             </std.code.lines>

+ 4 - 5
metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_stdout.gold.txt

@@ -15,13 +15,12 @@
             </std.code.complexity>
             <std.code.lines>
                 <code avg="5.27272727" count="11" max="11" min="0" nonzero="False" sup="0" total="58.0">
-                    <__diff__ avg="0.0" count="0" max="0" min="0" nonzero="0" sup="0" total="0.0" />
+                    <__diff__ avg="-1.27272727" count="0" max="-9" min="0" nonzero="0" sup="0" total="-14.0" />
                     <distribution-bars>
                         <distribution-bar __diff__="0" count="1" metric="0" ratio="0.09090909" />
                         <distribution-bar __diff__="0" count="2" metric="3" ratio="0.18181818" />
                         <distribution-bar __diff__="1" count="2" metric="4" ratio="0.18181818" />
                         <distribution-bar __diff__="0" count="2" metric="5" ratio="0.18181818" />
-                        <distribution-bar __diff__="-1" count="0" metric="6" ratio="0" />
                         <distribution-bar __diff__="-2" count="1" metric="7" ratio="0.09090909" />
                         <distribution-bar __diff__="2" count="2" metric="8" ratio="0.18181818" />
                         <distribution-bar __diff__="0" count="1" metric="11" ratio="0.09090909" />
@@ -44,13 +43,13 @@
                     </distribution-bars>
                 </preprocessor>
                 <total avg="5.90909091" count="11" max="12" min="0" nonzero="False" sup="0" total="65.0">
-                    <__diff__ avg="0.18181818" count="0" max="0" min="0" nonzero="0" sup="0" total="2.0" />
+                    <__diff__ avg="-1.09090909" count="0" max="-8" min="0" nonzero="0" sup="0" total="-12.0" />
                     <distribution-bars>
                         <distribution-bar __diff__="0" count="1" metric="0" ratio="0.09090909" />
                         <distribution-bar __diff__="-1" count="1" metric="3" ratio="0.09090909" />
                         <distribution-bar __diff__="2" count="2" metric="4" ratio="0.18181818" />
                         <distribution-bar __diff__="0" count="2" metric="5" ratio="0.18181818" />
-                        <distribution-bar __diff__="-2" count="0" metric="6" ratio="0" />
+                        <distribution-bar __diff__="-1" count="0" metric="6" ratio="0" />
                         <distribution-bar __diff__="1" count="2" metric="7" ratio="0.18181818" />
                         <distribution-bar __diff__="-2" count="0" metric="8" ratio="0" />
                         <distribution-bar __diff__="2" count="2" metric="9" ratio="0.18181818" />
@@ -95,7 +94,7 @@
                 <region>
                     <data>
                         <std.code.lines code="4" comments="0" preprocessor="0" total="4">
-                            <__diff__ code="-2" comments="0" preprocessor="0" total="-2" />
+                            <__diff__ code="-16" comments="0" preprocessor="0" total="-16" />
                         </std.code.lines>
                     </data>
                     <info cursor="10" line_begin="10" line_end="75" modified="True" name="A" offset_begin="111" offset_end="831" type="class" />

+ 9 - 10
metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_txt_all_stdout.gold.txt

@@ -26,10 +26,10 @@
 	Offsets        : 111-831
 	Line numbers   : 10-75
 	Modified       : True
-	std.code.lines:code: 4 [-2]
+	std.code.lines:code: 4 [-16]
 	std.code.lines:comments: 0 [+0]
 	std.code.lines:preprocessor: 0 [+0]
-	std.code.lines:total: 4 [-2]
+	std.code.lines:total: 4 [-16]
 
 ./simple.cpp:13: info: Metrics per 'A' region
 	Region name    : A
@@ -141,17 +141,16 @@
 	             3 : 0.143 : 1.000 : 1 [+0]	||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.27272727 [+0.0]
+	Average        : 5.27272727 [-1.27272727]
 	Minimum        : 0 [+0]
-	Maximum        : 11 [+0]
-	Total          : 58.0 [+0.0]
+	Maximum        : 11 [-9]
+	Total          : 58.0 [-14.0]
 	Distribution   : 11 [+0] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.091 : 0.091 :  1 [+0 ]	|||||||||
 	             3 : 0.182 : 0.273 :  2 [+0 ]	||||||||||||||||||
 	             4 : 0.182 : 0.455 :  2 [+1 ]	||||||||||||||||||
 	             5 : 0.182 : 0.636 :  2 [+0 ]	||||||||||||||||||
-	             6 : 0.000 : 0.636 :  0 [-1 ]	
 	             7 : 0.091 : 0.727 :  1 [-2 ]	|||||||||
 	             8 : 0.182 : 0.909 :  2 [+2 ]	||||||||||||||||||
 	            11 : 0.091 : 1.000 :  1 [+0 ]	|||||||||
@@ -179,17 +178,17 @@
 	             2 : 0.091 : 1.000 :  1 [+1 ]	|||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.90909091 [+0.18181818]
+	Average        : 5.90909091 [-1.09090909]
 	Minimum        : 0 [+0]
-	Maximum        : 12 [+0]
-	Total          : 65.0 [+2.0]
+	Maximum        : 12 [-8]
+	Total          : 65.0 [-12.0]
 	Distribution   : 11 [+0] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.091 : 0.091 :  1 [+0 ]	|||||||||
 	             3 : 0.091 : 0.182 :  1 [-1 ]	|||||||||
 	             4 : 0.182 : 0.364 :  2 [+2 ]	||||||||||||||||||
 	             5 : 0.182 : 0.545 :  2 [+0 ]	||||||||||||||||||
-	             6 : 0.000 : 0.545 :  0 [-2 ]	
+	             6 : 0.000 : 0.545 :  0 [-1 ]	
 	             7 : 0.182 : 0.727 :  2 [+1 ]	||||||||||||||||||
 	             8 : 0.000 : 0.727 :  0 [-2 ]	
 	             9 : 0.182 : 0.909 :  2 [+2 ]	||||||||||||||||||

+ 2 - 2
metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_txt_new_stdout.gold.txt

@@ -26,10 +26,10 @@
 	Offsets        : 111-831
 	Line numbers   : 10-75
 	Modified       : True
-	std.code.lines:code: 4 [-2]
+	std.code.lines:code: 4 [-16]
 	std.code.lines:comments: 0 [+0]
 	std.code.lines:preprocessor: 0 [+0]
-	std.code.lines:total: 4 [-2]
+	std.code.lines:total: 4 [-16]
 
 ./simple.cpp:13: info: Metrics per 'A' region
 	Region name    : A

+ 9 - 10
metrixpp/tests/general/test_basic/test_workflow_view_second_per_file_txt_touched_stdout.gold.txt

@@ -26,10 +26,10 @@
 	Offsets        : 111-831
 	Line numbers   : 10-75
 	Modified       : True
-	std.code.lines:code: 4 [-2]
+	std.code.lines:code: 4 [-16]
 	std.code.lines:comments: 0 [+0]
 	std.code.lines:preprocessor: 0 [+0]
-	std.code.lines:total: 4 [-2]
+	std.code.lines:total: 4 [-16]
 
 ./simple.cpp:13: info: Metrics per 'A' region
 	Region name    : A
@@ -140,16 +140,15 @@
 	             2 : 0.400 : 1.000 : 2 [+1]	||||||||||||||||||||||||||||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.57142857 [+0.0]
+	Average        : 5.57142857 [-2.0]
 	Minimum        : 3 [+0]
-	Maximum        : 8 [+1]
-	Total          : 39.0 [+0.0]
+	Maximum        : 8 [-12]
+	Total          : 39.0 [-14.0]
 	Distribution   : 7 [+0] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             3 : 0.143 : 0.143 : 1 [+0]	||||||||||||||
 	             4 : 0.286 : 0.429 : 2 [+1]	||||||||||||||||||||||||||||
 	             5 : 0.143 : 0.571 : 1 [+0]	||||||||||||||
-	             6 : 0.000 : 0.571 : 0 [-1]	
 	             7 : 0.143 : 0.714 : 1 [-2]	||||||||||||||
 	             8 : 0.286 : 1.000 : 2 [+2]	||||||||||||||||||||||||||||
 
@@ -176,16 +175,16 @@
 	             2 : 0.143 : 1.000 : 1 [+1]	||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 6.42857143 [+0.28571429]
+	Average        : 6.42857143 [-1.71428571]
 	Minimum        : 4 [+1]
-	Maximum        : 9 [+1]
-	Total          : 45.0 [+2.0]
+	Maximum        : 9 [-11]
+	Total          : 45.0 [-12.0]
 	Distribution   : 7 [+0] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             3 : 0.000 : 0.000 : 0 [-1]	
 	             4 : 0.286 : 0.286 : 2 [+2]	||||||||||||||||||||||||||||
 	             5 : 0.143 : 0.429 : 1 [+0]	||||||||||||||
-	             6 : 0.000 : 0.429 : 0 [-2]	
+	             6 : 0.000 : 0.429 : 0 [-1]	
 	             7 : 0.286 : 0.714 : 2 [+1]	||||||||||||||||||||||||||||
 	             8 : 0.000 : 0.714 : 0 [-2]	
 	             9 : 0.286 : 1.000 : 2 [+2]	||||||||||||||||||||||||||||

+ 3 - 4
metrixpp/tests/general/test_basic/test_workflow_view_second_stdout.gold.txt

@@ -15,13 +15,12 @@
             </std.code.complexity>
             <std.code.lines>
                 <code avg="5.0" count="15" max="11" min="0" nonzero="False" sup="0" total="75.0">
-                    <__diff__ avg="0.0" count="-1" max="0" min="0" nonzero="0" sup="0" total="-5.0" />
+                    <__diff__ avg="-0.875" count="-1" max="-9" min="0" nonzero="0" sup="0" total="-19.0" />
                     <distribution-bars>
                         <distribution-bar __diff__="0" count="2" metric="0" ratio="0.13333333" />
                         <distribution-bar __diff__="0" count="3" metric="3" ratio="0.2" />
                         <distribution-bar __diff__="1" count="3" metric="4" ratio="0.2" />
                         <distribution-bar __diff__="0" count="2" metric="5" ratio="0.13333333" />
-                        <distribution-bar __diff__="-1" count="0" metric="6" ratio="0" />
                         <distribution-bar __diff__="-3" count="1" metric="7" ratio="0.06666667" />
                         <distribution-bar __diff__="1" count="2" metric="8" ratio="0.13333333" />
                         <distribution-bar __diff__="1" count="1" metric="10" ratio="0.06666667" />
@@ -45,13 +44,13 @@
                     </distribution-bars>
                 </preprocessor>
                 <total avg="5.66666667" count="15" max="12" min="0" nonzero="False" sup="0" total="85.0">
-                    <__diff__ avg="0.10416667" count="-1" max="0" min="0" nonzero="0" sup="0" total="-4.0" />
+                    <__diff__ avg="-0.77083333" count="-1" max="-8" min="0" nonzero="0" sup="0" total="-18.0" />
                     <distribution-bars>
                         <distribution-bar __diff__="0" count="2" metric="0" ratio="0.13333333" />
                         <distribution-bar __diff__="-1" count="2" metric="3" ratio="0.13333333" />
                         <distribution-bar __diff__="2" count="2" metric="4" ratio="0.13333333" />
                         <distribution-bar __diff__="1" count="3" metric="5" ratio="0.2" />
-                        <distribution-bar __diff__="-2" count="0" metric="6" ratio="0" />
+                        <distribution-bar __diff__="-1" count="0" metric="6" ratio="0" />
                         <distribution-bar __diff__="-1" count="2" metric="7" ratio="0.13333333" />
                         <distribution-bar __diff__="-2" count="0" metric="8" ratio="0" />
                         <distribution-bar __diff__="1" count="2" metric="9" ratio="0.13333333" />

+ 7 - 8
metrixpp/tests/general/test_basic/test_workflow_view_second_txt_all_stdout.gold.txt

@@ -11,17 +11,16 @@
 	             3 : 0.250 : 1.000 : 2 [+1]	|||||||||||||||||||||||||
 
 ./:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.0 [+0.0]
+	Average        : 5.0 [-0.875]
 	Minimum        : 0 [+0]
-	Maximum        : 11 [+0]
-	Total          : 75.0 [-5.0]
+	Maximum        : 11 [-9]
+	Total          : 75.0 [-19.0]
 	Distribution   : 15 [-1] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.133 : 0.133 :  2 [+0 ]	|||||||||||||
 	             3 : 0.200 : 0.333 :  3 [+0 ]	||||||||||||||||||||
 	             4 : 0.200 : 0.533 :  3 [+1 ]	||||||||||||||||||||
 	             5 : 0.133 : 0.667 :  2 [+0 ]	|||||||||||||
-	             6 : 0.000 : 0.667 :  0 [-1 ]	
 	             7 : 0.067 : 0.733 :  1 [-3 ]	||||||
 	             8 : 0.133 : 0.867 :  2 [+1 ]	|||||||||||||
 	            10 : 0.067 : 0.933 :  1 [+1 ]	||||||
@@ -50,17 +49,17 @@
 	             2 : 0.067 : 1.000 :  1 [+1 ]	||||||
 
 ./:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.66666667 [+0.10416667]
+	Average        : 5.66666667 [-0.77083333]
 	Minimum        : 0 [+0]
-	Maximum        : 12 [+0]
-	Total          : 85.0 [-4.0]
+	Maximum        : 12 [-8]
+	Total          : 85.0 [-18.0]
 	Distribution   : 15 [-1] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.133 : 0.133 :  2 [+0 ]	|||||||||||||
 	             3 : 0.133 : 0.267 :  2 [-1 ]	|||||||||||||
 	             4 : 0.133 : 0.400 :  2 [+2 ]	|||||||||||||
 	             5 : 0.200 : 0.600 :  3 [+1 ]	||||||||||||||||||||
-	             6 : 0.000 : 0.600 :  0 [-2 ]	
+	             6 : 0.000 : 0.600 :  0 [-1 ]	
 	             7 : 0.133 : 0.733 :  2 [-1 ]	|||||||||||||
 	             8 : 0.000 : 0.733 :  0 [-2 ]	
 	             9 : 0.133 : 0.867 :  2 [+1 ]	|||||||||||||

+ 7 - 8
metrixpp/tests/general/test_basic/test_workflow_view_second_txt_touched_stdout.gold.txt

@@ -11,17 +11,16 @@
 	             3 : 0.167 : 1.000 : 1 [+1]	||||||||||||||||
 
 ./:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.09090909 [+0.00757576]
+	Average        : 5.09090909 [-1.15909091]
 	Minimum        : 0 [+0]
-	Maximum        : 10 [+2]
-	Total          : 56.0 [-5.0]
+	Maximum        : 10 [-10]
+	Total          : 56.0 [-19.0]
 	Distribution   : 11 [-1] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.091 : 0.091 :  1 [+0 ]	|||||||||
 	             3 : 0.182 : 0.273 :  2 [+0 ]	||||||||||||||||||
 	             4 : 0.273 : 0.545 :  3 [+1 ]	|||||||||||||||||||||||||||
 	             5 : 0.091 : 0.636 :  1 [+0 ]	|||||||||
-	             6 : 0.000 : 0.636 :  0 [-1 ]	
 	             7 : 0.091 : 0.727 :  1 [-3 ]	|||||||||
 	             8 : 0.182 : 0.909 :  2 [+1 ]	||||||||||||||||||
 	            10 : 0.091 : 1.000 :  1 [+1 ]	|||||||||
@@ -49,17 +48,17 @@
 	             2 : 0.091 : 1.000 :  1 [+1 ]	|||||||||
 
 ./:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.90909091 [+0.15909091]
+	Average        : 5.90909091 [-1.00757576]
 	Minimum        : 0 [+0]
-	Maximum        : 12 [+3]
-	Total          : 65.0 [-4.0]
+	Maximum        : 12 [-8]
+	Total          : 65.0 [-18.0]
 	Distribution   : 11 [-1] regions in total (including 0 [+0] suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.091 : 0.091 :  1 [+0 ]	|||||||||
 	             3 : 0.091 : 0.182 :  1 [-1 ]	|||||||||
 	             4 : 0.182 : 0.364 :  2 [+2 ]	||||||||||||||||||
 	             5 : 0.182 : 0.545 :  2 [+1 ]	||||||||||||||||||
-	             6 : 0.000 : 0.545 :  0 [-2 ]	
+	             6 : 0.000 : 0.545 :  0 [-1 ]	
 	             7 : 0.182 : 0.727 :  2 [-1 ]	||||||||||||||||||
 	             8 : 0.000 : 0.727 :  0 [-2 ]	
 	             9 : 0.182 : 0.909 :  2 [+1 ]	||||||||||||||||||