-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14096 Rewrite lint rules to check classes and methods https://pharo.fogbugz.com/f/cases/14096 6512 Traits should not use compiler https://pharo.fogbugz.com/f/cases/6512 14203 OCStoreIntoReadOnlyVariableError: RecentMessageList>>#lastClasses https://pharo.fogbugz.com/f/cases/14203 http://files.pharo.org/image/40/40296.zip
- Loading branch information
Jenkins Build Server
authored and
ci
committed
Oct 10, 2014
1 parent
51a8750
commit b3267a7
Showing
69 changed files
with
625 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
Refactoring-Critics.package/RBAbstractClassRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
checkClass: aContext | ||
(aContext selectedClass whichSelectorsReferTo: subclassResponsibilitySymbol) ifNotEmpty: | ||
[ aContext selectedClass allCallsOn ifNotEmpty: [ result addClass: aContext selectedClass ] ] | ||
checkClass: aClass | ||
(aClass whichSelectorsReferTo: subclassResponsibilitySymbol) ifNotEmpty: | ||
[ aClass allCallsOn ifNotEmpty: [ result addClass: aClass ] ] |
10 changes: 5 additions & 5 deletions
10
Refactoring-Critics.package/RBAddRemoveDependentsRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
checkClass: aContext | ||
checkClass: aClass | ||
| count | | ||
count := 0. | ||
((Set withAll: (aContext selectedClass whichSelectorsReferTo: #addDependent:)) | ||
addAll: (aContext selectedClass whichSelectorsReferTo: #removeDependent:); | ||
((Set withAll: (aClass whichSelectorsReferTo: #addDependent:)) | ||
addAll: (aClass whichSelectorsReferTo: #removeDependent:); | ||
yourself) do: | ||
[ :sel | | ||
(aContext selectedClass compiledMethodAt: sel) messages do: | ||
(aClass compiledMethodAt: sel) messages do: | ||
[ :each | | ||
each = #addDependent: ifTrue: [ count := count + 1 ]. | ||
each = #removeDependent: ifTrue: [ count := count - 1 ] ] ]. | ||
count > 0 ifTrue: [ result addClass: aContext selectedClass ] | ||
count > 0 ifTrue: [ result addClass: aClass ] |
6 changes: 3 additions & 3 deletions
6
...ng-Critics.package/RBAssignmentOnBlockArgumentRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
checkMethod: aContext | ||
(RBFindBlockArgumentAssignment collectAssignments: aContext compiledMethod parseTree) | ||
checkMethod: aMethod | ||
(RBFindBlockArgumentAssignment collectAssignments: aMethod parseTree) | ||
do: [ :item | | ||
result addClass: aContext selectedClass selector: aContext selector. | ||
result addMethod: aMethod. | ||
result addSearchString: item ] |
7 changes: 3 additions & 4 deletions
7
Refactoring-Critics.package/RBBadMessageRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
checkMethod: aContext | ||
checkMethod: aMethod | ||
|
||
self badSelectors do: [ :badSelector | | ||
(aContext compiledMethod sendsSelector: badSelector) | ||
(aMethod sendsSelector: badSelector) | ||
ifTrue: [ | ||
result | ||
addClass: aContext selectedClass | ||
selector: aContext selector; | ||
addMethod: aMethod; | ||
searchStrings: self badSelectors ] ] | ||
|
12 changes: 6 additions & 6 deletions
12
...ng-Critics.package/RBClassInstVarNotInitializedRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
checkClass: aContext | ||
checkClass: aClass | ||
| definesVar class | | ||
aContext selectedClass isMeta ifTrue: | ||
[ class := aContext selectedClass. | ||
aClass isMeta ifTrue: | ||
[ class := aClass. | ||
definesVar := false. | ||
[ definesVar or: [ class isNil or: [ class isMeta not ] ] ] whileFalse: [ | ||
definesVar := class instVarNames isEmpty not | ||
"TestCase defines Announcers but does not initialize it -> all tests are reported | ||
so we exclude it here" | ||
and: [ class ~= TestCase class | ||
and: [ aContext selectedClass ~= TestCase ] ]. | ||
and: [ aClass ~= TestCase ] ]. | ||
class := class superclass ]. | ||
(definesVar and: [ (aContext selectedClass includesSelector: #initialize) not ]) ifTrue: [ | ||
result addClass: aContext selectedClass ] ] | ||
(definesVar and: [ (aClass includesSelector: #initialize) not ]) ifTrue: [ | ||
result addClass: aClass ] ] |
12 changes: 5 additions & 7 deletions
12
Refactoring-Critics.package/RBClassNameInSelectorRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
checkMethod: aContext | ||
(aContext selectedClass isMeta and: | ||
[ (aContext selector | ||
indexOfSubCollection: aContext selectedClass soleInstance name | ||
checkMethod: aMethod | ||
(aMethod methodClass isMeta and: | ||
[ (aMethod selector | ||
indexOfSubCollection: aMethod methodClass soleInstance name | ||
startingAt: 1) > 0 ]) ifTrue: | ||
[ result | ||
addClass: aContext selectedClass | ||
selector: aContext selector ] | ||
[ result addMethod: aMethod ] |
10 changes: 5 additions & 5 deletions
10
Refactoring-Critics.package/RBClassNotReferencedRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
checkClass: aContext | ||
(aContext selectedClass isMeta or: [ aContext selectedClass subclasses notEmpty or: [ aContext selectedClass inheritsFrom: TestCase ] ] ) | ||
checkClass: aClass | ||
(aClass isMeta or: [ aClass subclasses notEmpty or: [ aClass inheritsFrom: TestCase ] ] ) | ||
ifTrue: [ ^ self ]. | ||
aContext selectedClass allCallsOn ifEmpty: [ | ||
aClass allCallsOn ifEmpty: [ | ||
result | ||
addClass: aContext selectedClass; | ||
addClass: aContext selectedClass class ] | ||
addClass: aClass; | ||
addClass: aClass class ] |
12 changes: 6 additions & 6 deletions
12
...g-Critics.package/RBClassVariableCapitalizationRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
checkClass: aContext | ||
aContext selectedClass isMeta | ||
checkClass: aClass | ||
aClass isMeta | ||
ifTrue: [ ^ self ]. | ||
aContext selectedClass classVarNames do: [ :each | | ||
aClass classVarNames do: [ :each | | ||
each first isUppercase ifFalse: [ | ||
result | ||
addClass: aContext selectedClass | ||
addClass: aClass | ||
classVariable: each ] ]. | ||
aContext selectedClass sharedPoolNames do: [ :each | | ||
aClass sharedPoolNames do: [ :each | | ||
each first isUppercase ifFalse: [ | ||
result | ||
addClass: aContext selectedClass | ||
addClass: aClass | ||
classVariable: each ] ] |
12 changes: 6 additions & 6 deletions
12
Refactoring-Critics.package/RBCollectionCopyEmptyRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
checkClass: aContext | ||
((aContext selectedClass inheritsFrom: Collection) | ||
and: [ aContext selectedClass isVariable | ||
and: [ (aContext selectedClass includesSelector: #copyEmpty) not | ||
and: [ aContext selectedClass instVarNames isEmpty not ]]]) | ||
ifTrue: [ result addClass: aContext selectedClass ] | ||
checkClass: aClass | ||
((aClass inheritsFrom: Collection) | ||
and: [ aClass isVariable | ||
and: [ (aClass includesSelector: #copyEmpty) not | ||
and: [ aClass instVarNames isEmpty not ]]]) | ||
ifTrue: [ result addClass: aClass ] |
4 changes: 2 additions & 2 deletions
4
Refactoring-Critics.package/RBCompositeLintRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
checkClass: aContext | ||
rules do: [ :each | each checkClass: aContext ] | ||
checkClass: aClass | ||
rules do: [ :each | each checkClass: aClass ] |
4 changes: 2 additions & 2 deletions
4
Refactoring-Critics.package/RBCompositeLintRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
checkMethod: aContext | ||
rules do: [ :each | each checkMethod: aContext ] | ||
checkMethod: aMethod | ||
rules do: [ :each | each checkMethod: aMethod ] |
4 changes: 2 additions & 2 deletions
4
Refactoring-Critics.package/RBDefinesEqualNotHashRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
checkClass: aContext | ||
((aContext selectedClass includesSelector: #=) and: [ (aContext selectedClass includesSelector: #hash) not ]) ifTrue: [ result addClass: aContext selectedClass ] | ||
checkClass: aClass | ||
((aClass includesSelector: #=) and: [ (aClass includesSelector: #hash) not ]) ifTrue: [ result addClass: aClass ] |
16 changes: 8 additions & 8 deletions
16
...-Critics.package/RBEquivalentSuperclassMethodsRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
checkMethod: aContext | ||
checkMethod: aMethod | ||
| superclass supertree | | ||
(self ignoredSelectors includes: aContext selector) | ||
(self ignoredSelectors includes: aMethod selector) | ||
ifTrue: [ ^ self ]. | ||
aContext selectedClass superclass notNil ifTrue: [ | ||
superclass := aContext selectedClass superclass | ||
whichClassIncludesSelector: aContext selector. | ||
aMethod methodClass superclass notNil ifTrue: [ | ||
superclass := aMethod methodClass superclass | ||
whichClassIncludesSelector: aMethod selector. | ||
superclass notNil ifTrue: [ | ||
supertree := superclass parseTreeFor: aContext selector. | ||
(supertree notNil and: [ supertree equalTo: aContext compiledMethod parseTree exceptForVariables: supertree allDefinedVariables ]) | ||
ifTrue: [ result addClass: aContext selectedClass selector: aContext selector ] ] ] | ||
supertree := superclass parseTreeFor: aMethod selector. | ||
(supertree notNil and: [ supertree equalTo: aMethod parseTree exceptForVariables: supertree allDefinedVariables ]) | ||
ifTrue: [ result addMethod: aMethod ] ] ] |
6 changes: 3 additions & 3 deletions
6
Refactoring-Critics.package/RBExcessiveArgumentsRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
checkMethod: aContext | ||
aContext selector numArgs >= self argumentsCount | ||
ifTrue: [ result addClass: aContext selectedClass selector: aContext selector ] | ||
checkMethod: aMethod | ||
aMethod numArgs >= self argumentsCount | ||
ifTrue: [ result addMethod: aMethod ] |
8 changes: 4 additions & 4 deletions
8
Refactoring-Critics.package/RBExcessiveInheritanceRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
checkClass: aContext | ||
checkClass: aClass | ||
| count current | | ||
aContext selectedClass isMeta | ||
aClass isMeta | ||
ifTrue: [ ^ self ]. | ||
count := 1. | ||
current := aContext selectedClass. | ||
current := aClass. | ||
[ current isNil ] whileFalse: [ | ||
self inheritanceDepth < count | ||
ifTrue: [ ^ result addClass: aContext selectedClass; addClass: aContext selectedClass class ]. | ||
ifTrue: [ ^ result addClass: aClass; addClass: aClass class ]. | ||
current := current superclass. | ||
count := count + 1 ] |
6 changes: 3 additions & 3 deletions
6
Refactoring-Critics.package/RBExcessiveMethodsRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
checkClass: aContext | ||
aContext selectedClass selectors size >= self methodsCount | ||
ifTrue: [ result addClass: aContext selectedClass ] | ||
checkClass: aClass | ||
aClass selectors size >= self methodsCount | ||
ifTrue: [ result addClass: aClass ] |
8 changes: 4 additions & 4 deletions
8
Refactoring-Critics.package/RBExcessiveVariablesRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
checkClass: aContext | ||
(aContext selectedClass instVarNames size >= self variablesCount | ||
or: [ aContext selectedClass classVarNames size >= self variablesCount ]) | ||
ifTrue: [ result addClass: aContext selectedClass ] | ||
checkClass: aClass | ||
(aClass instVarNames size >= self variablesCount | ||
or: [ aClass classVarNames size >= self variablesCount ]) | ||
ifTrue: [ result addClass: aClass ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
...ing-Critics.package/RBFutureDeprecationWarningRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
checkMethod: aContext | ||
checkMethod: aMethod | ||
|
||
self plannedSelectorRenames do: [ :mapping | | ||
| oldSelector newSelector | | ||
oldSelector := mapping key. | ||
newSelector := mapping value. | ||
(aContext compiledMethod sendsSelector: oldSelector) | ||
ifTrue: [ | ||
result | ||
addClass: aContext selectedClass | ||
selector: aContext selector ] ] | ||
(aMethod sendsSelector: oldSelector) | ||
ifTrue: [ result addMethod: aMethod ] ] | ||
|
14 changes: 6 additions & 8 deletions
14
Refactoring-Critics.package/RBImplementedNotSentRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
checkMethod: aContext | ||
checkMethod: aMethod | ||
"Check if there are any senders. Furthermore methods with pragmas are likely to be sent through reflection, thus do not report those. Also test methods are sent through reflection, so ignore those as well." | ||
|
||
(self literals includes: aContext compiledMethod selector) | ||
(self literals includes: aMethod selector) | ||
ifTrue: [ ^ self ]. | ||
aContext compiledMethod pragmas isEmpty | ||
aMethod pragmas isEmpty | ||
ifFalse: [ ^ self ]. | ||
(aContext selectedClass isMeta not | ||
and: [ aContext includesBehaviorNamed: #TestCase ]) | ||
(aMethod methodClass isMeta not | ||
and: [ aMethod methodClass includesBehavior: TestCase ]) | ||
ifTrue: [ ^ self ]. | ||
result | ||
addClass: aContext selectedClass | ||
selector: aContext selector | ||
result addMethod: aMethod |
16 changes: 8 additions & 8 deletions
16
...ics.package/RBInconsistentMethodClassificationRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
checkMethod: aContext | ||
checkMethod: aMethod | ||
| superClass superProtocol ownerProtocol | | ||
aContext selectedClass superclass isNil ifFalse: [ | ||
superClass := aContext selectedClass superclass whichClassIncludesSelector: aContext selector. | ||
aMethod methodClass superclass isNil ifFalse: [ | ||
superClass := aMethod methodClass superclass whichClassIncludesSelector: aMethod selector. | ||
superClass isNil ifFalse: [ | ||
superProtocol := superClass whichCategoryIncludesSelector: aContext selector. | ||
ownerProtocol := aContext selectedClass whichCategoryIncludesSelector: aContext selector. | ||
superProtocol := superClass whichCategoryIncludesSelector: aMethod selector. | ||
ownerProtocol := aMethod methodClass whichCategoryIncludesSelector: aMethod selector. | ||
(superProtocol isNil or: [ superProtocol isEmpty or: [ superProtocol first = $* or: [ ownerProtocol isNil or: [ ownerProtocol isEmpty or: [ ownerProtocol first = $* ] ] ] ] ]) ifFalse: [ | ||
superProtocol = ownerProtocol ifFalse: [ | ||
result | ||
addClass: superClass | ||
selector: aContext selector | ||
selector: aMethod selector | ||
into: superProtocol; | ||
addClass: aContext selectedClass | ||
selector: aContext selector | ||
addClass: aMethod methodClass | ||
selector: aMethod selector | ||
into: superProtocol ] ] ] ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ritics.package/RBInstanceVariableCapitalizationRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
checkClass: aContext | ||
aContext selectedClass instVarNames do: [ :each | | ||
checkClass: aClass | ||
aClass instVarNames do: [ :each | | ||
each first isLowercase ifFalse: [ | ||
result | ||
addClass: aContext selectedClass | ||
addClass: aClass | ||
instanceVariable: each ] ] |
10 changes: 4 additions & 6 deletions
10
Refactoring-Critics.package/RBJustSendsSuperRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
checkMethod: aContext | ||
(aContext compiledMethod parseTree isPrimitive not and: | ||
checkMethod: aMethod | ||
(aMethod parseTree isPrimitive not and: | ||
[ matcher | ||
executeMethod: aContext compiledMethod parseTree | ||
executeMethod: aMethod parseTree | ||
initialAnswer: false ]) ifTrue: | ||
[ result | ||
addClass: aContext selectedClass | ||
selector: aContext selector ] | ||
[ result addMethod: aMethod ] |
2 changes: 1 addition & 1 deletion
2
Refactoring-Critics.package/RBLintRule.class/instance/running/checkClass_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
checkClass: aContext | ||
checkClass: aClass | ||
"Is a hook to specify a check that is performed at the class level" | ||
|
2 changes: 1 addition & 1 deletion
2
Refactoring-Critics.package/RBLintRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
checkMethod: aContext | ||
checkMethod: aMethod | ||
"Is a hook to specify a check that is performed at the method level" |
9 changes: 3 additions & 6 deletions
9
...ng-Critics.package/RBLiteralArrayContainsCommaRule.class/instance/running/checkMethod_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
checkMethod: aContext | ||
(aContext compiledMethod allLiterals anySatisfy: [ :each | self doesLiteralArrayContainComma: each ]) | ||
ifTrue: [ | ||
result | ||
addClass: aContext selectedClass | ||
selector: aContext selector ] | ||
checkMethod: aMethod | ||
(aMethod allLiterals anySatisfy: [ :each | self doesLiteralArrayContainComma: each ]) | ||
ifTrue: [ result addMethod: aMethod ] |
Oops, something went wrong.