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

[perl #127993] Version control conflict markers

Thread Previous | Thread Next
From: via RT
May 21, 2016 08:27
[perl #127993] Version control conflict markers
Message ID:
On Tue Apr 26 00:04:31 2016, wrote:
> This is a bug report for perl from,
> 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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About