Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deltas_count field #79

Closed
steven-esser opened this issue Feb 22, 2018 · 3 comments
Closed

Add deltas_count field #79

steven-esser opened this issue Feb 22, 2018 · 3 comments

Comments

@steven-esser
Copy link
Contributor

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

@johnmhoran
Copy link
Member

@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"
      ],

. . .

@steven-esser
Copy link
Contributor Author

@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.

@johnmhoran
Copy link
Member

👍

johnmhoran added a commit that referenced this issue Apr 4, 2018
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
johnmhoran added a commit that referenced this issue Apr 4, 2018
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
steven-esser added a commit that referenced this issue Apr 4, 2018
Add deltas_count field to JSON output #79
@johnmhoran johnmhoran moved this from In progress to Done in 1.1.0 Release Apr 4, 2018
@steven-esser steven-esser removed this from Done in 1.1.0 Release Apr 6, 2018
JonoYang pushed a commit that referenced this issue Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants