def parse_cli()

in utils/comment-github-pr.py [0:0]


def parse_cli():
    """Parse CLI and return parsed parameters"""

    parser = ArgumentParser()

    parser.add_argument(
        "-r",
        "--report-file",
        help="GCC Style Report which should be used to create a PR comment (format: file:line:<message>)",
        default=None,
        required=True,
    )

    parser.add_argument(
        "-R",
        "--report-zero",
        help="Also report if there have not been any defects",
        default=False,
        action="store_true",
    )

    parser.add_argument(
        "-s",
        "--summary",
        help="Only comment a summary of the report",
        default=False,
        action="store_true",
    )

    # Parse parameters
    args = vars(parser.parse_args())
    log.debug("Received arguments %r", args)

    return args