Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: classes for format checking #119

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

thekaveman
Copy link
Member

@thekaveman thekaveman commented Oct 21, 2024

  • 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

Copy link

github-actions bot commented Oct 21, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  conventional_pre_commit
  format.py
  hook.py
  output.py 70
Project Total  

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

@thekaveman thekaveman changed the title Refactor: format Refactor: classes for format checking Oct 21, 2024
@thekaveman thekaveman force-pushed the refactor/format branch 2 times, most recently from e9301f5 to 7278451 Compare October 21, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promote usage of default_install_hook_types
2 participants