3 ms·
The API of your configuration could use some work. Have you looked at the validations present in JSON Schema[1]? Instead of { "commit": { "message
by tyre 11y ago
The API of your configuration could use some work. Have you looked at the validations present in JSON Schema[1]?
Instead of
{
"commit": {
"message_must_be_imperative_tense": true,
"message_must_include_prefix": {
"prefixes": ["feat", "fix", "docs", "refactor"],
"require_after_prefix": " "
}
}
}
Something like:
{
"commit": {
"message": {
"imperative": true,
"prefixes": ["feat ", "fix ", "docs ", "refactor "]
}
}
}
[1] http://json-schema.org/latest/json-schema-validation.html http://json-schema.org/latest/json-schema-validation.html
- gitmagic 11y agoThanks for the feedback. The JSON structure is something we will refine, and right now we wanted to have very explicit rules and not too complex configuration settings. But we will evaluate this along the way, and I like your example :)
- fiatjaf 11y agoI like "message_must_be_imperative_tense" much more. It is much clearer. it doesn't hurt to be so big since you're going to set it up just once.