lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5453] Require an additional copyright notice in html file


From: Greg Chicares
Subject: [lmi-commits] [5453] Require an additional copyright notice in html files
Date: Fri, 04 May 2012 12:36:25 +0000

Revision: 5453
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5453
Author:   chicares
Date:     2012-05-04 12:36:23 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Require an additional copyright notice in html files

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/test_coding_rules.cpp
    lmi/trunk/test_coding_rules_test.sh

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2012-05-04 11:20:19 UTC (rev 5452)
+++ lmi/trunk/ChangeLog 2012-05-04 12:36:23 UTC (rev 5453)
@@ -30007,3 +30007,25 @@
   install_miscellanea.make
 Install 'jing' and 'trang'.
 
+20120504T1020Z <address@hidden> [573]
+
+  test_coding_rules.cpp
+Refactor to support a forthcoming change.
+
+20120504T1030Z <address@hidden> [573]
+
+  test_coding_rules.cpp
+Remove a marker for an issue resolved 20080107T0556Z.
+
+20120504T1120Z <address@hidden> [573]
+
+  test_coding_rules.cpp
+  test_coding_rules_test.sh
+For copyright, use current civil year, not last-modified year.
+
+20120504T1236Z <address@hidden> [573]
+
+  test_coding_rules.cpp
+  test_coding_rules_test.sh
+Require an additional copyright notice in html files.
+

Modified: lmi/trunk/test_coding_rules.cpp
===================================================================
--- lmi/trunk/test_coding_rules.cpp     2012-05-04 11:20:19 UTC (rev 5452)
+++ lmi/trunk/test_coding_rules.cpp     2012-05-04 12:36:23 UTC (rev 5453)
@@ -434,7 +434,18 @@
 /// | which have not. It is recommended and simpler to add the new
 /// | year to all files in the package, and be done with it for the
 /// | rest of the year.
+/// ...
+/// | stick with parenthesized \x91C\x92 unless you know that C-in-a-circle
+/// | will work.
 ///
+/// For html files, two copyright notices are required. The first
+/// appears in a comment near the top of the file, and uses "(C)" for
+/// concinnity with non-html files. The second appears in displayed
+/// text, generally toward the bottom, and uses '&copy;' because the
+/// circle-C symbol is reliably available and more attractive. Both
+/// notices must include the current year, except that html versions
+/// of the GPL use the FSF's copyright years in the '&copy;' notice.
+///
 /// SOMEDAY !! This test could be liberalized to permit copyright
 /// notices to span multiple lines. For now, it is assumed that the
 /// year appears on the same line as the word "Copyright".
@@ -456,9 +467,17 @@
     std::tm const*const t1 = std::localtime(&t0);
     LMI_ASSERT(NULL != t1);
     int const year = 1900 + t1->tm_year;
+
     std::ostringstream oss;
     oss << "Copyright \\(C\\)[^\\n]*" << year;
     require(f, oss.str(), "lacks current copyright.");
+
+    if(f.is_of_phylum(e_html) && !f.phyloanalyze("^COPYING"))
+        {
+        std::ostringstream oss;
+        oss << "Copyright &copy;[^\\n]*" << year;
+        require(f, oss.str(), "lacks current secondary copyright.");
+        }
 }
 
 void check_cxx(file const& f)

Modified: lmi/trunk/test_coding_rules_test.sh
===================================================================
--- lmi/trunk/test_coding_rules_test.sh 2012-05-04 11:20:19 UTC (rev 5452)
+++ lmi/trunk/test_coding_rules_test.sh 2012-05-04 12:36:23 UTC (rev 5453)
@@ -62,6 +62,24 @@
 "(c) 1999": lower-case 'c' is incorrect in ASCII copyright symbol.
 EOF
 
+# html files: copyright.
+
+cat >eraseme_copyright_002.html <<EOF
+$boilerplate
+Copyright &copy; `date -u +'%Y'`
+EOF
+
+cat >eraseme_copyright_003.html <<EOF
+$good_rcsid $good_url
+Missing "(C)" copyright.
+Copyright &copy; `date -u +'%Y'`
+EOF
+
+cat >eraseme_copyright_004.html <<EOF
+$boilerplate
+Missing circle-C copyright.
+EOF
+
 # Files in general: defect markers.
 
 Q='?'
@@ -397,6 +415,8 @@
 Exception--file 'another.unexpected.file': File is unexpectedly 
uncategorizable.
 File 'eraseme_copyright_001' lacks current copyright.
 File 'eraseme_copyright_001' breaks taboo '\(c\) *[0-9]'.
+File 'eraseme_copyright_003.html' lacks current copyright.
+File 'eraseme_copyright_004.html' lacks current secondary copyright.
 File 'eraseme_cpp_001.cpp' must not include 'config.hpp'.
 File 'eraseme_cpp_002.cpp' has misindented label ' wrong   :'.
 File 'eraseme_cpp_002.cpp' has misindented label '   No2   :'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]