my $incomment=0;
my @copyright=();
+ my %includes;
checksrc_clear(); # for file based ignores
accept_violations();
$line, length($1), $file, $l, "\/\/ comment");
}
+ if($l =~ /^(\#\s*include\s+)([\">].*[>}"])/) {
+ my ($pre, $path) = ($1, $2);
+ if($includes{$path}) {
+ checkwarn("INCLUDEDUP",
+ $line, length($1), $file, $l, "duplicated include");
+ }
+ $includes{$path} = $l;
+ }
+
# detect and strip preprocessor directives
if($l =~ /^[ \t]*\#/) {
# preprocessor line