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

Class GeneratedCodeDetector

src/summarycode/generated.py:45–68  ·  view source on GitHub ↗

Tag a file as generated.

Source from the content-addressed store, hash-verified

43
44@scan_impl
45class GeneratedCodeDetector(ScanPlugin):
46 """
47 Tag a file as generated.
48 """
49 resource_attributes = dict(is_generated=Boolean(
50 help='True if this file is likely an automatically generated file.'))
51
52 run_order = 50
53 sort_order = 50
54
55 options = [
56 PluggableCommandLineOption(('--generated',),
57 is_flag=True, default=False,
58 help='Classify automatically generated code files with a flag.',
59 help_group=OTHER_SCAN_GROUP,
60 sort_order=50,
61 )
62 ]
63
64 def is_enabled(self, generated, **kwargs):
65 return generated
66
67 def get_scanner(self, **kwargs):
68 return generated_scanner
69
70
71def generated_scanner(location, **kwargs):

Callers

nothing calls this directly

Calls 2

BooleanFunction · 0.90

Tested by

no test coverage detected