#cargo-subcommand #prefix #target #fixed #check #manifest-path #prefix-path

app cargo-ensure-prefix

Cargo subcommand to check that all target files have a fixed prefix

5 releases

0.1.7 Nov 21, 2021
0.1.6 Mar 8, 2020
0.1.4 Sep 2, 2019
0.1.3 Jan 6, 2019
0.1.1 Dec 31, 2018

#510 in Cargo plugins

BSD-3-Clause

15KB
212 lines

cargo-ensure-prefix

A cargo subcommand to check that all target files have a fixed prefix. This may be useful for licence headers, ensuring particular clippy lints are en/disabled, or maybe some other things too.

crates.io Documentation Build Status

Usage

cargo-ensure-prefix 

USAGE:
    cargo-ensure-prefix [FLAGS] [OPTIONS] --manifest-path <manifest-path> --prefix-path <prefix-path>

FLAGS:
        --all        
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --manifest-path <manifest-path>    
    -p, --package <package>...             
        --prefix-path <prefix-path>

Wildcard matching

Any byte will be accepted where a character \x1A is present in the prefix file. e.g. you could match any set of 4-digit years with a prefix file with contents: Copyright \x1A\x1A\x1A\x1A. Note that this is byte-wise matching, not character-wise matching.

Dependencies

~52MB
~1M SLoC