MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / new

Method new

src/pyspector/_rust_core/src/issues.rs:44–66  ·  view source on GitHub ↗
(
        rule_id: String,
        description: String,
        file_path: String,
        line_number: usize,
        code: String,
        severity: Severity,
        confidence: String,
        rem

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected