File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ module.exports = {
2727 "always" ,
2828 footerMaxLineLength ,
2929 ] ,
30- // temporarily disabled because of https://github.com/nblockchain/conventions/issues/118
31- "footer-notes-misplacement" : [ RuleConfigSeverity . Disabled , "always" ] ,
30+ "footer-notes-misplacement" : [ RuleConfigSeverity . Error , "always" ] ,
3231 // temporarily disabled because of https://github.com/nblockchain/conventions/issues/125
3332 "footer-refs-validity" : [ RuleConfigSeverity . Disabled , "always" ] ,
3433 "header-max-length-with-suggestions" : [
Original file line number Diff line number Diff line change @@ -475,7 +475,6 @@ test("empty-wip-3", () => {
475475 expect ( emptyWIP3 . status ) . toBe ( 0 ) ;
476476} ) ;
477477
478- /* temporarily disabled rule because of https://github.com/nblockchain/conventions/issues/118
479478test ( "footer-notes-misplacement-1" , ( ) => {
480479 let commitMsgWithRightFooter =
481480 "foo: this is only a title" +
@@ -529,7 +528,17 @@ test("footer-notes-misplacement-4", () => {
529528 let footerNotesMisplacement4 = runCommitLintOnMsg ( commitMsgWithWrongFooter ) ;
530529 expect ( footerNotesMisplacement4 . status ) . not . toBe ( 0 ) ;
531530} ) ;
532- */
531+
532+ test ( "footer-notes-misplacement-5" , ( ) => {
533+ let commitMsgWithRightFooter =
534+ "foo: this is only a title\n\n" +
535+ "Bla bla blah[1]:\n\n" +
536+ "```\nSome error message with a [] in the first of its line\n[warn] some warning\n```\n\n" +
537+ "[1] http://foo.bar/baz" ;
538+ let footerNotesMisplacement5 = runCommitLintOnMsg ( commitMsgWithRightFooter ) ;
539+ console . log ( footerNotesMisplacement5 . stdout . toString ( ) ) ;
540+ expect ( footerNotesMisplacement5 . status ) . toBe ( 0 ) ;
541+ } ) ;
533542
534543/* temporarily disabled rule because of https://github.com/nblockchain/conventions/issues/125
535544test("footer-refs-validity1", () => {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export abstract class Plugins {
157157 let offence = false ;
158158
159159 if ( bodyStr !== null ) {
160- bodyStr = bodyStr . trim ( ) ;
160+ bodyStr = Helpers . removeAllCodeBlocks ( bodyStr ) . trim ( ) ;
161161 let seenBody = false ;
162162 let seenFooter = false ;
163163 let lines = bodyStr . split ( / \r ? \n / ) ;
You can’t perform that action at this time.
0 commit comments