chectarine

Crates.iochectarine
lib.rschectarine
version0.1.0
sourcesrc
created_at2023-08-14 14:43:20.803288
updated_at2023-08-14 14:43:20.803288
descriptionContent checker for source code & other text files
homepage
repositoryhttps://github.com/Xion/chectarine
max_upload_size
id944247
size119,694
Karol Kuczmarski (Xion)

documentation

README

chectarine   Build Status Latest Version

Content checker for source code & other text files

Status: EXPERIMENTAL


$ cargo install chectarine

Example .chectarine.json5 config:

{
    {
        files: "src/**/*.rs",
        require: {
            text: "// Copyright",
            message: "A copyright notice is required on each file"
        },
    },
    {
        files: "crates/*/Cargo.toml",
        require: [
            {
                regex: "^\\s*publish\\s*=\\s*false",
                message: "Internal crates should be marked as private",
                suggestion: "Add `publish = false` to [package] section in the manifest"
            }
        ]
    },
    {
        files: [
            "src/**/.rs",
            "!src/**/*_test.rs",
        ],
        forbid: {
            text: "#[test]",
            message: "Tests should be placed in separate files"
        }
    }
}

Place it in the root directory of a project and run:

$ chectarine .
Commit count: 0

cargo fmt