summaryrefslogtreecommitdiff
path: root/checkLicense.pl
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-07-19 13:10:24 (GMT)
committergeronimo <geronimo013@gmx.de>2012-07-19 13:10:24 (GMT)
commit04a867b018a8c6761047ef8878a4434692673084 (patch)
tree79109d9d6c053b9c5446f89e9cc07d30380a0fa1 /checkLicense.pl
parent94023c37e288048eb22a2d4e3dfa8529fe3a3816 (diff)
downloadcmp-04a867b018a8c6761047ef8878a4434692673084.tar.gz
cmp-04a867b018a8c6761047ef8878a4434692673084.tar.bz2
add categories to json result message
Diffstat (limited to 'checkLicense.pl')
-rwxr-xr-xcheckLicense.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/checkLicense.pl b/checkLicense.pl
index 88f604c..82d71cc 100755
--- a/checkLicense.pl
+++ b/checkLicense.pl
@@ -21,7 +21,7 @@ my $realAuthor = '<a href="mailto:geronimo013@gmx.de">Geronimo</a>';
my $modeConfig = {
'java' => { 'match' => '\.java$', 'key' => 'package ', 'cmt0' => '/**', 'cmt1' => ' * ', 'cmt2' => ' */' }
, 'php' => { 'match' => '\.php$', 'key' => 'use ', 'cmt0' => '/**', 'cmt1' => ' * ', 'cmt2' => ' */' }
- , 'c++' => { 'match' => '\.(?:cc|h|cpp|hpp)$', 'key' => '#\s*(?:ifndef|include) ', 'cmt0' => '/**', 'cmt1' => ' * ', 'cmt2' => ' */' }
+ , 'c++' => { 'match' => '\.(?:cc|h|cpp|hpp)$', 'key' => '#\s*(?:ifndef|include|define) ', 'cmt0' => '/**', 'cmt1' => ' * ', 'cmt2' => ' */' }
};
my $summaries = {};
my @license = ();
@@ -176,9 +176,10 @@ sub processFile {
}
}
elsif ($pl =~ /\@\@Comment\@\@/) {
- foreach (@cmt) {
- $prefix .= $modeConfig->{$mode}{'cmt1'}.$_;
- }
+# TODO: separate comment from rest of license!
+# foreach (@cmt) {
+# $prefix .= $modeConfig->{$mode}{'cmt1'}.$_;
+# }
}
elsif ($pl =~ /\@\@FileInfo\@\@/) {
$prefix .= $modeConfig->{$mode}{'cmt1'}.$tag[1].$fi->{'name'}."\n";