slopguard-cli 0.1.42

CLI tool to catch AI-generated code patterns via static analysis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fs::read_to_string;
use std::path::Path;

/// The GitLab template persists the signing key through an untracked-only
/// cached path, so a key committed to the repository is never installed.
#[test]
fn gitlab_template_persists_cache_key_untracked_only() {
    let path = Path::new(env!("CARGO_MANIFEST_DIR"))
        .join("..")
        .join("ci")
        .join("slopguard.gitlab-ci.yml");
    let template = read_to_string(path).expect("read GitLab CI template");

    assert!(template.contains("      - .cache/slopguard-key/"));
    assert!(template.contains("after_script"));
    assert!(template.contains("git ls-files"));
}