Exemple #1
0
def quick_designer_check(draft):
    """Quick test."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    d = check_grid_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_grid_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_designer_unlock_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    for e in action_dependency.check_unreachable_designer_actions(draft):
        ret[_ERRORS].append(str(e))
    for w in action_dependency.check_false_unlock_designer_actions(draft):
        ret[_WARNINGS].append(str(w))
    for w in action_dependency.check_missmatched_designer_level(draft):
        ret[_WARNINGS].append(str(w))
    return ret
Exemple #2
0
def full_designer_check(draft):
    """Runs all the designer checks (slow)."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    d = check_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(str(e)))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_grid_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_grid_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_designer_unlock_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    for w in check_designer_urls(draft):
        ret[_WARNINGS].append(str(w))
    for e in action_dependency.check_unreachable_designer_actions(draft):
        ret[_ERRORS].append(str(e))
    for w in action_dependency.check_false_unlock_designer_actions(draft):
        ret[_WARNINGS].append(str(w))
    for w in action_dependency.check_missmatched_designer_level(draft):
        ret[_WARNINGS].append(str(w))
    return ret
Exemple #3
0
def run_designer_checks(draft, settings):  # pylint: disable=R0912
    """Runs the checks that the user set in their GccSettings."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    # cannot turn off checking the predicates.
    for e in check_designer_predicates(draft):
        ret[_ERRORS].append(str(e))
    for e in check_designer_action_column_names(draft):
        ret[_ERRORS].append(str(e))
    if settings.check_pub_dates:
        d = check_grid_pub_exp_dates(draft)
        for e in d[_ERRORS]:
            ret[_ERRORS].append(str(e))
        for w in d[_WARNINGS]:
            ret[_WARNINGS].append(str(w))
    if settings.check_event_dates:
        d = check_grid_event_dates(draft)
        for e in d:
            ret[_ERRORS].append(str(e))
    if settings.check_unlock_dates:
        d = check_designer_unlock_dates(draft)
        for e in d[_ERRORS]:
            ret[_ERRORS].append(str(e))
        for w in d[_WARNINGS]:
            ret[_WARNINGS].append(str(w))
    if settings.check_description_urls:
        for w in check_designer_urls(draft):
            ret[_WARNINGS].append(str(w))
    if settings.check_unreachable:
        for e in action_dependency.check_unreachable_designer_actions(draft):
            ret[_ERRORS].append(str(e))
    if settings.check_false_unlocks:
        for w in action_dependency.check_false_unlock_designer_actions(draft):
            ret[_WARNINGS].append(str(w))
    if settings.check_mismatched_levels:
        for w in action_dependency.check_missmatched_designer_level(draft):
            ret[_WARNINGS].append(str(w))
    return ret
Exemple #4
0
def check_unreachable_designer_actions(draft):
    """Checks for unreachable actions and returns a list of Errors indicating which actions are
    unreachable."""
    return action_dependency.check_unreachable_designer_actions(draft)