MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / Tallies

Class Tallies

src/summarycode/tallies.py:46–68  ·  view source on GitHub ↗

Compute tallies for license, copyright and other scans at the codebase level

Source from the content-addressed store, hash-verified

44
45@post_scan_impl
46class Tallies(PostScanPlugin):
47 """
48 Compute tallies for license, copyright and other scans at the codebase level
49 """
50 run_order = 15
51 sort_order = 15
52
53 codebase_attributes = dict(tallies=attr.ib(default=attr.Factory(dict)))
54
55 options = [
56 PluggableCommandLineOption(('--tallies',),
57 is_flag=True, default=False,
58 help='Compute tallies for license, copyright and other scans at the codebase level.',
59 help_group=POST_SCAN_GROUP)
60 ]
61
62 def is_enabled(self, tallies, **kwargs):
63 return tallies
64
65 def process_codebase(self, codebase, tallies, **kwargs):
66 if TRACE_LIGHT: logger_debug('Tallies:process_codebase')
67 tallies = compute_codebase_tallies(codebase, keep_details=False, **kwargs)
68 codebase.attributes.tallies.update(tallies)
69
70
71@post_scan_impl

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected