[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.6-65-g69bc0fc



The following commit has been merged in the master branch:
commit 69bc0fcea49405571502df95b20262c75119db06
Author: Russ Allbery <rra@debian.org>
Date:   Sun Mar 8 17:27:33 2009 -0700

    Add pedantic tag for weird spacing after the colon of a field
    
    * checks/control-file{,.desc}:
      + [RA] Add pedantic tag for weird spacing after the colon of a field.

diff --git a/checks/control-file b/checks/control-file
index a46e716..b085d95 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -71,6 +71,9 @@ while (<CONTROL>) {
 			tag "xs-vcs-header-in-debian-control", "$field"
 			    if $known_source_fields{$base};
 		}
+		unless (/^\S+: \S/) {
+			tag 'debian-control-has-unusual-field-spacing', "line $.";
+		}
 	}
 }
 close CONTROL;
diff --git a/checks/control-file.desc b/checks/control-file.desc
index 2254752..1cddd68 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -34,6 +34,15 @@ Info: One of the paragraphs of your debian/control contains the same
  field more than once. This can lead to an unexpected behaviour of dpkg
  and apt.
 
+Tag: debian-control-has-unusual-field-spacing
+Severity: pedantic
+Certainty: certain
+Ref: policy 5.1
+Info: The field on this line of <tt>debian/control</tt> has whitespace
+ other than a single space after the colon.  This is explicitly permitted
+ in the syntax of Debian control files, but as Policy says, it is
+ conventional to put a single space after the colon.
+
 Tag: binary-control-field-duplicates-source
 Severity: wishlist
 Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 48a469b..952efa8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ lintian (2.2.7) UNRELEASED; urgency=low
     + Added
       - apparently-truncated-elf-binary
       - copyright-refers-to-nonexistent-license-file
+      - debian-control-has-unusual-field-spacing (pedantic)
       - embedded-zlib
       - incorrect-libdir-in-la-file
     + Removed
@@ -25,6 +26,8 @@ lintian (2.2.7) UNRELEASED; urgency=low
   * checks/common_data.pm:
     + [RA] Move all information used only in one check script from here to
       the relevant check script.  Patch from Raphael Geissert.
+  * checks/control-file{,.desc}:
+    + [RA] Add pedantic tag for weird spacing after the colon of a field.
   * checks/copyright-file{,.desc}:
     + [RA] Avoid capturing parentheses in regexes due to their minor
       performance penalty.  Patch from Raphael Geissert.
diff --git a/t/templates/pedantic/debian/control.in b/t/tests/control-file-pedantic-space/debian/debian/control.in
similarity index 88%
copy from t/templates/pedantic/debian/control.in
copy to t/tests/control-file-pedantic-space/debian/debian/control.in
index b61fc71..66d13ef 100644
--- a/t/templates/pedantic/debian/control.in
+++ b/t/tests/control-file-pedantic-space/debian/debian/control.in
@@ -1,6 +1,6 @@
-Source: {$srcpkg}
-Priority: extra
-Section: {$section}
+Source:  {$srcpkg}
+Priority:extra
+Section:	{$section}
 Maintainer: {$author}
 Standards-Version: 3.8.0
 Build-Depends: debhelper (>= 7)
diff --git a/t/tests/control-file-pedantic-space/desc b/t/tests/control-file-pedantic-space/desc
new file mode 100644
index 0000000..018c11d
--- /dev/null
+++ b/t/tests/control-file-pedantic-space/desc
@@ -0,0 +1,7 @@
+Testname: control-file-pedantic-space
+Sequence: 6000
+Version: 1.0
+Skeleton: pedantic
+Options: --pedantic -I -E
+Description: Pedantic tests for control file spacing
+Test-For: debian-control-has-unusual-field-spacing
diff --git a/t/tests/control-file-pedantic-space/tags b/t/tests/control-file-pedantic-space/tags
new file mode 100644
index 0000000..24d657f
--- /dev/null
+++ b/t/tests/control-file-pedantic-space/tags
@@ -0,0 +1,3 @@
+P: control-file-pedantic-space source: debian-control-has-unusual-field-spacing line 1
+P: control-file-pedantic-space source: debian-control-has-unusual-field-spacing line 2
+P: control-file-pedantic-space source: debian-control-has-unusual-field-spacing line 3

-- 
Debian package checker


Reply to: