conventional-commits icon indicating copy to clipboard operation
conventional-commits copied to clipboard

Add a validate command to CLI to validate commit messages

Open hussainweb opened this issue 3 years ago • 2 comments

Description

As discussed in https://github.com/ramsey/conventional-commits/issues/57#issuecomment-1191824713, this PR adds a command to validate a commit message

Motivation and context

More details in #57 and #25.

How has this been tested?

So far, I have added a few tests and mainly tested this manually. This PR is WIP and I will add more tests.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • [x] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING.md document.
  • [ ] I have added tests to cover my changes.

hussainweb avatar Jul 21 '22 19:07 hussainweb

I am not sure what to do with the phpstan error in the static analysis stage. FWIW, this breaks on the main branch as well. If I find a fix, I'll submit another PR for that.

hussainweb avatar Jul 21 '22 19:07 hussainweb

Hello,

I'm really interested with this PR, @hussainweb any news ? :)

Thanks

Whax avatar Aug 16 '22 11:08 Whax

@ramsey, I have found why there is an error with PHPStan and created #64. Can you please take a look?

hussainweb avatar Oct 03 '22 21:10 hussainweb

I'm happy to see most relevant checks are passing now. More tests and docs next. ~I can't do that today though. Maybe tomorrow or later this week.~

hussainweb avatar Oct 03 '22 22:10 hussainweb

Codecov Report

Merging #58 (b937c51) into main (a9a668b) will increase coverage by 0.05%. The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #58      +/-   ##
============================================
+ Coverage     98.71%   98.76%   +0.05%     
- Complexity      286      296      +10     
============================================
  Files            37       39       +2     
  Lines           779      813      +34     
============================================
+ Hits            769      803      +34     
  Misses           10       10              
Impacted Files Coverage Δ
...ntionalCommits/Console/Command/ValidateCommand.php 100.00% <100.00%> (ø)
...tionalCommits/Console/Question/MessageQuestion.php 100.00% <100.00%> (ø)

codecov[bot] avatar Oct 03 '22 22:10 codecov[bot]

Cool. Codecov is happy. I'll work on the docs tomorrow.

hussainweb avatar Oct 03 '22 22:10 hussainweb

@ramsey, I completed all the tasks and requesting a review now. Thanks!

hussainweb avatar Oct 05 '22 01:10 hussainweb