Hi,

Nice project.

You should probably take into consideration that FM3PropertyDescription is an object representing a property. For example:
   class := FAMIXClass new numberOfLinesOfCode: 42.
   loc := class mooseDescription allAttributes detect: [ :each | each name = #numberOfLinesOfCode ].
   class mmGetProperty: loc
   ==> 42

A possible route would be to add extra constraints (for example related to the type) to this object.

Another option would be to have the numberOfLinesOfCode method return a linesOfText unit. This implies that code like:
   group inject: 0 into: [:sum :each | sum + each numberOfLinesOfCode]
would break. We can live with this and fix the breaking places, but it should be a thing to consider.

Cheers,
Doru

 


On Mon, Mar 31, 2014 at 11:32 AM, Guillaume Larcheveque <guillaume.larcheveque@gmail.com> wrote:
Currently, there is no object in my knowledge to represent a metric in Moose. I would like to have this kind of object to ask it for example the name of the metric, a description, the associated selector...

Ideally this object should have the same behaviour than Unit framework; it should resolve units for example if you divide number of bugs by lines of code, you should get numberOfBugs.linesOfCode^(-1); then if you multiply this by line of code to get the estimated average value you get numberOfBugs...

If I missed an existing implementation close to this, thank you very much in advance to indicate me otherwise I will create a project for this and you are welcome to contribute.

--
Guillaume Larcheveque


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
www.tudorgirba.com

"Every thing has its own flow"