Skip to content

Commit cebba59

Browse files
committed
Add decorator @check_wrapper for all check functions
A new decorator `@check_wrapper` is to move most of the I/O functionalities, such as printing and writing the result into a file, outside of each check function so that each check can focus on the validation logic itself by minimizing the impact from a requirement change in the output format and so on. To support this, a new class `Result` is also introduced to make it clear what a check function is expected to return. As long as `Result` class is returned, the decorator `@check_wrapper` handles the printing them to stdout and files.
1 parent 654c2f1 commit cebba59

3 files changed

Lines changed: 1004 additions & 1041 deletions

File tree

0 commit comments

Comments
 (0)