Add script to support per-line @suppress annotations in Phan
authorErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 13 Dec 2016 18:25:48 +0000 (10:25 -0800)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 13 Dec 2016 19:54:10 +0000 (11:54 -0800)
commit3becc477a971df20f5a9834c0c4342b9854bfa3c
tree1f7fcaeec55fd3031e575e8b2c7ee9b1c50c322a
parent5c6c93c76dd8d40f0df94d1e7f4d9e573489c7a2
Add script to support per-line @suppress annotations in Phan

Adds the functionality of per-line @suppress annotations. Phan already
supports per-class or per-method annotations, but does not have any
per-line support due to the PHP AST only returning comments that are
class/property/method level docblocks.

This is a bit of a hack, but get's the job done. Removes the
PhanTypeInvalidLeftOperand issue from blacklist and suppresses it
to demonstrate the supression works as expected.

Change-Id: I5066b3b431fb69175a711ee366e95f31c7c47639
languages/Language.php
tests/phan/bin/phan
tests/phan/bin/postprocess-phan.php [new file with mode: 0644]
tests/phan/config.php