commitguard 0.2.0

A commitlint implementation in Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
commit = { SOI ~ header ~ body? ~ footer? ~ NEWLINE* ~ EOI }

header = ${ commit_type ~ scope_with_braces? ~ "!"? ~ ":" ~ WHITE_SPACE+ ~ subject }

commit_type = @{ ASCII_ALPHANUMERIC+ }

scope = @{ ASCII_ALPHANUMERIC+ }
scope_with_braces = _{ "(" ~ scope ~ ")" }

subject = @{ text_without_newline }

body = { NEWLINE{2, } ~ (!footer ~ ANY)+ }

footer = @{ NEWLINE{2, } ~ text_without_newline ~ EOI }

text_without_newline = { (!NEWLINE ~ ANY)+ }