From 60609bce9c6780648d792ac6d1c1c23f8df30135 Mon Sep 17 00:00:00 2001 From: Gabriel <78592838+Gabriel-Darbord@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:28:28 +0200 Subject: [PATCH] Spell 'overridden' --- .../FAMIXMethod.class.st | 4 +- .../FamixJavaMethod.class.st | 10 ++--- .../FamixJavaMethodTest.class.st | 40 +++++++++---------- .../FamixStMethod.class.st | 4 +- .../FamixSmalltalkMethodTest.class.st | 2 +- src/Famix-Traits/FamixTClassMetrics.trait.st | 12 +++--- ...ModelClassesShouldNotOverrideRule.class.st | 6 +-- .../LANFamixPropertiesTest.class.st | 10 ++--- .../LANImporterTest.class.st | 2 +- 9 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/Famix-Compatibility-Entities/FAMIXMethod.class.st b/src/Famix-Compatibility-Entities/FAMIXMethod.class.st index 0b1747cf5..d652d2df6 100644 --- a/src/Famix-Compatibility-Entities/FAMIXMethod.class.st +++ b/src/Famix-Compatibility-Entities/FAMIXMethod.class.st @@ -166,8 +166,8 @@ FAMIXMethod >> isJUnit4Test [ ] { #category : #'Famix-Extensions' } -FAMIXMethod >> isOverriden [ - +FAMIXMethod >> isOverridden [ + "If we have a stub and we don't have the container, we can't have the information" diff --git a/src/Famix-Java-Entities/FamixJavaMethod.class.st b/src/Famix-Java-Entities/FamixJavaMethod.class.st index bfb808400..59df71356 100644 --- a/src/Famix-Java-Entities/FamixJavaMethod.class.st +++ b/src/Famix-Java-Entities/FamixJavaMethod.class.st @@ -157,10 +157,10 @@ FamixJavaMethod >> isJUnit4Test [ ] { #category : #testing } -FamixJavaMethod >> isOverriden [ +FamixJavaMethod >> isOverridden [ "If we have a stub and we don't have the container, we can't have the information" - + (self parentType isNil and: [ self isStub ]) @@ -257,7 +257,7 @@ FamixJavaMethod >> numberOfInvokedMethods [ ] { #category : #testing } -FamixJavaMethod >> overridenMethod [ +FamixJavaMethod >> overriddenMethod [ ^ (self parentType superclass ifNotNil: [ :superclass | superclass lookUp: self signature ]) ifNil: [ @@ -268,9 +268,9 @@ FamixJavaMethod >> overridenMethod [ FamixJavaMethod >> overridesMethod [ self deprecated: 'This method seems to not be used anymore.'. - "Please consider using #overridenMethod instead. + "Please consider using #overriddenMethod instead. We are not automatically replacing it because the behavior is not identical: - #overridenMethod is a detect and not a collect + it goes through intefaces." + #overriddenMethod is a detect and not a collect + it goes through intefaces." ^ self belongsTo superclassHierarchy collect: [ :each | each implementationOf: self signature ] diff --git a/src/Famix-Java-Tests/FamixJavaMethodTest.class.st b/src/Famix-Java-Tests/FamixJavaMethodTest.class.st index 1c9fce885..320c67a77 100644 --- a/src/Famix-Java-Tests/FamixJavaMethodTest.class.st +++ b/src/Famix-Java-Tests/FamixJavaMethodTest.class.st @@ -92,7 +92,7 @@ FamixJavaMethodTest >> testIsStubWhenParentIsStub [ { #category : #tests } FamixJavaMethodTest >> testOverride [ - | overridenMethod c1 c2 package | + | overriddenMethod c1 c2 package | package := FamixJavaPackage new. c1 := FamixJavaClass new parentPackage: package; @@ -100,7 +100,7 @@ FamixJavaMethodTest >> testOverride [ c2 := FamixJavaClass new parentPackage: package; yourself. - overridenMethod := FamixJavaMethod new + overriddenMethod := FamixJavaMethod new name: 'method'; signature: 'method()'; parentType: c1; @@ -117,67 +117,67 @@ FamixJavaMethodTest >> testOverride [ subclass: c2; superclass: c1). self assert: method isOverriding. - self assert: overridenMethod isOverriden + self assert: overriddenMethod isOverridden ] { #category : #tests } -FamixJavaMethodTest >> testOverridenMethod [ +FamixJavaMethodTest >> testOverriddenMethod [ - | signature overridenMethod localClass superclass | + | signature overriddenMethod localClass superclass | signature := 'javaMethod()'. method signature: signature. - overridenMethod := FamixJavaMethod new signature: signature. + overriddenMethod := FamixJavaMethod new signature: signature. localClass := FamixJavaClass named: #LocalClass. superclass := FamixJavaClass named: #Superclass. localClass addMethod: method. - superclass addMethod: overridenMethod. + superclass addMethod: overriddenMethod. FamixJavaInheritance new superclass: superclass; subclass: localClass. - self assert: method overridenMethod equals: overridenMethod + self assert: method overriddenMethod equals: overriddenMethod ] { #category : #tests } -FamixJavaMethodTest >> testOverridenMethodFromInterface [ +FamixJavaMethodTest >> testOverriddenMethodFromInterface [ - | signature interfaceOverridenMethod localClass interface | + | signature interfaceOverriddenMethod localClass interface | signature := 'javaMethod()'. method signature: signature. - interfaceOverridenMethod := FamixJavaMethod new signature: signature. + interfaceOverriddenMethod := FamixJavaMethod new signature: signature. localClass := FamixJavaClass named: #LocalClass. interface := FamixJavaInterface named: #Interface. localClass addMethod: method. - interface addMethod: interfaceOverridenMethod. + interface addMethod: interfaceOverriddenMethod. FamixJavaImplementation new interface: interface; implementingClass: localClass. - self assert: method overridenMethod equals: interfaceOverridenMethod + self assert: method overriddenMethod equals: interfaceOverriddenMethod ] { #category : #tests } -FamixJavaMethodTest >> testOverridenMethodOnlyOneLevel [ +FamixJavaMethodTest >> testOverriddenMethodOnlyOneLevel [ - | signature overridenMethod localClass superclass superSuperclass otherOverridenMethod | + | signature overriddenMethod localClass superclass superSuperclass otherOverriddenMethod | signature := 'javaMethod()'. method signature: signature. - overridenMethod := FamixJavaMethod new signature: signature. - otherOverridenMethod := FamixJavaMethod new signature: signature. + overriddenMethod := FamixJavaMethod new signature: signature. + otherOverriddenMethod := FamixJavaMethod new signature: signature. localClass := FamixJavaClass named: #LocalClass. superclass := FamixJavaClass named: #Superclass. superSuperclass := FamixJavaClass named: #SuperSuperclass. localClass addMethod: method. - superclass addMethod: overridenMethod. - superSuperclass addMethod: otherOverridenMethod. + superclass addMethod: overriddenMethod. + superSuperclass addMethod: otherOverriddenMethod. FamixJavaInheritance new superclass: superclass; @@ -186,7 +186,7 @@ FamixJavaMethodTest >> testOverridenMethodOnlyOneLevel [ superclass: superSuperclass; subclass: superclass. - self assert: method overridenMethod equals: overridenMethod + self assert: method overriddenMethod equals: overriddenMethod ] { #category : #tests } diff --git a/src/Famix-PharoSmalltalk-Entities/FamixStMethod.class.st b/src/Famix-PharoSmalltalk-Entities/FamixStMethod.class.st index 95304bfb8..6cb9f45f8 100644 --- a/src/Famix-PharoSmalltalk-Entities/FamixStMethod.class.st +++ b/src/Famix-PharoSmalltalk-Entities/FamixStMethod.class.st @@ -141,10 +141,10 @@ FamixStMethod >> isJUnit4Test [ ] { #category : #testing } -FamixStMethod >> isOverriden [ +FamixStMethod >> isOverridden [ "If we have a stub and we don't have the container, we can't have the information" - + (self parentType isNil and: [ self isStub ]) diff --git a/src/Famix-PharoSmalltalk-Tests/FamixSmalltalkMethodTest.class.st b/src/Famix-PharoSmalltalk-Tests/FamixSmalltalkMethodTest.class.st index ca84e7572..1c4eefd9b 100644 --- a/src/Famix-PharoSmalltalk-Tests/FamixSmalltalkMethodTest.class.st +++ b/src/Famix-PharoSmalltalk-Tests/FamixSmalltalkMethodTest.class.st @@ -85,7 +85,7 @@ FamixSmalltalkMethodTest >> testOverride [ subclass: c2; superclass: c1). self assert: newM1 isOverriding. - self assert: m1 isOverriden + self assert: m1 isOverridden ] { #category : #tests } diff --git a/src/Famix-Traits/FamixTClassMetrics.trait.st b/src/Famix-Traits/FamixTClassMetrics.trait.st index 79a0d754e..a05ca073c 100644 --- a/src/Famix-Traits/FamixTClassMetrics.trait.st +++ b/src/Famix-Traits/FamixTClassMetrics.trait.st @@ -101,21 +101,21 @@ FamixTClassMetrics >> numberOfMethodsInherited: aNumber [ ] { #category : #metrics } -FamixTClassMetrics >> numberOfMethodsOverriden [ +FamixTClassMetrics >> numberOfMethodsOverridden [ - + + 'The number of methods in a class overridden with respect to super classes'> ^ self - lookUpPropertyNamed: #numberOfMethodsOverriden + lookUpPropertyNamed: #numberOfMethodsOverridden computedAs: [ self numberOfMethods - self numberOfLocallyDefinedMethods ] ] { #category : #metrics } -FamixTClassMetrics >> numberOfMethodsOverriden: aNumber [ - self cacheAt: #numberOfMethodsOverriden put: aNumber +FamixTClassMetrics >> numberOfMethodsOverridden: aNumber [ + self cacheAt: #numberOfMethodsOverridden put: aNumber ] { #category : #metrics } diff --git a/src/Moose-Core/FamixMetaModelClassesShouldNotOverrideRule.class.st b/src/Moose-Core/FamixMetaModelClassesShouldNotOverrideRule.class.st index 5eb00333e..66417c1c0 100644 --- a/src/Moose-Core/FamixMetaModelClassesShouldNotOverrideRule.class.st +++ b/src/Moose-Core/FamixMetaModelClassesShouldNotOverrideRule.class.st @@ -19,7 +19,7 @@ FamixMetaModelClassesShouldNotOverrideRule >> checkClass: aContext [ (self metaModelClasses includes: class) ifTrue: [ - self selectorsThatShouldNotBeOverriden do: [:each | + self selectorsThatShouldNotBeOverridden do: [:each | (class includesSelector: each) ifTrue: [ result addClass: class selector: each @@ -49,11 +49,11 @@ FamixMetaModelClassesShouldNotOverrideRule >> name [ { #category : #accessing } FamixMetaModelClassesShouldNotOverrideRule >> rationale [ - ^ 'check if a metamodel class (MooseEntity and all its subclasses) override some methods that it should not override. Those methods are specified by FamixMetaModelClassesShouldNotOverrideRule >> selectorsThatShouldNotBeOverriden' + ^ 'check if a metamodel class (MooseEntity and all its subclasses) override some methods that it should not override. Those methods are specified by FamixMetaModelClassesShouldNotOverrideRule >> selectorsThatShouldNotBeOverridden' ] { #category : #accessing } -FamixMetaModelClassesShouldNotOverrideRule >> selectorsThatShouldNotBeOverriden [ +FamixMetaModelClassesShouldNotOverrideRule >> selectorsThatShouldNotBeOverridden [ ^ #(#mooseName #printString) ] diff --git a/src/Moose-SmalltalkImporter-LAN-Tests/LANFamixPropertiesTest.class.st b/src/Moose-SmalltalkImporter-LAN-Tests/LANFamixPropertiesTest.class.st index ddc9542c5..b61bfd496 100644 --- a/src/Moose-SmalltalkImporter-LAN-Tests/LANFamixPropertiesTest.class.st +++ b/src/Moose-SmalltalkImporter-LAN-Tests/LANFamixPropertiesTest.class.st @@ -120,7 +120,7 @@ LANFamixPropertiesTest >> testClassLinesOfCode [ LANFamixPropertiesTest >> testClassMethods [ self assert: self nodeClass numberOfMethods equals: 12. self assert: (self nodeClass propertyNamed: #numberOfMethodsInherited) equals: 0. - self assert: (self nodeClass propertyNamed: #numberOfMethodsOverriden) equals: 0. + self assert: (self nodeClass propertyNamed: #numberOfMethodsOverridden) equals: 0. self assert: (self nodeClass propertyNamed: #numberOfLocallyDefinedMethods) equals: (self nodeClass propertyNamed: #numberOfMethods). @@ -128,11 +128,11 @@ LANFamixPropertiesTest >> testClassMethods [ assert: (self workstationClass propertyNamed: #numberOfMethodsInherited) equals: 9. self assert: (self workstationClass propertyNamed: #numberOfLocallyDefinedMethods) equals: 1. - self assert: (self workstationClass propertyNamed: #numberOfMethodsOverriden) equals: 3. + self assert: (self workstationClass propertyNamed: #numberOfMethodsOverridden) equals: 3. self assert: (self workstationClass propertyNamed: #numberOfLocallyDefinedMethods) - + (self workstationClass propertyNamed: #numberOfMethodsOverriden) + + (self workstationClass propertyNamed: #numberOfMethodsOverridden) equals: (self workstationClass propertyNamed: #numberOfMethods) ] @@ -260,8 +260,8 @@ LANFamixPropertiesTest >> testNoDuplicatesOfClassVariables [ ] { #category : #testing } -LANFamixPropertiesTest >> testOverridenMethods [ - self assert: (self model entityNamed: #Smalltalk::LANOutputServer) numberOfMethodsOverriden equals: 2 +LANFamixPropertiesTest >> testOverriddenMethods [ + self assert: (self model entityNamed: #Smalltalk::LANOutputServer) numberOfMethodsOverridden equals: 2 ] { #category : #testing } diff --git a/src/Moose-SmalltalkImporter-LAN-Tests/LANImporterTest.class.st b/src/Moose-SmalltalkImporter-LAN-Tests/LANImporterTest.class.st index 14df1ade1..e9e548c90 100644 --- a/src/Moose-SmalltalkImporter-LAN-Tests/LANImporterTest.class.st +++ b/src/Moose-SmalltalkImporter-LAN-Tests/LANImporterTest.class.st @@ -226,7 +226,7 @@ LANImporterTest >> testMethodIsAbstract [ LANImporterTest >> testMethodOverriding [ self assert: (self model entityNamed: (LANOutputServer>>#canOutput) mooseName) isOverriding. - self assert: (self model entityNamed: (LANNode>>#canOutput) mooseName) isOverriden + self assert: (self model entityNamed: (LANNode>>#canOutput) mooseName) isOverridden ] { #category : #tests }