-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Support multiple input path in CLI #875 #1397 #1399
Conversation
@nicobucher ping... were you able to test this branch a bit? feedback is mucho welcomed! |
Hi @pombredanne, I was able to quickly try this out. I will play around with this branch in the next days. Perhaps I can give more detailed feedback then. |
@nicobucher thank you for the feedback. Note that the current implementation is subpar performance wise because the logic goes this way:
If you have a large codebase (say a Linux kernel) and you modified only one file, this would walk 70K files first. So this can be optimized later if needed. |
Signed-off-by: Philippe Ombredanne <[email protected]>
The handling of ignores and includes/excludes was not fully correct and precedence was not given to includes Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
This was ScanCode can be aclled as a simple function without the Click UI/UX and requirements Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
See ticket #1400 for more details This is an example of how to call Scancode as a function from Python2 or Python3. The benefits are that when the server process has loaded the license index, and imported its modules there is no per-call import/loading penalty anymore. This is using execnet which is the multiprocessing library used by py.test and therefore a rather stable and high quality engine. Signed-off-by: Philippe Ombredanne <[email protected]>
767ef38
to
8afa686
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1399 +/- ##
===========================================
+ Coverage 83.65% 83.83% +0.17%
===========================================
Files 119 119
Lines 13949 14245 +296
===========================================
+ Hits 11669 11942 +273
- Misses 2280 2303 +23
Continue to review full report at Codecov.
|
Signed-off-by: Philippe Ombredanne <[email protected]>
This can be a list or tuple or a string. Signed-off-by: Philippe Ombredanne <[email protected]>
This is to support an possible namespace registration of all ScanCode non-SPDX licenses as discussed in #536 and #532 Signed-off-by: Philippe Ombredanne <[email protected]>
e0096b3
to
96069fd
Compare
@johnmhoran I moved the script to create one SPDX doc per license to this branch... https://github.com/nexB/scancode-toolkit/pull/1399/files#diff-09a4d8eb1415f0acf8c0e24ec59fc3d3 |
Thanks for the heads-up @pombredanne . |
All green ... merging now. |
This adds support for #875 #1397 aka. multiple inputs and a new
--include
option.--include
that works in tandem with the--ignore
and has the same semantics. Includes are processed first then ignores are applied on top.find samples/ | grep zlib |grep -v ada | grep -v iostrea | xargs scancode --include="*JGroup*" --ignore "*.S" --json-pp -
or this:
git diff --name-only master | xargs scancode -i --json-pp -
Reported-by: Nico Bucher @nicobucher
Signed-off-by: Philippe Ombredanne [email protected]