nexB/deltacode

Add deltas_count field

steven-esser opened this issue · 3 comments

We should have a deltas_count field in JSON output, similar to scancode-toolkit

May need some discussion as to how to handle the -a option

@MaJuRG For your feedback, here's a JSON excerpt showing how my current draft handles the total count ("deltas_count_total": 8,) and the -a option ("deltas_count_unmodified": 7,):

{
  "deltacode_notice": [string omitted on GH for brevity],
  "deltacode_options": {
    "new_scan_path": "C:/code/nexb/dev/deltacode/tests/data/cli/scan_1_file_moved_new.json",
    "old_scan_path": "C:/code/nexb/dev/deltacode/tests/data/cli/scan_1_file_moved_old.json",
    "--all-delta-types": true
  },
  "deltacode_version": "1.0.0.post43.c2af0b2",
  "deltacode_errors": [],
  "deltas_count_total": 8,
  "deltas_count_unmodified": 7,
  "deltas": [
    {
      "factors": [
        "moved"
      ],

. . .

@johnmhoran I think we should just have a single deltas_count field that is simply the number of delta objects that will be found in the "payload" (deltas: )

So in the case where everything is unmodified, this number would be 0 if there was no -a flag given.

👍