diff --git a/build-tools/capi_parser/src/coreImpl/check/check.py b/build-tools/capi_parser/src/coreImpl/check/check.py index ce5fc5417c6599cf136f0ae565606cb8506c303f..ac2bcf42b8dec2fc134be9363020775019d7e4fa 100644 --- a/build-tools/capi_parser/src/coreImpl/check/check.py +++ b/build-tools/capi_parser/src/coreImpl/check/check.py @@ -22,6 +22,9 @@ from coreImpl.parser.parser import parser_include_ast from coreImpl.check.check_syntax import check_syntax +file_path_test = [] + + def process_api_json(api_info, file_doc_info: FileDocInfo, api_result_info_list): api_result_info_list.extend(check_ndk_name(api_info)) if 'comment' in api_info.keys(): @@ -69,14 +72,11 @@ def write_in_txt(check_result, output_path): def result_to_json(check_result): txt_resul = [] - if len(check_result) == 0: - txt_resul.append('api_check: false') - else: - for result in check_result: - location = f'{result.location}(line:{result.location_line}, col:{result.location_column})' - message = 'API check error of [{}]:{}'.format(result.error_type['description'], result.error_info) - txt_resul.append(OutputTxt(result.error_type['id'], result.level, location, result.file_name, message)) - txt_resul.append('api_check: false') + txt_resul.extend(file_path_test) + for result in check_result: + location = f'{result.location}(line:{result.location_line}, col:{result.location_column})' + message = 'API check error of [{}]:{}'.format(result.error_type['description'], result.error_info) + txt_resul.append(OutputTxt(result.error_type['id'], result.level, location, result.file_name, message)) return json.dumps(txt_resul, default=lambda obj: obj.__dict__, indent=4) @@ -89,6 +89,8 @@ def curr_entry(file_path): def get_check_result_list(file_list): check_result_list = [] for file in file_list: + global file_path_test + file_path_test.append(f'file_path: {file}') root_start = file.split('sdk_c')[0] root_path = f'{root_start}sdk_c' python_obj = parser_include_ast(root_path, [file]) diff --git a/build-tools/capi_parser/src/utils/constants.py b/build-tools/capi_parser/src/utils/constants.py index b88370294744cbb915a37205bf542c46bd1c06c5..fbb6578db7ae8c55fe5f6ed394b2b56c8ad93c22 100644 --- a/build-tools/capi_parser/src/utils/constants.py +++ b/build-tools/capi_parser/src/utils/constants.py @@ -19,7 +19,7 @@ import enum class StringConstant(enum.Enum): - LIB_CLG_PATH = r'D:\Environment\LLVM\bin\libclang.dll' # 共享库 + LIB_CLG_PATH = r'/home/tools/llvm/lib/libclang.so' # 共享库 FUNK_NAME = "ohos_ndk_headers" REPLACE_WAREHOUSE = '\\interface_sdk_c\\interface_sdk_c' # 拉到本地仓路径(去掉磁盘) # 拉到本地仓的三方库绝对路径 diff --git a/third_party/musl/ndk_musl_include/ctype.h b/third_party/musl/ndk_musl_include/ctype.h index fbdba6e3fd9bfdac1c8dc4683aa001fbb9f69c74..54f55f0e81e3d3cfe9b7a8b1a0823997d2fa526a 100644 --- a/third_party/musl/ndk_musl_include/ctype.h +++ b/third_party/musl/ndk_musl_include/ctype.h @@ -45,7 +45,7 @@ static __inline int __isspace(int _c) #define __NEED_locale_t #include -int isalnum_l(int, locale_t); +int isalnum_ll(int, locale_t); int isalpha_l(int, locale_t); int isblank_l(int, locale_t); int iscntrl_l(int, locale_t);