Skip to content

Commit 55f44fe

Browse files
committed
Add warnings field to codebase headers
Reference: #38 Signed-off-by: Jono Yang <[email protected]>
1 parent 653225d commit 55f44fe

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/commoncode/resource.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class Header(object):
158158
duration = String(help='Scan duration in seconds.')
159159
message = String(help='Message text.')
160160
errors = List(help='List of error messages.')
161+
warnings = List(help='List of warning messages.')
161162
extra_data = Mapping(help='Mapping of extra key/values for this tool.')
162163

163164
def to_dict(self):
@@ -180,6 +181,7 @@ def from_dict(cls, **kwargs):
180181
'duration',
181182
'message',
182183
'errors',
184+
'warnings',
183185
'extra_data',
184186
])
185187

@@ -1602,12 +1604,12 @@ def _populate(self, scan_data):
16021604
raise Exception('Input has no file-level scan results.')
16031605

16041606
# We iterate through all the Resource(s) so that we can build attributes each resource contains
1605-
1607+
16061608
sample_resource_data = dict()
1607-
1609+
16081610
for resource in resources_data:
16091611
sample_resource_data.update(resource)
1610-
1612+
16111613
# Collect the existing attributes of the standard Resource class
16121614
standard_res_attributes = set(f.name for f in attr.fields(Resource))
16131615
# add these properties since they are fields but are serialized

0 commit comments

Comments
 (0)