Skip to content

Commit

Permalink
Merge pull request #806 from jecisc/rules
Browse files Browse the repository at this point in the history
P13 compatibility
  • Loading branch information
jecisc authored Jul 19, 2024
2 parents 725338e + b4010cd commit ac03287
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Extension { #name : #FamixMetaModelClassesNotDeclaredInFameRule }

{ #category : #'*Famix-Deprecated' }
FamixMetaModelClassesNotDeclaredInFameRule >> group [
"This metadata on the instance side is important for P12 but should be removed to have only the class side one in P13."

^ self class group
]

{ #category : #'*Famix-Deprecated' }
FamixMetaModelClassesNotDeclaredInFameRule >> name [
"This metadata on the instance side is important for P12 but should be removed to have only the class side one in P13."

^ self class ruleName
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Extension { #name : #FamixMetaModelClassesShouldNotOverrideRule }

{ #category : #'*Famix-Deprecated' }
FamixMetaModelClassesShouldNotOverrideRule >> group [
"This metadata on the instance side is important for P12 but should be removed to have only the class side one in P13."

^ self class group
]

{ #category : #'*Famix-Deprecated' }
FamixMetaModelClassesShouldNotOverrideRule >> name [
"This metadata on the instance side is important for P12 but should be removed to have only the class side one in P13."

^ self class ruleName
]

{ #category : #'*Famix-Deprecated' }
FamixMetaModelClassesShouldNotOverrideRule >> rationale [
"This metadata on the instance side is important for P12 but should be removed to have only the class side one in P13."

^ self class rationale
]
24 changes: 12 additions & 12 deletions src/Moose-Core/FAMIXMetaModelClassesNotDeclaredInFameRule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ Class {
#category : #'Moose-Core'
}

{ #category : #accessing }
FamixMetaModelClassesNotDeclaredInFameRule class >> group [

^ 'Famix'
]

{ #category : #accessing }
FamixMetaModelClassesNotDeclaredInFameRule class >> ruleName [

^ 'A metamodel class is not properly Fame-described by a <FMClass:super:> pragma'
]

{ #category : #accessing }
FamixMetaModelClassesNotDeclaredInFameRule class >> uniqueIdentifierName [
^ 'MetaModelClassesNotDeclaredInFame'
Expand All @@ -31,24 +43,12 @@ FamixMetaModelClassesNotDeclaredInFameRule >> checkClass: aContext [
^ self ] ]
]

{ #category : #accessing }
FamixMetaModelClassesNotDeclaredInFameRule >> group [

^ 'Famix'
]

{ #category : #accessing }
FamixMetaModelClassesNotDeclaredInFameRule >> metaModelClasses [
"return all classes that have to be checked in this rule"
^ metaModelClasses ifNil: [metaModelClasses := MooseEntity withAllSubclasses].
]

{ #category : #accessing }
FamixMetaModelClassesNotDeclaredInFameRule >> name [

^ 'A metamodel class is not properly Fame-described by a <FMClass:super:> pragma'
]

{ #category : #running }
FamixMetaModelClassesNotDeclaredInFameRule >> resultClass [

Expand Down
36 changes: 18 additions & 18 deletions src/Moose-Core/FAMIXMetaModelClassesShouldNotOverrideRule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ Class {
#category : #'Moose-Core'
}

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule class >> group [

^ 'Famix'
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule class >> 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 >> selectorsThatShouldNotBeOverridden'
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule class >> ruleName [

^ 'A metamodel class override a method that it should not override'
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule class >> uniqueIdentifierName [
^ 'MetaModelClassShouldNotOverride'
Expand All @@ -28,30 +46,12 @@ FamixMetaModelClassesShouldNotOverrideRule >> checkClass: aContext [
].
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule >> group [

^ 'Famix'
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule >> metaModelClasses [
"return all classes that have to be checked in this rule"
^ metaModelClasses ifNil: [metaModelClasses := MooseEntity allSubclasses].
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule >> name [

^ 'A metamodel class override a method that it should not override'
]

{ #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 >> selectorsThatShouldNotBeOverridden'
]

{ #category : #accessing }
FamixMetaModelClassesShouldNotOverrideRule >> selectorsThatShouldNotBeOverridden [

Expand Down

0 comments on commit ac03287

Please sign in to comment.