Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dburriss committed Jun 24, 2023
1 parent 24daa05 commit 6b4c952
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/metrics/cognitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ impl Cognitive for TsxCode {
js_cognitive!(Tsx);
}


impl Cognitive for JavaCode {
fn compute(
node: &Node,
Expand Down Expand Up @@ -1738,22 +1737,18 @@ mod tests {

#[test]
fn java_no_cognitive() {
check_metrics::<JavaParser>(
"int a = 42;",
"foo.java",
|metric| {
insta::assert_json_snapshot!(
metric.cognitive,
@r###"
check_metrics::<JavaParser>("int a = 42;", "foo.java", |metric| {
insta::assert_json_snapshot!(
metric.cognitive,
@r###"
{
"sum": 0.0,
"average": null,
"min": 0.0,
"max": 0.0
}"###
);
},
);
);
});
}

#[test]
Expand Down Expand Up @@ -1868,7 +1863,6 @@ mod tests {
);
}


#[test]
fn java_switch_expression() {
check_metrics::<JavaParser>(
Expand Down Expand Up @@ -1918,4 +1912,4 @@ mod tests {
},
);
}
}
}

0 comments on commit 6b4c952

Please sign in to comment.