Skip to content

Conversation

@xeptore
Copy link
Contributor

@xeptore xeptore commented Mar 22, 2021

There's a bug in body-maker module which removes the leading-empty-line from the commit body message when commitlint's body-leading-blank option is set to always. Previously, the leadingBlankFilter filter function works fine and it prepends the commit body with an empty new line correctly. But, when its output - which is the empty-line-prepended commit body, gets passed into maxLineLengthFilter function, it removes the leading empty line (\n) that was prepended by leadingBlankFilter as it is using the word-wrap package. Finally, the output of this chain, does not have the leading-empty-new-line which is required for commitlint, and it throws an error on regarding this. Also, as leading empty new line characters does not affect maximum length of any line, there should not be any problem to apply leading empty new line after splitting body message into multiple line, if necessary.
This merge request fixes this issue.

@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #8 (0545208) into master (d48c643) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #8   +/-   ##
=======================================
  Coverage   78.30%   78.30%           
=======================================
  Files          12       12           
  Lines         355      355           
  Branches       81       81           
=======================================
  Hits          278      278           
  Misses         76       76           
  Partials        1        1           
Flag Coverage Δ
unittests 78.30% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/prompts/body-maker.ts 100.00% <100.00%> (ø)

@martinmcwhorter martinmcwhorter merged commit 8829ed9 into martinmcwhorter:master Mar 29, 2021
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.

2 participants