- if (/^\s*\#include\s+"/) {
- bad_line("sherlock includes after global includes", $_) if (!$has_loc && $has_glob);
- $has_loc++;
- }
- $has_glob++ if (/^\s*\#include\s+\</);
- $has_copy++ if (/\(c\)\s*\w/);
- $empty = $_ =~ /^\s*$/;
- $lineno++;
+ chomp;
+ if (/^\s*\#include\s+"/) {
+ bad_line("sherlock includes after global includes", $_) if (!$has_loc && $has_glob);
+ $has_loc++;
+ }
+ if (/\s$/) {
+ bad_line("trailing whitespace", $_);
+ }
+ if (/^\s* \t/) {
+ bad_line("indent SP followed by a TAB", $_);
+ }
+ if (/^\s*\#define\s+LOCAL_DEBUG/) {
+ bad_line("LOCAL_DEBUG left enabled", $_);
+ }
+ if (/^([<>])\1{6} |^={7}$/) {
+ bad_line("unresolved merge conflict", $_);
+ }
+
+ $has_glob++ if (/^\s*\#include\s+\</);
+ $has_copy++ if (/\([Cc]\)\s*\w/);
+ $empty = $_ =~ /^\s*$/;
+ $lineno++;