#QUALITY by stefan
authorStefan Vogel <sv@exept.de>
Tue, 02 Oct 2018 17:29:24 +0200
changeset 4360 6f051df487df
parent 4359 f46715e6c974
child 4361 779de481266f
#QUALITY by stefan class: ProjectChecker comment/format in: #check changed: #check: #checkMethodSTCCompilability: class: ProjectChecker class comment/format in: #check: #checkClass: Can check single classes now (to enable class consistency checking on checkin)
ProjectChecker.st
--- a/ProjectChecker.st	Tue Oct 02 17:28:32 2018 +0200
+++ b/ProjectChecker.st	Tue Oct 02 17:29:24 2018 +0200
@@ -94,9 +94,8 @@
 
 !ProjectChecker class methodsFor:'checking'!
 
-check: package
-
-    ^self new check: package
+check:aPackageSymbolOrClass
+    ^ self new check:aPackageSymbolOrClass
 
     "Created: / 11-01-2012 / 16:46:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -140,7 +139,6 @@
 !ProjectChecker methodsFor:'checking'!
 
 check
-
     problems removeAll.
     packages do:[:each |
         currentPackage := each.
@@ -164,10 +162,20 @@
     "Modified: / 22-02-2014 / 21:59:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-check: package
+check:packageSymbolOrClass
+    packageSymbolOrClass isBehavior ifTrue:[
+        self package:packageSymbolOrClass package.
+        self checkMethods:packageSymbolOrClass theNonMetaclass methodDictionary values, packageSymbolOrClass theMetaclass methodDictionary values
+    ] ifFalse:[
+        self package:packageSymbolOrClass.
+        self check.
+    ].
 
-    self package: package.
-    self check.
+    "
+        ProjectChecker new check:'stx:libbasic3'
+        ProjectChecker new check:self
+    "
+
 
     "Created: / 11-01-2012 / 16:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -558,7 +566,7 @@
     cls isPrivate ifTrue:[ 
         cls := cls topOwningClass.
     ].
-    (currentPackageDef autoloaded_classNames includes: cls name) ifTrue:[
+    (currentPackageDef notNil and:[currentPackageDef autoloaded_classNames includes: cls name]) ifTrue:[
         ^ self
     ].
 
@@ -579,11 +587,7 @@
     issue2 hasIssue ifTrue:[
         self addProblem: issue2
     ].
-^ self.
-Transcript showCR:helloBlaBla
-                "
-                    Smalltalk at:#helloBlaBla put:'xxx'
-                "
+
     "Created: / 11-04-2012 / 12:37:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified (format): / 29-05-2014 / 16:54:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !