The following checks are available in the library.
Some checks are explained in the Sun Coding Conventions for JSP.
Attribute Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
Illegal Attribute |
Checks for illegal attributes. The default configuration of this check looks for |
attributes |
JSP/JSF |
RequiredAttributeCheck |
Looks for a required attribute. |
attributes |
JSP / JSF |
Coding Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
AvoidHtmlCommentCheck |
HTML comment is not allowed in JSP files, use server side comment. |
- |
JSP |
ComplexityCheck |
Checks cyclomatic complexity against a specified limit. The complexity is measured by counting decision tags (such as if and forEach) and boolean operators in expressions ("&&" and "||"), plus one for the body of the document. It is a measure of the minimum number of possible paths to render the page. |
max(default: 12) |
JSP / JSF |
DoubleQuotesCheck |
Checks that attributes are properly double quoted. |
- |
JSP / JSF |
File Length |
Checks the length of the file |
maxLength (default: 500) |
JSP/JSF |
InternationalizationCheck |
Find hardcoded labels and messages in attributes and tag content. |
attributes |
JSP / JSF |
MaxLineLengthCheck |
Checks the length of the lines. |
maxLength (default: 120) |
JSP / JSF |
UnclosedTagCheck |
Checks for unclosed tags. |
|
JSP / JSF |
Header Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
DocTypeCheck |
Checks declaration of the DOCTYPE. It must refer a dtd as specified in the parameter. |
dtd (default: http://www.w3.org/ TR/xhtml1/DTD/xhtml1-strict.dtd) |
JSF |
HeaderCheck |
Looks for an opening comment and checks the content. |
expression (default: ^.Copyright*.*$) |
JSP / JSF |
MultiplePageDirectivesCheck |
Checker to find multiple page directives, where 1 page directive would be preferred. |
- |
JSP |
Scripting Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
JspScriptletCheck |
Avoid use of scriptlets. |
- |
JSP |
LongJavaScriptCheck |
Find long JavaScript. |
maxLines (default: 5) |
JSF |
UnifiedExpressionCheck |
Validate expressions in the Unified Expression Language. |
- |
JSP /JSF |
Dependency Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
Dynamic Jsp Include |
Looks for <jsp:include> tags. |
- |
JSP |
Illegal Namespace |
Checks for illegal namespaces. |
namespaces |
JSF |
Illegal TagLibs |
Find disallowed taglibs. |
tagLibs (default: http://java.sun.com/jstl/sql) |
JSP |
Library Dependency |
Finds illegal dependencies, checks for imported java libraries |
libraries (default: java.sql,javax.sql) |
JSP/JF |
Generic Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
RegularExpressionCheck |
Checks a regular expression in an element or a attribute. |
expression |
JSP / JSF |
Structure Rules
Structure rules check for illegal or required elements. To make these checks useful for your project, you should configure the checks.
Check |
Description |
Properties |
Language |
|---|---|---|---|
Child Element Illegal |
Checks for an illegal child element |
parent, child |
JSP / JSF |
Child Element Required |
Checks for a required child element |
parent, child |
JSP / JSF |
Element Illegal |
Checks for illegal elements. The default configuration of this check looks for deprecated elements according to HTML 4 (http://www.w3.org/TR/REC-html40/index/attributes.html). |
elements (default: applet, basefont, center, dir, font, isindex, menu, s, strike, u) |
JSP / JSF |
Parent Element Illegal |
Checks for an llegal parent element |
parent, child |
JSP / JSF |
Parent Element Required |
Checks for a required parent element |
parent, child |
JSP / JSF |
Element Required |
Looks for a required element. |
elements (komma separated list of elements) |
JSP / JSF |
Style Rules
Check |
Description |
Properties |
Language |
|---|---|---|---|
InlineStyleCheck |
Checks for inline style element. |
- |
JSP / JSF |
Whitespace Rules
WhiteSpaceAroundCheck |
Check for required white space around start and end markers of expressions and comments. |
- |
JSP |
IllegalTabCheck |
Checks for occurrence of tab character. |
|
JSP / JSF |

