#7 Brace placement affecting LOC

v1.0 (example)
open
nobody
None
1
2013-09-10
2013-09-10
No

Brace placement seems to affect the "lines of code" count. For example, the following:

public static void main(final String[] the_args)
{
if (the_args.length > 0)
{
System.err.println("Invalid number of arguments.");
System.exit(1);
}
}

is counted as 5 lines of code, whereas:

public static void main(final String[] the_args) {
if (the_args.length > 0) {
System.err.println("Invalid number of arguments.");
System.exit(1);
}
}

is counted as 4 lines of code. Really, they probably should both be 3 lines of code because braces on lines by themselves shouldn't count as lines...

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks