yes there are many ways
but I don't see any reasonable argument for numberOfLinesOfCode to be inferior to numberOfLinesOfCodWithMorethanOneCharacter
nicolas
On 01/01/2017 16:05, stephan wrote:
There are many ways to calculate the number of lines of code, so I don't expect them to be consistent. Computing from the sourceText is not necessarily any better, especially in the case of smalltalk. The sourceText of a smalltalk class is not in a form where a smalltalker would find it easy to predict the #loc, or where she would find it recognizable as a smalltalk class (missing package and superclass)
e.g. Smalltalk::Job CIV#jobAnnouncer block currentValue min max title children isRunning parent process ...
I would either test-drive the different ways of calculating #loc describing what exactly we mean, and making those different calculations available, or not touch it.
There are a.o.
- count empty lines
- count empty lines beyond end
- count empty lines before class start
- count license comment
- reduce multiple empty lines to one
- count method separators
- wrap
- word-wrap
- ignore comments
- ignore multi-line comments
- map instance variables from string to separate lines
- package name
Stephan
On 01/01/17 13:18, Nicolas Anquetil wrote:
Anne spotted a bug in numberOfLinesOfCode.
...
So I propose to remove FAMIXBehaviouralEntity>>numberOfLinesOfCode
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev