| 155 | @click.option("--no-same-renames", "same_renames", flag_value=False) |
| 156 | @click.option("-a", "--analyzer", multiple=True, help="Specify analyzers to run") |
| 157 | def diff(pth1, pth2, *, format=None, detections=True, patch=None, same_renames=None, analyzer=None): |
| 158 | if not format: |
| 159 | format = ("text",) |
| 160 | |
| 161 | output_opts = { |
| 162 | "detections": detections, |
| 163 | } |
| 164 | |
| 165 | if analyzer and detections: |
| 166 | output_opts["detections"] = analyzer |
| 167 | |
| 168 | if patch is not None: |
| 169 | output_opts["patch"] = patch |
| 170 | if same_renames is not None: |
| 171 | output_opts["output_same_renames"] = same_renames |
| 172 | |
| 173 | commands.data_diff( |
| 174 | a_path=pth1, |
| 175 | b_path=pth2, |
| 176 | format_uri=format, |
| 177 | output_opts=output_opts |
| 178 | ) |
| 179 | purge(standard=False) |
| 180 | |
| 181 | |
| 182 | @cli.command(name="parse_ast") |