From 7a983f2e511a7dd973bdf5f9bd1463604f8691b7 Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Wed, 29 Mar 2006 15:24:34 +0000 Subject: [PATCH] Tweaked JSP/JSF rule docs git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4316 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/etc/doing_the_next_pmd_release.txt | 2 +- pmd/etc/jsl/rule-format.jsl | 2 +- pmd/project.xml | 2 +- pmd/rulesets/basic-jsf.xml | 60 ++++++++++++++------------ pmd/rulesets/basic-jsp.xml | 32 +++++++++----- pmd/xdocs/navigation.xml | 6 ++- 6 files changed, 61 insertions(+), 43 deletions(-) diff --git a/pmd/etc/doing_the_next_pmd_release.txt b/pmd/etc/doing_the_next_pmd_release.txt index 9205f62d12..3bb0e93969 100644 --- a/pmd/etc/doing_the_next_pmd_release.txt +++ b/pmd/etc/doing_the_next_pmd_release.txt @@ -57,7 +57,7 @@ rm -rf tmp/ mkdir tmp cd tmp cvs -q export -r pmd_release_3_6 pmd -mv pmd/ pmd-3.6/ +mv pmd/ pmd-3.6 cd .. cp pmd/lib/pmd-src-3.6.jar tmp/pmd-3.6/lib/ mv tmp/pmd-3.6/ ~/tmp/ diff --git a/pmd/etc/jsl/rule-format.jsl b/pmd/etc/jsl/rule-format.jsl index 436e48f911..caef3d3e08 100644 --- a/pmd/etc/jsl/rule-format.jsl +++ b/pmd/etc/jsl/rule-format.jsl @@ -15,7 +15,7 @@ - Tom Copeland + Tom Copeland Rule Set: ${rulesetname} diff --git a/pmd/project.xml b/pmd/project.xml index 3e0aac0b8b..48dfaa66d1 100644 --- a/pmd/project.xml +++ b/pmd/project.xml @@ -59,7 +59,7 @@ 3.6 3.6 - pmd_release_3_5 + pmd_release_3_6 dev diff --git a/pmd/rulesets/basic-jsf.xml b/pmd/rulesets/basic-jsf.xml index e72286b6f7..d59373e501 100644 --- a/pmd/rulesets/basic-jsf.xml +++ b/pmd/rulesets/basic-jsf.xml @@ -1,34 +1,40 @@ - - - Rules concerning basic JSF guidelines. - - - Do not nest JSF component custom actions inside a custom action that iterates over its body. - 3 - - - - - - - - -
    + + +Rules concerning basic JSF guidelines. + + + + + Do not nest JSF component custom actions inside a custom action that iterates over its body. + + + + + + + + + 3 + +
    • -
      +
    - ]]> -
    -
    + ]]> + +
    + diff --git a/pmd/rulesets/basic-jsp.xml b/pmd/rulesets/basic-jsp.xml index 83412515ba..0e2364e1c7 100644 --- a/pmd/rulesets/basic-jsp.xml +++ b/pmd/rulesets/basic-jsp.xml @@ -1,14 +1,16 @@ - + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> Rules concerning basic JSP guidelines. + class="net.sourceforge.pmd.rules.XPathRule" + externalInfoUrl="http://pmd.sourceforge.net/rules/basic-jsp.html#NoLongScripts"> Scripts should be part of Tag Libraries, rather than part of JSP pages. 2 @@ -48,8 +50,10 @@ onload=calcDays; - + Scriptlets should be factored into Tag Libraries or JSP declarations, rather than being part of JSP pages. 3 @@ -78,8 +82,10 @@ response.setHeader("Pragma", "No-cache"); - + or tags, or attributes like "align='center'" ]]> 3 @@ -93,7 +99,8 @@ response.setHeader("Pragma", "No-cache"); + class="net.sourceforge.pmd.rules.XPathRule" + externalInfoUrl="http://pmd.sourceforge.net/rules/basic-jsp.html#NoClassAttribute"> Do not use an attribute called 'class'. Use "styleclass" for CSS styles. 2 @@ -115,7 +122,8 @@ response.setHeader("Pragma", "No-cache"); + class="net.sourceforge.pmd.rules.XPathRule" + externalInfoUrl="http://pmd.sourceforge.net/rules/basic-jsp.html#NoJspForward"> Do not do a forward from within a JSP file. 3 @@ -135,7 +143,8 @@ response.setHeader("Pragma", "No-cache"); + class="net.sourceforge.pmd.rules.XPathRule" + externalInfoUrl="http://pmd.sourceforge.net/rules/basic-jsp.html#IframeMissingSrcAttribute"> IFrames which are missing a src element can cause security information popups in IE if you are accessing the page through SSL. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188 @@ -165,7 +174,8 @@ response.setHeader("Pragma", "No-cache"); + class="net.sourceforge.pmd.rules.XPathRule" + externalInfoUrl="http://pmd.sourceforge.net/rules/basic-jsp.html#NoHtmlComments"> In a production system, HTML comments increase the payload between the application server to the client, and serve little other purpose. Consider switching to diff --git a/pmd/xdocs/navigation.xml b/pmd/xdocs/navigation.xml index 8417481900..fc0d201a99 100644 --- a/pmd/xdocs/navigation.xml +++ b/pmd/xdocs/navigation.xml @@ -15,8 +15,8 @@ href="http://sourceforge.net" /> - - + + @@ -68,6 +68,8 @@ + +