case CURLE_INTERFACE_FAILED:
return "Failed binding local connection end";
- case CURLE_TOO_MANY_REDIRECTS :
+ case CURLE_TOO_MANY_REDIRECTS:
return "Number of redirects hit maximum amount";
case CURLE_UNKNOWN_OPTION:
return "An unknown option was passed in to libcurl";
- case CURLE_SETOPT_OPTION_SYNTAX :
+ case CURLE_SETOPT_OPTION_SYNTAX:
return "Malformed option provided in a setopt";
case CURLE_GOT_NOTHING:
'SPACEBEFORECOMMA' => 'space before a comma',
'SPACEBEFOREPAREN' => 'space before an open parenthesis',
'SPACESEMICOLON' => 'space before semicolon',
+ 'SPACESWITCHCOLON' => 'space before colon of switch label',
'TABS' => 'TAB characters not allowed',
'TRAILINGSPACE' => 'Trailing whitespace on the line',
'TYPEDEFSTRUCT' => 'typedefed struct',
$line, length($1), $file, $ol, "no space before semicolon");
}
+ # check for space before the colon in a switch label
+ if($l =~ /^( *(case .+|default)) :/) {
+ checkwarn("SPACESWITCHCOLON",
+ $line, length($1), $file, $ol, "no space before colon of switch label");
+ }
+
# scan for use of banned functions
if($l =~ /^(.*\W)
(gmtime|localtime|
"exceeded your quota.\n", name);
break;
#endif
- default :
+ default:
fprintf(errors, "Error creating directory %s.\n", name);
break;
}