develooper Front page | perl.perl5.porters | Postings from May 2016

[perl #127993] Version control conflict markers

Thread Previous | Thread Next
From:
l.mai@web.de via RT
Date:
May 21, 2016 08:27
Subject:
[perl #127993] Version control conflict markers
Message ID:
rt-4.0.18-7166-1463819242-1382.127993-15-0@perl.org
On Tue Apr 26 00:04:31 2016, eda@waniasset.com wrote:
> 
> This is a bug report for perl from eda@waniasset.com,
> generated with the help of perlbug 1.40 running under perl 5.22.1.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> Sometimes Perl code will appear to compile when there are git conflict
> markers like <<<<<<< in the file.  Or sometimes it gives an error but
> one that doesn't make it clear what the problem really is.
> 
> I suggest adding explict detection of <<<<<<< ======= >>>>>>> as
> tokens and making them give an immediate error which stops parsing.
> As usual, this would not catch 100% of all such errors (the conflict
> markers might be inside a here-document, and so on) but it would
> be a great help nonetheless.
> 
> For C and C++ programs, the latest gcc now reports
>    test.c:3:1: error: version control conflict marker in file
> It would be great for perl's error reporting to be as good as C.

Patch attached. I followed gcc's example:

+   Specifically, we consider a run of 7 '<', '=' or '>' characters
+   at the start of a line as a patch conflict marker.

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=127993

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About