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

Improve sort order of JSON returned; align with ScanCode toolkit #546

Closed
pombredanne opened this issue Oct 24, 2022 · 0 comments
Closed

Comments

@pombredanne
Copy link
Contributor

The files section of a JSON scan looks this way:

    {
      "for_packages": [
        "pkg:pypi/[email protected]?uuid=cbee3d4a-50c0-480f-8193-005b7b4328c8"
      ],
      "compliance_alert": "",
      "md5": "a02be95d0116629188cd4c2a3fa67660",
      "sha1": "71e4b08e9402a313dc3b1f682854e31f2ba4ee08",
      "extra_data": {},
      "copyrights": [],
      "holders": [],
      "authors": [],
      "licenses": [],
      "license_expressions": [],
      "emails": [],
      "urls": [],
      "path": "et_xmlfile-1.1.0.dist-info/AUTHORS.txt",
      "status": "application-package",
      "size": 64,
      "tag": "",
      "type": "file",
      "name": "AUTHORS.txt",
      "extension": ".txt",
      "programming_language": "",
      "mime_type": "text/plain",
      "file_type": "ASCII text",
      "is_binary": false,
      "is_text": true,
      "is_archive": false,
      "is_key_file": false,
      "is_media": false,
      "package_data": []
    },

The order of fields seems random.
We should instead adopt something like ScanCode toolkit and at least for the base file info something such as https:/nexB/scancode-toolkit/blob/ded56e9120f5fdfb9a1a0309130bb4305a66aacb/src/scancode/api.py#L366

tdruez added a commit that referenced this issue Oct 25, 2022
tdruez added a commit that referenced this issue Oct 25, 2022
SCANCODEIO_TEST_FIXTURES_REGEN

Signed-off-by: Thomas Druez <[email protected]>
tdruez added a commit that referenced this issue Oct 25, 2022
Signed-off-by: Thomas Druez <[email protected]>
tdruez added a commit that referenced this issue Oct 25, 2022
tdruez added a commit that referenced this issue Oct 25, 2022
Signed-off-by: Thomas Druez <[email protected]>
tdruez added a commit that referenced this issue Oct 25, 2022
Signed-off-by: Thomas Druez <[email protected]>
tdruez added a commit that referenced this issue Oct 25, 2022
@tdruez tdruez closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants