This is an automated email from the git hooks/post-receive script. dod pushed a commit to branch master in repository devscripts.
commit afe2ed01e2dd7abd161c39fab90d3d50540e77b4 Author: Dominique Dumont <[email protected]> Date: Thu May 14 16:48:17 2015 +0200 licensecheck: move regexp definition out of function --- scripts/licensecheck.pl | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl index aa21dd5..1ce3ff5 100755 --- a/scripts/licensecheck.pl +++ b/scripts/licensecheck.pl @@ -169,6 +169,24 @@ my $default_ignore_regex = qr! my $default_check_regex = '\.(c(c|pp|xx)?|h(h|pp|xx)?|f(77|90)?|go|p(l|m)|xs|sh|php|py(|x)|rb|java|js|vala|el|sc(i|e)|cs|pas|inc|dtd|xsl|mod|m|tex|mli?|(c|l)?hs)$'; + +my $copyright_indicator_regex = ' +(?:copyright # The full word +|copr\. # Legally-valid abbreviation +|© # Unicode character COPYRIGHT SIGN +|\(c\) # Legally-null representation of sign +)'; +my $copyright_disindicator_regex = ' +\b(?:info(?:rmation)? # Discussing copyright information +|(notice|statement|claim|string)s? # Discussing the notice +|and|or|is|in|to # Part of a sentence +|(holder|owner)s? # Part of a sentence +|ownership # Part of a sentence +)\b'; +my $copyright_predisindicator_regex = '( +^[#]define\s+.*\(c\) # #define foo(c) -- not copyright +)'; + my $modified_conf_msg; my %OPT=( @@ -342,23 +360,6 @@ sub parse_copyright { my $copyright = ''; my $match; - my $copyright_indicator_regex = ' - (?:copyright # The full word - |copr\. # Legally-valid abbreviation - |© # Unicode character COPYRIGHT SIGN - |\(c\) # Legally-null representation of sign - )'; - my $copyright_disindicator_regex = ' - \b(?:info(?:rmation)? # Discussing copyright information - |(notice|statement|claim|string)s? # Discussing the notice - |and|or|is|in|to # Part of a sentence - |(holder|owner)s? # Part of a sentence - |ownership # Part of a sentence - )\b'; - my $copyright_predisindicator_regex = '( - ^[#]define\s+.*\(c\) # #define foo(c) -- not copyright - )'; - if ( $data !~ m%$copyright_predisindicator_regex%ix) { if ($data =~ m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%lix) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git _______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
