The simpleStyleCheck class shows the minimal amount of code required to enable a user-defined source code validation capability that is based on the built-in ecStyleCheck group of classes.
Click Formatted HTML or Simple Text to view the source code for the class.
The constructor for this contributed tool loads the style rules. The remainder of the logic for the source code validation is inherited from ecStyleCheck.
def class "simpleStyleCheck" create required like "ecStyleCheck" ! ** specify the name of the file that contains the style rules ! ** default value: %PvxCode(mid(pgn,1,pos(dlm=pgn,-1))+_obj'_Class$+"_rules.txt")% local styleRulesFile$=mid(pgn,1,pos(dlm=pgn,-1))+_obj'_Class$+"_rules.txt" ! ** Override Description local theDescription$="Simple rule-based Style Check" end def on_create: ! Use the method from the parent class to load the rules _obj'loadRules(from "ecStyleCheck",styleRulesFile$) return end