Skip to content

--ignore plugin does not work on latest develop #1362

Description

@steven-esser
[sesser@nexb ~] scancode -i --ignore=node_modules Code2/ --json-pp ~/here.json
Setup plugins...
Collect file inventory...
`ERROR: failed to run pre-scan plugin: ignore:
Traceback (most recent call last):
  File "/Users/sesser/Code/scancode-toolkit/src/scancode/cli.py", line 870, in run_codebase_plugins
    plugin.process_codebase(codebase, **kwargs)
  File "/Users/sesser/Code/scancode-toolkit/src/scancode/plugin_ignore.py", line 85, in process_codebase
    remove_resource(resource)
  File "/Users/sesser/Code/scancode-toolkit/src/scancode/resource.py", line 753, in remove_resource
    for descendant in resource.walk(self, topdown=False):
  File "/Users/sesser/Code/scancode-toolkit/src/scancode/resource.py", line 1117, in walk
    for child in self.children(codebase):
  File "/Users/sesser/Code/scancode-toolkit/src/scancode/resource.py", line 1141, in children
    return sorted((get_resource(rid) for rid in self.children_rids), key=_sorter)
  File "/Users/sesser/Code/scancode-toolkit/src/scancode/resource.py", line 1139, in <lambda>
    _sorter = lambda r: (r.has_children(), r.name.lower(), r.name)
AttributeError: 'NoneType' object has no attribute 'has_children'

Scan files for: info with 1 process(es)...
[------------------#-] 244 Scanned: pdfmake-0.1.18.LICENSE 

The --ignore plugin seems to be broken in some way. The above error is display and the scan still starts, but nothing gets ignored.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions