提交 f091785f 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 4b852310
流水线 #156870 已通过 于阶段
用时 1 分 26 秒
......@@ -158,10 +158,10 @@ def getUserResultFileStr(resultFileType):
def getSpecifyfileStr():
specifyFile = ""
if os.path.isfile("specifyfile.dat"):
specifyFile = "specifyfile.dat"
elif os.path.isfile("specifyfile.txt"):
specifyFile = "specifyfile.txt"
if os.path.isfile("file.dat"):
specifyFile = "file.dat"
elif os.path.isfile("file.txt"):
specifyFile = "file.txt"
return specifyFile
def getRunProgCmdStr(dsType, resultFileType, dsFile, userresultFile):
......
......@@ -139,8 +139,8 @@ if __name__ == "__main__":
# 处理读取指定文件
if teaCheckCount == 0:
specifyfile = "teacher_check/" + getSpecifyfileStr()
if os.path.isfile(specifyfile):
specifyfile = getSpecifyfileStr()
if os.path.isfile("teacher_check/" + specifyfile):
runCpCommand = "cp teacher_check/{0} {0}".format(specifyfile)
runCmd(runCpCommand)
print("正在检查附加算例")
......
  • Developer

    代码质量分析发现了 11 个问题。

    • 0 blocker
    • 🚫 0 critical
    • 2 major
    • 🔽 6 minor
    • 3 info

    注意: 存在下列问题的代码行在本次提交中没有发生变更,无法使用代码行评论的方式进行报告。所以将下列问题汇总显示在这里(点击问题链接可以转到对应的源代码行):

    1. [8 bytes in 1 blocks are definitely lost in loss record 1 of 1

    0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) 0x40070A: main (main.c:10)](https://www.codecode.net/engintime-cs/teacher-group/shx/Test/casegroup/template/readargv-dat-writefile-dat/blob/f091785fa228766bbd9892492a731ee10e479ae4/main.c#L10) 📘

    1. Memory leak: p 📘
    2. 🔽 Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config. (ProjectKey-176964) 📘
    3. 🔽 Variable 'b' is assigned a value that is never used. 📘
    4. 🔽 Variable 'p' is allocated memory that is never used. 📘
    5. 🔽 Either the condition 'fp2!=0' is redundant or there is possible null pointer dereference: fp2. 📘
    6. 🔽 Unused variable: buf 📘
    7. 🔽 Either the condition 'fp!=0' is redundant or there is possible null pointer dereference: fp. 📘
    8. keyword 'if' not followed by a single space 📘
    9. closing curly bracket not in the same line or column 📘
    10. closing curly bracket not in the same line or column 📘
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论