[lintian] 03/03: L::Util: Extend error message with proposed fix
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit ab2ad0ea21fd858c6a105ff740ad1e8b96bcd6c4
Author: Niels Thykier <niels@thykier.net>
Date: Wed Feb 12 22:21:02 2014 +0100
L::Util: Extend error message with proposed fix
When seeing a continuation line outside a paragraph in a Deb822,
suggest that the previous line might need to be " .".
Signed-off-by: Niels Thykier <niels@thykier.net>
---
debian/changelog | 5 +++++
lib/Lintian/Util.pm | 5 +++--
t/tests/source-copyright-dep5-syntax-error/tags | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b8bfce3..911b709 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,11 @@ lintian (2.5.22) UNRELEASED; urgency=medium
+ [NT] Use the new @builddeps@ from autopkgtest/2.5.5
instead of duplicating the values.
+ * lib/Lintian/Util.pm:
+ + [NT] Extend the "Continuation line outside a paragraph" parse
+ error on Deb822 files with a possible suggestion for fixing
+ the problem.
+
* reporting/config:
+ [NT] Fix typo of HARNESS_STATE_DIR config variable.
* reporting/harness:
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index 0cca7e2..7eed1b3 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -312,7 +312,7 @@ Where %d is the line number of the issue and %s is one of:
The field appeared twice in the paragraph.
-=item Continuation line outside a paragraph
+=item Continuation line outside a paragraph (maybe line %d should be " .")
A continuation line appears outside a paragraph - usually caused by an
unintended empty line before it.
@@ -548,7 +548,8 @@ sub visit_dpkg_paragraph {
$open_section
or die join(q{ },
"syntax error at line $.:",
- "Continuation line outside a paragraph.\n");
+ 'Continuation line outside a paragraph (maybe line',
+ ($. - 1), qq{should be " .").\n});
# Policy: Many fields' values may span several lines; in this case
# each continuation line must start with a space or a tab. Any
diff --git a/t/tests/source-copyright-dep5-syntax-error/tags b/t/tests/source-copyright-dep5-syntax-error/tags
index 7488b2f..2478605 100644
--- a/t/tests/source-copyright-dep5-syntax-error/tags
+++ b/t/tests/source-copyright-dep5-syntax-error/tags
@@ -1 +1 @@
-W: source-copyright-dep5-syntax-error source: syntax-error-in-dep5-copyright line 13: Continuation line outside a paragraph.
+W: source-copyright-dep5-syntax-error source: syntax-error-in-dep5-copyright line 13: Continuation line outside a paragraph (maybe line 12 should be " .").
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: