Tools__NewSystemBrowser.st
changeset 17051 674e966f7cd5
parent 17049 ae2e34d3dc95
child 17053 55df75304e61
--- a/Tools__NewSystemBrowser.st	Sun Nov 06 11:53:21 2016 +0100
+++ b/Tools__NewSystemBrowser.st	Sun Nov 06 12:34:14 2016 +0100
@@ -28804,7 +28804,7 @@
     "
 
     | rules checker numClassesOverAll numMethodsOverAll numRules
-      count lastPercentage timeOfLastFeedback|
+      count lastPercentage timeOfLastFeedback anyWarning anyError anyInfo|
 
     (Smalltalk at:#RBBuiltinRuleSet) isNil ifTrue:[
         self loadSmalllint
@@ -28822,6 +28822,7 @@
     count := 0.
     lastPercentage := nil.
     timeOfLastFeedback := Timestamp now.
+    anyWarning := anyError := anyInfo := false.
     
     rules withIndexDo:[:rule :index|
         |t ruleName ruleClassName|
@@ -28859,7 +28860,26 @@
                         ((numClassesOverAll < 10) or:[numRules == 1]) ifTrue:[
                             msg := msg , ' in ',classBeingChecked name.
                         ].    
+                        anyError ifFalse:[
+                            rule isEmpty ifFalse:[
+                                anyError := (rule severity == RBLintRule severityWarning). 
+                                anyError ifFalse:[
+                                    anyWarning ifFalse:[
+                                        anyWarning := (rule severity == RBLintRule severityWarning).
+                                        anyWarning ifFalse:[
+                                            anyInfo := true
+                                        ].    
+                                    ].
+                                ].
+                            ].
+                        ].    
                         ProgressNotification new
+                            statusInfo:(anyError 
+                                            ifTrue:[#error] 
+                                            ifFalse:[ 
+                                                anyWarning 
+                                                    ifTrue:[#warning] 
+                                                    ifFalse:[ anyInfo ifTrue:[#info] ifFalse:[nil]]]);
                             messageText: msg;
                             parameter: percentage;
                             raiseRequest.