Counting Lines of code - quality metircs
I'm taking the lines of code 开发者_StackOverflow中文版for my Java project , the project contains lot of XML files too. Now my question is when calculating lines of code. Do i need to consider XML lines of code as well? Please help
IMO counting lines of code is a terrible quality metric. I consider it a great day when I remove hundreds of lines of code.
However answering your question. if your XML is handwritten and represents metadata that configures your application then yes I'd consider it to be code.
It depends if the xml is representing data or if it is a DSL of some sort.
If it is just data then I'd ignore it from a LOC metric. However, if it is something like a NAnt script which is essentially programming in xml then I would be tempted to count it as LOC.
精彩评论