summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-30 20:56:17 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-30 20:56:17 +0000
commitf35eb376737d9df40adb9cd1821313b98c6bda52 (patch)
tree33c1b1571a7dc73683e56e3244b872f75a636dc8 /scripts
parent3c17d392f2a148c7fa48b3ec74db11e0630545d8 (diff)
downloadbrdo-f35eb376737d9df40adb9cd1821313b98c6bda52.tar.gz
brdo-f35eb376737d9df40adb9cd1821313b98c6bda52.tar.bz2
- Improvment: detect wrong mixed case variables, be more strict about XHTML.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/code-style.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/code-style.pl b/scripts/code-style.pl
index f7d773e54..5418941f9 100644
--- a/scripts/code-style.pl
+++ b/scripts/code-style.pl
@@ -88,12 +88,13 @@ while (<>) {
elsif (/^\s*{/ && $program) {
$msg = "take '{' to previous line";
}
- elsif (/function ([a-zA-Z_][a-zA-Z_0-9]*[A-Z][a-zA-Z_0-9]*)\(/) {
- $msg = "no mixedcase, use lowercase and _";
+ elsif (/([a-z])([A-Z])/) {
+ $msg = "no mixed case function or variable names, use lower case and _";
}
-# elsif (/<[\/]*[A-Z]+[^>]*>/) {
-# $msg = "XHTML demands tags to be lowercase";
-# }
+ elsif (/<[\/]*[A-Z]+[^>]*>/) {
+ $msg = "XHTML demands tags to be lowercase";
+ }
+
# trying to recognize splitted lines
# there are only a few valid last characters in programming mode,
# only sometimes it is ( if you use if/else with a single statement