Compute tallies for license, copyright and other scans at the codebase level
| 44 | |
| 45 | @post_scan_impl |
| 46 | class 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 |
nothing calls this directly
no test coverage detected