提交 84e25aa5 创建 作者: 305350171@qq.com's avatar 305350171@qq.com

提交作业

上级 9f541052
流水线 #151776 已失败 于阶段
用时 31 秒
...@@ -8,20 +8,29 @@ import filecmp ...@@ -8,20 +8,29 @@ import filecmp
import subprocess import subprocess
import platform import platform
from colorama import Fore, init, AnsiToWin32
init(wrap=False)
stream = AnsiToWin32(sys.stderr).stream
if __name__ == "__main__": if __name__ == "__main__":
execResult = os.system("git add . && git commit -m \"提交作业\"") execResult = os.system("git add . && git commit -m \"提交作业\"")
print("execResult=", execResult)
if execResult == 256: if execResult == 256:
print("-------- 本次提交没有任何变更,即使推送成功,也不代表远程一定有提交记录 --------") print("\n-------- 本次提交没有任何变更,即使推送成功,也不代表远程一定有提交记录 --------")
print("-------- 请对项目中的文件进行修改后再进行提交-----------------------------------") print("-------- 请对项目中的文件进行修改后再进行提交-----------------------------------")
elif execResult == 128:
print("\n-------- 推送到 Git 远程库失败 --------")
exit(0)
print("\n-------------------------------------------------------------------------------")
print("当弹出命令面板时请分别输入 Git 远程库的用户名和密码。通常为 CodeCode 密码。")
print("注意,在输入完成后按回车。必要时关闭中文输入法。")
print("-------------------------------------------------------------------------------") print("-------------------------------------------------------------------------------")
print("当显示 Password for... 时请输入 Git 远程库密码。通常为 CodeCode 密码。")
print("注意,在输入密码时无回显,输入完成后按回车。必要时关闭中文输入法。")
print("-------------------------------------------------------------------------------")
print(Fore.GREEN + "正在提交作业...", file = stream)
print(Fore.WHITE, file = stream)
sys.stdout.flush()
execResult = os.system("git push") execResult = os.system("git push")
if execResult == 0: if execResult == 0:
print("\n-------- 推送到 Git 远程库成功 --------") print("\n-------- 推送到 Git 远程库成功 --------")
......
  • Developer

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

    • 0 blocker
    • 🚫 0 critical
    • 0 major
    • 🔽 1 minor
    • 2 info

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

    1. 🔽 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-169403) 📘
    2. keyword 'if' not followed by a single space 📘
    3. keyword 'if' not followed by a single space 📘
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论