module documentation

Common library for writing rule-style checks for generating warnings and errors. Use of this style streamlines reporting.

The pattern for rules is simple: a rule provides a function that implements the rule and a format string. If the function returns a non-zero value, that value is combined with the format string to produced an error reporting string. There are other conveniences as well. If the rule returns a list or a tuple, that will be transformed into a human-readable list.

This library is a layer on top of the base L{WtfWarning} and L{WtfError} representation in roswtf.model.

Function error_rule Check return value of rule and update ctx if rule failed.
Function warning_rule Check return value of rule and update ctx if rule failed.
Function _check_rule Undocumented
def error_rule(rule, ret, ctx):

Check return value of rule and update ctx if rule failed.

@param rule: Rule/message pair. @type rule: (rule_fn, format_msg) @param ret: return value of rule. If value is non-zero, rule failed @type ret: Any @param ctx: context for which rule failed @type ctx: L{WtfContext}

def warning_rule(rule, ret, ctx):

Check return value of rule and update ctx if rule failed.

@param rule: Rule/message pair. @type rule: (rule_fn, format_msg) @param ret: return value of rule. If value is non-zero, rule failed @param ret: Any @param ctx: context for which rule failed @param ctx: L{WtfContext}

def _check_rule(rule, ret, ctx, ctx_list, level):

Undocumented