equal
deleted
inserted
replaced
92 ^ self basicNew initialize. |
92 ^ self basicNew initialize. |
93 ! ! |
93 ! ! |
94 |
94 |
95 !ProjectChecker class methodsFor:'checking'! |
95 !ProjectChecker class methodsFor:'checking'! |
96 |
96 |
97 check: package |
97 check:aPackageSymbolOrClass |
98 |
98 ^ self new check:aPackageSymbolOrClass |
99 ^self new check: package |
|
100 |
99 |
101 "Created: / 11-01-2012 / 16:46:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
100 "Created: / 11-01-2012 / 16:46:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
102 ! ! |
101 ! ! |
103 |
102 |
104 !ProjectChecker methodsFor:'accessing'! |
103 !ProjectChecker methodsFor:'accessing'! |
138 ! ! |
137 ! ! |
139 |
138 |
140 !ProjectChecker methodsFor:'checking'! |
139 !ProjectChecker methodsFor:'checking'! |
141 |
140 |
142 check |
141 check |
143 |
|
144 problems removeAll. |
142 problems removeAll. |
145 packages do:[:each | |
143 packages do:[:each | |
146 currentPackage := each. |
144 currentPackage := each. |
147 currentPackageDef := ProjectDefinition definitionClassForPackage: currentPackage. |
145 currentPackageDef := ProjectDefinition definitionClassForPackage: currentPackage. |
148 currentPackageDef isNil ifTrue:[ |
146 currentPackageDef isNil ifTrue:[ |
162 |
160 |
163 "Created: / 11-01-2012 / 16:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
161 "Created: / 11-01-2012 / 16:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
164 "Modified: / 22-02-2014 / 21:59:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
162 "Modified: / 22-02-2014 / 21:59:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
165 ! |
163 ! |
166 |
164 |
167 check: package |
165 check:packageSymbolOrClass |
168 |
166 packageSymbolOrClass isBehavior ifTrue:[ |
169 self package: package. |
167 self package:packageSymbolOrClass package. |
170 self check. |
168 self checkMethods:packageSymbolOrClass theNonMetaclass methodDictionary values, packageSymbolOrClass theMetaclass methodDictionary values |
|
169 ] ifFalse:[ |
|
170 self package:packageSymbolOrClass. |
|
171 self check. |
|
172 ]. |
|
173 |
|
174 " |
|
175 ProjectChecker new check:'stx:libbasic3' |
|
176 ProjectChecker new check:self |
|
177 " |
|
178 |
171 |
179 |
172 "Created: / 11-01-2012 / 16:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
180 "Created: / 11-01-2012 / 16:47:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
173 ! ! |
181 ! ! |
174 |
182 |
175 !ProjectChecker methodsFor:'checks-individual'! |
183 !ProjectChecker methodsFor:'checks-individual'! |
556 "No need to check the method if the class is autoloaded" |
564 "No need to check the method if the class is autoloaded" |
557 cls := method mclass theNonMetaclass. |
565 cls := method mclass theNonMetaclass. |
558 cls isPrivate ifTrue:[ |
566 cls isPrivate ifTrue:[ |
559 cls := cls topOwningClass. |
567 cls := cls topOwningClass. |
560 ]. |
568 ]. |
561 (currentPackageDef autoloaded_classNames includes: cls name) ifTrue:[ |
569 (currentPackageDef notNil and:[currentPackageDef autoloaded_classNames includes: cls name]) ifTrue:[ |
562 ^ self |
570 ^ self |
563 ]. |
571 ]. |
564 |
572 |
565 "/ Speed optimization: do not check method if it was compiled by |
573 "/ Speed optimization: do not check method if it was compiled by |
566 "/ stc and hasn't been changed since then. |
574 "/ stc and hasn't been changed since then. |
577 issue2 method: method. |
585 issue2 method: method. |
578 self checkMethodSTCCompilability2: method into: issue2. |
586 self checkMethodSTCCompilability2: method into: issue2. |
579 issue2 hasIssue ifTrue:[ |
587 issue2 hasIssue ifTrue:[ |
580 self addProblem: issue2 |
588 self addProblem: issue2 |
581 ]. |
589 ]. |
582 ^ self. |
590 |
583 Transcript showCR:helloBlaBla |
|
584 " |
|
585 Smalltalk at:#helloBlaBla put:'xxx' |
|
586 " |
|
587 "Created: / 11-04-2012 / 12:37:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
591 "Created: / 11-04-2012 / 12:37:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
588 "Modified (format): / 29-05-2014 / 16:54:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
592 "Modified (format): / 29-05-2014 / 16:54:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
589 ! |
593 ! |
590 |
594 |
591 checkMethodSourceCode: method |
595 checkMethodSourceCode: method |