Commit 518ad371 by sikang

update script

parent 7d361071
...@@ -80,7 +80,10 @@ def process_file_content(path, file_name): ...@@ -80,7 +80,10 @@ def process_file_content(path, file_name):
return_level = 0 return_level = 0
if "//interference code" not in line and ("){\n" in line or ") {\n" in line) and func_level == 0: if "//interference code" not in line and \
("){\n" in line or ") {\n" in line) and \
func_level == 0 and \
not isReturn:
func_level = 1 func_level = 1
if func_level > 0: if func_level > 0:
if "//interference code" not in line and "{\n" in line: if "//interference code" not in line and "{\n" in line:
...@@ -103,7 +106,7 @@ def process_file_content(path, file_name): ...@@ -103,7 +106,7 @@ def process_file_content(path, file_name):
"//" not in line: "//" not in line:
if random.randint(0, 20) % 2 == 0: if random.randint(0, 20) % 2 == 0:
line = line.replace(";\n", get_rand_code(return_level>0)) line = line.replace(";\n", func_level(return_level>0))
if ";" in line : if ";" in line :
isErrorIf = False isErrorIf = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment