[Pharo-dev] [Bug] In ClassDescription>>#linesOfCode
marcus.denker at inria.fr
Fri Nov 15 08:18:03 EST 2013
On 15 Nov 2013, at 14:07, Roberto Minelli <roberto.minelli at usi.ch> wrote:
> I looked at the implementation of #linesOfCode of ClassDescription. It is actually wrong, a correct version should be:
> "An approximate measure of lines of code. Includes comments, but excludes blank lines."
> | lines |
> lines := self localMethods inject: 0 into: [:sum :each | sum + each linesOfCode].
> ^ self isMeta not
> ifTrue: [lines]
> ifFalse: [lines + self class linesOfCode]
and after fixing, Pharo3 shrinks from 444kLoc to 368KLoc :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev