Lines of code for sources other then JAVA

  • Stefan Lecho
    Stefan Lecho


    I have successfully used Metrics on different Java projects. The project on which I'm currently working is based on the Spring framework. As a result of this usage, the project contains a lot of xml files. Although these files are primarily used for configuration, I consider them as being part of the "source code" of the project.

    Is there a way to configure Metrics such that the "Total Lines of Code" metric includes the number of lines in all project XML files ?

    Regards, Stefan Lecho.

    • Brian Brooks
      Brian Brooks

      I am also interested in the answer to Stefan's question.  Our project contains Hibernate mapping files hbm.xml, Spring applicationContext*.xml, and Java Server Pages *.jsp files. 

      In the programmer's guide, I see extensions documented.  However, this documentation seems to only discuss how to add additional measurement algorithms rather than a way to support new types of source files.

      Is there any way to add lines of code counters for other source types?


    • G.B.

      no. line of code is base on language scanner. most of this plugin is based on AST and java grammar.