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

Bug#634191: [checks/lintian] CR(LF) line endings in copyright files



Package: lintian
Version: 2.5.1
Severity: wishlist
Tags: patch

Please see the attached patch.

--
Jakub Wilk
diff --git a/checks/copyright-file b/checks/copyright-file
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -130,6 +130,10 @@
 $_ = slurp_entire_file('copyright');
 study $_;
 
+if (m,\r,) {
+    tag 'copyright-has-crs';
+}
+
 my $wrong_directory_detected = 0;
 
 if (m,\<fill in (?:http/)?ftp site\>, or m/\<Must follow here\>/) {
diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -391,3 +391,13 @@
  .
  This file may be removed from a future version of base-files if
  references to it drop sufficiently.
+
+Tag: copyright-has-crs
+Severity: pedantic
+Certainty: certain
+Info: The copyright file has lines ending in CRLF instead of just LF.
+ .
+ Running the following command against the given file removes any
+ <tt>CR</tt> character in the file:
+ .
+ <tt>sed -i 's/\r//g' path/to/file</tt>

Reply to: