[WIP] Potential whole-file fix for file modification when commenting

Review Request #10219 — Created Oct. 11, 2018 and discarded — Latest diff uploaded




NOTE: Very WIP, posted mostly for feedback / discussion. The current
change is not ideal, and will be different.

The Bug

According to the previous code "Some tools report general file errors as
being on line 0" It handles this special case by bumping up all
"first_line" arguments to 1. The _is_modified() method will then check
if any of the diff chunks report line 1 is modified. This will cause
users who have "comment on modified files" disabled to not get any
comments on files which do not have the first line modified. This
problem is caused in part by is_modified() only handling single lines
and ignoring its num_lines parameter.

The current patch adds a new is_any_modified() which is called instead
of any multiple-line checks in the comment() method when first_line
is 0, which simply checks if any hunk is not 'equal'.

Currently testing on my nyc plugin