Expand description
Bullshitdetector - Fast pattern detection for magic numbers and code smells
This crate provides blazing-fast regex-based detection of hardcoded values, magic numbers, and common code smells in source code.
§Quick Start
use bullshitdetector::{DetectConfig, scan_code};
let code = r#"
if confidence > 0.85 {
do_something();
}
"#;
let config = DetectConfig::default();
let alerts = scan_code(code, &config).unwrap();
for alert in alerts {
println!("Found {} at line {}", alert.issue_type, alert.location.0);
}Modules§
Structs§
- Bullshit
Alert - Bullshit alert with confidence and suggestions
- Detect
Config - Detection configuration
Enums§
- Bullshit
Type - Bullshit alert types
Functions§
- scan_
code - Scan code for bullshit patterns using regex