From 8a3abb7c8418ba2881108690e2f3a4ed69b4792e Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Wed, 30 Aug 2017 16:23:32 +0200 Subject: [PATCH] Revert "20045-No-one-uses-RBLintRule-longDescription-almost-no-one-implements" --- .../RBLintRule.extension/instance/longDescription.st | 8 -------- .../RBLintRule.extension/properties.json | 3 --- .../RBLintRule.class/instance/longDescription.st | 4 ++++ .../instance/{rationale.st => longDescription.st} | 2 +- .../RBRemoveAssignmentWithoutEffectRule.class/README.md | 2 +- .../instance/longDescription.st | 3 +++ .../properties.json | 2 +- .../instance/longDescription.st | 4 ++++ .../RBSuperSendsNewRule.class/instance/longDescription.st | 4 ++++ .../RBSuperSendsNewRule.class/instance/rationale.st | 3 +++ 10 files changed, 21 insertions(+), 14 deletions(-) delete mode 100644 src/Deprecated70.package/RBLintRule.extension/instance/longDescription.st delete mode 100644 src/Deprecated70.package/RBLintRule.extension/properties.json create mode 100644 src/Refactoring-Critics.package/RBLintRule.class/instance/longDescription.st rename src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/{rationale.st => longDescription.st} (84%) create mode 100644 src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/instance/longDescription.st create mode 100644 src/Refactoring-Critics.package/RBRenrakuWrapperLintRule.class/instance/longDescription.st create mode 100644 src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/longDescription.st create mode 100644 src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/rationale.st diff --git a/src/Deprecated70.package/RBLintRule.extension/instance/longDescription.st b/src/Deprecated70.package/RBLintRule.extension/instance/longDescription.st deleted file mode 100644 index 812252bc786..00000000000 --- a/src/Deprecated70.package/RBLintRule.extension/instance/longDescription.st +++ /dev/null @@ -1,8 +0,0 @@ -*Deprecated70 -longDescription - self - deprecated: 'Please use #rationale instead' - transformWith: '`@receiver longDescription' - -> '`@receiver rationale'. - - ^ self rationale \ No newline at end of file diff --git a/src/Deprecated70.package/RBLintRule.extension/properties.json b/src/Deprecated70.package/RBLintRule.extension/properties.json deleted file mode 100644 index cda2477eb21..00000000000 --- a/src/Deprecated70.package/RBLintRule.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "RBLintRule" -} \ No newline at end of file diff --git a/src/Refactoring-Critics.package/RBLintRule.class/instance/longDescription.st b/src/Refactoring-Critics.package/RBLintRule.class/instance/longDescription.st new file mode 100644 index 00000000000..2dcafb413ce --- /dev/null +++ b/src/Refactoring-Critics.package/RBLintRule.class/instance/longDescription.st @@ -0,0 +1,4 @@ +accessing +longDescription + "A long version of the rationale, just delegate to the class comment. Therefore just enhance class comments!" + ^ self class comment \ No newline at end of file diff --git a/src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/rationale.st b/src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/longDescription.st similarity index 84% rename from src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/rationale.st rename to src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/longDescription.st index e4d764f9f87..f24d9bd960f 100644 --- a/src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/rationale.st +++ b/src/Refactoring-Critics.package/RBOverridesSpecialMessageRule.class/instance/longDescription.st @@ -1,5 +1,5 @@ accessing -rationale +longDescription ^ 'Checks that a class does not override a message that is essential to the base system. For example, if you override the #class method from object, you are likely to crash your image. In the class the messages we should not override are: ', (', ' join: (self classShouldNotOverride) ),'. diff --git a/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/README.md b/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/README.md index 50c98aa1ee2..813b85845f3 100644 --- a/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/README.md +++ b/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/README.md @@ -1 +1 @@ -Remove assignment that has no effect. For example, var := var is useless. \ No newline at end of file +See my #longDescription . \ No newline at end of file diff --git a/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/instance/longDescription.st b/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/instance/longDescription.st new file mode 100644 index 00000000000..9d6109c179b --- /dev/null +++ b/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/instance/longDescription.st @@ -0,0 +1,3 @@ +as yet unclassified +longDescription + ^ 'Remove assignment has no effect. For example, var := var is unless' \ No newline at end of file diff --git a/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/properties.json b/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/properties.json index 55b2df433e4..5df1393b90d 100644 --- a/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/properties.json +++ b/src/Refactoring-Critics.package/RBRemoveAssignmentWithoutEffectRule.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "YuriyTymchuk 5/11/2017 00:41", + "commentStamp" : "", "super" : "RBTransformationRule", "category" : "Refactoring-Critics", "classinstvars" : [ ], diff --git a/src/Refactoring-Critics.package/RBRenrakuWrapperLintRule.class/instance/longDescription.st b/src/Refactoring-Critics.package/RBRenrakuWrapperLintRule.class/instance/longDescription.st new file mode 100644 index 00000000000..49cb09af91c --- /dev/null +++ b/src/Refactoring-Critics.package/RBRenrakuWrapperLintRule.class/instance/longDescription.st @@ -0,0 +1,4 @@ +accessing +longDescription + + ^ renrakuRule rationale \ No newline at end of file diff --git a/src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/longDescription.st b/src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/longDescription.st new file mode 100644 index 00000000000..f2c8c8d9715 --- /dev/null +++ b/src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/longDescription.st @@ -0,0 +1,4 @@ +accessing +longDescription + ^' This rule checks for method that wrongly initialize an object twice. Contrary to other Smalltalk implementations Pharo automatically calls #initiailize on object creation. +For example, a warning is raised when the statment self new initialize is found in a method.' \ No newline at end of file diff --git a/src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/rationale.st b/src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/rationale.st new file mode 100644 index 00000000000..825150a8690 --- /dev/null +++ b/src/Refactoring-Critics.package/RBSuperSendsNewRule.class/instance/rationale.st @@ -0,0 +1,3 @@ +accessing +rationale + ^ 'Checks for methods that wrongly initialize an object twice. Contrary to other Smalltalk implementations Pharo automatically calls #initiailize on object creation.' \ No newline at end of file