conventional-pre-commit icon indicating copy to clipboard operation
conventional-pre-commit copied to clipboard

Refactor: classes for format checking

Open thekaveman opened this issue 1 year ago • 1 comments

  • Refactors the conventional_pre_commit.format module to use classes instead of the top-level functions
  • All existing behavior is now available on instances of either the Commit or ConventionalCommit class
  • Refactored all internal code to use these classes instead
  • Top-level conventional_pre_commit.format.is_conventional() still exists with the same signature

Finally, this PR introduces the long requested option to skip merge commits, e.g. Merge branch 'dev' into 'main' with a new flag --skip-merges, implemented on the Commit class.

ht @zlodes #103

Updates the documentation to close #104

thekaveman avatar Oct 21 '24 21:10 thekaveman

Coverage report

Click to see where and how coverage changed
FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  conventional_pre_commit
  format.py
  hook.py
  output.py 77-78
Project Total  

This report was generated by python-coverage-comment-action

github-actions[bot] avatar Oct 21 '24 21:10 github-actions[bot]