Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 自定义工具.md #667

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/zh/guide/工具管理/自定义工具.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,24 @@
- **平台已提供的环境变量**

- 获取及使用方式请参考 [Demo 项目](https://github.com/TCATools/demo_tool)。

```
SOURCE_DIR:要扫描的代码目录路径
DIFF_FILES: 值为一个json文件路径,文件内容为增量扫描的文件列表(增量扫描时可用)
SCAN_FILES: 值为一个json文件路径,文件内容为需要扫描的文件列表(增量或全量扫描均可用)
TASK_REQUEST: 值为一个json文件路径,文件内容为当前扫描任务参数
```

有些结果处理的阶段可以跳过,可以在工具环境变量配置里,设置一下:

```
FILTER_TYPE=NO_VERSION_FILTER
IGNORE_TYPE=NO_ISSUE_IGNORE
BLAME_TYPE=NO_BLAME
```

以上这些字段根据各自需要可以自定义添加到环境配置中,具体需不需要要看自己的工具需求,这些环境变量可以自定义,并且可以在程序中获取。

- **工具命令声明**

在工具仓库根目录下,添加一个`tool.json`文件,声明工具的检查和扫描命令,比如:
Expand Down