- SmallSenseChecker
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 06 Sep 2012 17:38:47 +0100
changeset 28 f516772ba2b8
parent 27 656483c3b8f4
child 29 fe650a6e5704
- SmallSenseChecker class definition added: #initialize #new changed: #checkMethodsForClass: - extensions ...
SmallSenseChecker.st
smallsense.rc
--- a/SmallSenseChecker.st	Mon Aug 13 23:12:37 2012 +0100
+++ b/SmallSenseChecker.st	Thu Sep 06 17:38:47 2012 +0100
@@ -2,7 +2,7 @@
 
 SmalllintChecker subclass:#SmallSenseChecker
 	instanceVariableNames:''
-	classVariableNames:''
+	classVariableNames:'Errors'
 	poolDictionaries:''
 	category:'SmallSense-Lint'
 !
@@ -29,6 +29,18 @@
 "
 ! !
 
+!SmallSenseChecker class methodsFor:'initialization'!
+
+initialize
+    "Invoked at system start or when the class is dynamically loaded."
+
+    "/ please change as required (and remove this comment)
+
+    Errors := Dictionary new.
+
+    "Modified: / 06-09-2012 / 14:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !SmallSenseChecker class methodsFor:'accessing'!
 
 forceDisabledRules
@@ -66,15 +78,13 @@
         context parseTree notNil ifTrue:[
             rule flattened do:[:each|
                 [
-                    "JV@2012-02-17: HACK HACK: Law Of Demeter has a **lots** of false positives
-                     and it is hard to fix"
-                    (each class ~~ RBLawOfDemeterRule) ifTrue:[
-                        each checkMethod: context.
-                    ]
+                    each checkMethod: context.
                 ] on: Error do:[:ex|
                     SmallSenseService debugging ifTrue:[
                         SmallSenseService debugging: false.
                         ex pass.
+                    ] ifFalse:[
+                        Errors at: each class ifAbsentPut:[ context method source ].
                     ]
                 ]
             ].
@@ -88,5 +98,7 @@
 !SmallSenseChecker class methodsFor:'documentation'!
 
 version_SVN
-    ^ '$Id: SmallSenseChecker.st 7970 2012-04-04 16:42:36Z vranyj1 $'
+    ^ '$Id: SmallSenseChecker.st 8046 2012-09-06 16:38:47Z vranyj1 $'
 ! !
+
+SmallSenseChecker initialize!
--- a/smallsense.rc	Mon Aug 13 23:12:37 2012 +0100
+++ b/smallsense.rc	Thu Sep 06 17:38:47 2012 +0100
@@ -4,7 +4,7 @@
 //
 VS_VERSION_INFO VERSIONINFO
   FILEVERSION     6,2,7967,7967
-  PRODUCTVERSION  6,2,2,1
+  PRODUCTVERSION  6,2,3,1
 #if (__BORLANDC__)
   FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
   FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
@@ -24,8 +24,8 @@
       VALUE "InternalName", "stx:libtool/smallsense\0"
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
       VALUE "ProductName", "Smalltalk/X\0"
-      VALUE "ProductVersion", "6.2.2.1\0"
-      VALUE "ProductDate", "Mon, 13 Aug 2012 22:17:56 GMT\0"
+      VALUE "ProductVersion", "6.2.3.1\0"
+      VALUE "ProductDate", "Thu, 06 Sep 2012 16:39:15 GMT\0"
     END
 
   END