[webkit-reviews] review granted: [Bug 182405] prepare-ChangeLog gets confused about Python docstrings that contain the word "class" or "def" : [Attachment 332909] Patch and tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 5 10:55:59 PST 2018


JF Bastien <jfbastien at apple.com> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 182405: prepare-ChangeLog gets confused about Python docstrings that
contain the word "class" or "def"
https://bugs.webkit.org/show_bug.cgi?id=182405

Attachment 332909: Patch and tests

https://bugs.webkit.org/attachment.cgi?id=332909&action=review




--- Comment #4 from JF Bastien <jfbastien at apple.com> ---
Comment on attachment 332909
  --> https://bugs.webkit.org/attachment.cgi?id=332909
Patch and tests

View in context: https://bugs.webkit.org/attachment.cgi?id=332909&action=review

r=me

> Tools/Scripts/prepare-ChangeLog:1798
> +	   next unless /^(\s*)([^#].*)$/; # Skip non-indented lines that begin
with a comment.

I don't think this is accurate: the regex matches any line that contains code
(starts with spaces, contains a non-hash character, and then anything). It'll
stop if there's an empty line (potentially indented) as well as a comment-only
line (potentially indented).

> Tools/Scripts/prepare-ChangeLog:1827
> +	   next if /^\s*[#'"]/; # Skip indented and non-indented lines that
begin with a comment or string literal (includes docstrings).

That won't capture multi-line docstrings though. I guess it's a net improvement
over what was there before, so only fix if you think it matters :)


More information about the webkit-reviews mailing list