MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / check

Function check

tools/ci/cpp_check.py:94–114  ·  view source on GitHub ↗

static code analysis(cppcheck).

()

Source from the content-addressed store, hash-verified

92
93@cli.command()
94def check():
95 """
96 static code analysis(cppcheck).
97 """
98 format_ignore.init_logger()
99 # get modified files list
100 checkout = format_ignore.CheckOut()
101 file_list = checkout.get_new_file()
102 if file_list is None:
103 logging.error("checkout files fail")
104 sys.exit(1)
105
106 # use cppcheck
107 cpp_check = CPPCheck(file_list)
108 cpp_check_result = cpp_check.check()
109
110 if not cpp_check_result:
111 logging.error("static code analysis(cppcheck) fail.")
112 sys.exit(1)
113 logging.info("check success.")
114 sys.exit(0)
115
116
117if __name__ == '__main__':

Callers

nothing calls this directly

Calls 3

get_new_fileMethod · 0.95
checkMethod · 0.95
CPPCheckClass · 0.85

Tested by

no test coverage detected