Skip to content

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Oct 13, 2018

Fixes: #24

var failed = false
for (let i = 0; i < parsed.body.length; i++) {
const line = parsed.body[i]
// Skip quoted lines, e.g. for riginal commit messages of V8 backports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

riginal->original

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richardlau thanks, done!

if (line.startsWith(' '))
continue
// Skip lines with URLs.
if (line.match(/https?:\/\//))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think RegExp#test would be better here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thefourtheye There’s 0 difference here, right? Anyway, done!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, there will be no difference. I was going for idiomatic code 🙂

for (let i = 0; i < parsed.body.length; i++) {
const line = parsed.body[i]
// Skip quoted lines, e.g. for original commit messages of V8 backports.
if (line.startsWith(' '))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this have four space characters? The test actually tests with four space characters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure … switched to 4 spaces for now, yes

@lundibundi
Copy link
Member

lundibundi commented Nov 2, 2018

@thefourtheye, @joyeecheung, @addaleax I think this can be landed, isn't it?
(Also, Fixes/Closes #24 should probably be added)

@joyeecheung
Copy link
Member

@lundibundi Yes, I'll push the button

@joyeecheung joyeecheung merged commit 029fc30 into nodejs:master Nov 2, 2018
richardlau pushed a commit to richardlau/core-validate-commit that referenced this pull request Dec 15, 2018
richardlau added a commit to richardlau/core-validate-commit that referenced this pull request Dec 15, 2018
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.

5 participants