-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
Cannot call (easily) the main scancode function from Python #1780
Comments
@pombredanne Can I work on it? |
@Iamshankhadeep this is a rather complex one: this about being able to call https://github.com/nexB/scancode-toolkit/blob/25d71f078f82d23a0b6ee0d0019e810430af4295/src/scancode/cli.py#L540 from another program for instance with I know how to fix the problem ... but this requires introspection into how options are contributed by the all scancode plugins which is far from trivial. ... the You are welcome to have a stab at this... The first step would be to craft and commit a failing tests. BUT I would suggest that you may look into something a tad easier like any of these two https://github.com/nexB/scancode-toolkit/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+milestone%3A%22v3.1+%22 |
This is the first setp and can be used this way: >>> from scancode import cli >>> rc, results = run_scan(<absolute loc a file or dir to scan>, license=Trye, copyright=True) The options are overall the same as when calling the CLI Signed-off-by: Philippe Ombredanne <[email protected]>
Also apply minor import and code ordering cleanups Signed-off-by: Philippe Ombredanne <[email protected]>
Also apply minor import and code ordering cleanups Signed-off-by: Philippe Ombredanne <[email protected]>
Allow to call "run_scan" as a function #1780
This has been fixed and merged in develop. I am keeping this open to add the docs for this. |
This is the first setp and can be used this way: >>> from scancode import cli >>> rc, results = run_scan(<absolute loc a file or dir to scan>, license=Trye, copyright=True) The options are overall the same as when calling the CLI Signed-off-by: Philippe Ombredanne <[email protected]>
Also apply minor import and code ordering cleanups Signed-off-by: Philippe Ombredanne <[email protected]>
* uniformize aliases order * LighttpdConfLexer: add lighttpd.conf filename
* uniformize aliases order * LighttpdConfLexer: add lighttpd.conf filename
Description
This has been discovered during a hacking session with @valeriocos . See also chaoss/grimoirelab-graal#64
Note that we also faced #1778 reported by @AyanSinhaMahapatra
System configuration
For bug reports, it really helps us to know:
The text was updated successfully, but these errors were encountered: