24 May 06:06
[RFC/PATCH] repoman: unroll escaped lines so we can check the entirety of it
Mike Frysinger <vapier <at> gentoo.org>
2012-05-24 04:06:39 GMT
2012-05-24 04:06:39 GMT
Sometimes people wrap long lines in their ebuilds to make it easier to read, but this causes us issues when doing line-by-line checking. So automatically unroll those lines before passing the full content down to our checkers. This seems to work, but maybe someone can suggest something simpler. Signed-off-by: Mike Frysinger <vapier <at> gentoo.org> --- pym/repoman/checks.py | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 65e7136..67f2b0a 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -750,11 +750,46 @@ _ignore_comment_re = re.compile(r'^\s*#') def run_checks(contents, pkg): checks = _constant_checks here_doc_delim = None + multiline = None for lc in checks: lc.new(pkg) for num, line in enumerate(contents): + # Unroll multiline escaped strings so that we can check things: + # inherit foo bar \ + # moo \ + # cow(Continue reading)
RSS Feed