My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 602: Upload code-review comments over ssh
28 people starred this issue and may be notified of changes. Back to list
Status:  Submitted
Closed:  Jul 28

Sign in to add a comment
Project Member Reported by, Jun 18, 2010
My script to give negative reviews to changes with improper commit messages[1] is working well.  As a next step, I'd like to pass changes through a tool like checkstyle[2] to verify that they meet my company's coding standards.

It'd be nice if the script could put in-line comments for where it finds problems (this line has tabs, spacing is incorrect here, etc).  Is this currently only possible with json?  I can probably make that work, is there any documentation?  If not, where can I find more about the format?  I can upload some documentation.

Doing this over ssh would be preferable, but I'm not sure about the interface.  Putting all the comments on the command line worries me.  Escaping the strings correctly is a huge pain, as I found in [1].


Jun 18, 2010
Maybe we should teach the review command a new --json-input
flag, that if passed causes it to read a structured JSON
object from stdin.  Then you can feed it your high level
commands and line-level comments in JSON:

  {message: "Seems OK",
   verified: "+1",
   comments: [
     {file: "src/README",
      line: 5,
      message: "Spelling error"},
     {file: "src/Makefile",
      line: 70,
      message: "warning: Don't use /bin/sh, use $(SHELL)"}

Status: Accepted
Jun 18, 2010
Project Member #2
+1, lgtm.  Would we deprecate the message and review score options from review command?  If not, do we need to handle duplicate/conflicting options?
Jun 18, 2010
No, I wouldn't deprecate the command line options.

So we'd need to have a check in the command that
makes sure you don't use the existing options at
the same time as this new --json-input option.
Feb 22, 2012
 Issue 1269  has been merged into this issue.
Feb 22, 2012
(No comment was entered for this change.)
Mar 7, 2013
Is this being actively worked on?
Mar 7, 2013
Project Member #7
Not sure about ssh, but with latest Gerrit master there is a REST API that allows to upload comments via http [1].

Jul 15, 2014
Link to change uploaded for this issue:
Jul 15, 2014
Project Member #9
(No comment was entered for this change.)
Status: ChangeUnderReview
Jul 28, 2014
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.11
Sign in to add a comment

Powered by Google Project Hosting