Skip to content

Commit

Permalink
60348
Browse files Browse the repository at this point in the history
19557 GTDebugger should use FastTable in the object inspector for thisContext
	https://pharo.fogbugz.com/f/cases/19557

19561 Drag&Drop FastTable Example Does Not Work
	https://pharo.fogbugz.com/f/cases/19561

19536 "Instance variables not read and written" critique false positive on classes with certain slots
	https://pharo.fogbugz.com/f/cases/19536

19559 GTMoldableDebugger>>updateBrowser should not call #update
	https://pharo.fogbugz.com/f/cases/19559

http://files.pharo.org/image/60/60348.zip
  • Loading branch information
Jenkins Build Server authored and ci committed Jan 20, 2017
1 parent 4546a80 commit e40a6a8
Show file tree
Hide file tree
Showing 48 changed files with 99 additions and 127 deletions.
@@ -1,5 +1,5 @@
variablesIn: composite
^ composite table
^ composite fastTable
showOnly: 50;
shouldValidate: false;
allowsRecursiveSearch: false;
Expand Down
Expand Up @@ -4,5 +4,4 @@ updateBrowser
session := self session.
browserPane := self browser pane.
(browserPane port: #entity) silentValue: nil.
(browserPane port: #entity) value: session.
browserPane update.
(browserPane port: #entity) value: session.
@@ -0,0 +1 @@
This smell arises when an instance variable is not both read and written. If an instance variable is only read, the reads can be replaced by nil, since it could not have been assigned a value. If the variable is only written, then it does not need to store the result since it is never used. This check does not work for the data model classes since they use the #instVarAt:put: messages to set instance variables.
@@ -0,0 +1,5 @@
ReAbstractRule subclass: #GRIvarNeitherReadNorWrittenRule
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'GeneralRules'
@@ -0,0 +1,3 @@
name

^ 'Instance variable not read or not written'
@@ -0,0 +1,16 @@
check: aClass forCritiquesDo: aCriticBlock
| methods |

methods := aClass withAllSubclasses flatCollect: #methods.

aClass slots
select: [ :slot |
| read written |
read := written := false.
methods noneSatisfy: [ :method |
read := read or: [ method readsSlot: slot ].
written := written or: [ method writesSlot: slot ].
read and: [ written ] ] ]
thenDo: [ :slot |
aCriticBlock cull:
(self critiqueFor: aClass about: slot) ]
@@ -0,0 +1,10 @@
critiqueFor: aClass about: aSlot
| crit |
crit := ReTrivialCritique
withAnchor: (ReVarSearchSourceAnchor
entity: aClass
string: aSlot name)
by: self.

crit tinyHint: aSlot name.
^ crit
@@ -0,0 +1,5 @@
ReNodeBasedRule subclass: #GRTemporaryNeitherReadNorWrittenRule
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'GeneralRules'

This file was deleted.

Expand Up @@ -18,9 +18,10 @@ exampleIn: composer
act: [ :text :exampleClass :examplePragma |
Smalltalk tools browser
openOnClass: exampleClass
selector: examplePragma selector ]
selector: examplePragma methodSelector ]
icon: GLMUIThemeExtraIcons glamorousBrowse
entitled: 'Browse';
smalltalkClass: [ :exampleClass | exampleClass ];
doItReceiver: [ :exampleClass | exampleClass ];
display: [ :exampleClass :pragma | exampleClass sourceCodeAt: pragma methodSelector ]
display:
[ :exampleClass :pragma | exampleClass sourceCodeAt: pragma methodSelector ]
@@ -1,6 +1,6 @@
fastListDragAndDrop
<glmBrowser: 'Fast List drag&drop' input: '(1 to: 5) asOrderedCollection'>
"self new listDragAndDrop openOn: (1 to: 5) asOrderedCollection"
"self new fastListDragAndDrop openOn: (1 to: 5) asOrderedCollection"
| browser |
browser := GLMTabulator new.
browser column: #source; column: #target.
Expand Down
@@ -1,2 +1,2 @@
allowDropOnItemBlock
^ allowDropOnItemBlock
^ allowDropOnItemBlock ifNil: [ allowDropOnItemBlock := [ false ] ]
Expand Up @@ -4,11 +4,11 @@ setUp
bm := TheManifestBuilder of: MFClassA.
bm installFalsePositiveOf: RBCodeCruftLeftInMethodsRule uniqueIdentifierName version: 1.
bm addFalsePositive: MFClassB >> #method3 of: RBCodeCruftLeftInMethodsRule uniqueIdentifierName version: 1.
bm installToDoOf: GRTemporaryNotReadNorWrittenRule uniqueIdentifierName version: 1.
bm installToDoOf: GRTemporaryNeitherReadNorWrittenRule uniqueIdentifierName version: 1.
bm
addAllToDo:
{(MFClassB >> #method3).
(MFClassA >> #method)}
of: GRTemporaryNotReadNorWrittenRule uniqueIdentifierName
of: GRTemporaryNeitherReadNorWrittenRule uniqueIdentifierName
version: 1.
checker := ReSmalllintChecker new
Expand Up @@ -7,7 +7,7 @@ testCriticsOf
environment: self package asEnvironment;
run.

critiques := checker criticsOf: GRTemporaryNotReadNorWrittenRule new.
critiques := checker criticsOf: GRTemporaryNeitherReadNorWrittenRule new.

self assert: critiques size = 3.
self assert: (critiques anySatisfy: [ :each |
Expand Down
Expand Up @@ -7,6 +7,6 @@ testIsToDo
environment: self package asEnvironment;
run.

self assert: (checker isToDo: (MFClassB>>#method3) forRuleId: (GRTemporaryNotReadNorWrittenRule uniqueIdentifierName) versionId: 1).
self deny: (checker isToDo: (MFClassB>>#method2) forRuleId: (GRTemporaryNotReadNorWrittenRule uniqueIdentifierName) versionId: 1).
self assert: (checker isToDo: (MFClassB>>#method3) forRuleId: (GRTemporaryNeitherReadNorWrittenRule uniqueIdentifierName) versionId: 1).
self deny: (checker isToDo: (MFClassB>>#method2) forRuleId: (GRTemporaryNeitherReadNorWrittenRule uniqueIdentifierName) versionId: 1).

Expand Up @@ -7,7 +7,7 @@ testToDoOf
environment: self package asEnvironment;
run.

self assert: (( checker toDoOf: GRTemporaryNotReadNorWrittenRule new) anySatisfy: [:each|
self assert: (( checker toDoOf: GRTemporaryNeitherReadNorWrittenRule new) anySatisfy: [:each|
each sourceAnchor entity = (MFClassB>>#method3)]).
self deny: (( checker toDoOf: GRTemporaryNotReadNorWrittenRule new) anySatisfy: [:each|
self deny: (( checker toDoOf: GRTemporaryNeitherReadNorWrittenRule new) anySatisfy: [:each|
each sourceAnchor entity = (MFClassB>>#method2)]).

This file was deleted.

@@ -1,3 +1,3 @@
new

^ GRTemporaryNotReadNorWrittenRule asRBRule
^ GRTemporaryNeitherReadNorWrittenRule asRBRule
@@ -0,0 +1,4 @@
isVisible

self flag: 'The functionality was moved to TemporaryNeitherReadNorWrittenRule, but as this rule is used by Monkey, and Monkey is not using Renraku model yet, the rule is hidden'.
^ false
@@ -0,0 +1,3 @@
new

^ GRIvarNeitherReadNorWrittenRule asRBRule
@@ -0,0 +1,4 @@
isVisible

self flag: 'The functionality was moved to GRIvarNeitherReadNorWrittenRule, but as this rule is used by Monkey, and Monkey is not using Renraku model yet, the rule is hidden'.
^ false

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,4 +1,4 @@
script60347
script60348

^ 'AST-Core-TheIntegrator.489.mcz
AST-Tests-Core-TheIntegrator.132.mcz
Expand Down Expand Up @@ -94,7 +94,7 @@ FuelTools-Debugger-MaxLeske.14.mcz
FuzzyMatcher-TheIntegrator.18.mcz
FuzzyMatcher-Tests-TheIntegrator.5.mcz
GT-BytecodeDebugger-AndreiChis.33.mcz
GT-Debugger-TheIntegrator.363.mcz
GT-Debugger-TheIntegrator.364.mcz
GT-EventRecorder-AndreiChis.74.mcz
GT-EventRecorder-Tests-TheIntegrator.39.mcz
GT-Inspector-TheIntegrator.444.mcz
Expand All @@ -108,20 +108,20 @@ GT-Tests-Debugger-AndreiChis.14.mcz
GT-Tests-Inspector-StefanReichhart.59.mcz
GT-Tests-Playground-StefanReichhart.4.mcz
GT-Tests-Spotter-TheIntegrator.27.mcz
GeneralRules-TheIntegrator.7.mcz
GeneralRules-TheIntegrator.9.mcz
Glamour-Announcements-AndreiChis.8.mcz
Glamour-Browsers-AndreiChis.112.mcz
Glamour-Core-JurajKubelka.327.mcz
Glamour-Examples-JurajKubelka.315.mcz
Glamour-FastTable-JurajKubelka.64.mcz
Glamour-Examples-TheIntegrator.317.mcz
Glamour-FastTable-TheIntegrator.66.mcz
Glamour-Helpers-TudorGirba.40.mcz
Glamour-Morphic-Brick-AndreiChis.436.mcz
Glamour-Morphic-Brick-Tests-JurajKubelka.15.mcz
Glamour-Morphic-Pager-MarcusDenker.111.mcz
Glamour-Morphic-Renderer-TudorGirba.352.mcz
Glamour-Morphic-Theme-TheIntegrator.229.mcz
Glamour-Morphic-Widgets-TheIntegrator.203.mcz
Glamour-Presentations-JurajKubelka.187.mcz
Glamour-Presentations-TheIntegrator.189.mcz
Glamour-Rubric-Presentations-TheIntegrator.58.mcz
Glamour-SpecIntegration-TheIntegrator.6.mcz
Glamour-Tests-Core-PavelKrivanek.113.mcz
Expand Down Expand Up @@ -164,7 +164,7 @@ Keymapping-Tools-Spec-TheIntegrator.32.mcz
Komitter-TheIntegrator.186.mcz
Manifest-Core-TheIntegrator.252.mcz
Manifest-Resources-Tests-MarcusDenker.14.mcz
Manifest-Tests-TheIntegrator.53.mcz
Manifest-Tests-TheIntegrator.55.mcz
MenuRegistration-TheIntegrator.93.mcz
MessageBrowserRefactoringAddition-StephaneDucasse.2.mcz
Metacello-Base-EstebanLorenzano.126.mcz
Expand Down Expand Up @@ -269,7 +269,7 @@ Random-Tests-TheIntegrator.4.mcz
RecentSubmissions-TheIntegrator.246.mcz
Refactoring-Changes-TheIntegrator.70.mcz
Refactoring-Core-TheIntegrator.335.mcz
Refactoring-Critics-TheIntegrator.293.mcz
Refactoring-Critics-TheIntegrator.296.mcz
Refactoring-Environment-TheIntegrator.88.mcz
Refactoring-Help-TheIntegrator.7.mcz
Refactoring-Tests-Changes-TheIntegrator.40.mcz
Expand Down

This file was deleted.

@@ -0,0 +1,15 @@
update60348
"self new update60348"
self withUpdateLog: '19557 GTDebugger should use FastTable in the object inspector for thisContext
https://pharo.fogbugz.com/f/cases/19557
19561 Drag&Drop FastTable Example Does Not Work
https://pharo.fogbugz.com/f/cases/19561
19536 "Instance variables not read and written" critique false positive on classes with certain slots
https://pharo.fogbugz.com/f/cases/19536
19559 GTMoldableDebugger>>updateBrowser should not call #update
https://pharo.fogbugz.com/f/cases/19559'.
self loadTogether: self script60348 merge: false.
self flushCaches.
@@ -1,6 +1,12 @@
commentForCurrentUpdate
^ '19551 GLMPopper should accept cmd L shortcut to remote popup and cancel text changes
https://pharo.fogbugz.com/f/cases/19551
^ '19557 GTDebugger should use FastTable in the object inspector for thisContext
https://pharo.fogbugz.com/f/cases/19557
19552 Cancelling changes by cmd L should not request user confirmation
https://pharo.fogbugz.com/f/cases/19552'
19561 Drag&Drop FastTable Example Does Not Work
https://pharo.fogbugz.com/f/cases/19561
19536 "Instance variables not read and written" critique false positive on classes with certain slots
https://pharo.fogbugz.com/f/cases/19536
19559 GTMoldableDebugger>>updateBrowser should not call #update
https://pharo.fogbugz.com/f/cases/19559'

0 comments on commit e40a6a8

Please sign in to comment.