From 968e49ab157bc3fa62d175bc588f54ac459d0bc0 Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Tue, 19 Sep 2017 20:52:10 +0200 Subject: [PATCH] wsl metrics, different columns changed the script so that all the generated columns in a metrics comparison have different names. they will all have an adequate prefix - either P1, P2, DIFF or %. --- src-wsl/metrics.wsl | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src-wsl/metrics.wsl b/src-wsl/metrics.wsl index 8dff9db..d563847 100644 --- a/src-wsl/metrics.wsl +++ b/src-wsl/metrics.wsl @@ -91,14 +91,14 @@ MW_PROC @Write_Metrics(metrics VAR) == OD END; -MW_PROC @Write_Metrics_List() == - @WS("McCabe Cyclo");@WS(Field_Separator); - @WS("McCabe Essential");@WS(Field_Separator); - @WS("Statements");@WS(Field_Separator); - @WS("Expressions");@WS(Field_Separator); - @WS("CFDF");@WS(Field_Separator); - @WS("Size");@WS(Field_Separator); - @WS("Structure") +MW_PROC @Write_Metrics_List(prefix VAR) == + @WS(prefix);@WS("McCabe Cyclo");@WS(Field_Separator); + @WS(prefix);@WS("McCabe Essential");@WS(Field_Separator); + @WS(prefix);@WS("Statements");@WS(Field_Separator); + @WS(prefix);@WS("Expressions");@WS(Field_Separator); + @WS(prefix);@WS("CFDF");@WS(Field_Separator); + @WS(prefix);@WS("Size");@WS(Field_Separator); + @WS(prefix);@WS("Structure") END; MW_PROC @Metrics_Main() == @@ -122,18 +122,15 @@ ELSE SKIP ELSIF filename = "-H" OR filename = "--header" THEN @WS("filename");@WS(Field_Separator); - @Write_Metrics_List(); + @Write_Metrics_List(""); @WL(""); ELSIF filename = "-HC" THEN C:"Header for comparison"; @WS("filename");@WS(Field_Separator); - @Write_Metrics_List();@WS(Field_Separator); - @WS("P2 "); - @Write_Metrics_List();@WS(Field_Separator); - @WS("DIF "); - @Write_Metrics_List();@WS(Field_Separator); - @WS("% "); - @Write_Metrics_List(); + @Write_Metrics_List("P1-");@WS(Field_Separator); + @Write_Metrics_List("P2-");@WS(Field_Separator); + @Write_Metrics_List("DIFF-");@WS(Field_Separator); + @Write_Metrics_List("%-"); @WL(""); ELSIF filename = "-o" THEN C:"set output"; -- 2.25.1