-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Is your feature request related to a problem? Please describe.
- When making a commit through koji, but you forget to run
git addor add the-aflag, you won't know until you're done writing the commit message. After that, you'd have to go through the whole prompt all over again. - Some might not like the summary, scope or body being too long. Of course you could use other tools for validating the commit message, but then you'd have the same annoyance as in the first problem.
Describe the solution you'd like
An optional validator system should be added, which can handle various validations.
The necessary validations to have:
- Maximum size of the scope, summary and/or body
- Checking if any files are staged
These validators can be enabled, disabled and configured (perhaps it would be good to have a system for the "level" of the problem, as in only warning or blocking) through the configuration.
I'm not sure to which extend this is possible, but nice would be a good integration with the interactive prompts, showing the warning/error but also coloring the part of the entered value that's exceeding the configured maximum.
Describe alternatives you've considered
Using different tools: After the other tools fail, you'd have to re-run koji and re-enter every field again. Maybe it'd be possible to add a --retry flag to koji, but this would add complexity (where would the values of the last run be saved?) and I think koji should be able to handle those things by itself.
Additional context