RiskRanking-Callback

Value of a finding, computed by a Python function

Required inputs: IR

Adding this rule to the list of active RiskRanking actions creates a rank factor column in the Dashboard. The name of the list entry is shown as the column name.

The function is called once for every finding, once every metric is computed, and can rank findings by anything the IR and the RFG state about the code they are reported in.

Possible Messages

This rule has no predefined messages.

Options

The following places define options that affect this rule: Analysis-GlobalOptions

callback

callback

Type: typing.Callable[[typing.Union[analysis_result_pb2.Architecture_Violation, analysis_result_pb2.Clone_Pair, analysis_result_pb2.Cycle_Finding, analysis_result_pb2.Dead_Entity, analysis_result_pb2.Metric, analysis_result_pb2.Style_Violation], bauhaus.ir.Graph | None, _dg.Graph], float | None] | None

Default: None

A function taking the finding, the IR connected to the RFG or None without an IR, and the RFG, and returning a value from 0.0 to 1.0 or None for no value.
 

show_by_default

show_by_default : bool = False

Whether or not to show the column by default.