diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-17 20:06:06 -0800 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@digia.com> | 2015-02-16 07:29:27 +0000 |
commit | 2bd4853e6396974a224f094f822351b6c3fe3672 (patch) | |
tree | e968525f898027114ca150c16252675711c78873 /scripts/t | |
parent | 265ac2528b3741ff69b6b74c3e348050784de09c (diff) |
Allow trivial files (less than 4 lines) to forego license headers
Most of the qplatformdefs.h files are trivial (one line) and they need
to carry a 35-line header just because they are *.h. Instead, give a
pass to very short files -- after all, under 4 lines it's hardly
copyrightable anyway.
Note: such files will probably show up as having no changes with
header_diff.pl, even if they have changes.
Change-Id: Iae2ee0da157a77cdf6c9a148362f25e94e7a61e8
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Diffstat (limited to 'scripts/t')
-rw-r--r-- | scripts/t/license-testdata/bad/noheader.cpp | 7 | ||||
-rw-r--r-- | scripts/t/license-testdata/expected-output.txt | 3 | ||||
-rw-r--r-- | scripts/t/license-testdata/good/noheader.cpp | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/scripts/t/license-testdata/bad/noheader.cpp b/scripts/t/license-testdata/bad/noheader.cpp index 5cd1c72a..56a3920d 100644 --- a/scripts/t/license-testdata/bad/noheader.cpp +++ b/scripts/t/license-testdata/bad/noheader.cpp @@ -1 +1,8 @@ /* This is a C++ file with no license header - bad! */ +// This file doesn't qualify for the "short header exemption" +struct Foo +{ + int i; + int j; + int k; +}; diff --git a/scripts/t/license-testdata/expected-output.txt b/scripts/t/license-testdata/expected-output.txt index 84f5c9d3..d5f4b0a8 100644 --- a/scripts/t/license-testdata/expected-output.txt +++ b/scripts/t/license-testdata/expected-output.txt @@ -35,7 +35,7 @@ # The test numbers are also ignored (as long as the total count of tests # is as expected). -1..12 +1..13 not ok x - QT_BEGIN_LICENSE does not follow Copyright block in bad/missing-license-info.qdoc, line 8 not ok x - Mismatch in license text in bad/multiple-header-one-wrong.s not ok x - bad/noheader.cpp does not appear to contain a license header @@ -43,6 +43,7 @@ not ok x - bad/old-contact-info.cpp does not appear to contain a license header not ok x - Mismatch in license text in bad/wrong-lgpl-nokia.sh ok x - good/multiple-copyright-lgpl.g ok x - good/multiple-headers.cpp +ok x - good/noheader.cpp ok x - good/not-all-rights-reserved-nokia.cpp ok x - good/typical-bsd-nokia.cpp ok x - good/typical-fdl-nokia.qdoc diff --git a/scripts/t/license-testdata/good/noheader.cpp b/scripts/t/license-testdata/good/noheader.cpp new file mode 100644 index 00000000..8987a2ed --- /dev/null +++ b/scripts/t/license-testdata/good/noheader.cpp @@ -0,0 +1,3 @@ +/* This is a very short C++ file with no license header. * + * Because it's so short (3 lines), it is accepted (it + * wouldn't be copyrightable anyway) */ |