Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [RFC/PATCH] repoman: unroll escaped lines so we can check the entirety of it
Date: Thu, 24 May 2012 06:14:57
Message-Id: 4FBDB6E1.7020707@gentoo.org
In Reply to: [gentoo-portage-dev] [RFC/PATCH] repoman: unroll escaped lines so we can check the entirety of it by Mike Frysinger
1 On 05/23/2012 09:06 PM, Mike Frysinger wrote:
2 > Sometimes people wrap long lines in their ebuilds to make it easier to
3 > read, but this causes us issues when doing line-by-line checking. So
4 > automatically unroll those lines before passing the full content down
5 > to our checkers.
6 >
7 > This seems to work, but maybe someone can suggest something simpler.
8
9 This code should come right after the line that says "We're not in a
10 here-document", because we only need it to trigger when we're not in a
11 here-document.
12
13 I think it's going to be cleaner to detect an escaped newline with a
14 regular expression, like r'(^|[^\\])\\$'.
15 --
16 Thanks,
17 Zac

Replies