Skip to content

Commit 89ec807

Browse files
authored
Merge branch 'main' into feature/djangorestframework_update
2 parents 4e46f32 + 997971b commit 89ec807

File tree

135 files changed

+1623
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1623
-409
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424
- name: Checkout Repo
2525
uses: actions/checkout@v3
2626

27+
# 下载二进制文件
28+
- name: Download Binary Files
29+
run: |
30+
set -ex
31+
pwd
32+
bash ./scripts/base/install_bin.sh
33+
2734
- name: Setup Node 16
2835
uses: actions/setup-node@v3
2936
with:

ScriptsAPI.py

Lines changed: 374 additions & 0 deletions
Large diffs are not rendered by default.

client/codepuppy.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def __init__(self):
3737
self._params = CmdArgParser.parse_args()
3838
# 日志输出设置
3939
self.__setup_logger()
40+
# 打印版本信息
41+
self.__print_client_version()
4042

4143
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
4244
LogPrinter.info('running in a PyInstaller bundle')
@@ -49,6 +51,12 @@ def __init__(self):
4951
# 默认git配置
5052
GitConfig.set_default_config()
5153

54+
def __print_client_version(self):
55+
"""打印TCA客户端版本信息"""
56+
LogPrinter.info("=" * 39)
57+
LogPrinter.info(f"*** TCA Client v{settings.VERSION}({settings.EDITION.name} Beta) ***")
58+
LogPrinter.info("=" * 39)
59+
5260
def __setup_logger(self):
5361
"""日志打印配置
5462

client/settings/edition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ class Edition(Enum):
2828
# 版本号
2929
# ========================
3030
# puppy版本号,格式:浮点数,整数部分为8位日期,小数部分为编号(从1开始)
31-
VERSION = 20220907.1
31+
VERSION = 20240716.1

client/tool/luacheck.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,22 @@ def run_luacheck(self, scan_cmd, error_output, pos, rules):
131131
issues = []
132132
for file in raw_warning.iter(tag="testcase"):
133133
# tag, attrib
134-
path = file.attrib.get("classname")[pos:]
134+
path = file.attrib.get("classname")
135135
for error in file.findall("failure"):
136136
rule = error.attrib.get("type")
137137
if rules and rule not in rules:
138138
continue
139139
# 2024/4/18 移除msg中的行列号信息
140140
message = error.attrib.get("message")
141-
if message is None:
141+
if message is None or not message.startswith(path):
142142
continue
143-
infos = message.split(":", 3)
143+
message = message[len(path)+1:]
144+
infos = message.split(":", 2)
144145
# msg中 on line 后面也会跟着行号
145-
msg = infos[3].split("on line ")[0].strip()
146-
line = int(infos[1])
147-
column = int(infos[2])
148-
issues.append({"path": path, "rule": rule, "msg": msg, "line": line, "column": column})
146+
msg = infos[2].split("on line ")[0].strip()
147+
line = int(infos[0])
148+
column = int(infos[1])
149+
issues.append({"path": path[pos:], "rule": rule, "msg": msg, "line": line, "column": column})
149150
return issues
150151

151152

client/util/zipmgr.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,24 @@ def decompress_by_7z(self, zip_file, path, print_enable=False):
119119
def decompress(self, zip_file, path):
120120
logger.info("zip模块执行解压操作...")
121121
# 20190927 bug-fixed, 防止在当前目录下删除当前目录,出现权限异常情况
122-
os.chdir("..")
123-
if os.path.exists(path):
124-
PathMgr().rmpath(path)
122+
cur_dir = os.getcwd()
123+
cur_dir_is_changed = False
124+
if PathMgr().format_path(cur_dir) == PathMgr().format_path(path):
125+
logger.info("Decompress dir is current dir, can not delete it directory, change to parent directory first.")
126+
# 如果要删除的是当前工作目录,先切换到上层目录,再删除
127+
os.chdir("..")
128+
cur_dir_is_changed = True
125129

126-
self.decompress_by_7z(zip_file, path, print_enable=True)
127-
128-
if os.path.exists(WORK_DIR):
129-
os.chdir(WORK_DIR)
130+
try:
131+
if os.path.exists(path):
132+
PathMgr().rmpath(path)
133+
134+
self.decompress_by_7z(zip_file, path, print_enable=True)
135+
finally:
136+
# 恢复进入到当前工作目录
137+
logger.info("Go back to the current working directory.")
138+
if cur_dir_is_changed and os.path.exists(cur_dir):
139+
os.chdir(cur_dir)
130140
return True
131141

132142
def subprocc_log(self, line):

doc/.vuepress/configs/sidebar/en.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const en: SidebarConfig = {
3030
'/en/guide/代码检查/工具/TCA-Armory-R.md',
3131
'/en/guide/代码检查/工具/TCA-Armory-C1.md',
3232
'/en/guide/代码检查/工具/TCA-Armory-Q1.md',
33-
'/en/guide/代码检查/工具/cppcheck.md',
3433
'/en/guide/代码检查/工具/Error-Prone.md',
3534
],
3635
},

doc/.vuepress/configs/sidebar/zh.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const zh: SidebarConfig = {
3030
'/zh/guide/代码检查/工具/TCA-Armory-R.md',
3131
'/zh/guide/代码检查/工具/TCA-Armory-C1.md',
3232
'/zh/guide/代码检查/工具/TCA-Armory-Q1.md',
33-
'/zh/guide/代码检查/工具/cppcheck.md',
3433
'/zh/guide/代码检查/工具/Error-Prone.md',
3534
],
3635
},

doc/en/guide/客户端/其他配置.md

Lines changed: 7 additions & 3 deletions

doc/en/guide/客户端/本地分析.md

Lines changed: 4 additions & 0 deletions

doc/en/quickStarted/enhanceDeploy.md

Lines changed: 17 additions & 31 deletions

doc/images/API的个人令牌.png

-32.5 KB
Binary file not shown.

doc/images/AddRule.png

-68.1 KB
Binary file not shown.

doc/images/AddRule2.png

-48.3 KB
Binary file not shown.

doc/images/AddRule3.png

-32.5 KB
Binary file not shown.

doc/images/Fork.png

-272 KB
Binary file not shown.

doc/images/NewPullRequest.png

-213 KB
Binary file not shown.

doc/images/Nodemanagement.png

-276 KB
Binary file not shown.

doc/images/PR.png

-431 KB
Binary file not shown.

doc/images/ProcessConfiguration2.png

-10.7 KB
Binary file not shown.

doc/images/Welcome.png

-175 KB
Binary file not shown.

doc/images/addcustomrules.png

-129 KB
Binary file not shown.

doc/images/clientConfigIni.png

-417 KB
Binary file not shown.

doc/images/codelint_01.png

-571 KB
Binary file not shown.

doc/images/codelint_02.png

-527 KB
Binary file not shown.

doc/images/codelint_03.png

-542 KB
Binary file not shown.

doc/images/codelint_04.png

-312 KB
Binary file not shown.

doc/images/creataAnalysePlan.png

-115 KB
Binary file not shown.

doc/images/createProject.png

-84.1 KB
Binary file not shown.

doc/images/createTeam.png

-90.6 KB
Binary file not shown.

doc/images/create_repo.png

-199 KB
Binary file not shown.

doc/images/create_team.png

-166 KB
Binary file not shown.

doc/images/create_team_group.png

-181 KB
Binary file not shown.

doc/images/createcustomrule.png

-198 KB
Binary file not shown.

doc/images/customtool_01.png

-214 KB
Binary file not shown.

doc/images/customtool_02.png

-138 KB
Binary file not shown.

doc/images/customtool_03.png

-140 KB
Binary file not shown.

doc/images/customtool_04.png

-241 KB
Binary file not shown.

doc/images/customtool_05.png

-121 KB
Binary file not shown.

doc/images/customtool_06.png

-175 KB
Binary file not shown.

doc/images/fork1.png

-352 KB
Binary file not shown.

doc/images/golangcilint.jpg

-56.6 KB
Binary file not shown.

doc/images/golangcilintversion.jpg

-303 KB
Binary file not shown.

doc/images/homepage.png

-678 KB
Binary file not shown.

doc/images/jenkins_build.png

-201 KB
Binary file not shown.

doc/images/jenkins_console_output.png

-81.5 KB
Binary file not shown.

doc/images/jenkins_deploy_plugin.png

-191 KB
Binary file not shown.
-122 KB
Binary file not shown.

doc/images/jenkins_git_config.png

-130 KB
Binary file not shown.
-144 KB
Binary file not shown.

doc/images/jenkins_manage_jenkins.png

-228 KB
Binary file not shown.

doc/images/jenkins_manage_plugins.png

-278 KB
Binary file not shown.

doc/images/jenkins_new_item.png

-60.8 KB
Binary file not shown.

doc/images/jenkins_output_url.png

-168 KB
Binary file not shown.

doc/images/jenkins_shell.png

-116 KB
Binary file not shown.
-252 KB
Binary file not shown.

doc/images/jenkins_var_path.png

-34.1 KB
Binary file not shown.

doc/images/logo.png

-36.5 KB
Binary file not shown.

doc/images/manage_job_01.png

-420 KB
Binary file not shown.

doc/images/manage_node_01.png

-294 KB
Binary file not shown.

doc/images/manage_node_02.png

-384 KB
Binary file not shown.

doc/images/manage_node_03.png

-281 KB
Binary file not shown.

doc/images/manage_node_04.png

-208 KB
Binary file not shown.

doc/images/manage_oauth_01.png

-222 KB
Binary file not shown.

doc/images/manage_oauth_02.png

-113 KB
Binary file not shown.

doc/images/manage_org_01.png

-306 KB
Binary file not shown.

doc/images/manage_org_02.png

-285 KB
Binary file not shown.

doc/images/manage_team_01.png

-312 KB
Binary file not shown.

doc/images/manage_tool_01.png

-432 KB
Binary file not shown.

doc/images/manage_user_01.png

-334 KB
Binary file not shown.

doc/images/manage_user_02.png

-307 KB
Binary file not shown.

doc/images/node_mange.png

-45.2 KB
Binary file not shown.

doc/images/org_node_manager_1.png

-206 KB
Binary file not shown.

doc/images/org_node_manager_2.png

-193 KB
Binary file not shown.

doc/images/org_node_process.png

-456 KB
Binary file not shown.

doc/images/org_tag_manager.png

-177 KB
Binary file not shown.

doc/images/org_tag_node.png

-94 KB
Binary file not shown.

doc/images/org_tag_scheme.png

-276 KB
Binary file not shown.

doc/images/orgsid.png

-257 KB
Binary file not shown.

doc/images/personalToken.png

-303 KB
Binary file not shown.

doc/images/planPage.png

-237 KB
Binary file not shown.

doc/images/registerCodeRepo.png

-256 KB
Binary file not shown.

doc/images/scheme_codelint_01.png

-410 KB
Binary file not shown.

doc/images/scheme_codelint_02.png

-427 KB
Binary file not shown.

doc/images/scheme_codelint_03.png

-303 KB
Binary file not shown.

doc/images/scheme_codelint_04.png

-406 KB
Binary file not shown.

doc/images/scheme_template_01.png

-366 KB
Binary file not shown.

doc/images/scheme_template_02.png

-241 KB
Binary file not shown.

doc/images/start_scan_01.png

-211 KB
Binary file not shown.

doc/images/start_scan_02.png

-276 KB
Binary file not shown.

doc/images/start_scan_03.png

-298 KB
Binary file not shown.

doc/images/start_scan_04.png

-99.8 KB
Binary file not shown.

doc/images/start_scan_05.png

-354 KB
Binary file not shown.

doc/images/start_scan_06.png

-275 KB
Binary file not shown.

doc/images/team.png

-22.7 KB
Binary file not shown.

doc/images/team_member.png

-152 KB
Binary file not shown.

doc/images/user_token.png

-87.4 KB
Binary file not shown.

doc/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,11 @@ bl@^5.0.0:
706706
readable-stream "^3.4.0"
707707

708708
braces@^3.0.2, braces@~3.0.2:
709-
version "3.0.2"
710-
resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
711-
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
709+
version "3.0.3"
710+
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
711+
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
712712
dependencies:
713-
fill-range "^7.0.1"
713+
fill-range "^7.1.1"
714714

715715
browserslist@^4.21.5:
716716
version "4.21.9"
@@ -915,10 +915,10 @@ fastq@^1.6.0:
915915
dependencies:
916916
reusify "^1.0.4"
917917

918-
fill-range@^7.0.1:
919-
version "7.0.1"
920-
resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
921-
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
918+
fill-range@^7.1.1:
919+
version "7.1.1"
920+
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
921+
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
922922
dependencies:
923923
to-regex-range "^5.0.1"
924924

0 commit comments

Comments
 (0)