(
rule_id: String,
description: String,
file_path: String,
line_number: usize,
code: String,
severity: Severity,
confidence: String,
rem
| 42 | #[new] // This is the constructor exposed to Python |
| 43 | #[pyo3(signature = (rule_id, description, file_path, line_number, code, severity, confidence, remediation, cwe=None))] |
| 44 | pub fn new( |
| 45 | rule_id: String, |
| 46 | description: String, |
| 47 | file_path: String, |
| 48 | line_number: usize, |
| 49 | code: String, |
| 50 | severity: Severity, |
| 51 | confidence: String, |
| 52 | remediation: String, |
| 53 | cwe: Option<String>, |
| 54 | ) -> Self { |
| 55 | Self { |
| 56 | rule_id, |
| 57 | description, |
| 58 | file_path, |
| 59 | line_number, |
| 60 | code: code.trim().to_string(), |
| 61 | severity, |
| 62 | confidence, |
| 63 | remediation, |
| 64 | cwe, |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | /// Creates a unique, stable fingerprint for an issue. |
| 69 | pub fn get_fingerprint(&self) -> String { |
nothing calls this directly
no outgoing calls
no test coverage detected