Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Add commit rules #13

Closed
Arthelon opened this issue Jun 4, 2020 · 1 comment
Closed

Add commit rules #13

Arthelon opened this issue Jun 4, 2020 · 1 comment
Assignees

Comments

@Arthelon
Copy link
Contributor

Arthelon commented Jun 4, 2020

  • Rules are going to be implemented as a list of rule configuration objects which contain the following fields
    • name (rule ID), valid boolean, check function
    • Check function takes the parsed commit message as an argument and might return an object like this: { valid: false, data: { ... } }
    • A CommitDiagnosis containing the check data is created for invalid commit diagnoses.
  • Each rule's score is only added to the commit's overall score if the rule check is valid
@Arthelon
Copy link
Contributor Author

Arthelon commented Jun 5, 2020

List of default rules:

  • subject-max-length (subject <= 50 characters)
  • subject-min-length (subject >= 10 characters)
  • subject-capitalize-first (capitalize first letter of the subject)
  • subject-no-end-period (no period at the end of subject)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants