def METHOD_NAME():
    rcode = 0
    total = 0
    warnings = warning_summaries()
    args = parse_args()
    use_gcc_format = not args.msvc
    line_no = 1
    for line in get_input_lines(args.logfile):
        total += count_warning(use_gcc_format, line_no, line, warnings)
        line_no += 1
    if args.list:
        warnings.list_all()
    if args.files and warnings.files:
        warnings.print_files()
    if warnings.types:
        warnings.print_types()
    print("Total: {} warnings".format(total), end="")
    if args.max_warnings >= 0:
        print(" (out of {} allowed)\n".format(args.max_warnings))
        if total > args.max_warnings:
            print("Error: upper limit of allowed warnings is", args.max_warnings)
            rcode = 1
    else:
        print("\n")
    return rcode