def lint(args, parser):
    filenames = args.filename
    exit_code = OK
    if not filenames:
        filenames = [STDIN]

    for filename in filenames:
        xcodeproj = data_from_filename(filename)
        root, parseinfo = parse(xcodeproj, format=None, parsertype=args.parser)
        report_parse_status(root, parseinfo, filename=filename)
        if root is None:
            exit_code = max(exit_code, LINT_FAILED)
            continue

        if parseinfo['format'] not in ['xcode', 'xml']:
            reportmessage('The project file "%s" is in %s which is nothing that Xcode can read.' % (filename, parseinfo['format']))
            exit_code = max(exit_code, LINT_FAILED)
            continue

        if parseinfo['format'] == 'xml':
            reportmessage(filename % 'The project file "%s" is in XML which is a clearly a failed lint.')
            exit_code = max(exit_code, LINT_FAILED)
            continue

        projectname = projectname_from_args(args, parser, filename, parseinfo.get('projectname'))
        proj = unparse(root, projectname=projectname)
        if xcodeproj != proj:
            exit_code = max(exit_code, LINT_DIFFERENCES)
            print_unified_diff(xcodeproj, proj, fromfile=filename)
    return exit_code
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/lint/swapped operands of `%`