def main():
    parser = argparse.ArgumentParser(description="Validate and reformat JSON"
                                     "files.")
    parser.add_argument('files', metavar='FILES', nargs='+')
    parser.add_argument('-f', '--formatting', choices=['check', 'fix'],
                        help='check or fix formatting of JSON files')
    args = parser.parse_args()

    exit_status = 0
    for path in args.files:
        try:
            _process_file(path, args.formatting, verbose=True)
        except ValueError as err:
            print("%s\n%s" % (path, _indent_note(str(err))))
            exit_status = 1

    return exit_status
dataset/ETHPy150Open openstack/openstack-doc-tools/os_doc_tools/jsoncheck.py/main/original