New issue
Advanced search Search tips

Issue 832193 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Clarify and improve the Tricium Results data Comment format

Project Member Reported by qyears...@chromium.org, Apr 12 2018

Issue description

From discussion with maruel@ in chat:

 - Most text editors use 1-based indexes for both line and column, so StartChar/EndChar should also be 1-based (up for debate, maybe, but anyway the API should be clear).
 - StartLine == 0 always means file-level comment. If EndLine, StartChar, or EndChar are not zero, this is considered invalid.
 - EndLine must be >= StartLine, otherwise it's considered invalid.
 - EndChar must be >= StartChar, otherwise it's considered invalid.

Ideally, if an analyzer produces an invalid comment range, this should be surfaced to the analyzer owner. (Perhaps, though, while posting the comment, Tricium could fix the range and log a warning.)

 
Labels: Hotlist-GoodFirstBug
Summary: Clarify and improve the Tricium Results data Comment format (was: Change and clarify Tricium Results data Comment format)
Owner: diegomtzg@google.com
Status: Assigned (was: Available)
Components: Infra>Platform>Tricium
Components: -Infra>CodeAnalysis
Labels: -Tricium
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/ede200b53b8aa53ebc91b98a6d3f998daa4c8b1e

commit ede200b53b8aa53ebc91b98a6d3f998daa4c8b1e
Author: Lann Martin <lannm@google.com>
Date: Tue Jul 10 23:06:25 2018

[tricium] Document Data.Comment position numbering bases

Tricium passes these positions through to the Gerrit API's CommentRange
entity, which documents line positions as 1-based and character
positions as 0-based:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#comment-range

Bug:  832193 
Change-Id: Ibc395b3920a83ddeb6c7c435a510b862e5fdbc86
Reviewed-on: https://chromium-review.googlesource.com/1132426
Commit-Queue: Lann Martin <lannm@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/ede200b53b8aa53ebc91b98a6d3f998daa4c8b1e/go/src/infra/tricium/api/v1/data.proto

Owner: ----
Status: Available (was: Assigned)
Owner: lannm@google.com
Status: Fixed (was: Available)

Sign in to add a comment