Skip to content

Commit

Permalink
Merge pull request #793 from jecisc/clean-smalltalk-importer
Browse files Browse the repository at this point in the history
Remove unused properties
  • Loading branch information
jecisc authored Jun 19, 2024
2 parents 88570c8 + a944d69 commit 4f21645
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions src/Famix-Smalltalk-Utils/RBVisitorForFAMIXMetrics.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ RBVisitorForFamixMetrics >> initialize [
self resetMetricValues
]

{ #category : #private }
RBVisitorForFamixMetrics >> isDirtySuperInMethod: selector withReceiver: receiver [

^ selector ~~ self methodEntity name and: [ receiver isSuperVariable ]
]

{ #category : #private }
RBVisitorForFamixMetrics >> isSuperInMethod: selector withReceiver: receiver [

^ selector == self methodEntity name and: [ receiver isSuperVariable ]
]

{ #category : #'source access' }
RBVisitorForFamixMetrics >> methodBodyOn: aReadStream [
| aux |
Expand Down Expand Up @@ -192,32 +180,31 @@ RBVisitorForFamixMetrics >> resetMetricValues [
cyclomaticNumber := 1
]

{ #category : #enumerating }
{ #category : #visiting }
RBVisitorForFamixMetrics >> visitBlockNode: aBlockNode [
super visitBlockNode: aBlockNode.
numberOfStatements := numberOfStatements + aBlockNode body size
]

{ #category : #enumerating }
{ #category : #visiting }
RBVisitorForFamixMetrics >> visitCascadeNode: aCascadeNode [
numberOfStatements := numberOfStatements + aCascadeNode messages size.
^ super visitCascadeNode: aCascadeNode
]

{ #category : #enumerating }
{ #category : #visiting }
RBVisitorForFamixMetrics >> visitMessageNode: aMessageNode [

| receiver selector |
receiver := aMessageNode receiver.
selector := aMessageNode selector.
super visitMessageNode: aMessageNode.
numberOfMessageSends := numberOfMessageSends + 1.
self countConditionals: selector.
self computeCyclomaticNumber: selector.
(self isSuperInMethod: selector withReceiver: receiver) ifTrue: [ self methodEntity propertyNamed: #cleanSuperSend put: true ].
(self isDirtySuperInMethod: selector withReceiver: receiver) ifTrue: [ self methodEntity propertyNamed: #dirtySuperSend put: true ]
self computeCyclomaticNumber: selector
]

{ #category : #enumerating }
{ #category : #visiting }
RBVisitorForFamixMetrics >> visitMethodNode: aMethodNode [

" I do not know where this block came from"
Expand All @@ -227,7 +214,7 @@ RBVisitorForFamixMetrics >> visitMethodNode: aMethodNode [
^ super visitMethodNode: aMethodNode
]

{ #category : #enumerating }
{ #category : #visiting }
RBVisitorForFamixMetrics >> visitSequenceNode: aSequenceNode [
super visitSequenceNode: aSequenceNode.
numberOfStatements := numberOfStatements + aSequenceNode statements size
Expand Down

0 comments on commit 4f21645

Please sign in to comment.