new Check()
Constructor
Methods
-
raiseIssue(ref, positionIdentifier, errorContent, maybeFalsePositive)
-
Helper function used by checks to raise an issue.
Parameters:
Name Type Description refString An arbitrary string that identifies the kind of Issue. Usually the xml name. The string must be unique among checks. Reference is used to link the instance with an IssueInfo.
positionIdentifierString A string that describes the location of the issue. e.g : line number, url, html fragment, etc. positionIdentifier should be as precise as possible for 2 reasons :
- this valus is used in Issue.Id construction and must help discriminate two issues that happen at two different places but that cannot be differenciated otherwise
- help user as much as possible to quickly localize the problem in his/her website server or source code
errorContentString The proof of the issue.
Most problems are detected in website content either obtained passively or from crafted requests made by checks. ErrorContent should contain the piece of content that "convinced" the check of the issue. This is the proof that will be given to the user to help him/her understand and solve the issue. ErrorContent is also helpful to help user detect false positives.maybeFalsePositiveBoolean Some issues may be false positives. Checks must set this value to true if any doubt exists or if any objection may be found by the user, whatever his/her context. Only checks that are 100% sure to be true positives in any case should set this value to false.