1 |
On Thursday 24 May 2012 00:19:45 Zac Medico wrote: |
2 |
> On 05/23/2012 09:06 PM, Mike Frysinger wrote: |
3 |
> > Sometimes people wrap long lines in their ebuilds to make it easier to |
4 |
> > read, but this causes us issues when doing line-by-line checking. So |
5 |
> > automatically unroll those lines before passing the full content down |
6 |
> > to our checkers. |
7 |
> > |
8 |
> > This seems to work, but maybe someone can suggest something simpler. |
9 |
> |
10 |
> This code should come right after the line that says "We're not in a |
11 |
> here-document", because we only need it to trigger when we're not in a |
12 |
> here-document. |
13 |
|
14 |
i was thinking this would handle wrapped lines and heredocs together better, |
15 |
but i'll ignore that until i can come up with a concrete case. |
16 |
|
17 |
> I think it's going to be cleaner to detect an escaped newline with a |
18 |
> regular expression, like r'(^|[^\\])\\$'. |
19 |
|
20 |
the reason i didn't go the regex route is because this fails with: |
21 |
echo foo \\\\\ |
22 |
cow |
23 |
whereas letting python take care of all the escaping works much better |
24 |
-mike |