-
Notifications
You must be signed in to change notification settings - Fork 48
The GeneralRule class
The GeneralRule class is an abstract class that should be inherited by all rules that wish to be passed an instance of the RobotFile class. When the rule is applied (ie: the apply method is called), an instance of the RobotFile will be passed as a parameter.
This class is useful when you want a rule that runs against either a suite or resource file. It is particularly useful for rules that want to do its own parsing, by referencing the raw_text
attribute of the class. For example, the LineTooLong rule is a GeneralRule that iterates over each line in the raw text.
The class has an attribute named severity which defines the severity of the rule. The default severity is WARNING but may be overridden in the concrete class.
Every class that inherits from this class must define a method named apply
. This method must take exactly one parameter, a [Suite|The Suite class]] object.