X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig-hardened-check.py;h=85445b5d2c977a9bd0d163137d26df2edc157499;hb=9851d4f82f4dad8a93afa7de2a3f7348b1f1905e;hp=268bc857c7b9368beb8de98291104a0028cfbd26;hpb=a2c605aa465789eb61400fd04aa874a559eb3724;p=kconfig-hardened-check.git diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 268bc85..85445b5 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -86,9 +86,6 @@ class OptCheck: else: return False, self.result - def __repr__(self): - return '{} = {}'.format(self.name, self.state) - class VerCheck: def __init__(self, ver_expected): @@ -447,14 +444,15 @@ def print_checklist(checklist, with_results): print(json.dumps(opts)) return - # header - print('{:^45}|{:^13}|{:^10}|{:^20}'.format('option name', 'desired val', 'decision', 'reason'), end='') + # table header sep_line_len = 91 if with_results: - print('| {}'.format('check result'), end='') sep_line_len += 30 + print('=' * sep_line_len) + print('{:^45}|{:^13}|{:^10}|{:^20}'.format('option name', 'desired val', 'decision', 'reason'), end='') + if with_results: + print('| {}'.format('check result'), end='') print() - print('=' * sep_line_len) for opt in checklist: