diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 006199cf..2d70d185 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, GemStone64-3.7.0, GemStone64-3.6.7, GemStone64-3.5.7, Squeak64-5.3 ] + smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, GemStone64-3.7.0, GemStone64-3.6.6, GemStone64-3.5.7, Squeak64-5.3 ] experimental: [ false ] include: - smalltalk: Pharo64-12 diff --git a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineCommon..st b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineCommon..st index 14755223..0ead53ce 100644 --- a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineCommon..st +++ b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineCommon..st @@ -1,5 +1,6 @@ baselines baselineCommon: spec + spec for: #common do: [ spec blessing: #baseline. diff --git a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineGemStone..st b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineGemStone..st index fe1b4782..85554409 100644 --- a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineGemStone..st +++ b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselineGemStone..st @@ -1,5 +1,6 @@ baselines baselineGemStone: spec + spec for: #'gemstone' do: [ diff --git a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselinePharo..st b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselinePharo..st index 3b845c9a..69d5fe19 100644 --- a/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselinePharo..st +++ b/repository/BaselineOfGrease.package/BaselineOfGrease.class/instance/baselinePharo..st @@ -62,9 +62,9 @@ baselinePharo: spec requires: #('Grease-Pharo100-Core'); includes: #('Grease-Tests-Pharo-Core') ]; package: 'Grease-Pharo100-Core' with: [ spec requires: #('Grease-Core') ]; - package: 'Grease-Pharo90-Slime' with: [ spec requires: #('Grease-Core') ]; - package: 'Grease-Tests-Slime' with: [ spec requires: #('Grease-Pharo90-Slime') ]. + package: 'Grease-Pharo110-Slime' with: [ spec requires: #('Grease-Core') ]; + package: 'Grease-Tests-Pharo-Slime' with: [ spec requires: #('Grease-Pharo110-Slime') ]. spec - group: 'Slime' with: #('Grease-Pharo90-Slime'); - group: 'Slime Tests' with: #('Grease-Tests-Slime') ] + group: 'Slime' with: #('Grease-Pharo110-Slime'); + group: 'Slime Tests' with: #('Grease-Tests-Pharo-Slime') ] diff --git a/repository/BaselineOfGrease.package/monticello.meta/categories.st b/repository/BaselineOfGrease.package/monticello.meta/categories.st index 95bd9e83..aad806f8 100644 --- a/repository/BaselineOfGrease.package/monticello.meta/categories.st +++ b/repository/BaselineOfGrease.package/monticello.meta/categories.st @@ -1 +1 @@ -self packageOrganizer ensurePackage: #BaselineOfGrease withTags: #('Manifest')! +SystemOrganization addCategory: #BaselineOfGrease! diff --git a/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st b/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st index 210c7f65..0617a084 100644 --- a/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st +++ b/repository/Grease-Core.package/GRPackage.class/instance/resolveWith..st @@ -17,12 +17,14 @@ resolveWith: aDictionary aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo90-') ifAbsent: [ "try -Pharo100-" aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo100-') ifAbsent: [ - "try -Squeak-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [ - "try -Squeak5-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [ - "try -Squeak6-" - aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [ - "specific for Grease-Slime" - aDictionary at: (each copyReplaceAll: 'Grease-Pharo-Slime' with: 'Grease-Slime') ifAbsent: [ - self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] ] \ No newline at end of file + "try -Pharo110-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo110-') ifAbsent: [ + "try -Squeak-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [ + "try -Squeak5-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [ + "try -Squeak6-" + aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [ + "specific for Grease-Slime" + aDictionary at: (each copyReplaceAll: 'Grease-Pharo-Slime' with: 'Grease-Slime') ifAbsent: [ + self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] ] ] \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFile.st b/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..e92ccc4c --- /dev/null +++ b/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,6 @@ +files +newTemporaryFile + "Create a new temporary file in the systems temp directory and answer its pathString. + It is the users responsibility to delete or move the file, it will not be cleaned up automatically + (unless the host system has a policy for it)." + ^ self subclassResponsibility \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..c03ea7f2 --- /dev/null +++ b/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,6 @@ +files +newTemporaryFileNamed: aName + "Create a new temporary file in the systems temp directory and answer its pathString. + It is the users responsibility to delete or move the file, it will not be cleaned up automatically + (unless the host system has a policy for it)." + self subclassResponsibility \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileReference.st b/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileReference.st deleted file mode 100644 index 91961b92..00000000 --- a/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileReference.st +++ /dev/null @@ -1,8 +0,0 @@ -files -newTemporaryFileReference - "Create a new temporary file in the systems temp directory - and answer a reference to it. - It is the users responsibility to delete or move the file, - it will not be cleaned up automatically (unless the host system - has a policy for it)." - ^ self subclassResponsibility \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileReferenceNamed..st b/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileReferenceNamed..st deleted file mode 100644 index 93059d5f..00000000 --- a/repository/Grease-Core.package/GRPlatform.class/instance/newTemporaryFileReferenceNamed..st +++ /dev/null @@ -1,3 +0,0 @@ -files -newTemporaryFileReferenceNamed: aName - self subclassResponsibility \ No newline at end of file diff --git a/repository/Grease-Core.package/GRPlatform.class/instance/version.st b/repository/Grease-Core.package/GRPlatform.class/instance/version.st index 5b503f93..6deca1da 100644 --- a/repository/Grease-Core.package/GRPlatform.class/instance/version.st +++ b/repository/Grease-Core.package/GRPlatform.class/instance/version.st @@ -2,5 +2,5 @@ version info version "Answer the Grease version" - ^ (GRVersion major: 1 minor: 12 revision: 2) + ^ (GRVersion major: 1 minor: 16 revision: 0) yourself \ No newline at end of file diff --git a/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/deleteFile..st b/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/deleteFile..st new file mode 100644 index 00000000..5959876d --- /dev/null +++ b/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/deleteFile..st @@ -0,0 +1,4 @@ +files +deleteFile: aPathString + + GsFile removeServerFile: aPathString diff --git a/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/newTemporaryFile.st b/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..c452c26b --- /dev/null +++ b/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,4 @@ +files +newTemporaryFile + + ^ self newTemporaryFileNamed: UUID new greaseString diff --git a/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..6f8c5c0a --- /dev/null +++ b/repository/Grease-GemStone-Core.package/GRGemStonePlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,7 @@ +files +newTemporaryFileNamed: aName + + | fileName | + fileName := GRPlatform current pathSeparator,'tmp', GRPlatform current pathSeparator, aName. + (self fileExists: fileName) ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ]. + ^ (GsFile openWriteOnServer: fileName) pathName diff --git a/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..01578607 --- /dev/null +++ b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,4 @@ +files +newTemporaryFile + + ^ self newTemporaryFileNamed: UUID new greaseString \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..29d781b7 --- /dev/null +++ b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,7 @@ +files +newTemporaryFileNamed: aName + + | newFile | + newFile := FileLocator temp / aName. + newFile exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ]. + ^ newFile pathString \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st index cd503715..7992374f 100644 --- a/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st +++ b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st @@ -5,4 +5,7 @@ newTemporaryFileReference It is the users responsibility to delete or move the file, it will not be cleaned up automatically (unless the host system has a policy for it)." + self + greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReference' + details: 'Use newTemporaryFile'. ^ self newTemporaryFileReferenceNamed: UUID new asString \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st index 5f4d0602..81baa7c1 100644 --- a/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st +++ b/repository/Grease-Pharo100-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st @@ -5,4 +5,7 @@ newTemporaryFileReferenceNamed: aName It is the users responsibility to delete or move the file, it will not be cleaned up automatically (unless the host system has a policy for it)." + self + greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReferenceNamed:' + details: 'Use newTemporaryFileNamed:'. ^ FileLocator temp / aName \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/monticello.meta/categories.st b/repository/Grease-Pharo100-Core.package/monticello.meta/categories.st index ecc9aa78..47e57aa2 100644 --- a/repository/Grease-Pharo100-Core.package/monticello.meta/categories.st +++ b/repository/Grease-Pharo100-Core.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'Grease-Pharo100-Core'! +self packageOrganizer ensurePackage: #'Grease-Pharo100-Core' withTags: #()! diff --git a/repository/Grease-Pharo110-Slime.package/.filetree b/repository/Grease-Pharo110-Slime.package/.filetree new file mode 100644 index 00000000..57a67973 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/README.md similarity index 100% rename from repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/README.md rename to repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/README.md diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/initialize.st new file mode 100644 index 00000000..6058ed9f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/initialize.st @@ -0,0 +1,19 @@ +initialization +initialize + + super initialize. + self + replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ]' + with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 ] ]'; + replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ] and: [ | `@temp4 | ``@expr4 ]' + with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 and: [ | `@temp4 | ``@expr4 ] ] ]'; + replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ] and: [ | `@temp4 | ``@expr4 ] and: [ | `@temp5 | ``@expr5 ]' + with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 and: [ | `@temp4 | ``@expr4 and: [ | `@temp5 | ``@expr5 ] ] ] ]'; + replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ]' + with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 ] ]'; + replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ]' + with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 ] ] ]'; + replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ] or: [ | `@temp5 | ``@expr5 ]' + with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 or: [ | `@temp5 | ``@expr5 ] ] ] ]'; + replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ] or: [ | `@temp5 | ``@expr5 ] or: [ | `@temp6 | ``@expr6 ]' + with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 or: [ | `@temp5 | ``@expr5 or: [ | `@temp6 | ``@expr6 ] ] ] ] ]' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/name.st new file mode 100644 index 00000000..c1c48207 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Booleans' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/rationale.st new file mode 100644 index 00000000..b650ed54 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ '#and:and: and #or:or: are not ANSI compatible.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/properties.json new file mode 100644 index 00000000..4cab4c2d --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiBooleansRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiBooleansRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/README.md similarity index 100% rename from repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/README.md rename to repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/README.md diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/initialize.st new file mode 100644 index 00000000..f83e0222 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/initialize.st @@ -0,0 +1,16 @@ +initialization +initialize + + super initialize. + self + replace: 'Character value: ``@expr' + with: 'Character codePoint: ``@expr'. + self + replace: '`#source `{:node | node value isCharacter }` to: `#target' + byEvaluating: [ :node | + (node receiver value isCharacter and: [ + node arguments first value isCharacter ]) + ifTrue: [ + RBLiteralNode value: (String streamContents: [ :stream | + node receiver value codePoint to: node arguments first value codePoint do: [ :code | stream nextPut: (Character codePoint: code) ] ]) ] + ifFalse: [ node ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/name.st new file mode 100644 index 00000000..6ea7a32b --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Characters' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/rationale.st new file mode 100644 index 00000000..94cf8eb0 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Character value: 64 and $a to: $b is not ANSI compatible.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/properties.json new file mode 100644 index 00000000..2517609b --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCharactersRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiCharactersRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/initialize.st new file mode 100644 index 00000000..86c772ea --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/initialize.st @@ -0,0 +1,30 @@ +initialization +initialize + super initialize. + self + replace: '``@collection withIndexDo: [ :`each :`index | | `@temps | ``@.body ]' + with: '``@collection keysAndValuesDo: [ :`index :`each | | `@temps | ``@.body ]'; + replace: '``@collection doWithIndex: [ :`each :`index | | `@temps | ``@.body ]' + with: '``@collection keysAndValuesDo: [ :`index :`each | | `@temps | ``@.body ]'; + replace: '``@collection collect: ``@block1 thenDo: ``@block2' + with: '(``@collection collect: ``@block1) do: ``@block2'; + replace: '``@collection collect: ``@block1 thenSelect: ``@block2' + with: '(``@collection collect: ``@block1) select: ``@block2'; + replace: '``@collection pairsDo: [ :`t1 :`t2 | ``@.statements ]' + with: '1 to: ``@collection size by: 2 do: [ :index | | `t1 `t2 | `t1 := ``@collection at: index. `t2 := ``@collection at: index + 1. ``@.statements ]'; + replace: '``@collection reject: ``@block1 thenDo: ``@block2' + with: '(``@collection reject: ``@block1) do: ``@block2'; + replace: '``@collection select: ``@block1 thenCollect: ``@block2' + with: '(``@collection select: ``@block1) collect: ``@block2'; + replace: '``@collection select: ``@block1 thenDo: ``@block2' + with: '(``@collection select: ``@block1) do: ``@block2'; + replace: '``@collection detectSum: [ :`t1 | ``@.statements. `.last ]' + with: '``@collection inject: 0 into: [ :sum :`t1 | ``@.statements. sum + (`.last) ]'; + replace: '``@collection valuesDo: ``@block' + with: '``@collection do: ``@block'; + replace: '``@collection reversed' + with: '``@collection reverse'; + replace: '``@dictionary keysSortedSafely' + with: '``@dictionary keys asSortedCollection'; + replace: '``@collectionClass new: ``@size withAll: ``@character' + with: '(``@collectionClass new: ``@size) atAllPut: ``@character' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/name.st new file mode 100644 index 00000000..a318a869 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Collections' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/rationale.st new file mode 100644 index 00000000..5929ea0d --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Some collection methods are not ANSI compatible: #pairsDo:, #collect:thenDo:, #reject:thenDo:, #detectSum:, #valuesDo:, #keysSortedSafely, #new:withAll:, etc.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/properties.json new file mode 100644 index 00000000..1261c334 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiCollectionsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiCollectionsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/initialize.st new file mode 100644 index 00000000..962d59d3 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/initialize.st @@ -0,0 +1,17 @@ +initialization +initialize + + super initialize. + self + replace: '``@boolean ifNotNilDo: ``@block' + with: '``@boolean ifNotNil: ``@block'; + replace: '``@boolean ifNotNilDo: ``@block1 ifNil: ``@block2' + with: '``@boolean ifNotNil: ``@block1 ifNil: ``@block2'; + replace: '``@boolean ifNil: ``@block1 ifNotNilDo: ``@block2' + with: '``@boolean ifNil: ``@block1 ifNotNil: ``@block2'; + replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]' + with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ]'; + replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ] ifNil: ``@block ' + with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ] ifNil: ``@block'; + replace: '``@boolean ifNil: ``@block ifNotNil: [ | `@temps | ``@.body ]' + with: '``@boolean ifNil: ``@block ifNotNil: [ :arg | | `@temps | ``@.body ]' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/name.st new file mode 100644 index 00000000..76482a4a --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Conditionals' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/rationale.st new file mode 100644 index 00000000..a60d109e --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Conditionals like #ifNotNilDo: are not ANSI compatible.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/properties.json new file mode 100644 index 00000000..542f8001 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConditionalsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiConditionalsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/initialize.st new file mode 100644 index 00000000..4867fd82 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + self + replace: '``@object asString' with: '``@object greaseString'; + replace: '``@object asInteger' with: '``@object greaseInteger' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/name.st new file mode 100644 index 00000000..14c21187 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Convertors' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/rationale.st new file mode 100644 index 00000000..806fe5ac --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'The ANSI standard does not support #asInteger and #asString on Object.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/properties.json new file mode 100644 index 00000000..0069fdf8 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiConvertorRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiConvertorRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/initialize.st new file mode 100644 index 00000000..a06d318e --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + self + replace: '``@block on: `class do: [ | `@temps | ``@.body ]' + with: '``@block on: `class do: [ :err | | `@temps | ``@.body ]' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/name.st new file mode 100644 index 00000000..6d5286e6 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Exceptions' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/rationale.st new file mode 100644 index 00000000..7ec36da6 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Exception handlers expect exactly one argument in ANSI.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/properties.json new file mode 100644 index 00000000..6bd99b1d --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiExceptionsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiExceptionsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/initialize.st new file mode 100644 index 00000000..1b87d4ea --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/initialize.st @@ -0,0 +1,13 @@ +initialization +initialize + + super initialize. + self + replace: '`{ :node :context | node isVariable and: [ (Smalltalk includesKey: node name asSymbol) not and: [ context at: ''`receiver'' ifAbsentPut: [ node ]. true ] ] } cr' + with: '`{ :context | context at: ''`receiver'' } nextPut: Character cr'; + replace: '`{ :node :context | node isVariable and: [ (Smalltalk includesKey: node name asSymbol) not and: [ context at: ''`receiver'' ifAbsentPut: [ node ]. true ] ] } lf' + with: '`{ :context | context at: ''`receiver'' } nextPut: Character lf'; + replace: '``@stream nextPut: Character cr; nextPut: Character lf' + with: '``@stream crlf'; + replace: '``@collection writeStream' + with: 'WriteStream on: ``@collection' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/name.st new file mode 100644 index 00000000..50e44acb --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Streams' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/rationale.st new file mode 100644 index 00000000..3d05fb7c --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ '#cr and #lf are not part of the ANSI stream protocol.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/properties.json new file mode 100644 index 00000000..d367dbf7 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStreamsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiStreamsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/group.st new file mode 100644 index 00000000..f34a290f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'ANSI Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/initialize.st new file mode 100644 index 00000000..702a9ad0 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/initialize.st @@ -0,0 +1,26 @@ +initialization +initialize + + super initialize. + self + replace: 'String tab' with: '(String with: Character tab)'; + replace: 'String cr' with: '(String with: Character cr)'; + replace: 'String lf' with: '(String with: Character lf)'; + replace: 'String crlf' with: '(String with: Character cr with: Character lf)'; + replace: 'String space' with: '(String with: Character space)'; + replace: '`@string includesSubString: `@subString' + with: '(`@string indexOfSubCollection: `@subString startingAt: 0) ~= 0'; + replace: '`@string includesSubstring: `@subString' + with: '(`@string indexOfSubCollection: `@subString startingAt: 0) ~= 0'; + replace: '``@string findTokens: ``@arg' byEvaluating: [ :node | + | argument newNode | + newNode := node copy. + argument := newNode arguments first. + argument isLiteralNode ifTrue: [ + argument value isArray + ifTrue: [ argument replaceWith: (RBLiteralNode value: (String withAll: argument value)) ]. + argument value isCharacter + ifTrue: [ argument replaceWith: (RBLiteralNode value: (String with: argument value)) ] ]. + newNode + selector: #subStrings:; + yourself ] \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/name.st new file mode 100644 index 00000000..31e016a6 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Strings' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/rationale.st new file mode 100644 index 00000000..84577e32 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ '#cr, #crlf, #lf, #space, #tab, #findTokens:, ... are not part of the ANSI string protocol.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/properties.json new file mode 100644 index 00000000..39506d7e --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRAnsiStringsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRAnsiStringsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/class/checksClass.st b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/class/checksClass.st new file mode 100644 index 00000000..918ec479 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/class/checksClass.st @@ -0,0 +1,4 @@ +testing - interest +checksClass + + ^ true \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/basicCheck..st b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/basicCheck..st new file mode 100644 index 00000000..7d00fbc7 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/basicCheck..st @@ -0,0 +1,11 @@ +running +basicCheck: aClass + + ^ aClass isMeta not + and: [ (aClass includesSelector: #initialize) + and: [ (#(GRObject GRNotification GRNotification GRError RBLintRule RBTransformationRule) noneSatisfy: [ :each | + aClass includesBehavior: (Smalltalk globals at: each) ]) + and: [ aClass class methodDictionary noneSatisfy: [ :each | + matcher + executeTree: each parseTree + initialAnswer: false ] ] ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/group.st similarity index 97% rename from repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/group.st rename to repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/group.st index 7e52dd3b..b4981dc4 100644 --- a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/group.st +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/group.st @@ -1,3 +1,4 @@ accessing group + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/initialize.st new file mode 100644 index 00000000..f42fb7c0 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/initialize.st @@ -0,0 +1,8 @@ +initialization +initialize + + super initialize. + matcher := RBParseTreeSearcher new. + matcher + matches: 'self basicNew initialize' + do: [ :node :answer | true ] \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/name.st new file mode 100644 index 00000000..693fa6d6 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ '#basicNew initialize is missing' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/rationale.st new file mode 100644 index 00000000..22a02ade --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ '#initialize is not called implicitly when sending #new to an object in all Smalltalk dialects. Consider subclassing GRObject.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/properties.json new file mode 100644 index 00000000..e15fd361 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRBasicNewInitializeMissingRule.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeBlockLintRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "matcher" + ], + "name" : "GRBasicNewInitializeMissingRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/afterCheck.mappings..st b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/afterCheck.mappings..st new file mode 100644 index 00000000..495d1401 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/afterCheck.mappings..st @@ -0,0 +1,15 @@ +hooks +afterCheck: aNode mappings: mappingDict + + | method | + method := aNode methodNode. + " This ensures that the description is of the form ClassName>>#selector:" + (aNode arguments first isLiteralNode + and: [ aNode arguments first value isString + and: [ method methodClass name greaseString , '>>#' , method selector greaseString ~= aNode arguments first value ] ]) ifTrue: [ ^ true ]. + + " This ensures that the description is a string and ends with a dot." + ^ (aNode arguments size > 1 + and: [ aNode arguments second isLiteralNode + and: [ aNode arguments second value isString + and: [ (aNode arguments second value endsWithSubCollection: '.') not ] ] ]) \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/group.st new file mode 100644 index 00000000..b5813499 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Formatting' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/initialize.st new file mode 100644 index 00000000..4ee4851c --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/initialize.st @@ -0,0 +1,8 @@ +initialization +initialize + + super initialize. + self + matchesAny: #( + '``@receiver greaseDeprecatedApi: ``@arg1' + '``@receiver greaseDeprecatedApi: ``@arg1 details: ``@arg2' ) \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/name.st new file mode 100644 index 00000000..554083f4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Invalid use of deprecated API protocol.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/rationale.st new file mode 100644 index 00000000..aeabf8ad --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Make sure to follow the following pattern: self greaseDeprecatedApi: ''Class>>#selector'' details: ''Some description''.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/properties.json new file mode 100644 index 00000000..724ee707 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRDeprecatedApiProtocolRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeParseTreeLintRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRDeprecatedApiProtocolRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/class/checksMethod.st b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/class/checksMethod.st new file mode 100644 index 00000000..c0b5961f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/class/checksMethod.st @@ -0,0 +1,4 @@ +testing - interest +checksMethod + + ^ true \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/basicCheck..st b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/basicCheck..st new file mode 100644 index 00000000..1b7b4c47 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/basicCheck..st @@ -0,0 +1,10 @@ +running +basicCheck: aMethod + + ^ (aMethod methodClass isMeta not + and: [ (aMethod selector beginsWithSubCollection: #initialize) + and: [ aMethod selector numArgs > 0 + and: [ aMethod methodClass ~= GRObject + and: [ (aMethod methodClass includesBehavior: GRObject) + and: [ (aMethod superMessages includes: aMethod selector) not + and: [ aMethod selfMessages noneSatisfy: [ :each | each beginsWithSubCollection: #initialize ] ] ] ] ] ] ]) \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/group.st similarity index 97% rename from repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/group.st rename to repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/group.st index 7e52dd3b..b4981dc4 100644 --- a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/group.st +++ b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/group.st @@ -1,3 +1,4 @@ accessing group + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/name.st new file mode 100644 index 00000000..6386a8fd --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Invalid object initialization' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/rationale.st new file mode 100644 index 00000000..9ce37a52 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Initialize methods are required to call the designated initializer or its super implementation.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/properties.json new file mode 100644 index 00000000..37adfef6 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRInvalidObjectInitializationRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeBlockLintRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRInvalidObjectInitializationRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/class/checksNode.st b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/class/checksNode.st new file mode 100644 index 00000000..5e68f2ca --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/class/checksNode.st @@ -0,0 +1,4 @@ +testing - interest +checksNode + + ^ true \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/basicCheck..st b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/basicCheck..st new file mode 100644 index 00000000..428bcd1c --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/basicCheck..st @@ -0,0 +1,4 @@ +running +basicCheck: anEntity + + ^ anEntity isMessage and:[ self methodNames includes: anEntity selector ] diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/group.st new file mode 100644 index 00000000..b4981dc4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/methodNames.st b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/methodNames.st new file mode 100644 index 00000000..25a16ed6 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/methodNames.st @@ -0,0 +1,4 @@ +private +methodNames + + ^ #( anyOne withIndexCollect: ) \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/name.st new file mode 100644 index 00000000..cc5e5c47 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Uses non portable message' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/rationale.st new file mode 100644 index 00000000..bc7272e4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Some methods are not portable accross different Smalltalk dialects.' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/properties.json similarity index 67% rename from repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/properties.json rename to repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/properties.json index c03ba912..e1e9857f 100644 --- a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/properties.json +++ b/repository/Grease-Pharo110-Slime.package/GRNonPortableMessageRule.class/properties.json @@ -1,11 +1,11 @@ { "commentStamp" : "", "super" : "GRSlimeBlockLintRule", - "category" : "Grease-Pharo90-Slime", + "category" : "Grease-Pharo110-Slime", "classinstvars" : [ ], "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "GREmptyStatementsRule", + "name" : "GRNonPortableMessageRule", "type" : "normal" } \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/group.st new file mode 100644 index 00000000..b4981dc4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st new file mode 100644 index 00000000..5e8d416d --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st @@ -0,0 +1,9 @@ +initialization +initialize + + super initialize. + self + replace: '`@collection beginsWith: `@subCollection' + with: '`@collection greaseBeginsWith: `@subCollection'; + replace: '`@collection endsWith: `@subCollection' + with: '`@collection greaseEndsWith: `@subCollection' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/name.st new file mode 100644 index 00000000..a318a869 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Collections' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/rationale.st new file mode 100644 index 00000000..df5a43be --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ '#beginsWith: and #endsWith: are not portable.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/properties.json new file mode 100644 index 00000000..33f1f490 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRNotPortableCollectionsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRNotPortableCollectionsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/README.md new file mode 100644 index 00000000..bca4d093 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/README.md @@ -0,0 +1 @@ +I detect senders of Object >> #in: diff --git a/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/group.st new file mode 100644 index 00000000..b4981dc4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/initialize.st new file mode 100644 index 00000000..d51d0570 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + self + replace: '``@object in: [ :`var | | `@temps | `@.statements ]' + with: '[ :`var | | `@temps | `@.statements ] value: ``@object' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/name.st new file mode 100644 index 00000000..914d48df --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Object>>#in:' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/rationale.st new file mode 100644 index 00000000..944aa7c5 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Object>>#in: has different semantics on different Smalltalk dialects.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/properties.json new file mode 100644 index 00000000..c4168e75 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRObjectInRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "pmm 9/12/2009 10:37", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRObjectInRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/class/checksMethod.st b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/class/checksMethod.st new file mode 100644 index 00000000..c0b5961f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/class/checksMethod.st @@ -0,0 +1,4 @@ +testing - interest +checksMethod + + ^ true \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/instance/basicCheck..st b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/instance/basicCheck..st new file mode 100644 index 00000000..18b14d25 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/instance/basicCheck..st @@ -0,0 +1,8 @@ +running +basicCheck: aMethod + + (aMethod methodClass instanceSide category indexOfSubCollection: #'-Pharo-' startingAt: 1) ~= 0 ifTrue: [ + "classes in a -Pharo- package are per definition not portable and therefore allowed to use non-portable classes" + ^ false ]. + + ^ aMethod literals anySatisfy: [ :each | each isVariableBinding and: [ self classNames includes: each key ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/instance/name.st new file mode 100644 index 00000000..510ca2ab --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Uses not portable class' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/properties.json new file mode 100644 index 00000000..d21602c8 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRReferencesNotPortableClassRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRUsesNotPortableClassRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRReferencesNotPortableClassRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/class/isVisible.st b/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/class/isVisible.st new file mode 100644 index 00000000..116356fd --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/class/isVisible.st @@ -0,0 +1,4 @@ +testing +isVisible + + ^ self name ~= #GRSlimeBlockLintRule \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/properties.json new file mode 100644 index 00000000..e1389bfa --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSlimeBlockLintRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ReAbstractRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRSlimeBlockLintRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/class/isVisible.st b/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/class/isVisible.st new file mode 100644 index 00000000..5d72890a --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/class/isVisible.st @@ -0,0 +1,4 @@ +testing +isVisible + + ^ self name ~= #GRSlimeParseTreeLintRule \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/properties.json new file mode 100644 index 00000000..28ab8124 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSlimeParseTreeLintRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ReNodeMatchRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRSlimeParseTreeLintRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/class/isVisible.st b/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/class/isVisible.st new file mode 100644 index 00000000..b60e68d4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/class/isVisible.st @@ -0,0 +1,4 @@ +testing +isVisible + + ^ self name ~= #GRSlimeTransformationRule \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/properties.json new file mode 100644 index 00000000..df276035 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSlimeTransformationRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "ReNodeRewriteRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRSlimeTransformationRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/class/checksClass.st b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/class/checksClass.st new file mode 100644 index 00000000..918ec479 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/class/checksClass.st @@ -0,0 +1,4 @@ +testing - interest +checksClass + + ^ true \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/instance/basicCheck..st b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/instance/basicCheck..st new file mode 100644 index 00000000..1091897f --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/instance/basicCheck..st @@ -0,0 +1,4 @@ +running +basicCheck: aClass + + ^ aClass allSuperclasses anySatisfy: [ :each | self classNames includes: each name ] \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/instance/name.st new file mode 100644 index 00000000..65a2945a --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Subclasses not portable class' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/properties.json new file mode 100644 index 00000000..65aeb32b --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRSubclassesNotPortableClassRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRUsesNotPortableClassRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRSubclassesNotPortableClassRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/README.md new file mode 100644 index 00000000..6f3d9062 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/README.md @@ -0,0 +1 @@ +I check for TestCase >> #fail. \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/afterCheck.mappings..st b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/afterCheck.mappings..st new file mode 100644 index 00000000..874f1381 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/afterCheck.mappings..st @@ -0,0 +1,8 @@ +hooks +afterCheck: aNode mappings: mappingsDict + + aNode methodNode methodClass isMeta + ifTrue: [ ^ false ]. + (aNode methodNode methodClass allSuperclasses includes: (Smalltalk at: #TestCase)) + ifTrue: [ ^ true ]. + ^ false \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/checkMethod..st b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/checkMethod..st new file mode 100644 index 00000000..bab892c3 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/checkMethod..st @@ -0,0 +1,7 @@ +running +checkMethod: aContext + aContext methodClass isMeta + ifTrue: [ ^ self ]. + (aContext methodClass allSuperclasses includes:(Smalltalk at: #TestCase)) + ifFalse: [ ^ self ]. + ^ super checkMethod: aContext \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/group.st new file mode 100644 index 00000000..eb721d8e --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'SUnit Compatibility' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/initialize.st new file mode 100644 index 00000000..097ff5a1 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + self + replace: 'self fail' + with: 'self assert: false' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/name.st new file mode 100644 index 00000000..0dd472fc --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'TestCase >> #fail' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/rationale.st new file mode 100644 index 00000000..4e358c3e --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'TestCase >> #fail is not portable.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/properties.json new file mode 100644 index 00000000..572f670a --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRTestAssertionsRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "pmm 8/17/2014 11:24", + "super" : "GRSlimeTransformationRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRTestAssertionsRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/group.st new file mode 100644 index 00000000..b4981dc4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/initialize.st new file mode 100644 index 00000000..6ca1e900 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialization +initialize + + super initialize. + self matchesAny: #( + '`@receiver canPerform: `@selector' + '`@receiver canUnderstand: `@selector' ) \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/name.st new file mode 100644 index 00000000..a7805d06 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Sends #canPerform: or #canUnderstand:' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/rationale.st new file mode 100644 index 00000000..4332f561 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ '#canPerform: or #canUnderstand: are not portable.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/properties.json new file mode 100644 index 00000000..a30a05da --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesCanPerformOrUnderstandRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeParseTreeLintRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRUsesCanPerformOrUnderstandRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/afterCheck.mappings..st b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/afterCheck.mappings..st new file mode 100644 index 00000000..4648081c --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/afterCheck.mappings..st @@ -0,0 +1,4 @@ +hooks +afterCheck: aNode mappings: mappingDict + + ^ aNode methodNode selector = #hash \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/group.st new file mode 100644 index 00000000..b4981dc4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/initialize.st b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/initialize.st new file mode 100644 index 00000000..190c57e0 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/initialize.st @@ -0,0 +1,5 @@ +initialization +initialize + + super initialize. + self matches: '`@receiver class hash' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/name.st b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/name.st new file mode 100644 index 00000000..2a762ed7 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ 'Uses its class for hash' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/rationale.st new file mode 100644 index 00000000..018489ab --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'The hash of an object should not depend on the hash of its class as some Smalltalk have non-constant class hashes.' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/properties.json similarity index 67% rename from repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/properties.json rename to repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/properties.json index 8c5b7a18..063aef8f 100644 --- a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/properties.json +++ b/repository/Grease-Pharo110-Slime.package/GRUsesClassForHashRule.class/properties.json @@ -1,11 +1,11 @@ { "commentStamp" : "", "super" : "GRSlimeParseTreeLintRule", - "category" : "Grease-Pharo90-Slime", + "category" : "Grease-Pharo110-Slime", "classinstvars" : [ ], "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "GRUsesLiteralByteArraysRule", + "name" : "GRUsesClassForHashRule", "type" : "normal" } \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/README.md b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/class/isAbstract.st b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/class/isAbstract.st new file mode 100644 index 00000000..7d1d20cc --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/class/isAbstract.st @@ -0,0 +1,4 @@ +testing +isAbstract + + ^ self name = #GRUsesNotPortableClassRule \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/class/isVisible.st b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/class/isVisible.st new file mode 100644 index 00000000..680a15af --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/class/isVisible.st @@ -0,0 +1,4 @@ +testing +isVisible + + ^ self name ~= #GRUsesNotPortableClassRule \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/classNames.st b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/classNames.st new file mode 100644 index 00000000..0487cbe8 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/classNames.st @@ -0,0 +1,4 @@ +private +classNames + + ^ #( Delay MIMEDocument Monitor Mutex MutexSet Random Semaphore TimeStamp Timestamp MessageSend ) \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/group.st b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/group.st new file mode 100644 index 00000000..b4981dc4 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/group.st @@ -0,0 +1,4 @@ +accessing +group + + ^ 'Grease Portability' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/rationale.st b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/rationale.st new file mode 100644 index 00000000..e9a097fe --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/instance/rationale.st @@ -0,0 +1,4 @@ +accessing +rationale + + ^ 'Some classes are not portable accross different Smalltalk dialects.' \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/properties.json b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/properties.json new file mode 100644 index 00000000..128f88b8 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/GRUsesNotPortableClassRule.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "GRSlimeBlockLintRule", + "category" : "Grease-Pharo110-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GRUsesNotPortableClassRule", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/monticello.meta/categories.st b/repository/Grease-Pharo110-Slime.package/monticello.meta/categories.st new file mode 100644 index 00000000..ff4f5aed --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'Grease-Pharo110-Slime'! diff --git a/repository/Grease-Pharo110-Slime.package/monticello.meta/initializers.st b/repository/Grease-Pharo110-Slime.package/monticello.meta/initializers.st new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Pharo110-Slime.package/monticello.meta/package b/repository/Grease-Pharo110-Slime.package/monticello.meta/package new file mode 100644 index 00000000..7cd09a28 --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Grease-Pharo110-Slime') \ No newline at end of file diff --git a/repository/Grease-Pharo110-Slime.package/properties.json b/repository/Grease-Pharo110-Slime.package/properties.json new file mode 100644 index 00000000..6f31cf5a --- /dev/null +++ b/repository/Grease-Pharo110-Slime.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..01578607 --- /dev/null +++ b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,4 @@ +files +newTemporaryFile + + ^ self newTemporaryFileNamed: UUID new greaseString \ No newline at end of file diff --git a/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..29d781b7 --- /dev/null +++ b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,7 @@ +files +newTemporaryFileNamed: aName + + | newFile | + newFile := FileLocator temp / aName. + newFile exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ]. + ^ newFile pathString \ No newline at end of file diff --git a/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st index ce7f6f18..63358983 100644 --- a/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st +++ b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st @@ -5,4 +5,7 @@ newTemporaryFileReference It is the users responsibility to delete or move the file, it will not be cleaned up automatically (unless the host system has a policy for it)." + self + greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReference' + details: 'Use newTemporaryFile'. ^ self newTemporaryFileReferenceNamed: UUID new asString \ No newline at end of file diff --git a/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st index f0fdf80f..d9eed8ee 100644 --- a/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st +++ b/repository/Grease-Pharo70-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st @@ -5,4 +5,7 @@ newTemporaryFileReferenceNamed: aName It is the users responsibility to delete or move the file, it will not be cleaned up automatically (unless the host system has a policy for it)." + self + greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReferenceNamed:' + details: 'Use newTemporaryFileNamed:'. ^ FileLocator temp / aName \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..01578607 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,4 @@ +files +newTemporaryFile + + ^ self newTemporaryFileNamed: UUID new greaseString \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..29d781b7 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,7 @@ +files +newTemporaryFileNamed: aName + + | newFile | + newFile := FileLocator temp / aName. + newFile exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ]. + ^ newFile pathString \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st index cd503715..7992374f 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReference.st @@ -5,4 +5,7 @@ newTemporaryFileReference It is the users responsibility to delete or move the file, it will not be cleaned up automatically (unless the host system has a policy for it)." + self + greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReference' + details: 'Use newTemporaryFile'. ^ self newTemporaryFileReferenceNamed: UUID new asString \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st index 5f4d0602..81baa7c1 100644 --- a/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st +++ b/repository/Grease-Pharo90-Core.package/GRPharoPlatform.class/instance/newTemporaryFileReferenceNamed..st @@ -5,4 +5,7 @@ newTemporaryFileReferenceNamed: aName It is the users responsibility to delete or move the file, it will not be cleaned up automatically (unless the host system has a policy for it)." + self + greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReferenceNamed:' + details: 'Use newTemporaryFileNamed:'. ^ FileLocator temp / aName \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/checkMethod..st b/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/checkMethod..st deleted file mode 100644 index a2a96832..00000000 --- a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/checkMethod..st +++ /dev/null @@ -1,12 +0,0 @@ -running -checkMethod: aContext - | periods position | - aContext parseTree nodesDo: [ :node | - (node isSequence and: [ node periods notEmpty ]) ifTrue: [ - periods := OrderedCollection withAll: node periods. - 1 to: node statements size - 1 do: [ :index | - position := periods removeFirst. - ((node statements at: index) stop < position and: [ position < (node statements at: index + 1) start ]) - ifFalse: [ ^ result addClass: aContext methodClass selector: aContext selector ] ]. - (periods isEmpty or: [ periods size = 1 and: [ node statements notEmpty and: [ node statements last stop < periods first ] ] ]) - ifFalse: [ ^ result addClass: aContext methodClass selector: aContext selector ] ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/name.st b/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/name.st deleted file mode 100644 index 3f4db678..00000000 --- a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/name.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -name - ^ 'Empty Statements' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/rationale.st b/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/rationale.st deleted file mode 100644 index 252dd280..00000000 --- a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/rationale.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -rationale - ^ 'Empty statements are not supported by most Smalltalk implementations.' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/resetResult.st b/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/resetResult.st deleted file mode 100644 index 5b87472b..00000000 --- a/repository/Grease-Pharo90-Slime.package/GREmptyStatementsRule.class/instance/resetResult.st +++ /dev/null @@ -1,4 +0,0 @@ -running -resetResult - super resetResult. - result addSearchString: '..'; addSearchString: '.' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/initialize.st b/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/initialize.st deleted file mode 100644 index c7605206..00000000 --- a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/initialize.st +++ /dev/null @@ -1,6 +0,0 @@ -initialization -initialize - super initialize. - self matcher - matches: '`#literal `{ :node | node isLiteralArray and: [ node isForByteArray ] }' - do: [ :node :answer | answer isNil ifTrue: [ node ] ifFalse: [ answer ] ] \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/name.st b/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/name.st deleted file mode 100644 index fbcd5729..00000000 --- a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/name.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -name - ^ 'Uses literal byte arrays' \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/rationale.st b/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/rationale.st deleted file mode 100644 index 269ea76d..00000000 --- a/repository/Grease-Pharo90-Slime.package/GRUsesLiteralByteArraysRule.class/instance/rationale.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -rationale - ^ 'Literal byte arrays are not portable accross different Smalltalk dialects.' \ No newline at end of file diff --git a/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/deleteFile..st b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/deleteFile..st new file mode 100644 index 00000000..d03eee50 --- /dev/null +++ b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/deleteFile..st @@ -0,0 +1,3 @@ +files +deleteFile: aPathString + FileDirectory deleteFilePath: aPathString \ No newline at end of file diff --git a/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/newTemporaryFile.st b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..01578607 --- /dev/null +++ b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,4 @@ +files +newTemporaryFile + + ^ self newTemporaryFileNamed: UUID new greaseString \ No newline at end of file diff --git a/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..9e117ca4 --- /dev/null +++ b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,7 @@ +files +newTemporaryFileNamed: aName + + | file | + file := FileDirectory default / aName. + file exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ]. + ^ file pathName \ No newline at end of file diff --git a/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st index 1207150a..9207976d 100644 --- a/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st +++ b/repository/Grease-Squeak5-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st @@ -1,8 +1,8 @@ -as yet unclassified +files writeFileStreamOn: aString do: aBlock binary: aBoolean | stream | stream := aBoolean - ifTrue: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ] - ifFalse: [ (FileStream fileNamed: aString) binary ]. + ifTrue: [ (FileStream fileNamed: aString) binary ] + ifFalse: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ]. [ aBlock value: stream ] ensure: [ stream close ] \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/deleteFile..st b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/deleteFile..st new file mode 100644 index 00000000..d03eee50 --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/deleteFile..st @@ -0,0 +1,3 @@ +files +deleteFile: aPathString + FileDirectory deleteFilePath: aPathString \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/newTemporaryFile.st b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/newTemporaryFile.st new file mode 100644 index 00000000..01578607 --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/newTemporaryFile.st @@ -0,0 +1,4 @@ +files +newTemporaryFile + + ^ self newTemporaryFileNamed: UUID new greaseString \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/newTemporaryFileNamed..st b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/newTemporaryFileNamed..st new file mode 100644 index 00000000..9e117ca4 --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/newTemporaryFileNamed..st @@ -0,0 +1,7 @@ +files +newTemporaryFileNamed: aName + + | file | + file := FileDirectory default / aName. + file exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ]. + ^ file pathName \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st new file mode 100644 index 00000000..9207976d --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st @@ -0,0 +1,8 @@ +files +writeFileStreamOn: aString do: aBlock binary: aBoolean + | stream | + stream := aBoolean + ifTrue: [ (FileStream fileNamed: aString) binary ] + ifFalse: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ]. + [ aBlock value: stream ] + ensure: [ stream close ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testNewTemporaryFile.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testNewTemporaryFile.st new file mode 100644 index 00000000..a4c49df3 --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testNewTemporaryFile.st @@ -0,0 +1,20 @@ +tests-files +testNewTemporaryFile + + | temporaryFile1 temporaryFile2 | + [ + temporaryFile1 := GRPlatform current newTemporaryFile. + temporaryFile2 := GRPlatform current newTemporaryFile. + GRPlatform current + writeFileStreamOn: temporaryFile1 + do: [ :str | str nextPutAll: 'test temporary' ] + binary: false. + GRPlatform current + writeFileStreamOn: temporaryFile2 + do: [ :str | str nextPutAll: #[116 101 115 116 32 116 101 109 112 111 114 97 114 121] ] + binary: true. + self assert: (GRPlatform current fileExists: temporaryFile1). + self deny: (GRPlatform current localNameOf: temporaryFile1) equals: (GRPlatform current localNameOf: temporaryFile2) + ] ensure: [ GRPlatform current deleteFile: temporaryFile1. GRPlatform current deleteFile: temporaryFile2 ]. + self deny: (GRPlatform current fileExists: temporaryFile1). + self deny: (GRPlatform current fileExists: temporaryFile2) \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testNewTemporaryFileNamed.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testNewTemporaryFileNamed.st new file mode 100644 index 00000000..354c5403 --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testNewTemporaryFileNamed.st @@ -0,0 +1,16 @@ +tests-files +testNewTemporaryFileNamed + + | temporaryFile fileName | + fileName := 'GRPlatformTestTemporaryFile'. + [ + temporaryFile := GRPlatform current newTemporaryFileNamed: fileName. + GRPlatform current + writeFileStreamOn: temporaryFile + do: [ :str | str nextPutAll: 'test temporary' ] + binary: false. + self assert: (GRPlatform current fileExists: temporaryFile). + self should: [ GRPlatform current newTemporaryFileNamed: fileName ] raise: GRError. + ] ensure: [ GRPlatform current deleteFile: temporaryFile ]. + self deny: (GRPlatform current fileExists: temporaryFile). + \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteEmptyFileInFolderBinary.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteEmptyFileInFolderBinary.st deleted file mode 100644 index 39fbdb1c..00000000 --- a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteEmptyFileInFolderBinary.st +++ /dev/null @@ -1,8 +0,0 @@ -tests-filestreams -testReadWriteEmptyFileInFolderBinary - | bytes | - bytes := ByteArray new. - self - writeToFile: bytes - withFileNameDo:[ :fileName | - self assert: (bytes = (GRPlatform current contentsOfFile: fileName binary: true)) ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteEmptyFileInFolderText.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteEmptyFileInFolderText.st deleted file mode 100644 index 757a5cdb..00000000 --- a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteEmptyFileInFolderText.st +++ /dev/null @@ -1,8 +0,0 @@ -tests-filestreams -testReadWriteEmptyFileInFolderText - | text | - text := String new. - self - writeToFile: text - withFileNameDo:[ :fileName | - self assert: (text = (GRPlatform current contentsOfFile: fileName binary: false)) ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteToFileInFolderBinary.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteToFileInFolderBinary.st deleted file mode 100644 index ad114bf2..00000000 --- a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteToFileInFolderBinary.st +++ /dev/null @@ -1,8 +0,0 @@ -tests-filestreams -testReadWriteToFileInFolderBinary - | bytes | - bytes := #(80 104 39 110 103 108 117 105 32 109 103 108 119 39 110 97 102 104 32 67 116 104 117 108 104 117 32 82 39 108 121 101 104 32 119 103 97 104 39 110 97 103 108 32 102 104 116 97 103 110) asByteArray. - self - writeToFile: bytes - withFileNameDo:[ :fileName | - self assert: (bytes = (GRPlatform current contentsOfFile: fileName binary: true)) ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteToFileInFolderText.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteToFileInFolderText.st deleted file mode 100644 index 2d9fc845..00000000 --- a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testReadWriteToFileInFolderText.st +++ /dev/null @@ -1,8 +0,0 @@ -tests-filestreams -testReadWriteToFileInFolderText - | text | - text := 'Ph''nglui mglw''nafh Cthulhu R''lyeh wgah''nagl fhtagn'. - self - writeToFile: text - withFileNameDo:[ :fileName | - self assert: (text = (GRPlatform current contentsOfFile: fileName binary: false)) ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testWriteToFileInFolder.st b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testWriteToFileInFolder.st new file mode 100644 index 00000000..04b46b21 --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testWriteToFileInFolder.st @@ -0,0 +1,27 @@ +tests-files +testWriteToFileInFolder + + | bytes text | + bytes := ByteArray new. + self + writeToFile: bytes + withFileNameDo:[ :fileName | + self assert: (GRPlatform current contentsOfFile: fileName binary: true) equals: bytes ]. + + bytes := #[80 104 39 110 103 108 117 105 32 109 103 108 119 39 110 97 102 104 32 67 116 104 117 108 104 117 32 82 39 108 121 101 104 32 119 103 97 104 39 110 97 103 108 32 102 104 116 97 103 110]. + self + writeToFile: bytes + withFileNameDo:[ :fileName | + self assert:(GRPlatform current contentsOfFile: fileName binary: true) equals: bytes ]. + + text := String new. + self + writeToFile: text + withFileNameDo:[ :fileName | + self assert: (GRPlatform current contentsOfFile: fileName binary: false) equals: text ]. + + text := 'Ph''nglui mglw''nafh Cthulhu R''lyeh wgah''nagl fhtagn'. + self + writeToFile: text + withFileNameDo:[ :fileName | + self assert: (GRPlatform current contentsOfFile: fileName binary: false) equals: text ] \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/monticello.meta/categories.st b/repository/Grease-Tests-Core.package/monticello.meta/categories.st index ee8a55f5..7e8202de 100644 --- a/repository/Grease-Tests-Core.package/monticello.meta/categories.st +++ b/repository/Grease-Tests-Core.package/monticello.meta/categories.st @@ -1 +1 @@ -SystemOrganization addCategory: #'Grease-Tests-Core'! +self packageOrganizer ensurePackage: #'Grease-Tests-Core' withTags: #()! diff --git a/repository/Grease-Tests-Pharo-Slime.package/.filetree b/repository/Grease-Tests-Pharo-Slime.package/.filetree new file mode 100644 index 00000000..57a67973 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/README.md b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.matches..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.matches..st new file mode 100644 index 00000000..65b1cddd --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.matches..st @@ -0,0 +1,4 @@ +running-checks +assertRule: aRuleClass matches: expectedMatches + + self assertRule: aRuleClass matches: expectedMatches ignoring: Array new \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.matches.ignoring..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.matches.ignoring..st new file mode 100644 index 00000000..d2c4aa91 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/assertRule.matches.ignoring..st @@ -0,0 +1,13 @@ +running-checks +assertRule: aRuleClass matches: expectedMatches ignoring: ignoredRuleClasses + + self run: aRuleClass ignoring: ignoredRuleClasses do: [ :critiques | | critiquedEntities | + critiquedEntities := critiques collect:[ :critique | critique sourceAnchor entity ]. + critiquedEntities do:[ :critiquedEntity | + self + assert: (expectedMatches includes: critiquedEntity) + description: ('{1} should not be reported' format: { critiquedEntity printString }) ]. + expectedMatches do: [ :expectedEntity | + self + assert: (critiquedEntities includes: expectedEntity) + description: ('{1} should be reported' format: { expectedEntity printString }) ] ] \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/canParse..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/canParse..st new file mode 100644 index 00000000..ddf9adbc --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/canParse..st @@ -0,0 +1,7 @@ +accessing-code +canParse: aString + + RBParser + parseMethod: aString + onError: [ :err :pos | ^ false ]. + ^ true \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/category.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/category.st new file mode 100644 index 00000000..e4bff2ba --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/category.st @@ -0,0 +1,4 @@ +accessing-code +category + + ^ self class category , '-Data' \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/compile.in..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/compile.in..st new file mode 100644 index 00000000..cb2577d5 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/compile.in..st @@ -0,0 +1,7 @@ +accessing-code +compile: aString in: aClass + + GRPlatform current + compile: aString + into: aClass + classified: #accessing \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineClass.superclass..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineClass.superclass..st new file mode 100644 index 00000000..9769e83e --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineClass.superclass..st @@ -0,0 +1,4 @@ +accessing-code +defineClass: aClassSymbol superclass: aSuperSymbol + "For compatibility" + ^ self defineSubClassOf: aSuperSymbol \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineSubClassOf..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineSubClassOf..st new file mode 100644 index 00000000..92da2de7 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/defineSubClassOf..st @@ -0,0 +1,20 @@ +accessing-code +defineSubClassOf: aSuperSymbol + + | class | + class := SystemVersion current major >= 12 + ifTrue: [ + factory make: [ :aBuilder | + aBuilder + superclass: (Smalltalk at: aSuperSymbol); + package: self category ] ] + ifFalse: [ + factory + newSubclassOf: (Smalltalk at: aSuperSymbol) + instanceVariableNames: '' + classVariableNames: 'classVarsString' + category: self category ]. + environment + addClass: class; + addClass: class classSide. + ^ class \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.st new file mode 100644 index 00000000..8c178caf --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.st @@ -0,0 +1,6 @@ +running +expectedFailures + + SystemVersion current major >= 12 ifTrue:[ ^ #() ]. + + ^ #(#testEmptyStatements) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st new file mode 100644 index 00000000..13c0034b --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st @@ -0,0 +1,10 @@ +running +rules + + ^ (OrderedCollection new + addAll: GRSlimeBlockLintRule allSubclasses; + addAll: GRSlimeParseTreeLintRule allSubclasses; + addAll: GRSlimeTransformationRule allSubclasses; + add: ReMultiplePeriodsTerminatingStatementRule; + add: ReMethodSignaturePeriodRule; + yourself) reject: #isAbstract \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/run.ignoring.do..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/run.ignoring.do..st new file mode 100644 index 00000000..b6ec29e2 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/run.ignoring.do..st @@ -0,0 +1,28 @@ +running-checks +run: aRuleClass ignoring: ignoredRuleClasses do: aBlock + + | rules rule runner | + rules := self rules + collect: [ :each | each new ]. + rule := rules + detect: [ :each | each isKindOf: aRuleClass ] + ifNone: [ self error: ('{1} is not a slime rule' format: { aRuleClass name }) ]. + self + assert: (rule name isString and: [ rule name notEmpty ]) + description: aRuleClass name , ' has no name'. + self + assert: (rule rationale isString and: [ rule rationale notEmpty and: [ rule rationale endsWithSubCollection: '.' ] ]) + description: aRuleClass name , ' has no rationale'. + runner := ReSmalllintChecker new. + rules do: [ :each | + runner + rule: { each }; + environment: environment; + run ]. + rules do: [ :each | | result | + result := runner criticsOf: each. + self + assert: (rule = each or: [ result isEmpty or: [ ignoredRuleClasses includes: each class ] ]) + description: ('{1} should not report errors' format: { each name }) ]. + aBlock value: (runner criticsOf: rule). + ^ rule \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runCase.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runCase.st new file mode 100644 index 00000000..a508309b --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runCase.st @@ -0,0 +1,4 @@ +running +runCase + + GRPlatform current doSilently: [ super runCase ] \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runTransformation.changes..st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runTransformation.changes..st new file mode 100644 index 00000000..2bbd5df3 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/runTransformation.changes..st @@ -0,0 +1,15 @@ +running-checks +runTransformation: aClass changes: aCollection + + | expected | + expected := aCollection collect: [ :each | RBParser parseMethod: each ]. + self run: aClass ignoring: Array new do: [ :critiques | | changes | + changes := critiques collect:[ :critique | critique change ]. + changes do: [ :change | + self + assert: (expected anySatisfy: [ :parseTree | change parseTree = parseTree ]) + description: ('{1} should not be transformed' format: { change selector }) ]. + expected do: [ :parseTree | + self + assert: (changes anySatisfy: [ :change | change parseTree = parseTree ]) + description: ('{1} should be transformed' format: { parseTree selector }) ] ] \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/setUp.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/setUp.st new file mode 100644 index 00000000..1ba40656 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/setUp.st @@ -0,0 +1,7 @@ +running +setUp + + super setUp. + factory := ClassFactoryForTestCase new. + model := RBNamespace new. + environment := RBClassEnvironment new \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/tearDown.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/tearDown.st new file mode 100644 index 00000000..82f6aabd --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/tearDown.st @@ -0,0 +1,5 @@ +running +tearDown + + super tearDown. + factory cleanUp \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiBooleansRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiBooleansRule.st new file mode 100644 index 00000000..fc3a5aee --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiBooleansRule.st @@ -0,0 +1,12 @@ +tests-transform +testAnsiBooleansRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'and 1 and: [ 2 ] and: [ 3 ] and: [ 4 ]' in: class. + self compile: 'or 1 or: [ 2 ] or: [ 3 ] or: [ 4 ]' in: class. + self + runTransformation: GRAnsiBooleansRule + changes: #( + 'and 1 and: [ 2 and: [ 3 and: [ 4 ] ] ]' + 'or 1 or: [ 2 or: [ 3 or: [ 4 ] ] ]' ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCharacterRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCharacterRule.st new file mode 100644 index 00000000..ddc22642 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCharacterRule.st @@ -0,0 +1,11 @@ +tests-transform +testAnsiCharacterRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'character Character value: 123' in: class. + self compile: 'characterRange $a to: $c' in: class. + self compile: 'integerRange 1 to: 10' in: class. + self + runTransformation: GRAnsiCharactersRule + changes: #('character Character codePoint: 123' 'characterRange ''abc''') \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCollectionsRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCollectionsRule.st new file mode 100644 index 00000000..85726226 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiCollectionsRule.st @@ -0,0 +1,37 @@ +tests-transform +testAnsiCollectionsRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'withIndexDo #() withIndexDo: [ :each :index | each + index ]' in: class. + self compile: 'doWithIndex #() doWithIndex: [ :each :index | each + index ]' in: class. + self compile: 'collectThenDo #() collect: [ :a | a ] thenDo: [ :b | b ]' in: class. + self compile: 'collectThenSelect #() collect: [ :a | a ] thenSelect: [ :b | true ]' in: class. + self compile: 'detectSum #(1 2) detectSum: [ :each | each ]' in: class. + self compile: 'detectSumMultiline #(1 2) detectSum: [ :each | #foo copy. each ]' in: class. + self compile: 'pairsDo #(1 2 3 4) pairsDo: [ :a :b | b ]' in: class. + self compile: 'rejectThenDo #() reject: [ :a | true ] thenDo: [ :b | b ]' in: class. + self compile: 'selectThenCollect #() select: [ :a | true ] thenCollect: [ :b | b ]' in: class. + self compile: 'selectThenDo #() select: [ :a | true ] thenDo: [ :b | b ]' in: class. + self compile: 'valuesDo #() valuesDo: [ :a | a ]' in: class. + self compile: 'reversed #() reversed' in: class. + self compile: 'keysSortedSafely Dictionary new keysSortedSafely' in: class. + self compile: 'newWithAll Array new: 4 withAll: $a' in: class. + self + runTransformation: GRAnsiCollectionsRule + changes: #( + 'withIndexDo #() keysAndValuesDo: [ :index :each | each + index ]' + 'doWithIndex #() keysAndValuesDo: [ :index :each | each + index ]' + 'collectThenDo (#() collect: [ :a | a ]) do: [ :b | b ]' + 'selectThenDo (#() select: [ :a | true ]) do: [ :b | b ]' + 'rejectThenDo (#() reject: [ :a | true ]) do: [ :b | b ]' + 'selectThenCollect (#() select: [ :a | true ]) collect: [ :b | b ]' + 'pairsDo 1 to: #(1 2 3 4) size by: 2 do: [ :index | | a b | a := #(1 2 3 4) at: index. b := #(1 2 3 4) at: index + 1. b ]' + 'collectThenSelect (#() collect: [ :a | a ]) select: [ :b | true ]' + 'detectSum #(1 2) inject: 0 into: [ :sum :each | sum + each ]' + 'detectSumMultiline #(1 2) inject: 0 into: [ :sum :each | #foo copy. sum + each ]' + 'valuesDo #() do: [ :a | a ]' + 'reversed #() reverse' + 'keysSortedSafely Dictionary new keys asSortedCollection' + 'newWithAll (Array new: 4) atAllPut: $a' + ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiConditionalsRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiConditionalsRule.st new file mode 100644 index 00000000..cffcbfa7 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiConditionalsRule.st @@ -0,0 +1,12 @@ +tests-transform +testAnsiConditionalsRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'ifNotNil 1 ifNotNil: [ | a | self or. self and ]' in: class. + self compile: 'ifNotNilDo 1 ifNotNilDo: [ :a | ^ a ]' in: class. + self + runTransformation: GRAnsiConditionalsRule + changes: #( + 'ifNotNil 1 ifNotNil: [ :arg | | a | self or. self and ]' + 'ifNotNilDo 1 ifNotNil: [ :a | ^ a ]' ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiConvertorRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiConvertorRule.st new file mode 100644 index 00000000..b29370e2 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiConvertorRule.st @@ -0,0 +1,12 @@ +tests-transform +testAnsiConvertorRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'convertInteger ''1'' asInteger' in: class. + self compile: 'convertString 2 asString' in: class. + self + runTransformation: GRAnsiConvertorRule + changes: #( + 'convertInteger ''1'' greaseInteger' + 'convertString 2 greaseString' ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiExceptionsRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiExceptionsRule.st new file mode 100644 index 00000000..57b75a75 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiExceptionsRule.st @@ -0,0 +1,14 @@ +tests-transform +testAnsiExceptionsRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'exception1 [ self or ] on: Error do: [ self or ]' in: class. + self compile: 'exception2 [ self or ] on: Error do: [ self or. self or ]' in: class. + self compile: 'exception3 [ self or ] on: Error do: [ | a | a := 0 ]' in: class. + self + runTransformation: GRAnsiExceptionsRule + changes: #( + 'exception1 [ self or ] on: Error do: [ :err | self or ]' + 'exception2 [ self or ] on: Error do: [ :err | self or. self or ]' + 'exception3 [ self or ] on: Error do: [ :err | | a | a := 0 ]' ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiStreamsRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiStreamsRule.st new file mode 100644 index 00000000..7a8b3238 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiStreamsRule.st @@ -0,0 +1,14 @@ +tests-transform +testAnsiStreamsRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'writeStream ^ '''' writeStream' in: class. + self compile: 'writeCr | stream | stream := WriteStream on: ''''. stream cr. stream nextPut: Character cr' in: class. + self compile: 'writeLf | stream | stream := WriteStream on: ''''. stream lf. stream nextPut: Character lf' in: class. + self + runTransformation: GRAnsiStreamsRule + changes: #( + 'writeStream ^ WriteStream on: ''''' + 'writeCr | stream | stream := WriteStream on: ''''. stream nextPut: Character cr. stream nextPut: Character cr' + 'writeLf | stream | stream := WriteStream on: ''''. stream nextPut: Character lf. stream nextPut: Character lf') \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiStringsRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiStringsRule.st new file mode 100644 index 00000000..9e0aeb9e --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testAnsiStringsRule.st @@ -0,0 +1,28 @@ +tests-transform +testAnsiStringsRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'stringCr String cr, (String with: Character cr)' in: class. + self compile: 'stringTab String tab, (String with: Character tab)' in: class. + self compile: 'stringLf String lf, (String with: Character lf)' in: class. + self compile: 'stringCrLf String crlf, (String with: Character cr with: Character lf)' in: class. + self compile: 'stringSpace String space, (String with: Character space)' in: class. + self compile: 'findTokens ''123'' findTokens: '',''' in: class. + self compile: 'findTokensCharacter ''123'' findTokens: $,' in: class. + self compile: 'findTokensArray ''123'' findTokens: #($, $;)' in: class. + self compile: 'includesSubString ''1234'' includesSubString: ''23''' in: class. + self compile: 'includesSubString ''1234'' includesSubstring: ''23''' in: class. + self + runTransformation: GRAnsiStringsRule + changes: #( + 'stringCr (String with: Character cr), (String with: Character cr)' + 'stringTab (String with: Character tab), (String with: Character tab)' + 'stringLf (String with: Character lf), (String with: Character lf)' + 'stringCrLf (String with: Character cr with: Character lf), (String with: Character cr with: Character lf)' + 'stringSpace (String with: Character space), (String with: Character space)' + 'findTokens ''123'' subStrings: '',''' + 'findTokensCharacter ''123'' subStrings: '',''' + 'findTokensArray ''123'' subStrings: '',;''' + 'includesSubString (''1234'' indexOfSubCollection: ''23'' startingAt: 0) ~= 0' + 'includesSubString (''1234'' indexOfSubCollection: ''23'' startingAt: 0) ~= 0') \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testBasicNewInitializeMissing.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testBasicNewInitializeMissing.st new file mode 100644 index 00000000..679e1393 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testBasicNewInitializeMissing.st @@ -0,0 +1,9 @@ +tests-block +testBasicNewInitializeMissing + + | class | + class := self defineSubClassOf: #Object. + self compile: 'initialize' in: class. + self + assertRule: GRBasicNewInitializeMissingRule + matches: { class } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testDeprecatedApiProtocol.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testDeprecatedApiProtocol.st new file mode 100644 index 00000000..bc229c20 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testDeprecatedApiProtocol.st @@ -0,0 +1,11 @@ +tests-parsetree +testDeprecatedApiProtocol + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'deprecated1 self greaseDeprecatedApi: ''',class name,'>>#deprecated1'' details: ''Something.''' in: class. + self compile: 'deprecated2 self greaseDeprecatedApi: ''',class name,'>>#deprecated'' details: ''Something.''' in: class. + self compile: 'deprecated3 self greaseDeprecatedApi: ''GRSlimeMock>>#deprecated3'' details: ''Something.''' in: class. + self + assertRule: GRDeprecatedApiProtocolRule + matches: { class>>#deprecated2 . class>>#deprecated3 } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st new file mode 100644 index 00000000..7e3c3a62 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st @@ -0,0 +1,18 @@ +tests-block +testEmptyStatements + "We added this test to make sure that this Pharo-supplied rule works because we previously had this one in Grease and it is important." + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'emptyStatement1.', (String with: Character cr), ' self and' in: class. + self compile: 'emptyStatement2', (String with: Character cr), ' self and..' in: class. + self compile: 'emptyStatement3', (String with: Character cr), ' self and."foo".' in: class. + self compile: 'emptyStatement4', (String with: Character cr), ' self and."foo".self and' in: class. + self + assertRule: ReMultiplePeriodsTerminatingStatementRule + matches: { class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 } + ignoring: { ReMethodSignaturePeriodRule }. + self + assertRule: ReMethodSignaturePeriodRule + matches: { class>>#emptyStatement1 } + ignoring: { ReMultiplePeriodsTerminatingStatementRule }. \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testInvalidObjectInitialization.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testInvalidObjectInitialization.st new file mode 100644 index 00000000..c7bddcd6 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testInvalidObjectInitialization.st @@ -0,0 +1,9 @@ +tests-block +testInvalidObjectInitialization + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'initializeFoo: aNumber' in: class. + self + assertRule: GRInvalidObjectInitializationRule + matches: { class>>#initializeFoo: } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testNonPortableMessageRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testNonPortableMessageRule.st new file mode 100644 index 00000000..d5b8d927 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testNonPortableMessageRule.st @@ -0,0 +1,15 @@ +tests-block +testNonPortableMessageRule + + | class | + class := self defineSubClassOf: #GRObject. + + self compile: 'invalid1 ^ Array new anyOne' in: class. + self compile: 'valid1 ^ Array new first' in: class. + + self compile: 'invalid2 ^ Array new withIndexCollect: [ :each :index | each hash ]' in: class. + self compile: 'valid2 ^ Array new do: [ :each | each hash ]' in: class. + + self + assertRule: GRNonPortableMessageRule + matches: { class>>#invalid1 . class>>#invalid2 } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testNotPortableCollectionsRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testNotPortableCollectionsRule.st new file mode 100644 index 00000000..ba64daef --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testNotPortableCollectionsRule.st @@ -0,0 +1,12 @@ +tests-transform +testNotPortableCollectionsRule + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'beginsWith1 ''abc'' beginsWith: ''a''' in: class. + self compile: 'endsWith1 ''abc'' endsWith: ''a''' in: class. + self + runTransformation: GRNotPortableCollectionsRule + changes: #( + 'beginsWith1 ''abc'' greaseBeginsWith: ''a''' + 'endsWith1 ''abc'' greaseEndsWith: ''a''') \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testObjectIn.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testObjectIn.st new file mode 100644 index 00000000..5711be2a --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testObjectIn.st @@ -0,0 +1,13 @@ +tests-transform +testObjectIn + + | class | + class := self defineSubClassOf: #GRObject. + self compile: 'objectIn1 1 in: [ :val | val factorial ]' in: class. + self compile: 'objectIn2 2 in: [ :val | | temps | val factorial ]' in: class. + self compile: 'objectIn3 2 in: [ ''not this'' ]' in: class. + self + runTransformation: GRObjectInRule + changes: #( + 'objectIn1 [ :val | val factorial ] value: 1' + 'objectIn2 [ :val | | temps | val factorial ] value: 2') \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testReferencesNotPortableClass.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testReferencesNotPortableClass.st new file mode 100644 index 00000000..6c1b5b23 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testReferencesNotPortableClass.st @@ -0,0 +1,11 @@ +tests-block +testReferencesNotPortableClass + + | class | + class := self defineSubClassOf: #GRObject. + class category: 'SomeCategory'. + self compile: 'invalid ^ Semaphore new' in: class. + self compile: 'valid ^ GRObject new' in: class. + self + assertRule: GRReferencesNotPortableClassRule + matches: { class>>#invalid } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testSubclassesNotPortableClass.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testSubclassesNotPortableClass.st new file mode 100644 index 00000000..2ced3881 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testSubclassesNotPortableClass.st @@ -0,0 +1,9 @@ +tests-block +testSubclassesNotPortableClass + + | class | + class := self defineSubClassOf: #Mutex. + class category: 'SomeCategory'. + self + assertRule: GRSubclassesNotPortableClassRule + matches: { class } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testTestCaseFailRule.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testTestCaseFailRule.st new file mode 100644 index 00000000..c4044a19 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testTestCaseFailRule.st @@ -0,0 +1,10 @@ +tests-transform +testTestCaseFailRule + + | class | + class := self defineSubClassOf: #TestCase. + self compile: 'testMethod self fail' in: class. + self + runTransformation: GRTestAssertionsRule + changes: #( + 'testMethod self assert: false' ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testTestCaseFailRule2.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testTestCaseFailRule2.st new file mode 100644 index 00000000..13e098a6 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testTestCaseFailRule2.st @@ -0,0 +1,9 @@ +tests-transform +testTestCaseFailRule2 + + | class | + class := self defineSubClassOf: #Object. + self compile: 'method self fail' in: class. + self + runTransformation: GRTestAssertionsRule + changes: #( ) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st new file mode 100644 index 00000000..5573c829 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesCanPerformOrUnderstand.st @@ -0,0 +1,20 @@ +tests-parsetree +testUsesCanPerformOrUnderstand + + | class | + class := self defineSubClassOf: #GRObject. + self + compile: 'invalid1 + Object class canUnderstand: #new' + in: class. + self + compile: 'invalid2 + Object class canPerform: #new' + in: class. + self + compile: 'valid + Object respondsTo: #new' + in: class. + self + assertRule: GRUsesCanPerformOrUnderstandRule + matches: { class>>#invalid1 . class>>#invalid2 } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesClassForHash.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesClassForHash.st new file mode 100644 index 00000000..7b934bbe --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesClassForHash.st @@ -0,0 +1,16 @@ +tests-parsetree +testUsesClassForHash + + | class | + class := self defineSubClassOf: #GRObject. + self + compile: 'foo + ^ super hash bitXor: self class hash' + in: class. + self + compile: 'hash + ^ super hash bitXor: self class hash' + in: class. + self + assertRule: GRUsesClassForHashRule + matches: { class>>#hash } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesNotPortableClass.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesNotPortableClass.st new file mode 100644 index 00000000..5699c982 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testUsesNotPortableClass.st @@ -0,0 +1,11 @@ +tests-block +testUsesNotPortableClass + + | class | + class := self defineSubClassOf: #GRObject. + class category: 'SomeCategory'. + self compile: 'invalid ^ Semaphore new' in: class. + self compile: 'valid ^ GRObject new' in: class. + self + assertRule: GRReferencesNotPortableClassRule + matches: { class>>#invalid } \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/properties.json b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/properties.json new file mode 100644 index 00000000..b4ebf23f --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/properties.json @@ -0,0 +1,15 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Grease-Tests-Pharo-Slime", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "model", + "environment", + "factory" + ], + "name" : "GRReSlimeTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/categories.st b/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/categories.st new file mode 100644 index 00000000..6c2ac5ef --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'Grease-Tests-Pharo-Slime'! diff --git a/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/initializers.st b/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/initializers.st new file mode 100644 index 00000000..e69de29b diff --git a/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/package b/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/package new file mode 100644 index 00000000..e2360038 --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Grease-Tests-Pharo-Slime') \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/properties.json b/repository/Grease-Tests-Pharo-Slime.package/properties.json new file mode 100644 index 00000000..6f31cf5a --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st deleted file mode 100644 index e4b03969..00000000 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testEmptyStatements.st +++ /dev/null @@ -1,12 +0,0 @@ -tests-block -testEmptyStatements - | class | - class := self defineSubClassOf: #GRObject. - self compile: 'emptyStatement1. self and' in: class. - self compile: 'emptyStatement2 self and..' in: class. - self compile: 'emptyStatement3 self and."foo".' in: class. - self compile: 'emptyStatement4 self and."foo".self and' in: class. - self - runRule: GREmptyStatementsRule - selectors: #(emptyStatement1 emptyStatement2 emptyStatement3 emptyStatement4) - ignoring: (Array with: GRUnnecessaryLastPeriodRule) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st deleted file mode 100644 index 342eb995..00000000 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testUsesLiteralByteArrays.st +++ /dev/null @@ -1,17 +0,0 @@ -tests-parsetree -testUsesLiteralByteArrays - | class | - (self canParse: 'foo #[ 1 2 3 ]') - ifFalse: [ ^ self ]. - class := self defineSubClassOf: #GRObject. - self - compile: 'invalid - ^ #[ 1 2 3 ]' - in: class. - self - compile: 'valid - ^ ByteArray with: 1 with: 2 with: 3' - in: class. - self - runRule: GRUsesLiteralByteArraysRule - selectors: #(invalid) \ No newline at end of file diff --git a/repository/Grease-Tests-Slime.package/monticello.meta/categories.st b/repository/Grease-Tests-Slime.package/monticello.meta/categories.st index a49916c2..d34cfb4a 100644 --- a/repository/Grease-Tests-Slime.package/monticello.meta/categories.st +++ b/repository/Grease-Tests-Slime.package/monticello.meta/categories.st @@ -1 +1 @@ -self packageOrganizer ensurePackage: #'Grease-Tests-Slime' withTags: #()! +SystemOrganization addCategory: #'Grease-Tests-Slime'!