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

How to find the files without licenses/copyright using this tool? is there a flag for that? #580

Closed
vvscloud opened this issue Sep 3, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@vvscloud
Copy link

vvscloud commented Sep 3, 2020

Description

I want to find out the files without licenses/copyright content using scancode. How can I do that? Also if I want to put a filter exclusively for finding images inside the source code repo, is it possible?

System configuration

For bug reports, it really helps us to know:

  • Linux
  • What installation method was used to install/run scancode? source
@vvscloud vvscloud added the bug Something isn't working label Sep 3, 2020
@pombredanne
Copy link
Member

I want to find out the files without licenses/copyright content using scancode.

There is no explicit filter for that but there is a filter "--only-findings" that does the exact opposite.
You could either:

  1. contribute a plugin based on only-findings to do the opposite
  2. post-process the JSON results separately to collect things without copyright/license

Also if I want to put a filter exclusively for finding images inside the source code repo, is it possible?

well, we have all the data in the scans for that: mime type, file type and extensions as well as an is_media flag https://github.com/nexB/scancode-toolkit/blob/f488b6c2172f588e80e1b764ed6158444e92b8ef/src/typecode/contenttype.py#L480 but nothing that can as a summary tell you: this file is an image. I think we could add this to contenttype.py as is_image
Then once that is done, we could add a generic option to filter based on any of the is_*** flag?
Just some ideas.

@pombredanne
Copy link
Member

https://github.com/nexB/scancode.io/ does display files without a license or without a copyright is better suited for this since it is backed by a database. I am moving this issue there!

@pombredanne pombredanne transferred this issue from nexB/scancode-toolkit Jan 4, 2023
@pombredanne
Copy link
Member

@vvscloud this is an example screen shot from scancode.io
Screenshot from 2023-01-06 09-21-46

You can see how the files without licenses and without copyright are shown in the pie charts.
And clicking it leads to the list:
Screenshot from 2023-01-06 09-23-22

The same data is available through the API for integration in your workflow.

@tdruez
Copy link
Member

tdruez commented Sep 11, 2023

A new "Resources detected license expressions" panel was added in the project details view.
You click on the "no licenses" entry to view the list of files without licenses.
Screenshot 2023-09-11 at 14 32 42

Alternatively, you can use the "Detected license expression" filter in the resources list view.

@tdruez tdruez closed this as completed Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants