summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2009-11-24 18:34:00 +0000
committerville <ville@localhost>2009-11-24 18:34:00 +0000
commit7269e03a88cae031711edb4eb1dbcd519f5a5524 (patch)
treeba1b4af6dddec4eb9956a4451b947b6a6b0f36ca
parentb9c3a498f5948ae8aeb383a2b3aa0b3a2a87476b (diff)
downloadmarkup-validator-7269e03a88cae031711edb4eb1dbcd519f5a5524.zip
markup-validator-7269e03a88cae031711edb4eb1dbcd519f5a5524.tar.gz
markup-validator-7269e03a88cae031711edb4eb1dbcd519f5a5524.tar.bz2
Add perlcritic(1) profile and a Makefile target for running it.
-rw-r--r--Makefile4
-rw-r--r--misc/perlcriticrc39
2 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1001f73..7b5cfc0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,13 @@ PERL_FILES = httpd/cgi-bin/check httpd/cgi-bin/sendfeedback.pl \
misc/bundle/lib/Bundle/W3C/Validator.pm
PERLTIDY = perltidy --profile=misc/perltidyrc --backup-and-modify-in-place
+PERLCRITIC = perlcritic --profile misc/perlcriticrc
all:
+perlcritic:
+ $(PERLCRITIC) $(PERL_FILES)
+
perltidy:
@for file in $(PERL_FILES) ; do \
echo "$(PERLTIDY) $$file" ; \
diff --git a/misc/perlcriticrc b/misc/perlcriticrc
new file mode 100644
index 0000000..1ed90bc
--- /dev/null
+++ b/misc/perlcriticrc
@@ -0,0 +1,39 @@
+# perlcritic(1) profile for the W3C Markup Validator
+
+severity = 3
+# uncomment to find out policy modules
+#verbose = 8
+
+[Modules::ProhibitMultiplePackages]
+# not yet
+severity = 1
+
+[Modules::RequireFilenameMatchesPackage]
+# not yet
+severity = 1
+
+[RegularExpressions::RequireExtendedFormatting]
+severity = 1
+
+[Subroutines::ProhibitExcessComplexity]
+# not yet
+severity = 1
+
+[Subroutines::ProhibitSubroutinePrototypes]
+# not yet
+severity = 1
+
+[Subroutines::RequireFinalReturn]
+# not yet
+severity = 1
+
+[Variables::ProhibitPackageVars]
+# not yet
+severity = 1
+
+[Variables::ProhibitReusedNames]
+# not yet
+severity = 1
+
+[ValuesAndExpressions::ProhibitConstantPragma]
+severity = 1