Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ReReferencesObsoleteClassRule, fix ReGlobalVariablesUsageRule as it w…
…as wrongly detecting
- Loading branch information
1 parent
de6c80c
commit 4d6fda9
Showing
2 changed files
with
42 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
" | ||
You are referencing a class that is obsolete, that is, it has been removed | ||
" | ||
Class { | ||
#name : #ReReferencesObsoleteClassRule, | ||
#superclass : #ReNodeBasedRule, | ||
#category : #'GeneralRules-Migrated' | ||
} | ||
|
||
{ #category : #helpers } | ||
ReReferencesObsoleteClassRule >> basicCheck: aNode [ | ||
^ aNode isVariable | ||
and: [aNode isGlobal | ||
"we can not use isGlobalClassNameBinding here" | ||
and: [ aNode variable value isClassOrTrait | ||
and: [ aNode variable value isObsolete ] ] ] | ||
] | ||
|
||
{ #category : #helpers } | ||
ReReferencesObsoleteClassRule >> critiqueFor: aNode [ | ||
^ (super critiqueFor: aNode) | ||
tinyHint: aNode name; | ||
yourself | ||
] | ||
|
||
{ #category : #accessing } | ||
ReReferencesObsoleteClassRule >> group [ | ||
^ 'Bugs' | ||
] | ||
|
||
{ #category : #accessing } | ||
ReReferencesObsoleteClassRule >> name [ | ||
^ 'References an obsolete class' | ||
] | ||
|
||
{ #category : #accessing } | ||
ReReferencesObsoleteClassRule >> severity [ | ||
^ #error | ||
] |