Skip to content

Move impact_included method into Axe class #47

@m8ttyB

Description

@m8ttyB

Move the impact_included method into the Axe class. Nit, update the method to accept data['violations'] and simplify line 17.

def impact_included(rule, impact):
    if impact == 'minor' or impact is None:
        return True
    elif impact == 'moderate':
        if rule['impact'] != 'minor':
            return True
    elif impact == 'severe':
        if rule['impact'] == 'severe' or rule['impact'] == 'critical':
            return True
    elif impact == 'critical':
        if rule['impact'] == 'critical':
            return True
    else:
return False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions