Check options in incoming ScanCode files #2 - #13
Merged
Merged
Conversation
* Scan class 'get_options()' method adds options from
'scancode_options' field as dictionary to 'options' attribute.
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Member
Author
|
@MaJuRG I see my commit failed one of the two Travis CI builds -- here's an excerpt from the build: |
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
steven-esser
reviewed
Nov 1, 2017
steven-esser
left a comment
Contributor
There was a problem hiding this comment.
You should also add additional 'option' field checks for the Scan model unit tests on lines 238-265 in test_models.py
|
|
||
| scan = models.Scan(test_file) | ||
|
|
||
| assert scan.options.get( '--license', None ) == None |
Contributor
There was a problem hiding this comment.
We can probably remove these spaces after the left and right parens: .get('--license', None)
| assert scan.options['--license-score'] == 0 | ||
| assert scan.options['--format'] == 'json' | ||
| assert scan.options.get( '--package', None ) == None | ||
| assert scan.options.get( '--copyright', None ) == None |
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
steven-esser
approved these changes
Nov 1, 2017
Contributor
|
merged |
This file contains hidden or 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
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.
get_options()method adds options fromscancode_optionsfield as dictionary tooptionsattribute.Signed-off-by: John M. Horan johnmhoran@gmail.com