diff --git a/src/GitS-Tests.package/GSLintTest.class/README.md b/src/GitS-Tests.package/GSLintTest.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/defaultTimeout.st b/src/GitS-Tests.package/GSLintTest.class/instance/defaultTimeout.st new file mode 100644 index 000000000..d9ffe8842 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/defaultTimeout.st @@ -0,0 +1,3 @@ +running - timeout +defaultTimeout + ^ 60000 \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentGitAssetLoaderMethods.st b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentGitAssetLoaderMethods.st new file mode 100644 index 000000000..adb6c590a --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentGitAssetLoaderMethods.st @@ -0,0 +1,5 @@ +expected-unsent +expectedUnsentGitAssetLoaderMethods + ^ (#(loadAnimatedImageMorph: loadAnimation: loadImageMorph: loadByteArray: loadString: assetPaths) + collect: [:selector | GitAssetLoader>>selector]) + copyWith: GitAssetLoader class>>#for:basePath: \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethods.st b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethods.st new file mode 100644 index 000000000..f6c8754c4 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethods.st @@ -0,0 +1,6 @@ +expected-unsent +expectedUnsentMethods + ^ + self expectedUnsentGitAssetLoaderMethods, + self expectedUnsentMethodsForFutureUse, + self expectedUnsentMethodsThatHaveHiddenSends \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethodsForFutureUse.st b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethodsForFutureUse.st new file mode 100644 index 000000000..bd71aa347 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethodsForFutureUse.st @@ -0,0 +1,7 @@ +expected-unsent +expectedUnsentMethodsForFutureUse + ^ { + GSTonelMapper>>#writeTimestamps:. + GSRebaseOperationMerge>>#messageCommit. + GSRebaseOperationMerge>>#oneLineMessage. + } \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethodsThatHaveHiddenSends.st b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethodsThatHaveHiddenSends.st new file mode 100644 index 000000000..c4f680d9c --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/expectedUnsentMethodsThatHaveHiddenSends.st @@ -0,0 +1,5 @@ +expected-unsent +expectedUnsentMethodsThatHaveHiddenSends + ^ { + GSPreferences class>>#showBase:. "asSimpleSetter used in Preferences class>>addPragmaPreference:" + } \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/findAbstractMethodsInConcreteClasses.st b/src/GitS-Tests.package/GSLintTest.class/instance/findAbstractMethodsInConcreteClasses.st new file mode 100644 index 000000000..f3add9bed --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/findAbstractMethodsInConcreteClasses.st @@ -0,0 +1,21 @@ +finding +findAbstractMethodsInConcreteClasses + ^ CurrentReadOnlySourceFiles cacheDuring: [ + (Array streamContents: [:stream | | methodsWithClasses | + methodsWithClasses := IdentityDictionary new. + (self packageInfo classesAndMetaClasses + reject: [:each | each theNonMetaClass isAbstract]) + do: [:class | + class allSelectors do: [:selector | | compiledMethod | + compiledMethod := class lookupSelector: selector. + (methodsWithClasses + at: compiledMethod + ifAbsentPut: [OrderedCollection new]) + add: class]]. + (methodsWithClasses + associationsSelect: [:each | + (self ignoredAbstractMethods includes: each key) not]) + keysAndValuesDo: [:compiledMethod :classes | + (self isAbstractMethod: compiledMethod) + ifTrue: [stream nextPut: compiledMethod -> classes]]]) + sorted: #name ascending] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/findUnimplementedAndUnsentMethods.st b/src/GitS-Tests.package/GSLintTest.class/instance/findUnimplementedAndUnsentMethods.st new file mode 100644 index 000000000..6bb793f30 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/findUnimplementedAndUnsentMethods.st @@ -0,0 +1,21 @@ +finding +findUnimplementedAndUnsentMethods + | implemented sent packageImplemented packageSent unimplemented unsent | + implemented := Set new. + implemented addAll: Smalltalk globals keys. + sent := Set new. + packageImplemented := OrderedCollection new. + packageSent := OrderedCollection new. + CurrentReadOnlySourceFiles cacheDuring: [ + (SystemNavigation default allBehaviors gather: [:each | each methodDict values]) contents + do: [:compiledMethod | | included | + included := self packageInfo includesMethodReference: compiledMethod methodReference. + implemented add: compiledMethod selector. + included ifTrue: [packageImplemented add: compiledMethod]. + self sendsOf: compiledMethod do: [:selector | + sent add: selector. + included ifTrue: [packageSent add: compiledMethod -> selector]]] + displayingProgress: [:each | 'Analyzing ', each methodReference]]. + unimplemented := packageSent reject: [:each | implemented includes: each value]. + unsent := (packageImplemented reject: [:each | sent includes: each selector]). + ^ Dictionary newFrom: {'unimplemented' -> unimplemented. 'unsent' -> unsent} \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredAbstractMethods.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredAbstractMethods.st new file mode 100644 index 000000000..2cd081921 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredAbstractMethods.st @@ -0,0 +1,7 @@ +ignored-abstract-methods +ignoredAbstractMethods + ^ { + TextAttribute>>#closeHtmlOn:. + TextAttribute>>#openHtmlOn:. + Object>>#writeCypressJsonOn:forHtml:indent:. + } \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSends.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSends.st new file mode 100644 index 000000000..2724c5284 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSends.st @@ -0,0 +1,8 @@ +ignored-sends +ignoredSends + ^ + self ignoredSendsForCommitType, + self ignoredSendsForLegacyMetadataLoading, + self ignoredSendsForLegacyProjectImporting, + self ignoredSendsForTextDiffing, + self ignoredSendsForUnmappedPathDialogOptions \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForCommitType.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForCommitType.st new file mode 100644 index 000000000..2c66c58cc --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForCommitType.st @@ -0,0 +1,7 @@ +ignored-sends +ignoredSendsForCommitType + ^ { + #actionPick:message:windowTitlePrefix:revert:amend:alwaysOpenDialog:. + #mergeCommitIntoHead:mergeBase:message:windowTitle:alwaysOpenDialog:commitType:. + #openDialogToMergeCommitIntoHead:mergeBase:displayName:. + } gather: [:selector | #(commit merge amend) collect: [:symbol | GSBrowser>>selector -> symbol]] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForLegacyMetadataLoading.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForLegacyMetadataLoading.st new file mode 100644 index 000000000..07aad1ef3 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForLegacyMetadataLoading.st @@ -0,0 +1,8 @@ +ignored-sends +ignoredSendsForLegacyMetadataLoading + ^ { + #legacySquotClassMappings -> #(SquotTrackedObjectMetadata). + #loadMapperFromLegacySquotContentsReference:fallbackSerializer: -> #(SquotTonelSerializer SquotCypressCodeSerializer). + #loadLegacySerializerNameFromSquotContentsReference: -> #(serializer). + #legacySquotClassName: -> #(GS Squot). + } gather: [:each | each value collect: [:symbol | GSMetadataMapper>>each key -> symbol]] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForLegacyProjectImporting.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForLegacyProjectImporting.st new file mode 100644 index 000000000..687c34d39 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForLegacyProjectImporting.st @@ -0,0 +1,7 @@ +ignored-sends +ignoredSendsForLegacyProjectImporting + ^ { + #importLegacyGitStandaloneAssetLoaderInstances -> #(GitNamedAssetLoader assets). + #importLegacySquotWorkingCopyInstances -> #(SquotWorkingCopy registered). + #importLegacySqueakWorkingCopyInstances -> #(SqueakWorkingCopy). + } gather: [:each | each value collect: [:symbol | GSBaseWorkingCopy class>>each key -> symbol]] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForTextDiffing.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForTextDiffing.st new file mode 100644 index 000000000..bdaf17c38 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForTextDiffing.st @@ -0,0 +1,4 @@ +ignored-sends +ignoredSendsForTextDiffing + ^ #(diffChunksFrom:to: diffFromLines:toLines:) gather: [:selector | + #(common different) collect: [:symbol | GSTextUtilities class>>selector -> symbol]] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForUnmappedPathDialogOptions.st b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForUnmappedPathDialogOptions.st new file mode 100644 index 000000000..10906e8f3 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/ignoredSendsForUnmappedPathDialogOptions.st @@ -0,0 +1,7 @@ +ignored-sends +ignoredSendsForUnmappedPathDialogOptions + ^ { + GSBaseWorkingCopy>>#requestOptionForUnmappedPath:mapper:additionalOptions:. + GSBaseWorkingCopy>>#getUnmappedPathFrom:withTitle:additionalOptions:optionIfMapped:. + GSAssetBrowser>>#importDirectory:. + } gather: [:compiledMethod | #(different overwrite skip ask) collect: [:symbol | compiledMethod -> symbol]] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/isAbstractMethod..st b/src/GitS-Tests.package/GSLintTest.class/instance/isAbstractMethod..st new file mode 100644 index 000000000..e224e2186 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/isAbstractMethod..st @@ -0,0 +1,5 @@ +testing +isAbstractMethod: aCompiledMethod + self sendsOf: aCompiledMethod do: [:selector | + selector = #subclassResponsibility ifTrue: [^ true]]. + ^ false \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/isSend.in.enumerator..st b/src/GitS-Tests.package/GSLintTest.class/instance/isSend.in.enumerator..st new file mode 100644 index 000000000..c3af2388b --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/isSend.in.enumerator..st @@ -0,0 +1,10 @@ +testing +isSend: aSymbol in: aCompiledMethod enumerator: aSendsEnumerator + | parent | + ({self. self class} includes: aCompiledMethod methodClass) ifTrue: [^ false]. + (self ignoredSends includes: aCompiledMethod -> aSymbol) ifTrue: [^ false]. + parent := aSendsEnumerator parent ifNil: [^ true]. + parent isMessageNode ifFalse: [^ true]. + (parent arguments includes: aSendsEnumerator current) ifFalse: [^ true]. + (self selectorsWhoseArgumentsToIgnore includes: parent selector key) ifTrue: [^ false]. + ^ true \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/packageInfo.st b/src/GitS-Tests.package/GSLintTest.class/instance/packageInfo.st new file mode 100644 index 000000000..4c39a04e5 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/packageInfo.st @@ -0,0 +1,3 @@ +accessing +packageInfo + ^ PackageInfo named: 'GitS-Core' \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/selectorsWhoseArgumentsToIgnore.st b/src/GitS-Tests.package/GSLintTest.class/instance/selectorsWhoseArgumentsToIgnore.st new file mode 100644 index 000000000..f01d3fcbf --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/selectorsWhoseArgumentsToIgnore.st @@ -0,0 +1,3 @@ +ignored-sends +selectorsWhoseArgumentsToIgnore + ^ #(flag: = ~= changed: hResizing: horizontalResizing: vResizing: verticalResizing: listDirection:) \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/sendsOf.do..st b/src/GitS-Tests.package/GSLintTest.class/instance/sendsOf.do..st new file mode 100644 index 000000000..2600d9746 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/sendsOf.do..st @@ -0,0 +1,12 @@ +finding +sendsOf: aCompiledMethod do: aBlock + GSSendsEnumerator new + selectBlock: [:symbol :enumerator | + self + isSend: symbol + in: aCompiledMethod + enumerator: enumerator]; + doBlock: aBlock; + visit: (Parser new + parse: aCompiledMethod getSource + class: aCompiledMethod methodClass). \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/testNoAbstractMethodsInConcreteClasses.st b/src/GitS-Tests.package/GSLintTest.class/instance/testNoAbstractMethodsInConcreteClasses.st new file mode 100644 index 000000000..c23235d7d --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/testNoAbstractMethodsInConcreteClasses.st @@ -0,0 +1,7 @@ +tests +testNoAbstractMethodsInConcreteClasses + | found | + found := self findAbstractMethodsInConcreteClasses. + self + assert: found isEmpty + description: 'Found methods on non-abstract classes that call subclassResponsibility'. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/instance/testNoUnimplementedAndNoUnsentMethods.st b/src/GitS-Tests.package/GSLintTest.class/instance/testNoUnimplementedAndNoUnsentMethods.st new file mode 100644 index 000000000..3b33d71a4 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/instance/testNoUnimplementedAndNoUnsentMethods.st @@ -0,0 +1,10 @@ +tests +testNoUnimplementedAndNoUnsentMethods + | found | + found := self findUnimplementedAndUnsentMethods. + self + assert: (found at: 'unimplemented') isEmpty + description: 'Found unimplemented selectors or references to non-existing globals'. + self + assert: (found at: 'unsent') asIdentitySet = self expectedUnsentMethods asIdentitySet + description: 'Found unsent methods'. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSLintTest.class/methodProperties.json b/src/GitS-Tests.package/GSLintTest.class/methodProperties.json new file mode 100644 index 000000000..f6a478b08 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/methodProperties.json @@ -0,0 +1,25 @@ +{ + "class" : { + }, + "instance" : { + "defaultTimeout" : "mad 10/14/2024 00:00", + "expectedUnsentGitAssetLoaderMethods" : "mad 10/13/2024 23:47", + "expectedUnsentMethods" : "mad 10/14/2024 00:04", + "expectedUnsentMethodsForFutureUse" : "mad 10/14/2024 00:05", + "expectedUnsentMethodsThatHaveHiddenSends" : "mad 10/14/2024 00:10", + "findAbstractMethodsInConcreteClasses" : "mad 10/14/2024 00:05", + "findUnimplementedAndUnsentMethods" : "mad 10/14/2024 00:03", + "ignoredAbstractMethods" : "mad 10/14/2024 00:05", + "ignoredSends" : "mad 10/14/2024 00:07", + "ignoredSendsForCommitType" : "mad 10/14/2024 00:06", + "ignoredSendsForLegacyMetadataLoading" : "mad 10/14/2024 00:06", + "ignoredSendsForLegacyProjectImporting" : "mad 10/14/2024 00:06", + "ignoredSendsForTextDiffing" : "mad 10/14/2024 00:07", + "ignoredSendsForUnmappedPathDialogOptions" : "mad 10/14/2024 00:07", + "isAbstractMethod:" : "mad 10/13/2024 20:42", + "isSend:in:enumerator:" : "mad 10/14/2024 00:06", + "packageInfo" : "mad 10/13/2024 19:52", + "selectorsWhoseArgumentsToIgnore" : "mad 10/14/2024 00:08", + "sendsOf:do:" : "mad 10/13/2024 19:50", + "testNoAbstractMethodsInConcreteClasses" : "mad 10/13/2024 21:13", + "testNoUnimplementedAndNoUnsentMethods" : "mad 10/14/2024 00:04" } } diff --git a/src/GitS-Tests.package/GSLintTest.class/properties.json b/src/GitS-Tests.package/GSLintTest.class/properties.json new file mode 100644 index 000000000..c1fe09e60 --- /dev/null +++ b/src/GitS-Tests.package/GSLintTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "GitS-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "GSLintTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/README.md b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestor..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestor..st new file mode 100644 index 000000000..bf529f762 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestor..st @@ -0,0 +1,3 @@ +accessing +ancestor: aNumber + ^ self ancestors atLast: aNumber ifAbsent: [nil] \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestors..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestors..st new file mode 100644 index 000000000..0d30319fa --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestors..st @@ -0,0 +1,3 @@ +accessing +ancestors: aColletion + ancestors := aColletion \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestors.st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestors.st new file mode 100644 index 000000000..f1ece4082 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/ancestors.st @@ -0,0 +1,3 @@ +accessing +ancestors + ^ ancestors \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/current.st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/current.st new file mode 100644 index 000000000..ae22aa898 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/current.st @@ -0,0 +1,3 @@ +accessing +current + ^ self ancestor: 1 \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/initialize.st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/initialize.st new file mode 100644 index 000000000..2b929abdb --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialize-release +initialize + super initialize. + self ancestors: OrderedCollection new. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/parent.st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/parent.st new file mode 100644 index 000000000..0ded707e5 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/parent.st @@ -0,0 +1,3 @@ +accessing +parent + ^ self ancestor: 2 \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/pushAncestor.during..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/pushAncestor.during..st new file mode 100644 index 000000000..c8ad7eb66 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/pushAncestor.during..st @@ -0,0 +1,4 @@ +visiting +pushAncestor: aParseNode during: aBlock + self ancestors addLast: aParseNode. + aBlock ensure: [self ancestors removeLast]. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/root.st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/root.st new file mode 100644 index 000000000..ae368e7dd --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/root.st @@ -0,0 +1,3 @@ +accessing +root + ^ self ancestors first \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visit..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visit..st new file mode 100644 index 000000000..bd0e10232 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visit..st @@ -0,0 +1,3 @@ +visiting +visit: aParseNode + self pushAncestor: aParseNode during: [aParseNode accept: self]. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitAll..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitAll..st new file mode 100644 index 000000000..4884fc34f --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitAll..st @@ -0,0 +1,3 @@ +visiting +visitAll: aCollection + aCollection do: [:each | self visit: each]. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitAssignmentNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitAssignmentNode..st new file mode 100644 index 000000000..e9877aa09 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitAssignmentNode..st @@ -0,0 +1,6 @@ +visiting +visitAssignmentNode: anAssignmentNode + "N.B. since assigment happens after the value is evaluated the value is visited first." + self + visit: anAssignmentNode value; + visit: anAssignmentNode variable. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitBlockNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitBlockNode..st new file mode 100644 index 000000000..1ec4e7300 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitBlockNode..st @@ -0,0 +1,3 @@ +visiting +visitBlockNode: aBlockNode + self visitAll: aBlockNode statements. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitBraceNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitBraceNode..st new file mode 100644 index 000000000..841549962 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitBraceNode..st @@ -0,0 +1,3 @@ +visiting +visitBraceNode: aBraceNode + self visitAll: aBraceNode elements. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitCascadeNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitCascadeNode..st new file mode 100644 index 000000000..37dc8d598 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitCascadeNode..st @@ -0,0 +1,7 @@ +visiting +visitCascadeNode: aCascadeNode + self visit: aCascadeNode receiver. + aCascadeNode messages do: [:message| + self + pushAncestor: message + during: [self visitMessageNodeInCascade: message]]. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitFutureNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitFutureNode..st new file mode 100644 index 000000000..1caf19239 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitFutureNode..st @@ -0,0 +1,5 @@ +visiting +visitFutureNode: aFutureNode + self visit: aFutureNode receiver. + (aFutureNode originalSelector isKindOf: SelectorNode) ifTrue: + [self visit: aFutureNode originalSelector]. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMessageNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMessageNode..st new file mode 100644 index 000000000..972b3e475 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMessageNode..st @@ -0,0 +1,6 @@ +visiting +visitMessageNode: aMessageNode + self + visit: aMessageNode receiver; + visit: aMessageNode selector; + visitAll: aMessageNode argumentsInEvaluationOrder. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMessageNodeInCascade..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMessageNodeInCascade..st new file mode 100644 index 000000000..f859baaef --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMessageNodeInCascade..st @@ -0,0 +1,6 @@ +visiting +visitMessageNodeInCascade: aMessageNode + "receiver is nil for cascades" + self + visit: aMessageNode selector; + visitAll: aMessageNode argumentsInEvaluationOrder. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMethodNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMethodNode..st new file mode 100644 index 000000000..904562383 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitMethodNode..st @@ -0,0 +1,3 @@ +visiting +visitMethodNode: aMethodNode + self visit: aMethodNode block. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitReturnNode..st b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitReturnNode..st new file mode 100644 index 000000000..3f5705a96 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/instance/visitReturnNode..st @@ -0,0 +1,3 @@ +visiting +visitReturnNode: aReturnNode + self visit: aReturnNode expr. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/methodProperties.json b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/methodProperties.json new file mode 100644 index 000000000..f0d957fb7 --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/methodProperties.json @@ -0,0 +1,23 @@ +{ + "class" : { + }, + "instance" : { + "ancestor:" : "mad 10/13/2024 16:02", + "ancestors" : "mad 10/13/2024 15:27", + "ancestors:" : "mad 10/13/2024 15:27", + "current" : "mad 10/13/2024 16:02", + "initialize" : "mad 10/13/2024 15:28", + "parent" : "mad 10/13/2024 16:02", + "pushAncestor:during:" : "mad 10/13/2024 15:28", + "root" : "mad 10/13/2024 16:08", + "visit:" : "mad 10/13/2024 15:28", + "visitAll:" : "mad 10/13/2024 15:19", + "visitAssignmentNode:" : "mad 10/13/2024 15:16", + "visitBlockNode:" : "mad 10/13/2024 15:17", + "visitBraceNode:" : "mad 10/13/2024 15:19", + "visitCascadeNode:" : "mad 10/13/2024 15:40", + "visitFutureNode:" : "mad 10/13/2024 15:40", + "visitMessageNode:" : "mad 10/13/2024 15:23", + "visitMessageNodeInCascade:" : "mad 10/13/2024 15:23", + "visitMethodNode:" : "mad 10/13/2024 15:23", + "visitReturnNode:" : "mad 10/13/2024 15:23" } } diff --git a/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/properties.json b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/properties.json new file mode 100644 index 000000000..d68f0761f --- /dev/null +++ b/src/GitS-Tests.package/GSParseNodeVisitorWithAncestors.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "GitS-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "ancestors" ], + "name" : "GSParseNodeVisitorWithAncestors", + "pools" : [ + ], + "super" : "ParseNodeVisitor", + "type" : "normal" } diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/README.md b/src/GitS-Tests.package/GSSendsEnumerator.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/doBlock..st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/doBlock..st new file mode 100644 index 000000000..39babdc2b --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/doBlock..st @@ -0,0 +1,3 @@ +accessing +doBlock: aBlock + doBlock := aBlock \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/doBlock.st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/doBlock.st new file mode 100644 index 000000000..cfc10e2a8 --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/doBlock.st @@ -0,0 +1,3 @@ +accessing +doBlock + ^ doBlock \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/enumerate..st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/enumerate..st new file mode 100644 index 000000000..70b6a0901 --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/enumerate..st @@ -0,0 +1,5 @@ +enumerating +enumerate: aSymbol + self selectBlock ifNotNil: [:block | + (block cull: aSymbol cull: self) ifFalse: [^ self]]. + self doBlock cull: aSymbol cull: self. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/selectBlock..st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/selectBlock..st new file mode 100644 index 000000000..4580a1079 --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/selectBlock..st @@ -0,0 +1,3 @@ +accessing +selectBlock: aBlock + selectBlock := aBlock \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/selectBlock.st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/selectBlock.st new file mode 100644 index 000000000..12e491eca --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/selectBlock.st @@ -0,0 +1,3 @@ +accessing +selectBlock + ^ selectBlock \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitLiteralNode..st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitLiteralNode..st new file mode 100644 index 000000000..74de7099e --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitLiteralNode..st @@ -0,0 +1,5 @@ +visiting +visitLiteralNode: aNode + super visitLiteralNode: aNode. + aNode literalValue isSymbol ifFalse: [^ self]. + self enumerate: aNode literalValue. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitLiteralVariableNode..st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitLiteralVariableNode..st new file mode 100644 index 000000000..c72b244f5 --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitLiteralVariableNode..st @@ -0,0 +1,7 @@ +visiting +visitLiteralVariableNode: aNode + super visitLiteralVariableNode: aNode. + (self root isKindOf: MethodNode) ifTrue: [ + (self root methodClass theNonMetaClass classVarNames + includes: aNode name asString) ifTrue: [^ self]]. + self enumerate: aNode name asSymbol. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitSelectorNode..st b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitSelectorNode..st new file mode 100644 index 000000000..527891782 --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/instance/visitSelectorNode..st @@ -0,0 +1,4 @@ +visiting +visitSelectorNode: aNode + super visitSelectorNode: aNode. + self enumerate: aNode key. \ No newline at end of file diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/methodProperties.json b/src/GitS-Tests.package/GSSendsEnumerator.class/methodProperties.json new file mode 100644 index 000000000..a4abddd90 --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/methodProperties.json @@ -0,0 +1,12 @@ +{ + "class" : { + }, + "instance" : { + "doBlock" : "mad 10/13/2024 15:42", + "doBlock:" : "mad 10/13/2024 15:42", + "enumerate:" : "mad 10/13/2024 15:55", + "selectBlock" : "mad 10/13/2024 15:55", + "selectBlock:" : "mad 10/13/2024 15:55", + "visitLiteralNode:" : "mad 10/13/2024 15:44", + "visitLiteralVariableNode:" : "mad 10/13/2024 16:09", + "visitSelectorNode:" : "mad 10/13/2024 15:43" } } diff --git a/src/GitS-Tests.package/GSSendsEnumerator.class/properties.json b/src/GitS-Tests.package/GSSendsEnumerator.class/properties.json new file mode 100644 index 000000000..77c4e8e9b --- /dev/null +++ b/src/GitS-Tests.package/GSSendsEnumerator.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "GitS-Tests", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "doBlock", + "selectBlock" ], + "name" : "GSSendsEnumerator", + "pools" : [ + ], + "super" : "GSParseNodeVisitorWithAncestors", + "type" : "normal" }