Skip to end of metadata
Go to start of metadata

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
deprecated attributes according to HTML 4 (http://www.w3.org/TR/REC-html40/index/attributes.html)

attributes
default: CAPTION.align, IFRAME.align, IMG.align, INPUT.align, OBJECT.align,
LEGEND.align, TABLE.align, HR.align,
DIV.align, H1.align, H2.align, H3.align, H4.align, H5.align, H6.align, P.align,
alink, background, bgcolor,
IMG.border, OBJECT.border, clear, color, compact, face, hspace, TD.height, TH.height,
language, link,
noshade, nowrap, HR.size, FONT.size, start, text, LI.type, OL.type, UL.type, LI.value,
version,
HR.width,
PRE.width, TD.width, TH.width

JSP/JSF

RequiredAttributeCheck

Looks for a required attribute.

attributes
komma separated list of elementname.attributename
(default: img.alt,script.type)

JSP / JSF

Coding Rules

Check

Description

Properties

Language

AvoidHtmlCommentCheck

HTML comment is not allowed in JSP files, use server side comment.
The check allows HTML comment in XHTML files, recognized by its xml declaration.

-

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)
tags(default: catch, choose, if, forEach, forTokens,when)
operators(default: &, ||, and,or)

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
scope (attribute or element)

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

Labels
  • None