Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does line count change so much from D2007 to D2010?

Our app at work is a huge project with over 3000 units, weighing in about 3.5 million lines of code.

...or at least it was when we were compiling it under D2007. We recently updated to D2010, and now if we run a full build, the line count finally stops at about 4.9 million. Same DPR, same code base, same everything, but the compiler's somehow running over about 40% more lines of code in the build cycle and nobody here knows why.

Just to make things more confusing, after building, we can go to Project -> Information in the IDE and it reports 3.8M lines. In D2007, the compiler dialog and the Project -> Information dialog reported the same number.

Anyone have any idea what's going on here?

like image 959
Mason Wheeler Avatar asked Feb 02 '10 23:02

Mason Wheeler


People also ask

Can Visual Studio count lines of code?

Lines of Source code - Indicates the exact number of source code lines that are present in your source file, including blank lines. This metric is available starting in Visual Studio 2019 version 16.4 and Microsoft.

How do you count the number of lines of code?

We can check all of the lines of code in a file or directory by the command cloc --by-file. Our folder contains two Vue files, so we're getting the count of both of them as well as the sum. Now, the most useful cloc command is to get the lines of code of the whole project.

How do you count the number of lines in a text file in Python?

Use readlines() to get Line Count This is the most straightforward way to count the number of lines in a text file in Python. The readlines() method reads all lines from a file and stores it in a list. Next, use the len() function to find the length of the list which is nothing but total lines present in a file.


2 Answers

Doesn't D2010 support generics? I think some of the libs have been replaced by generics, which could account for additional lines that appear to be parsed if it counts the "virtual" lines it's using.

like image 50
David Avatar answered Nov 13 '22 07:11

David


It looks like it is a bug. The correct line number is still reported under Project | Information. See Nick's answer to a similar question.

like image 34
Jim McKeeth Avatar answered Nov 13 '22 09:11

Jim McKeeth