()
| 77 | |
| 78 | |
| 79 | def main(): |
| 80 | parser = argparse.ArgumentParser() |
| 81 | parser.add_argument('against', default='develop', nargs='?') |
| 82 | parser.add_argument('-i', '--in-place', action='store_true') |
| 83 | parser.add_argument('-q', '--quiet', action='store_true') |
| 84 | args = parser.parse_args() |
| 85 | try: |
| 86 | clang_format(args.against, apply=args.in_place) |
| 87 | yapf_format(args.against, apply=args.in_place) |
| 88 | except subprocess.CalledProcessError as ex: |
| 89 | if ex.stdout: |
| 90 | print(ex.stdout) |
| 91 | if ex.stderr: |
| 92 | print(ex.stderr) |
| 93 | if not args.quiet: |
| 94 | print(f"Command '{ex.cmd}' returned {ex.returncode}") |
| 95 | raise |
| 96 | # sys.exit(ex.returncode) |
| 97 | |
| 98 | |
| 99 | if __name__ == "__main__": |
no test coverage detected