From: Alexander Popov Date: Fri, 6 Mar 2020 21:31:50 +0000 (+0300) Subject: Improve the table header X-Git-Tag: v0.5.5~29 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=9851d4f82f4dad8a93afa7de2a3f7348b1f1905e;p=kconfig-hardened-check.git Improve the table header --- diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 4f01f57..85445b5 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -444,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: