Ver código fonte

tests for view scope-mode option

avkonst 11 anos atrás
pai
commit
8b83c088f2
39 arquivos alterados com 1339 adições e 200 exclusões
  1. 57 1
      mainline/tests/general/test_basic.py
  2. 33 0
      mainline/tests/general/test_basic/sources/file_deleted_in_new_sources.cpp
  3. 19 0
      mainline/tests/general/test_basic/sources/simple.cpp
  4. 3 0
      mainline/tests/general/test_basic/sources_changed/simple.cpp
  5. 44 6
      mainline/tests/general/test_basic/test_debug_tool_debug_default_stdout.gold.txt
  6. 46 28
      mainline/tests/general/test_basic/test_std_general_metrics_view_nest_per_file_stdout.gold.txt
  7. 10 9
      mainline/tests/general/test_basic/test_std_general_metrics_view_txt_stdout.gold.txt
  8. 86 54
      mainline/tests/general/test_basic/test_std_lines_metrics_view_nest_per_file_stdout.gold.txt
  9. 36 31
      mainline/tests/general/test_basic/test_std_lines_metrics_view_txt_stdout.gold.txt
  10. 13 13
      mainline/tests/general/test_basic/test_view_format_view_nest_per_file_stdout.gold.txt
  11. 3 3
      mainline/tests/general/test_basic/test_view_format_view_nest_stdout.gold.txt
  12. 1 1
      mainline/tests/general/test_basic/test_view_format_view_python_stdout.gold.txt
  13. 6 5
      mainline/tests/general/test_basic/test_view_format_view_txt_stdout.gold.txt
  14. 4 3
      mainline/tests/general/test_basic/test_view_format_view_xml_stdout.gold.txt
  15. 1 0
      mainline/tests/general/test_basic/test_workflow_collect_default_stderr.gold.txt
  16. 7 1
      mainline/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt
  17. 6 1
      mainline/tests/general/test_basic/test_workflow_info_second_stdout.gold.txt
  18. 1 1
      mainline/tests/general/test_basic/test_workflow_limit_default_stderr.gold.txt
  19. 40 4
      mainline/tests/general/test_basic/test_workflow_limit_default_stdout.gold.txt
  20. 5 5
      mainline/tests/general/test_basic/test_workflow_limit_second_stdout.gold.txt
  21. 5 5
      mainline/tests/general/test_basic/test_workflow_limit_second_warn_all_stdout.gold.txt
  22. 1 1
      mainline/tests/general/test_basic/test_workflow_limit_second_warn_new_stdout.gold.txt
  23. 3 3
      mainline/tests/general/test_basic/test_workflow_limit_second_warn_touched_stdout.gold.txt
  24. 2 2
      mainline/tests/general/test_basic/test_workflow_limit_second_warn_trend_stdout.gold.txt
  25. 44 3
      mainline/tests/general/test_basic/test_workflow_view_default_stdout.gold.txt
  26. 91 17
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_stdout.gold.txt
  27. 3 0
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_all_stderr.gold.txt
  28. 173 0
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_all_stdout.gold.txt
  29. 4 0
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_new_stderr.gold.txt
  30. 156 0
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_new_stdout.gold.txt
  31. 4 0
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_touched_stderr.gold.txt
  32. 168 0
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_touched_stdout.gold.txt
  33. 48 3
      mainline/tests/general/test_basic/test_workflow_view_second_stdout.gold.txt
  34. 3 0
      mainline/tests/general/test_basic/test_workflow_view_second_txt_all_stderr.gold.txt
  35. 71 0
      mainline/tests/general/test_basic/test_workflow_view_second_txt_all_stdout.gold.txt
  36. 5 0
      mainline/tests/general/test_basic/test_workflow_view_second_txt_new_stderr.gold.txt
  37. 61 0
      mainline/tests/general/test_basic/test_workflow_view_second_txt_new_stdout.gold.txt
  38. 6 0
      mainline/tests/general/test_basic/test_workflow_view_second_txt_touched_stderr.gold.txt
  39. 70 0
      mainline/tests/general/test_basic/test_workflow_view_second_txt_touched_stdout.gold.txt

+ 57 - 1
mainline/tests/general/test_basic.py

@@ -29,6 +29,10 @@ class Test(tests.common.TestCase):
         # first collection
         runner = tests.common.ToolRunner('collect',
                                          ['--std.code.complexity.cyclomatic',
+                                          '--std.code.lines.total',
+                                          '--std.code.lines.code',
+                                          '--std.code.lines.preprocessor',
+                                          '--std.code.lines.comments',
                                           '--log-level=INFO'],
                                          check_stderr=[(0, -1)],
                                          save_prev=True)
@@ -43,7 +47,7 @@ class Test(tests.common.TestCase):
                                          ['--log-level=INFO',
                                           '--max-limit=std.code.complexity:cyclomatic:0'],
                                          check_stderr=[(0, -1)],
