swt 3.1.1

🍬 Sweet: A blazing-fast code health and architecture analyzer.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Analysis exclusion logic based on @sweetignore comments.

/// Checks if a file should be ignored globally via a top-level @sweetignore.
#[must_use]
pub fn is_file_ignored(content: &str) -> bool {
    content
        .lines()
        .take(10)
        .any(|line| line.contains("@sweetignore"))
}

/// Checks if a specific line or block is marked for exclusion.
#[must_use]
pub fn is_line_ignored(line: &str) -> bool {
    line.contains("@sweetignore")
}