• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3# Copyright (c) 2023 Huawei Device Co., Ltd.
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16from coreImpl.parser.parser import diff_parser_include_ast
17from coreImpl.diff.diff_file import start_diff_file
18
19
20def process_pr(pr_id):
21    print("开发中...")
22
23
24def process_dir(old_dir, new_dir, output_path):
25    start_diff_file(old_dir, new_dir, output_path)
26
27
28def get_dir_by_pr(pr: str):
29    return {"old": "", "new": ""}
30
31
32def process_dir_diff(old_dir, new_dir):
33    diff_info_list = []
34    return diff_info_list
35
36
37def process_file_diff(old_file, new_file):
38    diff_info_list = []
39    return diff_info_list
40
41
42def get_parser_data(file_path):
43    root_start = file_path.split('sdk_c')[0]
44    root_path = f'{root_start}sdk_c'
45    parser_data = diff_parser_include_ast(root_path, [file_path])
46    return parser_data
47