After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779359 - IdeDiagnostic: set the location from range when unset
IdeDiagnostic: set the location from range when unset
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-28 08:16 UTC by Giovanni Campagna
Modified: 2017-02-28 21:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IdeDiagnostic: set the location from range when unset (1.16 KB, patch)
2017-02-28 08:16 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2017-02-28 08:16:55 UTC
The gnome code assistance plugin creates an IdeDiagnostic object
with no location, and then sets one or more IdeSourceRange's on it.

We can assume that the first source range corresponds to where the
problem is, and set the location based on it. Without a location,
the diagnostic will be dropped on the floor, which is not nice.
Comment 1 Giovanni Campagna 2017-02-28 08:16:57 UTC
Created attachment 346888 [details] [review]
IdeDiagnostic: set the location from range when unset
Comment 2 Christian Hergert 2017-02-28 21:52:09 UTC
Review of attachment 346888 [details] [review]:

LGTM, thanks!
Comment 3 Christian Hergert 2017-02-28 21:52:27 UTC
Attachment 346888 [details] pushed as 4b2bf5a - IdeDiagnostic: set the location from range when unset