keyhog-scanner 0.5.40

keyhog-scanner: high-performance SIMD-accelerated secret detection engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Docstring opened by assignment must not be flagged documentation.

use keyhog_scanner::context::documentation_line_flags;

#[test]
fn context_docstring_assignment_not_documentation() {
    let lines = vec![r#"x = """runtime doc""""#];
    let flags = documentation_line_flags(&lines);
    assert!(
        !flags[0],
        "assignment-prefixed triple-quoted string is code, not documentation"
    );
}