Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java LoC metric #694

Merged
Merged
Prev Previous commit
Next Next commit
Remove println
  • Loading branch information
dburriss committed Mar 22, 2022
commit 210824405e017aef6bddadda5bd88445abaacdd4
5 changes: 1 addition & 4 deletions src/metrics/loc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,6 @@ impl Loc for JavaCode {

let (start, end) = init(node, stats, is_func_space, is_unit);
let kind_id : Java = node.object().kind_id().into();
println!("KINDID {}", kind_id.to_string());
match kind_id {
Program => {}
Comment => {
Expand All @@ -845,7 +844,6 @@ impl Loc for JavaCode {
| ThrowStatement
| TryStatement
| UpdateExpression => {
println!(" lloc increased by {}", kind_id.to_string());
stats.logical_lines += 1;
}
For => {
Expand All @@ -856,7 +854,6 @@ impl Loc for JavaCode {
{
// handle for(int i:arr)
// otherwise the statements in the for are counted elsewhere
println!(" lloc increased by {}", kind_id.to_string());
stats.logical_lines += 1;
}
}
Expand Down Expand Up @@ -2228,7 +2225,7 @@ mod tests {
loc,
[
(sloc, 11, usize), // The number of lines is 11
(ploc, 6, usize), // The number of code lines is 5
(ploc, 6, usize), // The number of code lines is 6
(lloc, 1, usize), // The number of statements is 1
(cloc, 5, usize), // The number of comments is 5
(blank, 1, usize) // The number of blank lines is 1
Expand Down