-
-
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
New plugin architecture #885
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Yash D. Saraf <yashdsaraf@gmail.com>
Signed-off-by: Saravanan G <sgoffl1603@gmail.com>
Signed-off-by: Saravanan G <sgoffl1603@gmail.com>
Signed-off-by: Haiko Schol <ext-haiko.schol@here.com>
Signed-off-by: Haiko Schol <ext-haiko.schol@here.com>
Signed-off-by: Haiko Schol <ext-haiko.schol@here.com>
Signed-off-by: Haiko Schol <ext-haiko.schol@here.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* more ScanOption to scancode.__init__.py * add active_scans to BasePlugin initializer * ensure plugins work consistently * try to not make ignores a special case Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* use structured namedtuple to track Scanners and CommandOptions * rework how default scan and selected options are handled using these tuples to streamline the corresponding code and the way selected options are reported in the scan results (at least for JSON) * add is_enabled method to Plugin * ensure the help of options is used for each option, and not a global help for all the options of a given plugin * add new plural option for each scan (such as --licenses) that maps exactly to the key used in the scan results. Use plural variables throughout to simplify the code * use kwargs for the main cli.scancode function for all all options and no longer use named arguments: args can come from any plugins and are not known until runtime. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* fileutils.py: remove file_iter and dir_iter as they were not really used/useful Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* refactor pre-scan plugins to use the same approach as all other plugins and not make ignoring a special case * cli.py and cache.py: remove the on-disk file log and use an in-memory list instead Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* move and other file info code such as get_file_infos and Resource to new resource.py module. Make infos a proper, regular scan * Do use content checksum for scan cache, instead use plain path checksum. This enabled making info a proper scan, since content checksums are no longer needed for cache handling. * remove info cache and use only one cache file per file for its details * Reorganize scan steps to make them co-located and explicit: inventory pre-scan, scan and post-scan are not a set of clean loops * move most of the CLI output in the main scancode function * Add name class attribute to plugins to support UI reporting Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* now return (error string or None, value or None) * this is cleaner than (success, value) where the value could be either the callble result or the error string Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* and not a generator, so they can serialize OK without wrapping Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* This was a useless wrapper * Also improve imports locality and other minor refactorings Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* use generic get_plugins for all plugin types rather than a function with a unique name * use Resource objects throughout (except for format plugins) * enhance BasePlugin base class: the methods are now setup() and teardown() to be executed at init/exit time, process_resource() to process a single Resource and process_codebase() to process a whole Codebase Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
ok, so I am merging now. We can take it from develop for any other quirks. |
This was referenced Feb 7, 2018
Open
Closed
sschuberth
added a commit
to oss-review-toolkit/ort
that referenced
this pull request
Feb 16, 2018
This includes a massive refactoring with lots of performance improvements. For details see aboutcode-org/scancode-toolkit#885
sschuberth
added a commit
to oss-review-toolkit/ort
that referenced
this pull request
Feb 16, 2018
This includes a massive refactoring with lots of performance improvements. For details see aboutcode-org/scancode-toolkit#885
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is for #787 and a few more tickets.
There are a few changes on what is reported:
I want to close #856 in favor of this heavily updated plugin and CLI processing architecture.
@yashdsaraf and @haikoschol ping!