# code_review **Repository Path**: LiLiang1/code_review ## Basic Information - **Project Name**: code_review - **Description**: 全盘扫描代码,然后AI针对代码文件进行审查,并返回 审查结果 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2025-06-06 - **Last Updated**: 2025-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Code Review AI 工具 ## 项目介绍 🔍 全盘扫描代码,通过AI对代码文件进行智能审查,并返回详细的审查结果报告 --- ## 软件架构 待补充软件架构说明 --- ## 安装教程 ### Python 安装步骤 1. 访问 [Python官网](https://www.python.org/downloads/windows/) 下载安装包 2. 确定系统架构: ```cmd wmic os get osarchitecture wmic cpu get name ``` ![系统架构截图](readme_img/img_2.png) ![CPU类型截图](readme_img/img_3.png) 3. 根据架构选择对应版本下载(示例为AMD64位) ![下载页面截图](readme_img/img_4.png) 4. 运行安装程序,勾选"Add Python to PATH"选项 ![安装界面截图](readme_img/img_5.png) 5. 验证安装: ```cmd python --version ``` ![验证截图](readme_img/img_6.png) ### IDE 配置步骤 1. 安装Python插件: - File → Settings → Plugins - 搜索并安装Python插件 - 重启IDE生效 2. 配置Python解释器: - File → Settings → Project Structure → SDKs - 选择已安装的Python解释器 - 点击Apply ![解释器配置截图](readme_img/img_9.png) 3. 设置项目解释器: - File → Settings → Project → Python Interpreter - 选择相同的Python解释器 - 点击Apply ### 依赖安装方法 #### 方法一:自动安装 1. 打开任意报错的.py文件 2. IDE会提示缺失依赖 3. 点击"Install"按钮自动安装 ![自动安装截图](readme_img/img_10.png) #### 方法二:手动安装 ```cmd pip install -r requirements.txt -i https://pypi.org/simple ``` ![手动安装截图](readme_img/img_11.png) ### 项目配置与运行 1. 获取大模型API - 注册大模型代理平台账号:[大模型代理平台](https://api.fastgptapi.cn/) ![注册账号](readme_img/img_16.png) - 添加令牌 ![添加令牌](readme_img/img_15.png) - 获取API地址和密钥 ![复制密匙](readme_img/img_17.png) - 点击模型价格出现列表,选择想要的模型,复制模型名称 ![选择模型](readme_img/img_18.png) 2. 修改`.env`配置文件: - 设置大模型API地址/密钥 - 配置数据库连接信息 - 指定要审查的代码路径 ![配置截图](readme_img/img_12.png) 3. 运行主程序: ```python python main.py ``` ![运行截图](readme_img/img_13.png) 4. 查看审查结果: - 程序会生成Excel格式的报告 - ![结果示例](readme_img/img14.png) - 使用Office软件打开查看 - ![报告示例](readme_img/img_14.png) ## 使用说明 待补充详细使用说明 --- ## 参与贡献 欢迎通过以下方式参与项目贡献: 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码变更 4. 新建 Pull Request --- ## 相关资源 - 多语言支持:使用 `Readme_XX.md` 支持不同语言 - [Gitee 官方博客](https://blog.gitee.com) - [Gitee 开源项目探索](https://gitee.com/explore) - [GVP 最有价值开源项目](https://gitee.com/gvp) - [Gitee 使用手册](https://gitee.com/help) - [Gitee 封面人物](https://gitee.com/gitee-stars/)