Snapping file_line to 1, since some tools report general errors as line 0

Review Request #10093 — Created July 18, 2018 and submitted

Information

ReviewBot
master
57dc9c5...

Reviewers

Snapping file_line to 1, since some tools report general errors as line 0.

NOTE: We don't do any any math with num_lines since this is mainly to handle general file errors (maybe there should be a "general comment" for files as well as review requests?).
NOTE: "Comment on unmodified code" will need to be selected if line 1 wasn't changed.

Before change -> error displaying diff
After change -> Comments on line 1 if allowed, otherwise passes.

misery
  1. 
      
  2. Yeah, nice.... but I really like to see a "general comment"-feature in review bot settings as this is just a (sometimes not working) work-around for me. :-)

    1. I'm actually working on adding a "general_comment" method to the Review API in reviewbot-worker, we'll see how it goes. But general comments have review-granularity, meaning you can't make a "general comment" on a file (AFAIK). Personally, I think complaining about the first line of a file about what the file is missing is a better diagnostic than making a general comment and listing which files were missing what things.

      Either way though, I'm sure someone has or will run into this issue so a positive bug fix nonetheless 😃

    2. Review posted for general_comment at https://reviews.reviewboard.org/r/10095/

  3. 
      
jcannon
  1. bump

  2. 
      
jcannon
  1. bump

  2. 
      
david
  1. Ship It!
  2. 
      
jcannon
Review request changed
Status:
Completed
Change Summary:
Pushed to release-1.0.x (90e75f9)