Skip to content

Commit

Permalink
print summary on lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Jul 11, 2024
1 parent 22a7f8a commit 01a47f5
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions scgallery/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def __lint(self, design):

if not chip:
# custom flow, so accept
return True
return None

if 'lintflow' in chip.getkeys('flowgraph'):
chip.schema.remove('flowgraph', 'lintflow')
Expand All @@ -502,7 +502,7 @@ def __lint(self, design):

if chip.get('option', 'frontend') not in ('verilog', 'systemverilog'):
# Right now there are no linting for non-verilog
return True
return None

try:
chip.run()
Expand Down Expand Up @@ -670,10 +670,30 @@ def lint(self):
'''
Run lint on the enabled designs.
'''

status = {}

error = False
for job in self.__get_runnable_jobs():
print(job['print'])
error |= not self.__lint(job)
lint_status = self.__lint(job)
if lint_status is not None:
error |= not lint_status

status[job['design'], job['target']] = lint_status

for job, result in status.items():
design, target = job

title = f"Lint on \"{design}\""
if target:
title += f" with \"{target}\""

print(title)
if result:
print(" Passed")
else:
print(" Failed")

return not error

Expand Down

0 comments on commit 01a47f5

Please sign in to comment.