-                                         exit_code=4)
+                                         exit_code=8)
         self.assertExec(runner.run())
 
         runner = tests.common.ToolRunner('info',
@@ -55,6 +59,10 @@ class Test(tests.common.TestCase):
         # second collection
         runner = tests.common.ToolRunner('collect',
                                          ['--std.code.complexity.cyclomatic',
+                                          '--std.code.lines.total',
+                                          '--std.code.lines.code',
+                                          '--std.code.lines.preprocessor',
+                                          '--std.code.lines.comments',
                                           '--log-level=INFO'],
                                          check_stderr=[(0, -1)],
                                          prefix='second',
@@ -77,6 +85,52 @@ class Test(tests.common.TestCase):
                                          use_prev=True)
         self.assertExec(runner.run())
 
+        runner = tests.common.ToolRunner('view',
+                                         ['--log-level=INFO', '--scope-mode=all'],
+                                         check_stderr=[(0, -1)],
+                                         prefix='second_txt_all',
+                                         use_prev=True)
+        self.assertExec(runner.run())
+
+        runner = tests.common.ToolRunner('view',
+                                         ['--log-level=INFO', '--scope-mode=all'],
+                                         check_stderr=[(0, -1)],
+                                         prefix='second_per_file_txt_all',
+                                         dirs_list=['./simple.cpp'],
+                                         use_prev=True)
+        self.assertExec(runner.run())
+
+        runner = tests.common.ToolRunner('view',
+                                         ['--log-level=INFO', '--scope-mode=touched'],
+                                         check_stderr=[(0, -1)],
+                                         prefix='second_txt_touched',
+                                         use_prev=True)
+        self.assertExec(runner.run())
+
+        runner = tests.common.ToolRunner('view',
+                                         ['--log-level=INFO', '--scope-mode=touched'],
+                                         check_stderr=[(0, -1)],
+                                         prefix='second_per_file_txt_touched',
+                                         dirs_list=['./simple.cpp'],
+                                         use_prev=True)
+        self.assertExec(runner.run())
+
+        runner = tests.common.ToolRunner('view',
+                                         ['--log-level=INFO', '--scope-mode=new'],
+                                         check_stderr=[(0, -1)],
+                                         prefix='second_txt_new',
+                                         use_prev=True)
+        self.assertExec(runner.run())
+
+        runner = tests.common.ToolRunner('view',
+                                         ['--log-level=INFO', '--scope-mode=new'],
+                                         check_stderr=[(0, -1)],
+                                         prefix='second_per_file_txt_new',
+                                         dirs_list=['./simple.cpp'],
+                                         use_prev=True)
+        self.assertExec(runner.run())
+
+
         runner = tests.common.ToolRunner('limit',
                                          ['--log-level=INFO',
                                           '--max-limit=std.code.complexity:cyclomatic:0'],
@@ -157,6 +211,8 @@ class Test(tests.common.TestCase):
         #self.assertExec(runner.run())
 
     def test_view_format(self):
+        
+        # note: --scope-mode is tested in workflow test above
 
         runner = tests.common.ToolRunner('collect', ['--std.code.complexity.cyclomatic'], save_prev=True)
         self.assertExec(runner.run())

+ 33 - 0
mainline/tests/general/test_basic/sources/file_deleted_in_new_sources.cpp

@@ -0,0 +1,33 @@
+
+
+/*
+ * Just produce any code in order to test basic workflow
+ */
+namespace hmm
+{
+
+class B
+{
+
+	B()
+	{
+		/* first funtion */
+		this->m_member = 10;
+		if (a & "asdadasdsd")
+		{
+			int a; // right?
+		}
+	}
+
+};
+
+}
+
+int never_old(int how_long = 999)
+{
+	while(true)
+	{
+
+	}
+	return 1;
+}

+ 19 - 0
mainline/tests/general/test_basic/sources/simple.cpp

@@ -4,6 +4,8 @@
 namespace hmm
 {
 
+#define old_prep
+
 class A
 {
 
@@ -20,6 +22,7 @@ class A
 		}
 	}
 
+
 	int func(int param = 5)
 	{
 		class embeded
@@ -36,6 +39,22 @@ class A
 		if (a);
 	}
 
+	int func_to_be_removed_in_new_sources(int param = 5)
+	{
+		class embeded
+		{
+			embeded()
+			{
+				int a = 10;
+				if ("text")
+				{
+					/* again crazy */
+				}
+			}
+		};
+		if (a && b);
+	}
+
 	int never(int how_long = 999)
 	{
 		while(true)

+ 3 - 0
mainline/tests/general/test_basic/sources_changed/simple.cpp

@@ -4,6 +4,9 @@
 namespace hmm
 {
 
+#define old_prep
+#define new_prep
+
 class A
 {
 

+ 44 - 6
mainline/tests/general/test_basic/test_debug_tool_debug_default_stdout.gold.txt

@@ -4,6 +4,8 @@
 namespace hmm
 {
 
+<span style="color:#990000">#define old_prep</span>
+
 class A
 {
 
@@ -20,6 +22,7 @@ class A
 		}
 	}
 
+
 	int func(int param = 5)
 	{
 		class embeded
@@ -36,6 +39,22 @@ class A
 		if (a);
 	}
 
+	int func_to_be_removed_in_new_sources(int param = 5)
+	{
+		class embeded
+		{
+			embeded()
+			{
+				int a = 10;
+				if ("<span style="color:#0000FF">text</span>")
+				{
+					<span style="color:#009900">/* again crazy */</span>
+				}
+			}
+		};
+		if (a &amp;&amp; b);
+	}
+
 	int never(int how_long = 999)
 	{
 		while(true)
@@ -55,10 +74,12 @@ class A
 namespace hmm
 {
 
-<span style="background-color:#F0F0D0"><a href="#line7" id=line"7"></a>class A
+#define old_prep
+
+<span style="background-color:#F0F0D0"><a href="#line9" id=line"9"></a>class A
 {
 
-	<span style="background-color:#F0F030"><a href="#line10" id=line"10"></a>A()
+	<span style="background-color:#F0F030"><a href="#line12" id=line"12"></a>A()
 	{
 		/* first funtion */
 		this-&gt;m_member = 10;
@@ -71,11 +92,12 @@ namespace hmm
 		}
 	}</span>
 
-	<span style="background-color:#F030F0"><a href="#line23" id=line"23"></a>int func(int param = 5)
+
+	<span style="background-color:#F030F0"><a href="#line26" id=line"26"></a>int func(int param = 5)
 	{
-		<span style="background-color:#F0F090"><a href="#line25" id=line"25"></a>class embeded
+		<span style="background-color:#F0F090"><a href="#line28" id=line"28"></a>class embeded
 		{
-			<span style="background-color:#F0F0E0"><a href="#line27" id=line"27"></a>embeded()
+			<span style="background-color:#F0F0E0"><a href="#line30" id=line"30"></a>embeded()
 			{
 				int a = 10;
 				if (true)
@@ -87,7 +109,23 @@ namespace hmm
 		if (a);
 	}</span>
 
-	<span style="background-color:#F0F030"><a href="#line39" id=line"39"></a>int never(int how_long = 999)
+	<span style="background-color:#F0F030"><a href="#line42" id=line"42"></a>int func_to_be_removed_in_new_sources(int param = 5)
+	{
+		<span style="background-color:#F0F090"><a href="#line44" id=line"44"></a>class embeded
+		{
+			<span style="background-color:#F0F0E0"><a href="#line46" id=line"46"></a>embeded()
+			{
+				int a = 10;
+				if ("text")
+				{
+					/* again crazy */
+				}
+			}</span>
+		}</span>;
+		if (a &amp;&amp; b);
+	}</span>
+
+	<span style="background-color:#F030F0"><a href="#line58" id=line"58"></a>int never(int how_long = 999)
 	{
 		while(true)
 		{

+ 46 - 28
mainline/tests/general/test_basic/test_std_general_metrics_view_nest_per_file_stdout.gold.txt

@@ -1,54 +1,72 @@
 ./simple.cpp:0: info: Metrics per '__global__' region
 	Region name    : __global__
 	Region type    : global
-	Offsets        : 0-487
-	Line numbers   : 1-52
+	Offsets        : 0-697
+	Line numbers   : 1-71
 
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-486
-    	Line numbers   : 3-51
+    	Offsets        : 2-696
+    	Line numbers   : 3-70
 
-.   .   ./simple.cpp:7: info: Metrics per 'A' region
+.   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 76-482
-        	Line numbers   : 7-49
+        	Offsets        : 94-692
+        	Line numbers   : 9-68
 
-.   .   .   ./simple.cpp:10: info: Metrics per 'A' region
+.   .   .   ./simple.cpp:12: info: Metrics per 'A' region
             	Region name    : A
             	Region type    : function
-            	Offsets        : 88-234
-            	Line numbers   : 10-21
+            	Offsets        : 106-252
+            	Line numbers   : 12-23
 
-.   .   .   ./simple.cpp:23: info: Metrics per 'func' region
+.   .   .   ./simple.cpp:26: info: Metrics per 'func' region
             	Region name    : func
             	Region type    : function
-            	Offsets        : 237-386
-            	Line numbers   : 23-37
+            	Offsets        : 256-405
+            	Line numbers   : 26-40
 
-.   .   .   .   ./simple.cpp:25: info: Metrics per 'embeded' region
+.   .   .   .   ./simple.cpp:28: info: Metrics per 'embeded' region
                 	Region name    : embeded
                 	Region type    : class
-                	Offsets        : 266-372
-                	Line numbers   : 25-35
+                	Offsets        : 285-391
+                	Line numbers   : 28-38
 
-.   .   .   .   .   ./simple.cpp:27: info: Metrics per 'embeded' region
+.   .   .   .   .   ./simple.cpp:30: info: Metrics per 'embeded' region
                     	Region name    : embeded
                     	Region type    : function
-                    	Offsets        : 287-368
-                    	Line numbers   : 27-34
+                    	Offsets        : 306-387
+                    	Line numbers   : 30-37
 
-.   .   .   ./simple.cpp:39: info: Metrics per 'never' region
+.   .   .   ./simple.cpp:42: info: Metrics per 'func_to_be_removed_in_new_sources' region
+            	Region name    : func_to_be_removed_in_new_sources
+            	Region type    : function
+            	Offsets        : 408-596
+            	Line numbers   : 42-56
+
+.   .   .   .   ./simple.cpp:44: info: Metrics per 'embeded' region
+                	Region name    : embeded
+                	Region type    : class
+                	Offsets        : 466-577
+                	Line numbers   : 44-54
+
+.   .   .   .   .   ./simple.cpp:46: info: Metrics per 'embeded' region
+                    	Region name    : embeded
+                    	Region type    : function
+                    	Offsets        : 487-573
+                    	Line numbers   : 46-53
+
+.   .   .   ./simple.cpp:58: info: Metrics per 'never' region
             	Region name    : never
             	Region type    : function
-            	Offsets        : 389-459
-            	Line numbers   : 39-46
+            	Offsets        : 599-669
+            	Line numbers   : 58-65
 
 ./simple.cpp:0: info: Metrics per file
 	std.general:proctime: 0.01
-	std.general:size: 487
+	std.general:size: 697
 
 ./simple.cpp:: info: Overall metrics for 'std.general:procerrors' metric
 	Average        : None
@@ -68,12 +86,12 @@
 	        0.0100 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.general:size' metric
-	Average        : 487.0
-	Minimum        : 487
-	Maximum        : 487
-	Total          : 487.0
+	Average        : 697.0
+	Minimum        : 697
+	Maximum        : 697
+	Total          : 697.0
 	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
-	           487 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	           697 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 

+ 10 - 9
mainline/tests/general/test_basic/test_std_general_metrics_view_txt_stdout.gold.txt

@@ -10,19 +10,20 @@
 	Average        : 0.01
 	Minimum        : 0.01
 	Maximum        : 0.01
-	Total          : 0.01
-	Distribution   : 1 files in total (including 0 suppressed)
+	Total          : 0.02
+	Distribution   : 2 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
-	        0.0100 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	        0.0100 : 1.000 : 1.000 : 2	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 :: info: Overall metrics for 'std.general:size' metric
-	Average        : 487.0
-	Minimum        : 487
-	Maximum        : 487
-	Total          : 487.0
-	Distribution   : 1 files in total (including 0 suppressed)
+	Average        : 488.0
+	Minimum        : 279
+	Maximum        : 697
+	Total          : 976.0
+	Distribution   : 2 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
-	           487 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	           279 : 0.500 : 0.500 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
+	           697 : 0.500 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||
 
 :: info: Directory content:
 	Directory      : .

+ 86 - 54
mainline/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-487
-	Line numbers   : 1-52
+	Offsets        : 0-697
+	Line numbers   : 1-71
 	std.code.lines:code: 0
 	std.code.lines:total: 0
 	std.code.lines:preprocessor: 0
@@ -11,120 +11,152 @@
 .   ./simple.cpp:4: info: Metrics per 'hmm' region
     	Region name    : hmm
     	Region type    : namespace
-    	Offsets        : 2-486
-    	Line numbers   : 3-51
+    	Offsets        : 2-696
+    	Line numbers   : 3-70
     	std.code.lines:code: 4
-    	std.code.lines:total: 5
-    	std.code.lines:preprocessor: 0
+    	std.code.lines:total: 6
+    	std.code.lines:preprocessor: 1
     	std.code.lines:comments: 1
 
-.   .   ./simple.cpp:7: info: Metrics per 'A' region
+.   .   ./simple.cpp:9: info: Metrics per 'A' region
         	Region name    : A
         	Region type    : class
-        	Offsets        : 76-482
-        	Line numbers   : 7-49
+        	Offsets        : 94-692
+        	Line numbers   : 9-68
         	std.code.lines:code: 4
         	std.code.lines:total: 4
         	std.code.lines:preprocessor: 0
         	std.code.lines:comments: 0
 
-.   .   .   ./simple.cpp:10: info: Metrics per 'A' region
+.   .   .   ./simple.cpp:12: info: Metrics per 'A' region
             	Region name    : A
             	Region type    : function
-            	Offsets        : 88-234
-            	Line numbers   : 10-21
+            	Offsets        : 106-252
+            	Line numbers   : 12-23
             	std.code.lines:code: 11
             	std.code.lines:total: 12
             	std.code.lines:preprocessor: 0
             	std.code.lines:comments: 2
 
-.   .   .   ./simple.cpp:23: info: Metrics per 'func' region
+.   .   .   ./simple.cpp:26: info: Metrics per 'func' region
             	Region name    : func
             	Region type    : function
-            	Offsets        : 237-386
-            	Line numbers   : 23-37
+            	Offsets        : 256-405
+            	Line numbers   : 26-40
             	std.code.lines:code: 5
             	std.code.lines:total: 5
             	std.code.lines:preprocessor: 0
             	std.code.lines:comments: 0
 
-.   .   .   .   ./simple.cpp:25: info: Metrics per 'embeded' region
+.   .   .   .   ./simple.cpp:28: info: Metrics per 'embeded' region
                 	Region name    : embeded
                 	Region type    : class
-                	Offsets        : 266-372
-                	Line numbers   : 25-35
+                	Offsets        : 285-391
+                	Line numbers   : 28-38
                 	std.code.lines:code: 3
                 	std.code.lines:total: 3
                 	std.code.lines:preprocessor: 0
                 	std.code.lines:comments: 0
 
-.   .   .   .   .   ./simple.cpp:27: info: Metrics per 'embeded' region
+.   .   .   .   .   ./simple.cpp:30: info: Metrics per 'embeded' region
                     	Region name    : embeded
                     	Region type    : function
-                    	Offsets        : 287-368
-                    	Line numbers   : 27-34
+                    	Offsets        : 306-387
+                    	Line numbers   : 30-37
                     	std.code.lines:code: 7
                     	std.code.lines:total: 8
                     	std.code.lines:preprocessor: 0
                     	std.code.lines:comments: 1
 
-.   .   .   ./simple.cpp:39: info: Metrics per 'never' region
+.   .   .   ./simple.cpp:42: info: Metrics per 'func_to_be_removed_in_new_sources' region
+            	Region name    : func_to_be_removed_in_new_sources
+            	Region type    : function
+            	Offsets        : 408-596
+            	Line numbers   : 42-56
+            	std.code.lines:code: 5
+            	std.code.lines:total: 5
+            	std.code.lines:preprocessor: 0
+            	std.code.lines:comments: 0
+
+.   .   .   .   ./simple.cpp:44: info: Metrics per 'embeded' region
+                	Region name    : embeded
+                	Region type    : class
+                	Offsets        : 466-577
+                	Line numbers   : 44-54
+                	std.code.lines:code: 3
+                	std.code.lines:total: 3
+                	std.code.lines:preprocessor: 0
+                	std.code.lines:comments: 0
+
+.   .   .   .   .   ./simple.cpp:46: info: Metrics per 'embeded' region
+                    	Region name    : embeded
+                    	Region type    : function
+                    	Offsets        : 487-573
+                    	Line numbers   : 46-53
+                    	std.code.lines:code: 7
+                    	std.code.lines:total: 8
+                    	std.code.lines:preprocessor: 0
+                    	std.code.lines:comments: 1
+
+.   .   .   ./simple.cpp:58: info: Metrics per 'never' region
             	Region name    : never
             	Region type    : function
-            	Offsets        : 389-459
-            	Line numbers   : 39-46
+            	Offsets        : 599-669
+            	Line numbers   : 58-65
             	std.code.lines:code: 7
             	std.code.lines:total: 7
             	std.code.lines:preprocessor: 0
             	std.code.lines:comments: 0
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.5
+	Average        : 5.54545454545
 	Minimum        : 0
 	Maximum        : 12
-	Total          : 44.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Total          : 61.0
+	Distribution   : 11 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 0.125 : 0.125 : 1	|||||||||||||
-	             3 : 0.125 : 0.250 : 1	|||||||||||||
-	             4 : 0.125 : 0.375 : 1	|||||||||||||
-	             5 : 0.250 : 0.625 : 2	|||||||||||||||||||||||||
-	             7 : 0.125 : 0.750 : 1	|||||||||||||
-	             8 : 0.125 : 0.875 : 1	|||||||||||||
-	            12 : 0.125 : 1.000 : 1	|||||||||||||
+	             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.091 : 0.727 :  1	|||||||||
+	             8 : 0.182 : 0.909 :  2	||||||||||||||||||
+	            12 : 0.091 : 1.000 :  1	|||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.125
+	Average        : 5.09090909091
 	Minimum        : 0
 	Maximum        : 11
-	Total          : 41.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Total          : 56.0
+	Distribution   : 11 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 0.125 : 0.125 : 1	|||||||||||||
-	             3 : 0.125 : 0.250 : 1	|||||||||||||
-	             4 : 0.250 : 0.500 : 2	|||||||||||||||||||||||||
-	             5 : 0.125 : 0.625 : 1	|||||||||||||
-	             7 : 0.250 : 0.875 : 2	|||||||||||||||||||||||||
-	            11 : 0.125 : 1.000 : 1	|||||||||||||
+	             0 : 0.091 : 0.091 :  1	|||||||||
+	             3 : 0.182 : 0.273 :  2	||||||||||||||||||
+	             4 : 0.182 : 0.455 :  2	||||||||||||||||||
+	             5 : 0.182 : 0.636 :  2	||||||||||||||||||
+	             7 : 0.273 : 0.909 :  3	|||||||||||||||||||||||||||
+	            11 : 0.091 : 1.000 :  1	|||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:preprocessor' metric
-	Average        : 0.0
+	Average        : 0.0909090909091
 	Minimum        : 0
-	Maximum        : 0
-	Total          : 0.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Maximum        : 1
+	Total          : 1.0
+	Distribution   : 11 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 1.000 : 1.000 : 8	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             0 : 0.909 : 0.909 : 10	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.091 : 1.000 :  1	|||||||||
 
 ./simple.cpp:: info: Overall metrics for 'std.code.lines:comments' metric
-	Average        : 0.5
+	Average        : 0.454545454545
 	Minimum        : 0
 	Maximum        : 2
-	Total          : 4.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Total          : 5.0
+	Distribution   : 11 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 0.625 : 0.625 : 5	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-	             1 : 0.250 : 0.875 : 2	|||||||||||||||||||||||||
-	             2 : 0.125 : 1.000 : 1	|||||||||||||
+	             0 : 0.636 : 0.636 :  7	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.273 : 0.909 :  3	|||||||||||||||||||||||||||
+	             2 : 0.091 : 1.000 :  1	|||||||||
 
 

+ 36 - 31
mainline/tests/general/test_basic/test_std_lines_metrics_view_txt_stdout.gold.txt

@@ -1,51 +1,56 @@
 :: info: Overall metrics for 'std.code.lines:total' metric
-	Average        : 5.5
+	Average        : 5.4375
 	Minimum        : 0
 	Maximum        : 12
-	Total          : 44.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Total          : 87.0
+	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 0.125 : 0.125 : 1	|||||||||||||
-	             3 : 0.125 : 0.250 : 1	|||||||||||||
-	             4 : 0.125 : 0.375 : 1	|||||||||||||
-	             5 : 0.250 : 0.625 : 2	|||||||||||||||||||||||||
-	             7 : 0.125 : 0.750 : 1	|||||||||||||
-	             8 : 0.125 : 0.875 : 1	|||||||||||||
-	            12 : 0.125 : 1.000 : 1	|||||||||||||
+	             0 : 0.125 : 0.125 :  2	|||||||||||||
+	             3 : 0.188 : 0.312 :  3	|||||||||||||||||||
+	             4 : 0.062 : 0.375 :  1	||||||
+	             5 : 0.125 : 0.500 :  2	|||||||||||||
+	             6 : 0.062 : 0.562 :  1	||||||
+	             7 : 0.188 : 0.750 :  3	|||||||||||||||||||
+	             8 : 0.125 : 0.875 :  2	|||||||||||||
+	             9 : 0.062 : 0.938 :  1	||||||
+	            12 : 0.062 : 1.000 :  1	||||||
 
 :: info: Overall metrics for 'std.code.lines:code' metric
-	Average        : 5.125
+	Average        : 4.875
 	Minimum        : 0
 	Maximum        : 11
-	Total          : 41.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Total          : 78.0
+	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 0.125 : 0.125 : 1	|||||||||||||
-	             3 : 0.125 : 0.250 : 1	|||||||||||||
-	             4 : 0.250 : 0.500 : 2	|||||||||||||||||||||||||
-	             5 : 0.125 : 0.625 : 1	|||||||||||||
-	             7 : 0.250 : 0.875 : 2	|||||||||||||||||||||||||
-	            11 : 0.125 : 1.000 : 1	|||||||||||||
+	             0 : 0.125 : 0.125 :  2	|||||||||||||
+	             3 : 0.188 : 0.312 :  3	|||||||||||||||||||
+	             4 : 0.188 : 0.500 :  3	|||||||||||||||||||
+	             5 : 0.125 : 0.625 :  2	|||||||||||||
+	             7 : 0.250 : 0.875 :  4	|||||||||||||||||||||||||
+	             8 : 0.062 : 0.938 :  1	||||||
+	            11 : 0.062 : 1.000 :  1	||||||
 
 :: info: Overall metrics for 'std.code.lines:preprocessor' metric
-	Average        : 0.0
+	Average        : 0.0625
 	Minimum        : 0
-	Maximum        : 0
-	Total          : 0.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Maximum        : 1
+	Total          : 1.0
+	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 1.000 : 1.000 : 8	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             0 : 0.938 : 0.938 : 15	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.062 : 1.000 :  1	||||||
 
 :: info: Overall metrics for 'std.code.lines:comments' metric
-	Average        : 0.5
+	Average        : 0.625
 	Minimum        : 0
-	Maximum        : 2
-	Total          : 4.0
-	Distribution   : 8 regions in total (including 0 suppressed)
+	Maximum        : 3
+	Total          : 10.0
+	Distribution   : 16 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             0 : 0.625 : 0.625 : 5	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-	             1 : 0.250 : 0.875 : 2	|||||||||||||||||||||||||
-	             2 : 0.125 : 1.000 : 1	|||||||||||||
+	             0 : 0.625 : 0.625 : 10	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.188 : 0.812 :  3	|||||||||||||||||||
+	             2 : 0.125 : 0.938 :  2	|||||||||||||
+	             3 : 0.062 : 1.000 :  1	||||||
 
 :: info: Directory content:
 	Directory      : .

+ 13 - 13
mainline/tests/general/test_basic/test_view_format_view_nest_per_file_stdout.gold.txt

@@ -5,19 +5,19 @@
         <file-data>
             <regions>
                 <region>
-                    <info cursor="0" name="__global__" offset_end="639" line_begin="1" type="global" line_end="65" offset_begin="0" />
+                    <info cursor="0" name="__global__" offset_end="674" line_begin="1" type="global" line_end="68" offset_begin="0" />
                     <data />
                     <subregions>
                         <subregion>
-                            <info cursor="4" name="hmm" offset_end="638" line_begin="3" type="namespace" line_end="64" offset_begin="2" />
+                            <info cursor="4" name="hmm" offset_end="673" line_begin="3" type="namespace" line_end="67" offset_begin="2" />
                             <data />
                             <subregions>
                                 <subregion>
-                                    <info cursor="7" name="A" offset_end="634" line_begin="7" type="class" line_end="62" offset_begin="76" />
+                                    <info cursor="10" name="A" offset_end="669" line_begin="10" type="class" line_end="65" offset_begin="111" />
                                     <data />
                                     <subregions>
                                         <subregion>
-                                            <info cursor="10" name="A" offset_end="234" line_begin="10" type="function" line_end="21" offset_begin="88" />
+                                            <info cursor="13" name="A" offset_end="269" line_begin="13" type="function" line_end="24" offset_begin="123" />
                                             <data>
                                                 <std.code.complexity cyclomatic="3">
                                                     <__diff__ cyclomatic="0" />
@@ -27,7 +27,7 @@
                                             </subregions>
                                         </subregion>
                                         <subregion>
-                                            <info cursor="23" name="func" offset_end="420" line_begin="23" type="function" line_end="39" offset_begin="237" />
+                                            <info cursor="26" name="func" offset_end="455" line_begin="26" type="function" line_end="42" offset_begin="272" />
                                             <data>
                                                 <std.code.complexity cyclomatic="1">
                                                     <__diff__ cyclomatic="0" />
@@ -35,11 +35,11 @@
                                             </data>
                                             <subregions>
                                                 <subregion>
-                                                    <info cursor="25" name="embeded" offset_end="406" line_begin="25" type="class" line_end="37" offset_begin="266" />
+                                                    <info cursor="28" name="embeded" offset_end="441" line_begin="28" type="class" line_end="40" offset_begin="301" />
                                                     <data />
                                                     <subregions>
                                                         <subregion>
-                                                            <info cursor="27" name="embeded" offset_end="402" line_begin="27" type="function" line_end="36" offset_begin="287" />
+                                                            <info cursor="30" name="embeded" offset_end="437" line_begin="30" type="function" line_end="39" offset_begin="322" />
                                                             <data>
                                                                 <std.code.complexity cyclomatic="2">
                                                                     <__diff__ cyclomatic="1" />
@@ -53,7 +53,7 @@
                                             </subregions>
                                         </subregion>
                                         <subregion>
-                                            <info cursor="41" name="never" offset_end="514" line_begin="41" type="function" line_end="48" offset_begin="423" />
+                                            <info cursor="44" name="never" offset_end="549" line_begin="44" type="function" line_end="51" offset_begin="458" />
                                             <data>
                                                 <std.code.complexity cyclomatic="1">
                                                     <__diff__ cyclomatic="0" />
@@ -63,7 +63,7 @@
                                             </subregions>
                                         </subregion>
                                         <subregion>
-                                            <info cursor="50" name="new_func" offset_end="550" line_begin="50" type="function" line_end="53" offset_begin="517" />
+                                            <info cursor="53" name="new_func" offset_end="585" line_begin="53" type="function" line_end="56" offset_begin="552" />
                                             <data>
                                                 <std.code.complexity cyclomatic="0" />
                                             </data>
@@ -71,7 +71,7 @@
                                             </subregions>
                                         </subregion>
                                         <subregion>
-                                            <info cursor="55" name="new_func_complex" offset_end="611" line_begin="55" type="function" line_end="59" offset_begin="553" />
+                                            <info cursor="58" name="new_func_complex" offset_end="646" line_begin="58" type="function" line_end="62" offset_begin="588" />
                                             <data>
                                                 <std.code.complexity cyclomatic="1" />
                                             </data>
@@ -95,11 +95,11 @@
                 <cyclomatic nonzero="False" count="6" total="8.0" min="0" max="3" avg="1.33333333333" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="1" metric="0" ratio="0.166666666667" />
-                        <distribution-bar count="3" __diff__="0" metric="1" ratio="0.5" />
-                        <distribution-bar count="1" __diff__="1" metric="2" ratio="0.166666666667" />
+                        <distribution-bar count="3" __diff__="-1" metric="1" ratio="0.5" />
+                        <distribution-bar count="1" __diff__="0" metric="2" ratio="0.166666666667" />
                         <distribution-bar count="1" __diff__="0" metric="3" ratio="0.166666666667" />
                     </distribution-bars>
-                    <__diff__ nonzero="0" count="2" avg="-0.166666666667" min="-1" max="0" total="2.0" />
+                    <__diff__ nonzero="0" count="0" avg="-0.166666666667" min="-1" max="0" total="-1.0" />
                 </cyclomatic>
             </std.code.complexity>
         </aggregated-data>

+ 3 - 3
mainline/tests/general/test_basic/test_view_format_view_nest_stdout.gold.txt

@@ -13,11 +13,11 @@
                 <cyclomatic nonzero="False" count="7" total="11.0" min="0" max="3" avg="1.57142857143" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="1" metric="0" ratio="0.142857142857" />
-                        <distribution-bar count="3" __diff__="0" metric="1" ratio="0.428571428571" />
-                        <distribution-bar count="1" __diff__="1" metric="2" ratio="0.142857142857" />
+                        <distribution-bar count="3" __diff__="-3" metric="1" ratio="0.428571428571" />
+                        <distribution-bar count="1" __diff__="0" metric="2" ratio="0.142857142857" />
                         <distribution-bar count="2" __diff__="1" metric="3" ratio="0.285714285714" />
                     </distribution-bars>
-                    <__diff__ nonzero="0" count="3" avg="0.0714285714286" min="-1" max="0" total="5.0" />
+                    <__diff__ nonzero="0" count="-1" avg="0.196428571429" min="-1" max="0" total="0.0" />
                 </cyclomatic>
             </std.code.complexity>
         </aggregated-data>

+ 1 - 1
mainline/tests/general/test_basic/test_view_format_view_python_stdout.gold.txt

@@ -1 +1 @@
-{'export': [{'data: {'info': {'path': '', 'id': 1}, 'file-data': {}, 'subfiles': [], 'subdirs': [u'.'], 'aggregated-data': {'std.code.complexity': {'cyclomatic': {'nonzero': False, 'count': 4, 'avg': 1.5, 'min': 1, 'max': 3, 'distribution-bars': [{'count': 3, 'ratio': 0.75, 'metric': '1'}, {'count': 1, 'ratio': 0.25, 'metric': '3'}], 'sup': 0, 'total': 6.0}}}}}]}
+{'export': [{'data: {'info': {'path': '', 'id': 1}, 'file-data': {}, 'subfiles': [], 'subdirs': [u'.'], 'aggregated-data': {'std.code.complexity': {'cyclomatic': {'nonzero': False, 'count': 8, 'avg': 1.375, 'min': 1, 'max': 3, 'distribution-bars': [{'count': 6, 'ratio': 0.75, 'metric': '1'}, {'count': 1, 'ratio': 0.125, 'metric': '2'}, {'count': 1, 'ratio': 0.125, 'metric': '3'}], 'sup': 0, 'total': 11.0}}}}}]}

+ 6 - 5
mainline/tests/general/test_basic/test_view_format_view_txt_stdout.gold.txt

@@ -1,12 +1,13 @@
 :: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
-	Average        : 1.5
+	Average        : 1.375
 	Minimum        : 1
 	Maximum        : 3
-	Total          : 6.0
-	Distribution   : 4 regions in total (including 0 suppressed)
+	Total          : 11.0
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
-	             1 : 0.750 : 0.750 : 3	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-	             3 : 0.250 : 1.000 : 1	|||||||||||||||||||||||||
+	             1 : 0.750 : 0.750 : 6	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.125 : 0.875 : 1	|||||||||||||
+	             3 : 0.125 : 1.000 : 1	|||||||||||||
 
 :: info: Directory content:
 	Directory      : .

+ 4 - 3
mainline/tests/general/test_basic/test_view_format_view_xml_stdout.gold.txt

@@ -10,10 +10,11 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic nonzero="False" count="4" total="6.0" min="1" max="3" avg="1.5" sup="0">
+                <cyclomatic nonzero="False" count="8" total="11.0" min="1" max="3" avg="1.375" sup="0">
                     <distribution-bars>
-                        <distribution-bar count="3" metric="1" ratio="0.75" />
-                        <distribution-bar count="1" metric="3" ratio="0.25" />
+                        <distribution-bar count="6" metric="1" ratio="0.75" />
+                        <distribution-bar count="1" metric="2" ratio="0.125" />
+                        <distribution-bar count="1" metric="3" ratio="0.125" />
                     </distribution-bars>
                 </cyclomatic>
             </std.code.complexity>

+ 1 - 0
mainline/tests/general/test_basic/test_workflow_collect_default_stderr.gold.txt

@@ -1,5 +1,6 @@
 [LOG]: WARNING:	Logging enabled with INFO level
 [LOG]: INFO:	Excluding: ./.unused.cpp
 [LOG]: INFO:	Skipping: ./dummy.txt
+[LOG]: INFO:	Processing: ./file_deleted_in_new_sources.cpp
 [LOG]: INFO:	Processing: ./simple.cpp
 [LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 7 - 1
mainline/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt

@@ -7,10 +7,16 @@ test_workflow.db:: info: Created using plugins and settings:
 	std.code.cs:files: *.cs
 	std.code.java:version: 1.1
 	std.code.java:files: *.java
+	std.code.lines:version: 1.1
 
 test_workflow.db:: info: Collected metrics:
 	std.code.complexity:cyclomatic: 
+	std.code.lines:code: 
+	std.code.lines:comments: 
+	std.code.lines:preprocessor: 
+	std.code.lines:total: 
 
 :: info: Processed files and checksums:
-	./simple.cpp   : 0xbe3fa289
+	./file_deleted_in_new_sources.cpp: 0xfd51c243
+	./simple.cpp   : 0x83ea59bb
 

+ 6 - 1
mainline/tests/general/test_basic/test_workflow_info_second_stdout.gold.txt

@@ -7,11 +7,16 @@ test_workflow.db:: info: Created using plugins and settings:
 	std.code.cs:files: *.cs
 	std.code.java:version: 1.1
 	std.code.java:files: *.java
+	std.code.lines:version: 1.1
 
 test_workflow.db:: info: Collected metrics:
 	std.code.complexity:cyclomatic: 
+	std.code.lines:code: 
+	std.code.lines:comments: 
+	std.code.lines:preprocessor: 
+	std.code.lines:total: 
 
 :: info: Processed files and checksums:
-	./simple.cpp   : 0xf015c344 [modified]
+	./simple.cpp   : 0x3e73b264 [modified]
 	./simple2.cpp  : 0x44023f81 [new]
 

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_limit_default_stderr.gold.txt

@@ -1,4 +1,4 @@
 [LOG]: WARNING:	Logging enabled with INFO level
 [LOG]: INFO:	Processing: 
 [LOG]: INFO:	Applying limit: namespace 'std.code.complexity', filter '('cyclomatic', '>', 0.0)'
-[LOG]: WARNING:	Done (1 seconds). Exit code: 4
+[LOG]: WARNING:	Done (1 seconds). Exit code: 8

+ 40 - 4
mainline/tests/general/test_basic/test_workflow_limit_default_stdout.gold.txt

@@ -1,4 +1,22 @@
-./simple.cpp:10: warning: Metric 'std.code.complexity:cyclomatic' for region 'A' exceeds the limit.
+./file_deleted_in_new_sources.cpp:12: warning: Metric 'std.code.complexity:cyclomatic' for region 'B' exceeds the limit.
+	Metric name    : std.code.complexity:cyclomatic
+	Region name    : B
+	Metric value   : 1
+	Modified       : None
+	Change trend   : None
+	Limit          : 0.0
+	Suppressed     : False
+
+./file_deleted_in_new_sources.cpp:26: warning: Metric 'std.code.complexity:cyclomatic' for region 'never_old' exceeds the limit.
+	Metric name    : std.code.complexity:cyclomatic
+	Region name    : never_old
+	Metric value   : 1
+	Modified       : None
+	Change trend   : None
+	Limit          : 0.0
+	Suppressed     : False
+
+./simple.cpp:12: warning: Metric 'std.code.complexity:cyclomatic' for region 'A' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : A
 	Metric value   : 3
@@ -7,7 +25,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:23: warning: Metric 'std.code.complexity:cyclomatic' for region 'func' exceeds the limit.
+./simple.cpp:26: warning: Metric 'std.code.complexity:cyclomatic' for region 'func' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : func
 	Metric value   : 1
@@ -16,7 +34,25 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:27: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
+./simple.cpp:30: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
+	Metric name    : std.code.complexity:cyclomatic
+	Region name    : embeded
+	Metric value   : 1
+	Modified       : None
+	Change trend   : None
+	Limit          : 0.0
+	Suppressed     : False
+
+./simple.cpp:42: warning: Metric 'std.code.complexity:cyclomatic' for region 'func_to_be_removed_in_new_sources' exceeds the limit.
+	Metric name    : std.code.complexity:cyclomatic
+	Region name    : func_to_be_removed_in_new_sources
+	Metric value   : 2
+	Modified       : None
+	Change trend   : None
+	Limit          : 0.0
+	Suppressed     : False
+
+./simple.cpp:46: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : embeded
 	Metric value   : 1
@@ -25,7 +61,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:39: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
+./simple.cpp:58: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : never
 	Metric value   : 1

+ 5 - 5
mainline/tests/general/test_basic/test_workflow_limit_second_stdout.gold.txt

@@ -1,4 +1,4 @@
-./simple.cpp:10: warning: Metric 'std.code.complexity:cyclomatic' for region 'A' exceeds the limit.
+./simple.cpp:13: warning: Metric 'std.code.complexity:cyclomatic' for region 'A' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : A
 	Metric value   : 3
@@ -7,7 +7,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:23: warning: Metric 'std.code.complexity:cyclomatic' for region 'func' exceeds the limit.
+./simple.cpp:26: warning: Metric 'std.code.complexity:cyclomatic' for region 'func' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : func
 	Metric value   : 1
@@ -16,7 +16,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:27: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
+./simple.cpp:30: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : embeded
 	Metric value   : 2
@@ -25,7 +25,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:41: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
+./simple.cpp:44: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : never
 	Metric value   : 1
@@ -34,7 +34,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:55: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
+./simple.cpp:58: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : new_func_complex
 	Metric value   : 1

+ 5 - 5
mainline/tests/general/test_basic/test_workflow_limit_second_warn_all_stdout.gold.txt

@@ -1,4 +1,4 @@
-./simple.cpp:10: warning: Metric 'std.code.complexity:cyclomatic' for region 'A' exceeds the limit.
+./simple.cpp:13: warning: Metric 'std.code.complexity:cyclomatic' for region 'A' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : A
 	Metric value   : 3
@@ -7,7 +7,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:23: warning: Metric 'std.code.complexity:cyclomatic' for region 'func' exceeds the limit.
+./simple.cpp:26: warning: Metric 'std.code.complexity:cyclomatic' for region 'func' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : func
 	Metric value   : 1
@@ -16,7 +16,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:27: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
+./simple.cpp:30: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : embeded
 	Metric value   : 2
@@ -25,7 +25,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:41: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
+./simple.cpp:44: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : never
 	Metric value   : 1
@@ -34,7 +34,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:55: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
+./simple.cpp:58: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : new_func_complex
 	Metric value   : 1

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_limit_second_warn_new_stdout.gold.txt

@@ -1,4 +1,4 @@
-./simple.cpp:55: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
+./simple.cpp:58: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : new_func_complex
 	Metric value   : 1

+ 3 - 3
mainline/tests/general/test_basic/test_workflow_limit_second_warn_touched_stdout.gold.txt

@@ -1,4 +1,4 @@
-./simple.cpp:27: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
+./simple.cpp:30: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : embeded
 	Metric value   : 2
@@ -7,7 +7,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:41: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
+./simple.cpp:44: warning: Metric 'std.code.complexity:cyclomatic' for region 'never' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : never
 	Metric value   : 1
@@ -16,7 +16,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:55: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
+./simple.cpp:58: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : new_func_complex
 	Metric value   : 1

+ 2 - 2
mainline/tests/general/test_basic/test_workflow_limit_second_warn_trend_stdout.gold.txt

@@ -1,4 +1,4 @@
-./simple.cpp:27: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
+./simple.cpp:30: warning: Metric 'std.code.complexity:cyclomatic' for region 'embeded' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : embeded
 	Metric value   : 2
@@ -7,7 +7,7 @@
 	Limit          : 0.0
 	Suppressed     : False
 
-./simple.cpp:55: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
+./simple.cpp:58: warning: Metric 'std.code.complexity:cyclomatic' for region 'new_func_complex' exceeds the limit.
 	Metric name    : std.code.complexity:cyclomatic
 	Region name    : new_func_complex
 	Metric value   : 1

+ 44 - 3
mainline/tests/general/test_basic/test_workflow_view_default_stdout.gold.txt

@@ -10,13 +10,54 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic nonzero="False" count="4" total="6.0" min="1" max="3" avg="1.5" sup="0">
+                <cyclomatic nonzero="False" count="8" total="11.0" min="1" max="3" avg="1.375" sup="0">
                     <distribution-bars>
-                        <distribution-bar count="3" metric="1" ratio="0.75" />
-                        <distribution-bar count="1" metric="3" ratio="0.25" />
+                        <distribution-bar count="6" metric="1" ratio="0.75" />
+                        <distribution-bar count="1" metric="2" ratio="0.125" />
+                        <distribution-bar count="1" metric="3" ratio="0.125" />
                     </distribution-bars>
                 </cyclomatic>
             </std.code.complexity>
+            <std.code.lines>
+                <total nonzero="False" count="16" total="87.0" min="0" max="12" avg="5.4375" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="2" metric="0" ratio="0.125" />
+                        <distribution-bar count="3" metric="3" ratio="0.1875" />
+                        <distribution-bar count="1" metric="4" ratio="0.0625" />
+                        <distribution-bar count="2" metric="5" 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-bars>
+                </total>
+                <code nonzero="False" count="16" total="78.0" min="0" max="11" avg="4.875" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="2" metric="0" ratio="0.125" />
+                        <distribution-bar count="3" metric="3" ratio="0.1875" />
+                        <distribution-bar count="3" metric="4" ratio="0.1875" />
+                        <distribution-bar count="2" metric="5" ratio="0.125" />
+                        <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-bars>
+                </code>
+                <preprocessor nonzero="False" count="16" total="1.0" min="0" max="1" avg="0.0625" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="15" metric="0" ratio="0.9375" />
+                        <distribution-bar count="1" metric="1" ratio="0.0625" />
+                    </distribution-bars>
+                </preprocessor>
+                <comments nonzero="False" count="16" total="10.0" min="0" max="3" avg="0.625" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="10" metric="0" ratio="0.625" />
+                        <distribution-bar count="3" metric="1" ratio="0.1875" />
+                        <distribution-bar count="2" metric="2" ratio="0.125" />
+                        <distribution-bar count="1" metric="3" ratio="0.0625" />
+                    </distribution-bars>
+                </comments>
+            </std.code.lines>
         </aggregated-data>
     </data>
 </export>

+ 91 - 17
mainline/tests/general/test_basic/test_workflow_view_second_per_file_stdout.gold.txt

@@ -5,63 +5,93 @@
         <file-data>
             <regions>
                 <region>
-                    <info cursor="0" name="__global__" offset_end="639" line_begin="1" type="global" line_end="65" offset_begin="0" />
-                    <data />
+                    <info cursor="0" name="__global__" offset_end="674" line_begin="1" type="global" line_end="68" offset_begin="0" />
+                    <data>
+                        <std.code.lines total="0" code="0" preprocessor="0" comments="0">
+                            <__diff__ code="0" total="0" preprocessor="0" comments="0" />
+                        </std.code.lines>
+                    </data>
                 </region>
                 <region>
-                    <info cursor="4" name="hmm" offset_end="638" line_begin="3" type="namespace" line_end="64" offset_begin="2" />
-                    <data />
+                    <info cursor="4" name="hmm" offset_end="673" line_begin="3" type="namespace" line_end="67" offset_begin="2" />
+                    <data>
+                        <std.code.lines total="7" code="4" preprocessor="2" comments="1">
+                            <__diff__ code="0" total="1" preprocessor="1" comments="0" />
+                        </std.code.lines>
+                    </data>
                 </region>
                 <region>
-                    <info cursor="7" name="A" offset_end="634" line_begin="7" type="class" line_end="62" offset_begin="76" />
-                    <data />
+                    <info cursor="10" name="A" offset_end="669" line_begin="10" type="class" line_end="65" offset_begin="111" />
+                    <data>
+                        <std.code.lines total="4" code="4" preprocessor="0" comments="0">
+                            <__diff__ code="0" total="0" preprocessor="0" comments="0" />
+                        </std.code.lines>
+                    </data>
                 </region>
                 <region>
-                    <info cursor="10" name="A" offset_end="234" line_begin="10" type="function" line_end="21" offset_begin="88" />
+                    <info cursor="13" name="A" offset_end="269" line_begin="13" type="function" line_end="24" offset_begin="123" />
                     <data>
                         <std.code.complexity cyclomatic="3">
                             <__diff__ cyclomatic="0" />
                         </std.code.complexity>
+                        <std.code.lines total="12" code="11" preprocessor="0" comments="2">
+                            <__diff__ code="0" total="0" preprocessor="0" comments="0" />
+                        </std.code.lines>
                     </data>
                 </region>
                 <region>
-                    <info cursor="23" name="func" offset_end="420" line_begin="23" type="function" line_end="39" offset_begin="237" />
+                    <info cursor="26" name="func" offset_end="455" line_begin="26" type="function" line_end="42" offset_begin="272" />
                     <data>
                         <std.code.complexity cyclomatic="1">
                             <__diff__ cyclomatic="0" />
                         </std.code.complexity>
+                        <std.code.lines total="5" code="5" preprocessor="0" comments="0">
+                            <__diff__ code="0" total="0" preprocessor="0" comments="0" />
+                        </std.code.lines>
                     </data>
                 </region>
                 <region>
-                    <info cursor="25" name="embeded" offset_end="406" line_begin="25" type="class" line_end="37" offset_begin="266" />
-                    <data />
+                    <info cursor="28" name="embeded" offset_end="441" line_begin="28" type="class" line_end="40" offset_begin="301" />
+                    <data>
+                        <std.code.lines total="3" code="3" preprocessor="0" comments="0">
+                            <__diff__ code="0" total="0" preprocessor="0" comments="0" />
+                        </std.code.lines>
+                    </data>
                 </region>
                 <region>
-                    <info cursor="27" name="embeded" offset_end="402" line_begin="27" type="function" line_end="36" offset_begin="287" />
+                    <info cursor="30" name="embeded" offset_end="437" line_begin="30" type="function" line_end="39" offset_begin="322" />
                     <data>
                         <std.code.complexity cyclomatic="2">
                             <__diff__ cyclomatic="1" />
                         </std.code.complexity>
+                        <std.code.lines total="9" code="8" preprocessor="0" comments="2">
+                            <__diff__ code="1" total="1" preprocessor="0" comments="1" />
+                        </std.code.lines>
                     </data>
                 </region>
                 <region>
-                    <info cursor="41" name="never" offset_end="514" line_begin="41" type="function" line_end="48" offset_begin="423" />
+                    <info cursor="44" name="never" offset_end="549" line_begin="44" type="function" line_end="51" offset_begin="458" />
                     <data>
                         <std.code.complexity cyclomatic="1">
                             <__diff__ cyclomatic="0" />
                         </std.code.complexity>
+                        <std.code.lines total="7" code="7" preprocessor="0" comments="1">
+                            <__diff__ code="0" total="0" preprocessor="0" comments="1" />
+                        </std.code.lines>
                     </data>
                 </region>
                 <region>
-                    <info cursor="50" name="new_func" offset_end="550" line_begin="50" type="function" line_end="53" offset_begin="517" />
+                    <info cursor="53" name="new_func" offset_end="585" line_begin="53" type="function" line_end="56" offset_begin="552" />
                     <data>
                         <std.code.complexity cyclomatic="0" />
+                        <std.code.lines total="4" code="3" preprocessor="0" comments="1" />
                     </data>
                 </region>
                 <region>
-                    <info cursor="55" name="new_func_complex" offset_end="611" line_begin="55" type="function" line_end="59" offset_begin="553" />
+                    <info cursor="58" name="new_func_complex" offset_end="646" line_begin="58" type="function" line_end="62" offset_begin="588" />
                     <data>
                         <std.code.complexity cyclomatic="1" />
+                        <std.code.lines total="5" code="5" preprocessor="0" comments="0" />
                     </data>
                 </region>
             </regions>
@@ -75,13 +105,57 @@
                 <cyclomatic nonzero="False" count="6" total="8.0" min="0" max="3" avg="1.33333333333" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="1" metric="0" ratio="0.166666666667" />
-                        <distribution-bar count="3" __diff__="0" metric="1" ratio="0.5" />
-                        <distribution-bar count="1" __diff__="1" metric="2" ratio="0.166666666667" />
+                        <distribution-bar count="3" __diff__="-1" metric="1" ratio="0.5" />
+                        <distribution-bar count="1" __diff__="0" metric="2" ratio="0.166666666667" />
                         <distribution-bar count="1" __diff__="0" metric="3" ratio="0.166666666667" />
                     </distribution-bars>
-                    <__diff__ nonzero="0" count="2" avg="-0.166666666667" min="-1" max="0" total="2.0" />
+                    <__diff__ nonzero="0" count="0" avg="-0.166666666667" min="-1" max="0" total="-1.0" />
                 </cyclomatic>
             </std.code.complexity>
+            <std.code.lines>
+                <total nonzero="False" count="10" total="56.0" min="0" max="12" avg="5.6" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="1" __diff__="0" metric="0" ratio="0.1" />
+                        <distribution-bar count="1" __diff__="-1" metric="3" ratio="0.1" />
+                        <distribution-bar count="2" __diff__="1" metric="4" ratio="0.2" />
+                        <distribution-bar count="2" __diff__="0" metric="5" ratio="0.2" />
+                        <distribution-bar count="0" __diff__="-1" metric="6" ratio="0" />
+                        <distribution-bar count="2" __diff__="1" metric="7" ratio="0.2" />
+                        <distribution-bar count="0" __diff__="-2" metric="8" ratio="0" />
+                        <distribution-bar count="1" __diff__="1" metric="9" ratio="0.1" />
+                        <distribution-bar count="1" __diff__="0" metric="12" ratio="0.1" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-1" avg="0.0545454545455" min="0" max="0" total="-5.0" />
+                </total>
+                <code nonzero="False" count="10" total="50.0" min="0" max="11" avg="5.0" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="1" __diff__="0" metric="0" ratio="0.1" />
+                        <distribution-bar count="2" __diff__="0" metric="3" ratio="0.2" />
+                        <distribution-bar count="2" __diff__="0" metric="4" ratio="0.2" />
+                        <distribution-bar count="2" __diff__="0" metric="5" ratio="0.2" />
+                        <distribution-bar count="1" __diff__="-2" metric="7" ratio="0.1" />
+                        <distribution-bar count="1" __diff__="1" metric="8" ratio="0.1" />
+                        <distribution-bar count="1" __diff__="0" metric="11" ratio="0.1" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-1" avg="-0.0909090909091" min="0" max="0" total="-6.0" />
+                </code>
+                <preprocessor nonzero="False" count="10" total="2.0" min="0" max="2" avg="0.2" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="9" __diff__="-1" metric="0" ratio="0.9" />
+                        <distribution-bar count="0" __diff__="-1" metric="1" ratio="0" />
+                        <distribution-bar count="1" __diff__="1" metric="2" ratio="0.1" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-1" avg="0.109090909091" min="0" max="1" total="1.0" />
+                </preprocessor>
+                <comments nonzero="False" count="10" total="7.0" min="0" max="2" avg="0.7" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="5" __diff__="-2" metric="0" ratio="0.5" />
+                        <distribution-bar count="3" __diff__="0" metric="1" ratio="0.3" />
+                        <distribution-bar count="2" __diff__="1" metric="2" ratio="0.2" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-1" avg="0.245454545455" min="0" max="0" total="2.0" />
+                </comments>
+            </std.code.lines>
         </aggregated-data>
     </data>
 </export>

+ 3 - 0
mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_all_stderr.gold.txt

@@ -0,0 +1,3 @@
+[LOG]: WARNING:	Logging enabled with INFO level
+[LOG]: INFO:	Processing: ./simple.cpp
+[LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 173 - 0
mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_all_stdout.gold.txt

@@ -0,0 +1,173 @@
+./simple.cpp:0: info: Metrics per '__global__' region
+	Region name    : __global__
+	Region type    : global
+	Offsets        : 0-674
+	Line numbers   : 1-68
+	std.code.lines:code: 0 [+0]
+	std.code.lines:total: 0 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:4: info: Metrics per 'hmm' region
+	Region name    : hmm
+	Region type    : namespace
+	Offsets        : 2-673
+	Line numbers   : 3-67
+	std.code.lines:code: 4 [+0]
+	std.code.lines:total: 7 [+1]
+	std.code.lines:preprocessor: 2 [+1]
+	std.code.lines:comments: 1 [+0]
+
+./simple.cpp:10: info: Metrics per 'A' region
+	Region name    : A
+	Region type    : class
+	Offsets        : 111-669
+	Line numbers   : 10-65
+	std.code.lines:code: 4 [+0]
+	std.code.lines:total: 4 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:13: info: Metrics per 'A' region
+	Region name    : A
+	Region type    : function
+	Offsets        : 123-269
+	Line numbers   : 13-24
+	std.code.complexity:cyclomatic: 3 [+0]
+	std.code.lines:code: 11 [+0]
+	std.code.lines:total: 12 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 2 [+0]
+
+./simple.cpp:26: info: Metrics per 'func' region
+	Region name    : func
+	Region type    : function
+	Offsets        : 272-455
+	Line numbers   : 26-42
+	std.code.complexity:cyclomatic: 1 [+0]
+	std.code.lines:code: 5 [+0]
+	std.code.lines:total: 5 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:28: info: Metrics per 'embeded' region
+	Region name    : embeded
+	Region type    : class
+	Offsets        : 301-441
+	Line numbers   : 28-40
+	std.code.lines:code: 3 [+0]
+	std.code.lines:total: 3 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:30: info: Metrics per 'embeded' region
+	Region name    : embeded
+	Region type    : function
+	Offsets        : 322-437
+	Line numbers   : 30-39
+	std.code.complexity:cyclomatic: 2 [+1]
+	std.code.lines:code: 8 [+1]
+	std.code.lines:total: 9 [+1]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 2 [+1]
+
+./simple.cpp:44: info: Metrics per 'never' region
+	Region name    : never
+	Region type    : function
+	Offsets        : 458-549
+	Line numbers   : 44-51
+	std.code.complexity:cyclomatic: 1 [+0]
+	std.code.lines:code: 7 [+0]
+	std.code.lines:total: 7 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 1 [+1]
+
+./simple.cpp:53: info: Metrics per 'new_func' region
+	Region name    : new_func
+	Region type    : function
+	Offsets        : 552-585
+	Line numbers   : 53-56
+	std.code.complexity:cyclomatic: 0
+	std.code.lines:code: 3
+	std.code.lines:total: 4
+	std.code.lines:preprocessor: 0
+	std.code.lines:comments: 1
+
+./simple.cpp:58: info: Metrics per 'new_func_complex' region
+	Region name    : new_func_complex
+	Region type    : function
+	Offsets        : 588-646
+	Line numbers   : 58-62
+	std.code.complexity:cyclomatic: 1
+	std.code.lines:code: 5
+	std.code.lines:total: 5
+	std.code.lines:preprocessor: 0
+	std.code.lines:comments: 0
+
+./simple.cpp:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
+	Average        : 1.33333333333 [-0.166666666667]
+	Minimum        : 0 [-1]
+	Maximum        : 3 [+0]
+	Total          : 8.0 [-1.0]
+	Distribution   : 6 [+0] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.167 : 0.167 : 1 [+1]	|||||||||||||||||
+	             1 : 0.500 : 0.667 : 3 [-1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.167 : 0.833 : 1 [+0]	|||||||||||||||||
+	             3 : 0.167 : 1.000 : 1 [+0]	|||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
+	Average        : 5.6 [+0.0545454545455]
+	Minimum        : 0 [+0]
+	Maximum        : 12 [+0]
+	Total          : 56.0 [-5.0]
+	Distribution   : 10 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.100 : 0.100 :  1 [+0 ]	||||||||||
+	             3 : 0.100 : 0.200 :  1 [-1 ]	||||||||||
+	             4 : 0.200 : 0.400 :  2 [+1 ]	||||||||||||||||||||
+	             5 : 0.200 : 0.600 :  2 [+0 ]	||||||||||||||||||||
+	             6 : 0.000 : 0.600 :  0 [-1 ]	
+	             7 : 0.200 : 0.800 :  2 [+1 ]	||||||||||||||||||||
+	             8 : 0.000 : 0.800 :  0 [-2 ]	
+	             9 : 0.100 : 0.900 :  1 [+1 ]	||||||||||
+	            12 : 0.100 : 1.000 :  1 [+0 ]	||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
+	Average        : 5.0 [-0.0909090909091]
+	Minimum        : 0 [+0]
+	Maximum        : 11 [+0]
+	Total          : 50.0 [-6.0]
+	Distribution   : 10 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.100 : 0.100 :  1 [+0 ]	||||||||||
+	             3 : 0.200 : 0.300 :  2 [+0 ]	||||||||||||||||||||
+	             4 : 0.200 : 0.500 :  2 [+0 ]	||||||||||||||||||||
+	             5 : 0.200 : 0.700 :  2 [+0 ]	||||||||||||||||||||
+	             7 : 0.100 : 0.800 :  1 [-2 ]	||||||||||
+	             8 : 0.100 : 0.900 :  1 [+1 ]	||||||||||
+	            11 : 0.100 : 1.000 :  1 [+0 ]	||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:preprocessor' metric
+	Average        : 0.2 [+0.109090909091]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+1]
+	Total          : 2.0 [+1.0]
+	Distribution   : 10 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.900 : 0.900 :  9 [-1 ]	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.000 : 0.900 :  0 [-1 ]	
+	             2 : 0.100 : 1.000 :  1 [+1 ]	||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:comments' metric
+	Average        : 0.7 [+0.245454545455]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+0]
+	Total          : 7.0 [+2.0]
+	Distribution   : 10 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.500 : 0.500 :  5 [-2 ]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.300 : 0.800 :  3 [+0 ]	||||||||||||||||||||||||||||||
+	             2 : 0.200 : 1.000 :  2 [+1 ]	||||||||||||||||||||
+
+

+ 4 - 0
mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_new_stderr.gold.txt

@@ -0,0 +1,4 @@
+[LOG]: WARNING:	Logging enabled with INFO level
+[LOG]: INFO:	Processing: ./simple.cpp
+[LOG]: INFO:	Processing: ./simple.cpp [modified]
+[LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 156 - 0
mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_new_stdout.gold.txt

@@ -0,0 +1,156 @@
+./simple.cpp:0: info: Metrics per '__global__' region
+	Region name    : __global__
+	Region type    : global
+	Offsets        : 0-674
+	Line numbers   : 1-68
+	std.code.lines:code: 0 [+0]
+	std.code.lines:total: 0 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:4: info: Metrics per 'hmm' region
+	Region name    : hmm
+	Region type    : namespace
+	Offsets        : 2-673
+	Line numbers   : 3-67
+	std.code.lines:code: 4 [+0]
+	std.code.lines:total: 7 [+1]
+	std.code.lines:preprocessor: 2 [+1]
+	std.code.lines:comments: 1 [+0]
+
+./simple.cpp:10: info: Metrics per 'A' region
+	Region name    : A
+	Region type    : class
+	Offsets        : 111-669
+	Line numbers   : 10-65
+	std.code.lines:code: 4 [+0]
+	std.code.lines:total: 4 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:13: info: Metrics per 'A' region
+	Region name    : A
+	Region type    : function
+	Offsets        : 123-269
+	Line numbers   : 13-24
+	std.code.complexity:cyclomatic: 3 [+0]
+	std.code.lines:code: 11 [+0]
+	std.code.lines:total: 12 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 2 [+0]
+
+./simple.cpp:26: info: Metrics per 'func' region
+	Region name    : func
+	Region type    : function
+	Offsets        : 272-455
+	Line numbers   : 26-42
+	std.code.complexity:cyclomatic: 1 [+0]
+	std.code.lines:code: 5 [+0]
+	std.code.lines:total: 5 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:28: info: Metrics per 'embeded' region
+	Region name    : embeded
+	Region type    : class
+	Offsets        : 301-441
+	Line numbers   : 28-40
+	std.code.lines:code: 3 [+0]
+	std.code.lines:total: 3 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:30: info: Metrics per 'embeded' region
+	Region name    : embeded
+	Region type    : function
+	Offsets        : 322-437
+	Line numbers   : 30-39
+	std.code.complexity:cyclomatic: 2 [+1]
+	std.code.lines:code: 8 [+1]
+	std.code.lines:total: 9 [+1]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 2 [+1]
+
+./simple.cpp:44: info: Metrics per 'never' region
+	Region name    : never
+	Region type    : function
+	Offsets        : 458-549
+	Line numbers   : 44-51
+	std.code.complexity:cyclomatic: 1 [+0]
+	std.code.lines:code: 7 [+0]
+	std.code.lines:total: 7 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 1 [+1]
+
+./simple.cpp:53: info: Metrics per 'new_func' region
+	Region name    : new_func
+	Region type    : function
+	Offsets        : 552-585
+	Line numbers   : 53-56
+	std.code.complexity:cyclomatic: 0
+	std.code.lines:code: 3
+	std.code.lines:total: 4
+	std.code.lines:preprocessor: 0
+	std.code.lines:comments: 1
+
+./simple.cpp:58: info: Metrics per 'new_func_complex' region
+	Region name    : new_func_complex
+	Region type    : function
+	Offsets        : 588-646
+	Line numbers   : 58-62
+	std.code.complexity:cyclomatic: 1
+	std.code.lines:code: 5
+	std.code.lines:total: 5
+	std.code.lines:preprocessor: 0
+	std.code.lines:comments: 0
+
+./simple.cpp:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
+	Average        : 0.5 [+0.5]
+	Minimum        : 0 [+0]
+	Maximum        : 1 [+1]
+	Total          : 1.0 [+1.0]
+	Distribution   : 2 [+2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.500 : 0.500 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.500 : 1.000 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
+	Average        : 4.5 [+4.5]
+	Minimum        : 4 [+4]
+	Maximum        : 5 [+5]
+	Total          : 9.0 [+9.0]
+	Distribution   : 2 [+2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             4 : 0.500 : 0.500 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             5 : 0.500 : 1.000 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
+	Average        : 4.0 [+4.0]
+	Minimum        : 3 [+3]
+	Maximum        : 5 [+5]
+	Total          : 8.0 [+8.0]
+	Distribution   : 2 [+2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             3 : 0.500 : 0.500 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             5 : 0.500 : 1.000 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:preprocessor' metric
+	Average        : 0.0 [+0.0]
+	Minimum        : 0 [+0]
+	Maximum        : 0 [+0]
+	Total          : 0.0 [+0.0]
+	Distribution   : 2 [+2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 1.000 : 1.000 : 2 [+2]	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:comments' metric
+	Average        : 0.5 [+0.5]
+	Minimum        : 0 [+0]
+	Maximum        : 1 [+1]
+	Total          : 1.0 [+1.0]
+	Distribution   : 2 [+2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.500 : 0.500 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.500 : 1.000 : 1 [+1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+
+

+ 4 - 0
mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_touched_stderr.gold.txt

@@ -0,0 +1,4 @@
+[LOG]: WARNING:	Logging enabled with INFO level
+[LOG]: INFO:	Processing: ./simple.cpp
+[LOG]: INFO:	Processing: ./simple.cpp [modified]
+[LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 168 - 0
mainline/tests/general/test_basic/test_workflow_view_second_per_file_txt_touched_stdout.gold.txt

@@ -0,0 +1,168 @@
+./simple.cpp:0: info: Metrics per '__global__' region
+	Region name    : __global__
+	Region type    : global
+	Offsets        : 0-674
+	Line numbers   : 1-68
+	std.code.lines:code: 0 [+0]
+	std.code.lines:total: 0 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:4: info: Metrics per 'hmm' region
+	Region name    : hmm
+	Region type    : namespace
+	Offsets        : 2-673
+	Line numbers   : 3-67
+	std.code.lines:code: 4 [+0]
+	std.code.lines:total: 7 [+1]
+	std.code.lines:preprocessor: 2 [+1]
+	std.code.lines:comments: 1 [+0]
+
+./simple.cpp:10: info: Metrics per 'A' region
+	Region name    : A
+	Region type    : class
+	Offsets        : 111-669
+	Line numbers   : 10-65
+	std.code.lines:code: 4 [+0]
+	std.code.lines:total: 4 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:13: info: Metrics per 'A' region
+	Region name    : A
+	Region type    : function
+	Offsets        : 123-269
+	Line numbers   : 13-24
+	std.code.complexity:cyclomatic: 3 [+0]
+	std.code.lines:code: 11 [+0]
+	std.code.lines:total: 12 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 2 [+0]
+
+./simple.cpp:26: info: Metrics per 'func' region
+	Region name    : func
+	Region type    : function
+	Offsets        : 272-455
+	Line numbers   : 26-42
+	std.code.complexity:cyclomatic: 1 [+0]
+	std.code.lines:code: 5 [+0]
+	std.code.lines:total: 5 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:28: info: Metrics per 'embeded' region
+	Region name    : embeded
+	Region type    : class
+	Offsets        : 301-441
+	Line numbers   : 28-40
+	std.code.lines:code: 3 [+0]
+	std.code.lines:total: 3 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 0 [+0]
+
+./simple.cpp:30: info: Metrics per 'embeded' region
+	Region name    : embeded
+	Region type    : function
+	Offsets        : 322-437
+	Line numbers   : 30-39
+	std.code.complexity:cyclomatic: 2 [+1]
+	std.code.lines:code: 8 [+1]
+	std.code.lines:total: 9 [+1]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 2 [+1]
+
+./simple.cpp:44: info: Metrics per 'never' region
+	Region name    : never
+	Region type    : function
+	Offsets        : 458-549
+	Line numbers   : 44-51
+	std.code.complexity:cyclomatic: 1 [+0]
+	std.code.lines:code: 7 [+0]
+	std.code.lines:total: 7 [+0]
+	std.code.lines:preprocessor: 0 [+0]
+	std.code.lines:comments: 1 [+1]
+
+./simple.cpp:53: info: Metrics per 'new_func' region
+	Region name    : new_func
+	Region type    : function
+	Offsets        : 552-585
+	Line numbers   : 53-56
+	std.code.complexity:cyclomatic: 0
+	std.code.lines:code: 3
+	std.code.lines:total: 4
+	std.code.lines:preprocessor: 0
+	std.code.lines:comments: 1
+
+./simple.cpp:58: info: Metrics per 'new_func_complex' region
+	Region name    : new_func_complex
+	Region type    : function
+	Offsets        : 588-646
+	Line numbers   : 58-62
+	std.code.complexity:cyclomatic: 1
+	std.code.lines:code: 5
+	std.code.lines:total: 5
+	std.code.lines:preprocessor: 0
+	std.code.lines:comments: 0
+
+./simple.cpp:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
+	Average        : 1.0 [-0.25]
+	Minimum        : 0 [-1]
+	Maximum        : 2 [+0]
+	Total          : 4.0 [-1.0]
+	Distribution   : 4 [+0] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.250 : 0.250 : 1 [+1]	|||||||||||||||||||||||||
+	             1 : 0.500 : 0.750 : 2 [-1]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.250 : 1.000 : 1 [+0]	|||||||||||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:total' metric
+	Average        : 6.0 [+0.142857142857]
+	Minimum        : 4 [+1]
+	Maximum        : 9 [+1]
+	Total          : 36.0 [-5.0]
+	Distribution   : 6 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             3 : 0.000 : 0.000 : 0 [-1]	
+	             4 : 0.333 : 0.333 : 2 [+1]	|||||||||||||||||||||||||||||||||
+	             5 : 0.167 : 0.500 : 1 [+0]	|||||||||||||||||
+	             6 : 0.000 : 0.500 : 0 [-1]	
+	             7 : 0.333 : 0.833 : 2 [+1]	|||||||||||||||||||||||||||||||||
+	             8 : 0.000 : 0.833 : 0 [-2]	
+	             9 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:code' metric
+	Average        : 5.16666666667 [-0.119047619048]
+	Minimum        : 3 [+0]
+	Maximum        : 8 [+1]
+	Total          : 31.0 [-6.0]
+	Distribution   : 6 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             3 : 0.167 : 0.167 : 1 [+0]	|||||||||||||||||
+	             4 : 0.333 : 0.500 : 2 [+0]	|||||||||||||||||||||||||||||||||
+	             5 : 0.167 : 0.667 : 1 [+0]	|||||||||||||||||
+	             7 : 0.167 : 0.833 : 1 [-2]	|||||||||||||||||
+	             8 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:preprocessor' metric
+	Average        : 0.333333333333 [+0.190476190476]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+1]
+	Total          : 2.0 [+1.0]
+	Distribution   : 6 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.833 : 0.833 : 5 [-1]	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.000 : 0.833 : 0 [-1]	
+	             2 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+./simple.cpp:: info: Overall metrics for 'std.code.lines:comments' metric
+	Average        : 0.833333333333 [+0.404761904762]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+1]
+	Total          : 5.0 [+2.0]
+	Distribution   : 6 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.333 : 0.333 : 2 [-2]	|||||||||||||||||||||||||||||||||
+	             1 : 0.500 : 0.833 : 3 [+0]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+

+ 48 - 3
mainline/tests/general/test_basic/test_workflow_view_second_stdout.gold.txt

@@ -13,13 +13,58 @@
                 <cyclomatic nonzero="False" count="7" total="11.0" min="0" max="3" avg="1.57142857143" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="1" metric="0" ratio="0.142857142857" />
-                        <distribution-bar count="3" __diff__="0" metric="1" ratio="0.428571428571" />
-                        <distribution-bar count="1" __diff__="1" metric="2" ratio="0.142857142857" />
+                        <distribution-bar count="3" __diff__="-3" metric="1" ratio="0.428571428571" />
+                        <distribution-bar count="1" __diff__="0" metric="2" ratio="0.142857142857" />
                         <distribution-bar count="2" __diff__="1" metric="3" ratio="0.285714285714" />
                     </distribution-bars>
-                    <__diff__ nonzero="0" count="3" avg="0.0714285714286" min="-1" max="0" total="5.0" />
+                    <__diff__ nonzero="0" count="-1" avg="0.196428571429" min="-1" max="0" total="0.0" />
                 </cyclomatic>
             </std.code.complexity>
+            <std.code.lines>
+                <total nonzero="False" count="14" total="76.0" min="0" max="12" avg="5.42857142857" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="2" __diff__="0" metric="0" ratio="0.142857142857" />
+                        <distribution-bar count="2" __diff__="-1" metric="3" ratio="0.142857142857" />
+                        <distribution-bar count="2" __diff__="1" metric="4" ratio="0.142857142857" />
+                        <distribution-bar count="3" __diff__="1" metric="5" ratio="0.214285714286" />
+                        <distribution-bar count="0" __diff__="-1" metric="6" ratio="0" />
+                        <distribution-bar count="2" __diff__="-1" metric="7" ratio="0.142857142857" />
+                        <distribution-bar count="0" __diff__="-2" metric="8" ratio="0" />
+                        <distribution-bar count="1" __diff__="0" metric="9" ratio="0.0714285714286" />
+                        <distribution-bar count="2" __diff__="1" metric="12" ratio="0.142857142857" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-2" avg="-0.00892857142857" min="0" max="0" total="-11.0" />
+                </total>
+                <code nonzero="False" count="14" total="67.0" min="0" max="11" avg="4.78571428571" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="2" __diff__="0" metric="0" ratio="0.142857142857" />
+                        <distribution-bar count="3" __diff__="0" metric="3" ratio="0.214285714286" />
+                        <distribution-bar count="3" __diff__="0" metric="4" ratio="0.214285714286" />
+                        <distribution-bar count="2" __diff__="0" metric="5" ratio="0.142857142857" />
+                        <distribution-bar count="1" __diff__="-3" metric="7" ratio="0.0714285714286" />
+                        <distribution-bar count="1" __diff__="0" metric="8" ratio="0.0714285714286" />
+                        <distribution-bar count="1" __diff__="1" metric="10" ratio="0.0714285714286" />
+                        <distribution-bar count="1" __diff__="0" metric="11" ratio="0.0714285714286" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-2" avg="-0.0892857142857" min="0" max="0" total="-11.0" />
+                </code>
+                <preprocessor nonzero="False" count="14" total="2.0" min="0" max="2" avg="0.142857142857" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="13" __diff__="-2" metric="0" ratio="0.928571428571" />
+                        <distribution-bar count="0" __diff__="-1" metric="1" ratio="0" />
+                        <distribution-bar count="1" __diff__="1" metric="2" ratio="0.0714285714286" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-2" avg="0.0803571428571" min="0" max="1" total="1.0" />
+                </preprocessor>
+                <comments nonzero="False" count="14" total="10.0" min="0" max="2" avg="0.714285714286" sup="0">
+                    <distribution-bars>
+                        <distribution-bar count="7" __diff__="-3" metric="0" ratio="0.5" />
+                        <distribution-bar count="4" __diff__="1" metric="1" ratio="0.285714285714" />
+                        <distribution-bar count="3" __diff__="1" metric="2" ratio="0.214285714286" />
+                    </distribution-bars>
+                    <__diff__ nonzero="0" count="-2" avg="0.0892857142857" min="0" max="-1" total="0.0" />
+                </comments>
+            </std.code.lines>
         </aggregated-data>
     </data>
 </export>

+ 3 - 0
mainline/tests/general/test_basic/test_workflow_view_second_txt_all_stderr.gold.txt

@@ -0,0 +1,3 @@
+[LOG]: WARNING:	Logging enabled with INFO level
+[LOG]: INFO:	Processing: 
+[LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 71 - 0
mainline/tests/general/test_basic/test_workflow_view_second_txt_all_stdout.gold.txt

@@ -0,0 +1,71 @@
+:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
+	Average        : 1.57142857143 [+0.196428571429]
+	Minimum        : 0 [-1]
+	Maximum        : 3 [+0]
+	Total          : 11.0 [+0.0]
+	Distribution   : 7 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.143 : 0.143 : 1 [+1]	||||||||||||||
+	             1 : 0.429 : 0.571 : 3 [-3]	|||||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.143 : 0.714 : 1 [+0]	||||||||||||||
+	             3 : 0.286 : 1.000 : 2 [+1]	|||||||||||||||||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:total' metric
+	Average        : 5.42857142857 [-0.00892857142857]
+	Minimum        : 0 [+0]
+	Maximum        : 12 [+0]
+	Total          : 76.0 [-11.0]
+	Distribution   : 14 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.143 : 0.143 :  2 [+0 ]	||||||||||||||
+	             3 : 0.143 : 0.286 :  2 [-1 ]	||||||||||||||
+	             4 : 0.143 : 0.429 :  2 [+1 ]	||||||||||||||
+	             5 : 0.214 : 0.643 :  3 [+1 ]	|||||||||||||||||||||
+	             6 : 0.000 : 0.643 :  0 [-1 ]	
+	             7 : 0.143 : 0.786 :  2 [-1 ]	||||||||||||||
+	             8 : 0.000 : 0.786 :  0 [-2 ]	
+	             9 : 0.071 : 0.857 :  1 [+0 ]	|||||||
+	            12 : 0.143 : 1.000 :  2 [+1 ]	||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:code' metric
+	Average        : 4.78571428571 [-0.0892857142857]
+	Minimum        : 0 [+0]
+	Maximum        : 11 [+0]
+	Total          : 67.0 [-11.0]
+	Distribution   : 14 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.143 : 0.143 :  2 [+0 ]	||||||||||||||
+	             3 : 0.214 : 0.357 :  3 [+0 ]	|||||||||||||||||||||
+	             4 : 0.214 : 0.571 :  3 [+0 ]	|||||||||||||||||||||
+	             5 : 0.143 : 0.714 :  2 [+0 ]	||||||||||||||
+	             7 : 0.071 : 0.786 :  1 [-3 ]	|||||||
+	             8 : 0.071 : 0.857 :  1 [+0 ]	|||||||
+	            10 : 0.071 : 0.929 :  1 [+1 ]	|||||||
+	            11 : 0.071 : 1.000 :  1 [+0 ]	|||||||
+
+:: info: Overall metrics for 'std.code.lines:preprocessor' metric
+	Average        : 0.142857142857 [+0.0803571428571]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+1]
+	Total          : 2.0 [+1.0]
+	Distribution   : 14 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.929 : 0.929 : 13 [-2 ]	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.000 : 0.929 :  0 [-1 ]	
+	             2 : 0.071 : 1.000 :  1 [+1 ]	|||||||
+
+:: info: Overall metrics for 'std.code.lines:comments' metric
+	Average        : 0.714285714286 [+0.0892857142857]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [-1]
+	Total          : 10.0 [+0.0]
+	Distribution   : 14 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.500 : 0.500 :  7 [-3 ]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.286 : 0.786 :  4 [+1 ]	|||||||||||||||||||||||||||||
+	             2 : 0.214 : 1.000 :  3 [+1 ]	|||||||||||||||||||||
+
+:: info: Directory content:
+	Directory      : .
+
+

+ 5 - 0
mainline/tests/general/test_basic/test_workflow_view_second_txt_new_stderr.gold.txt

@@ -0,0 +1,5 @@
+[LOG]: WARNING:	Logging enabled with INFO level
+[LOG]: INFO:	Processing: 
+[LOG]: INFO:	Processing: ./simple.cpp [modified]
+[LOG]: INFO:	Processing: ./simple2.cpp [new]
+[LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 61 - 0
mainline/tests/general/test_basic/test_workflow_view_second_txt_new_stdout.gold.txt

@@ -0,0 +1,61 @@
+:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
+	Average        : 1.33333333333 [+1.33333333333]
+	Minimum        : 0 [+0]
+	Maximum        : 3 [+3]
+	Total          : 4.0 [+4.0]
+	Distribution   : 3 [+3] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.333 : 0.333 : 1 [+1]	|||||||||||||||||||||||||||||||||
+	             1 : 0.333 : 0.667 : 1 [+1]	|||||||||||||||||||||||||||||||||
+	             3 : 0.333 : 1.000 : 1 [+1]	|||||||||||||||||||||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:total' metric
+	Average        : 4.83333333333 [+4.83333333333]
+	Minimum        : 0 [+0]
+	Maximum        : 12 [+12]
+	Total          : 29.0 [+29.0]
+	Distribution   : 6 [+6] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.167 : 0.167 : 1 [+1]	|||||||||||||||||
+	             3 : 0.167 : 0.333 : 1 [+1]	|||||||||||||||||
+	             4 : 0.167 : 0.500 : 1 [+1]	|||||||||||||||||
+	             5 : 0.333 : 0.833 : 2 [+2]	|||||||||||||||||||||||||||||||||
+	            12 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:code' metric
+	Average        : 4.16666666667 [+4.16666666667]
+	Minimum        : 0 [+0]
+	Maximum        : 10 [+10]
+	Total          : 25.0 [+25.0]
+	Distribution   : 6 [+6] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.167 : 0.167 : 1 [+1]	|||||||||||||||||
+	             3 : 0.333 : 0.500 : 2 [+2]	|||||||||||||||||||||||||||||||||
+	             4 : 0.167 : 0.667 : 1 [+1]	|||||||||||||||||
+	             5 : 0.167 : 0.833 : 1 [+1]	|||||||||||||||||
+	            10 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:preprocessor' metric
+	Average        : 0.0 [+0.0]
+	Minimum        : 0 [+0]
+	Maximum        : 0 [+0]
+	Total          : 0.0 [+0.0]
+	Distribution   : 6 [+6] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 1.000 : 1.000 : 6 [+6]	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:comments' metric
+	Average        : 0.666666666667 [+0.666666666667]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+2]
+	Total          : 4.0 [+4.0]
+	Distribution   : 6 [+6] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.500 : 0.500 : 3 [+3]	||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.333 : 0.833 : 2 [+2]	|||||||||||||||||||||||||||||||||
+	             2 : 0.167 : 1.000 : 1 [+1]	|||||||||||||||||
+
+:: info: Directory content:
+	Directory      : .
+
+

+ 6 - 0
mainline/tests/general/test_basic/test_workflow_view_second_txt_touched_stderr.gold.txt

@@ -0,0 +1,6 @@
+[LOG]: WARNING:	Logging enabled with INFO level
+[LOG]: INFO:	Processing: 
+[LOG]: INFO:	Processing: ./simple.cpp [modified]
+[LOG]: INFO:	Processing: ./simple2.cpp [new]
+[LOG]: INFO:	Processing: ./simple2.cpp [deleted]
+[LOG]: WARNING:	Done (1 seconds). Exit code: 0

+ 70 - 0
mainline/tests/general/test_basic/test_workflow_view_second_txt_touched_stdout.gold.txt

@@ -0,0 +1,70 @@
+:: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
+	Average        : 1.4 [+0.233333333333]
+	Minimum        : 0 [-1]
+	Maximum        : 3 [+1]
+	Total          : 7.0 [+0.0]
+	Distribution   : 5 [-1] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.200 : 0.200 : 1 [+1]	||||||||||||||||||||
+	             1 : 0.400 : 0.600 : 2 [-3]	||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.200 : 0.800 : 1 [+0]	||||||||||||||||||||
+	             3 : 0.200 : 1.000 : 1 [+1]	||||||||||||||||||||
+
+:: info: Overall metrics for 'std.code.lines:total' metric
+	Average        : 5.6 [+0.0166666666667]
+	Minimum        : 0 [+0]
+	Maximum        : 12 [+3]
+	Total          : 56.0 [-11.0]
+	Distribution   : 10 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.100 : 0.100 :  1 [+0 ]	||||||||||
+	             3 : 0.100 : 0.200 :  1 [-1 ]	||||||||||
+	             4 : 0.200 : 0.400 :  2 [+1 ]	||||||||||||||||||||
+	             5 : 0.200 : 0.600 :  2 [+1 ]	||||||||||||||||||||
+	             6 : 0.000 : 0.600 :  0 [-1 ]	
+	             7 : 0.200 : 0.800 :  2 [-1 ]	||||||||||||||||||||
+	             8 : 0.000 : 0.800 :  0 [-2 ]	
+	             9 : 0.100 : 0.900 :  1 [+0 ]	||||||||||
+	            12 : 0.100 : 1.000 :  1 [+1 ]	||||||||||
+
+:: info: Overall metrics for 'std.code.lines:code' metric
+	Average        : 4.8 [-0.116666666667]
+	Minimum        : 0 [+0]
+	Maximum        : 10 [+2]
+	Total          : 48.0 [-11.0]
+	Distribution   : 10 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.100 : 0.100 :  1 [+0 ]	||||||||||
+	             3 : 0.200 : 0.300 :  2 [+0 ]	||||||||||||||||||||
+	             4 : 0.300 : 0.600 :  3 [+0 ]	||||||||||||||||||||||||||||||
+	             5 : 0.100 : 0.700 :  1 [+0 ]	||||||||||
+	             7 : 0.100 : 0.800 :  1 [-3 ]	||||||||||
+	             8 : 0.100 : 0.900 :  1 [+0 ]	||||||||||
+	            10 : 0.100 : 1.000 :  1 [+1 ]	||||||||||
+
+:: info: Overall metrics for 'std.code.lines:preprocessor' metric
+	Average        : 0.2 [+0.116666666667]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [+1]
+	Total          : 2.0 [+1.0]
+	Distribution   : 10 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.900 : 0.900 :  9 [-2 ]	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.000 : 0.900 :  0 [-1 ]	
+	             2 : 0.100 : 1.000 :  1 [+1 ]	||||||||||
+
+:: info: Overall metrics for 'std.code.lines:comments' metric
+	Average        : 0.8 [+0.133333333333]
+	Minimum        : 0 [+0]
+	Maximum        : 2 [-1]
+	Total          : 8.0 [+0.0]
+	Distribution   : 10 [-2] regions in total (including 0 suppressed)
+	  Metric value : Ratio : R-sum : Number of regions
+	             0 : 0.400 : 0.400 :  4 [-3 ]	||||||||||||||||||||||||||||||||||||||||
+	             1 : 0.400 : 0.800 :  4 [+1 ]	||||||||||||||||||||||||||||||||||||||||
+	             2 : 0.200 : 1.000 :  2 [+1 ]	||||||||||||||||||||
+
+:: info: Directory content:
+	Directory      : .
+
+