Hi Simon,
While checking some packaging today, I noticed that
the Kernel package is dirty because Mondrian seems to override
ClassDescription>>numberOfLinesOfCode
I added ClassDescription>>numberOfLinesOfCode because there was not such support in
Pharo. Apparently, there is one. The Mondrian implementation of numberOfLinesOfCode can be
safely removed.
Mondrian impl:
numberOfLinesOfCode
^ self methods inject: 5 into: [ :sum :compiledMethod |
(compiledMethod propertyValueAt: #numberOfLinesOfCode)
ifNil: [ compiledMethod
propertyValueAt: #numberOfLinesOfCode
put: compiledMethod getSource lineCount ].
sum + (compiledMethod propertyValueAt: #numberOfLinesOfCode) ]
I am not sure I understand the purpose of the override. Caching? Why is there a 'self
methods inject: 5' at the beginning?
Because a class definition has 5 lines of code.
And, do we absolutely need this override? :)
Before it was just a non-overriden extension. It has changed now.
I committed Mondrian-AlexandreBergel.592
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.