Fix for non-Smalltalk classes: do not check classes nor methods which are not Smalltalk ones.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 31 Jul 2014 10:49:55 +0200
changeset 3618 851e57ea8ad1
parent 3617 cd5cba72f63a
child 3619 e2a5752d7e1d
Fix for non-Smalltalk classes: do not check classes nor methods which are not Smalltalk ones.
ProjectChecker.st
--- a/ProjectChecker.st	Tue Jul 29 13:33:07 2014 +0200
+++ b/ProjectChecker.st	Thu Jul 31 10:49:55 2014 +0200
@@ -577,7 +577,7 @@
     | classesToCheck |
 
     classesToCheck := classes notNil ifTrue:[ classes ] ifFalse:[ Smalltalk allClasses ].
-    classesToCheck := classesToCheck select:[:each | each package = currentPackage ].
+    classesToCheck := classesToCheck select:[:each | each programmingLanguage isSmalltalk and:[ each package = currentPackage ] ].
 
     (currentPackageDef notNil and:[currentPackageDef isFolderForProjectsDefinition]) ifTrue:[
         classesToCheck remove:currentPackageDef ifAbsent:[]
@@ -593,7 +593,7 @@
     ].
 
     "Created: / 11-01-2012 / 16:55:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 04-04-2014 / 13:00:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 31-07-2014 / 09:47:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 checkClasses: classesToCheck
@@ -608,18 +608,20 @@
 !
 
 checkMethod: method
-    (self checkMethodSourceCode: method) ifTrue:[
-        "/OK, method's source code is fine, perform more checks on
-        "/ it's source code.
+    method programmingLanguage isSmalltalk ifTrue:[
+        (self checkMethodSourceCode: method) ifTrue:[
+            "/OK, method's source code is fine, perform more checks on
+            "/ it's source code.
 
-        "/ ActivityNotification raiseRequestWith:self errorString:'Checking stc compilability...'.
-        self checkMethodSTCCompilability: method.
-        "/ ActivityNotification raiseRequestWith:self errorString:'Checking coding style...'.
-        self checkMethodCodingStyle: method.
-    ]
+            "/ ActivityNotification raiseRequestWith:self errorString:'Checking stc compilability...'.
+            self checkMethodSTCCompilability: method.
+            "/ ActivityNotification raiseRequestWith:self errorString:'Checking coding style...'.
+            self checkMethodCodingStyle: method.
+        ]
+    ].
 
     "Created: / 11-04-2012 / 12:27:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (format): / 29-05-2014 / 16:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 31-07-2014 / 09:48:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 checkMethods
@@ -711,14 +713,14 @@
 !ProjectChecker class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ProjectChecker.st,v 1.25 2014-07-23 11:11:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ProjectChecker.st,v 1.26 2014-07-31 08:49:55 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/ProjectChecker.st,v 1.25 2014-07-23 11:11:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ProjectChecker.st,v 1.26 2014-07-31 08:49:55 vrany Exp $'
 !
 
 version_SVN
-    ^ '$Id: ProjectChecker.st,v 1.25 2014-07-23 11:11:21 cg Exp $'
+    ^ '$Id: ProjectChecker.st,v 1.26 2014-07-31 08:49:55 vrany Exp $'
 ! !