-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Functions that are wrappers around assert statements are likely to be marked by necessist, but are always false positives. For example, in rust:
#[test]
fn test_something() {
assert_normalizes("abcd", "def1");
}
fn assert_normalizes(sig_hex: String, expected_hex: String) {
let sig = decode(&sig_hex).unwrap();
let normalized_sig = normalize_ecdsa(sig).unwrap();
assert_eq!(encode(&normalized_sig), expected_hex);
}Removal of assert_normalizes should not be important. Heuristic for the improvement would be to not mark functions that have standard assert statements and do not modify global values.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels