Skip to content

Commit 1bbc14d

Browse files
committed
Merge branch 'main' of github.com:Lingghh/CodeAnalysis
2 parents 83a7db0 + be1a7d9 commit 1bbc14d

File tree

790 files changed

+12994
-24121
lines changed

Some content is hidden

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

790 files changed

+12994
-24121
lines changed

.cnb.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# .cnb.yml
2+
"**": # 触发的分支名,默认所有分支,按需修改
3+
push: # push 触发,可按需修改为 pull_request 等
4+
- stages:
5+
# 获取 git 变更文件列表,供 TCA 增量分析使用
6+
- name: git-change-list
7+
image: cnbcool/git-change-list:latest
8+
settings:
9+
# 变更文件列表输出到文件中
10+
changed: changed.txt
11+
# 代码分析
12+
- name: TCA
13+
image: tencentcom/tca-plugin:latest
14+
settings:
15+
from_file: changed.txt
16+
block: false
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Custom rule
3+
about: Regarding the demand for customized rules and false positives and negatives.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the demand**
11+
A clear and concise description of what the rule is.
12+
13+
14+
**规则概述(Rules Overview)**
15+
16+
17+
**规则背景(Rule Background)**
18+
代码的功能逻辑,按步骤书写。(The functional logic of the code is written in steps.)
19+
20+
21+
**目标问题点(Target Problem Points)**
22+
- 可以按照场景来阐述,比如场景1、场景2这样;(It can be explained by scenario, such as scenario 1 and scenario 2;)
23+
- 每个场景中是第几个步骤可能出现问题,想要解决/检测什么,可以怎么修复,可以结合右边的Case解释。(In each scenario, which step may cause a problem, what you want to solve/detect, and how to fix it. You can explain it in conjunction with the case on the right.)
24+
25+
26+
**错误代码示例(Bad Case)**
27+
28+
29+
**正确代码示例(Good Case)**
30+
31+
32+
**TCA官网上测试项目链接(TCA official website test project link)**
33+
tca.tencent.com
34+
35+
36+
**Additional context**
37+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
uses: actions/checkout@v3
2626

2727
# 下载二进制文件
28-
- name: Download Binary Files
29-
run: |
30-
set -ex
31-
pwd
32-
bash ./scripts/base/install_bin.sh
28+
# - name: Download Binary Files
29+
# run: |
30+
# set -ex
31+
# pwd
32+
# bash ./scripts/base/install_bin.sh
3333

3434
- name: Setup Node 16
3535
uses: actions/setup-node@v3

.github/workflows/sync.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,33 @@ jobs:
1616
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
1717
git fetch --all
1818
for branch in `git branch -a | grep remotes | grep -v HEAD`; do
19-
git branch --track ${branch##*/} $branch
19+
git branch --track ${branch#remotes/origin/} $branch
2020
done
2121
env:
2222
GITHUB_REPOSITORY: Tencent/CodeAnalysis
2323

2424
- name: Push to TGIT
2525
run: |
2626
remote_repo="https://${TGIT_USERNAME}:${TGIT_PASSWORD}@git.code.tencent.com/${TGIT_REPOSITORY}.git"
27-
git remote add tencent "${remote_repo}"
27+
git remote add tgit "${remote_repo}"
2828
git show-ref
2929
git branch --verbose
30-
git push --all --force tencent
31-
git push --tags --force tencent
30+
git push --all --force tgit
31+
git push --tags --force tgit
3232
env:
3333
TGIT_REPOSITORY: Tencent_Open_Source/CodeAnalysis
3434
TGIT_USERNAME: ${{ secrets.USERNAME }}
3535
TGIT_PASSWORD: ${{ secrets.PASSWORD }}
36+
continue-on-error: true
3637

37-
- name: Push to Gitee
38+
- name: Push to CNB
3839
run: |
39-
remote_repo="https://${GITEE_USERNAME}:${GITEE_PASSWORD}@gitee.com/${GITEE_REPOSITORY}.git"
40-
git remote add gitee "${remote_repo}"
41-
git show-ref
42-
git branch --verbose
43-
git push --all --force gitee
44-
git push --tags --force gitee
40+
remote_repo="https://${CNB_USERNAME}:${CNB_PASSWORD}@cnb.cool/${CNB_REPOSITORY}.git"
41+
git remote add cnb "${remote_repo}"
42+
git push --all --force cnb
43+
git push --tags --force cnb
4544
env:
46-
GITEE_REPOSITORY: zhang9w0v5/CodeAnalysis
47-
GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }}
48-
GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }}
45+
CNB_REPOSITORY: tencent/cloud/tca/code-analysis
46+
CNB_USERNAME: ${{ secrets.CNB_USERNAME }}
47+
CNB_PASSWORD: ${{ secrets.CNB_PASSWORD }}
4948

2.71 MB
Binary file not shown.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ Before submitting a pull request, please make sure the followings are done:
3838
6. Now, you can submit your pull request on `dev` branch.
3939

4040
## License
41-
[MIT LICENSE](LICENSE) is the open source license of TCA. Code contributed by anyone is protected by this license. Please make sure that you can accept the license before contributing your code.
41+
[MIT LICENSE](LICENSE.txt) is the open source license of TCA. Code contributed by anyone is protected by this license. Please make sure that you can accept the license before contributing your code.

0 commit comments

Comments
 (0)