Crates.io | chectarine |
lib.rs | chectarine |
version | 0.1.0 |
source | src |
created_at | 2023-08-14 14:43:20.803288 |
updated_at | 2023-08-14 14:43:20.803288 |
description | Content checker for source code & other text files |
homepage | |
repository | https://github.com/Xion/chectarine |
max_upload_size | |
id | 944247 |
size | 119,694 |
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 .