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 697136 - external tools: link parser fails to linkify when line number not followed by whitespace
external tools: link parser fails to linkify when line number not followed by...
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-02 19:10 UTC by Adam Dingle
Modified: 2019-03-23 20:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (2.15 KB, patch)
2013-04-29 14:43 UTC, Adam Dingle
committed Details | Review

Description Adam Dingle 2013-04-02 19:10:11 UTC
Many programs output information in the format

filename:line_number:text

and so it's great that the external tools link parser can parse this and generate links.  Unfortunately, it fails to generate a link if the text does not begin with whitespace.

To see this, create an external tool which runs this command:

grep -R -n sort /path/to/gedit/sources --include='*.c'

In the output, most lines get linkified, but lines without leading whitespace don't, e.g.

/path/to/gedit/sources/gedit-window.c:1011:get_languages_sorted_by_section (GeditWindow *window)
Comment 1 Ignacio Casal Quinteiro (nacho) 2013-04-02 19:46:56 UTC
Maybe you can provide an unit test for this?

See: https://git.gnome.org/browse/gedit/tree/plugins/externaltools/tools/linkparsing_test.py
Comment 2 Adam Dingle 2013-04-29 14:43:29 UTC
Created attachment 242804 [details] [review]
fix

Here's a test case along with a fix for the bug.
Comment 3 Ignacio Casal Quinteiro (nacho) 2013-04-29 14:44:53 UTC
Review of attachment 242804 [details] [review]:

Looks good.
Comment 4 Adam Dingle 2013-04-29 14:46:41 UTC
Great.  Can you push this?  I don't yet have commit rights in GNOME (though I should ask for them soon!)
Comment 5 Ignacio Casal Quinteiro (nacho) 2013-04-29 14:49:01 UTC
Please ask for the account and point to us if you need somebody to give some agreement.