This is an archive of the discontinued LLVM Phabricator instance.

Blacklist @mods and several other JSDoc tags from wrapping.
ClosedPublic

Authored by mprobst on Feb 28 2017, 2:49 AM.

Details

Summary

Limit the blacklisting to only apply when the tag is actually followed by a parameter in curly braces.

/** @mods {long.type.must.not.wrap} */

vs

/** @const this is a long description that may wrap. */

JSDoc tag reference here:
https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst created this revision.Feb 28 2017, 2:49 AM
djasper added inline comments.Feb 28 2017, 2:54 AM
lib/Format/Format.cpp
627 ↗(On Diff #89995)

I'd vote for making this "@\w*\ *{". We have seen incorrectly spelled version and such of this in the past.

mprobst updated this revision to Diff 89999.Feb 28 2017, 3:02 AM
  • Match \\w* for all JSDoc param tags.
mprobst marked an inline comment as done.Feb 28 2017, 3:03 AM
djasper accepted this revision.Feb 28 2017, 3:15 AM
djasper added inline comments.
lib/Format/Format.cpp
624 ↗(On Diff #89999)

Thinking again, I think the first "*" should probably be a "+", but not sure.

This revision is now accepted and ready to land.Feb 28 2017, 3:15 AM
mprobst marked an inline comment as done.Feb 28 2017, 3:16 AM
mprobst added inline comments.
lib/Format/Format.cpp
624 ↗(On Diff #89999)

Ah. I tried that initially, and fooled myself into thinking that didn't work. Done.

mprobst marked an inline comment as done.Feb 28 2017, 3:18 AM
This revision was automatically updated to reflect the committed changes.