Skip to content

requireDescriptionCompleteSentence: To detect and ignore HTML content#186

Merged
qfox merged 2 commits intojscs-dev:masterfrom
kepta:master
Mar 16, 2016
Merged

requireDescriptionCompleteSentence: To detect and ignore HTML content#186
qfox merged 2 commits intojscs-dev:masterfrom
kepta:master

Conversation

@kepta
Copy link
Copy Markdown
Contributor

@kepta kepta commented Jan 15, 2016

This rule has been flagging comments with html tags.
In this patch the html is sanitized with *** so that it doesn't
interfere with the regular regex tests. The htmlSanitizer function
is padding all strings with 'x.' so that RE_NEW_LINE_START_WITH_UPPER_CASE
doesnt fail. This will need to be improved after discussing with owner if he/she
thinks so.

Fixes jscs-dev/node-jscs#2056

This rule has been flagging comments with html tags.
In this patch the html is sanitized with *** so that it doesn't
interfere with the regular regex tests. The htmlSanitizer function
is padding all strings with 'x.' so that RE_NEW_LINE_START_WITH_UPPER_CASE
doesnt fail. This will need to be improved after discussing with owner if he/she
thinks so.

Fixes #2056
@kepta
Copy link
Copy Markdown
Contributor Author

kepta commented Jan 15, 2016

@zxqfox Let me know what you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Guess, no reason to remove this.

@qfox
Copy link
Copy Markdown
Member

qfox commented Jan 15, 2016

Looks good at all. Just need to fix nits.

@kepta
Copy link
Copy Markdown
Contributor Author

kepta commented Jan 15, 2016

I am sorry for the errors ommission, I will rebase.
Kinda newbie

@kepta
Copy link
Copy Markdown
Contributor Author

kepta commented Jan 15, 2016

@zxqfox, I wanted your review on the padding with of sanitized HTML with 'x.'
It's not the most elegant way, but I can't think of any other way to prevent RE_NEW_LINE_START_WITH_UPPER_CASE?

@qfox
Copy link
Copy Markdown
Member

qfox commented Jan 15, 2016

Oh, don't worry! I'm usually forgetting to check codestyle when going to foreign repo. Guess it's a common problem. 😼

@qfox
Copy link
Copy Markdown
Member

qfox commented Jan 15, 2016

the padding with of sanitized HTML with 'x.'

+1 to this solution as strong and simple.

Another could be parsing, analyzing, etc. It's a kinda complex problem that needs additional research.

Fixing omission of error statement and some further description

Fixes #2056
@kepta
Copy link
Copy Markdown
Contributor Author

kepta commented Jan 16, 2016

@zxqfox Does it look good now?
I can't see the build icon now.

@qfox
Copy link
Copy Markdown
Member

qfox commented Jan 16, 2016

Yeah, lgtm. Ready to merge?

@kepta
Copy link
Copy Markdown
Contributor Author

kepta commented Jan 17, 2016

Yes 👍

@kepta
Copy link
Copy Markdown
Contributor Author

kepta commented Jan 21, 2016

@zxqfox , friendly ping :)

qfox added a commit that referenced this pull request Mar 16, 2016
requireDescriptionCompleteSentence: To detect and ignore HTML content
@qfox qfox merged commit 1b6ad04 into jscs-dev:master Mar 16, 2016
qfox pushed a commit that referenced this pull request Mar 22, 2016
This rule has been flagging comments with html tags.
In this patch the html is sanitized with *** so that it doesn't
interfere with the regular regex tests. The htmlSanitizer function
is padding all strings with 'x.' so that RE_NEW_LINE_START_WITH_UPPER_CASE
doesnt fail. This will need to be improved after discussing with owner if he/she
thinks so.

Fixes jscs-dev/node-jscs#2056
Closes gh-186
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