Skip to content

Commit 81bec5c

Browse files
author
Johan Brichau
committed
ported rules: invalid object initialization and non-portable messages
1 parent d6705ff commit 81bec5c

File tree

26 files changed

+105
-30
lines changed

26 files changed

+105
-30
lines changed

repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/README.md

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
testing - interest
2+
checksMethod
3+
4+
^ true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
running
2+
basicCheck: aMethod
3+
4+
^ (aMethod methodClass isMeta not
5+
and: [ (aMethod selector beginsWithSubCollection: #initialize)
6+
and: [ aMethod selector numArgs > 0
7+
and: [ aMethod methodClass ~= GRObject
8+
and: [ (aMethod methodClass includesBehavior: GRObject)
9+
and: [ (aMethod superMessages includes: aMethod selector) not
10+
and: [ aMethod selfMessages noneSatisfy: [ :each | each beginsWithSubCollection: #initialize ] ] ] ] ] ] ])
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
accessing
2+
group
3+
4+
^ 'Grease Portability'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
accessing
2+
name
3+
4+
^ 'Invalid object initialization'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
accessing
2+
rationale
3+
4+
^ 'Initialize methods are required to call the designated initializer or its super implementation.'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"commentStamp" : "",
3+
"super" : "GRReSlimeBlockLintRule",
4+
"category" : "Grease-Pharo110-Slime",
5+
"classinstvars" : [ ],
6+
"pools" : [ ],
7+
"classvars" : [ ],
8+
"instvars" : [ ],
9+
"name" : "GRInvalidObjectInitializationRule",
10+
"type" : "normal"
11+
}

repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/README.md

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
testing - interest
2+
checksNode
3+
4+
^ true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
running
2+
basicCheck: anEntity
3+
4+
^ anEntity isMessage and:[ self methodNames includes: anEntity selector ]

0 commit comments

Comments
 (0)