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

Bug#695967: [new check] GFDL invariant



Thanks for the patch.

* bastien ROUCARIES <roucaries.bastien@gmail.com>, 2012-12-14, 23:56:
+          # GFDL state machine
+          if($line =~ m/GNU\s+Free\s+Documentation\s+License/) {
+              $foundGFDL = 1;
+          }
+          if($foundGFDL) {
+              # match in two part in order to not match italic html license example
+              if($line =~ m/with\s+the\s+Invariant\s+Sections\s+being/i) {
+                  if($line !~ m/list\s+their\s+titles/i) {
+                      tag 'license-problem-gfdl-invariants', $name;
+                  }
+              }
+              if($line =~ m/the\s+Front-Cover\s+Texts\s+being/i) {
+                  if($line !~ m/the\s+Front-Cover\s+Texts\s+being\s+(?:<var>)?\s+list/) {
+                      tag 'license-problem-gfdl-invariants', $name;
+                  }
+              }
+          }

There are also Back-Cover Texts, which are as bad as Front-Cover Texts.

AFAICS, the cover text check will trigger for the GFDL license text itself, which contains:
     with the Invariant Sections being @var{list their titles}, with
or:
     with the Invariant Sections being LIST THEIR TITLES, with
or:
     with the Invariant Sections being <list their titles>, with
(depending on the file format).

The "with the Invariant Sections being" and "the Front-Cover Texts being" phrases could be spread across two lines. Please take this into account.

--
Jakub Wilk


Reply to: