rubycritic
3,508
Stars
234
Forks
45
Watchers
35
Open Issues
MIT
许可证
Ruby
语言
2013-10-09
创建时间
2026-11-06
最近更新
项目能做什么
一款用于评估并生成报告的 Ruby 代码质量检测工具。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# RubyCritic
[](http://badge.fury.io/rb/rubycritic)
[](https://github.com/whitesmith/rubycritic/actions/workflows/main.yml)
[](https://codeclimate.com/github/whitesmith/rubycritic)
<img src="https://github.com/whitesmith/rubycritic/raw/main/images/logo.png" alt="RubyCritic Icon" align="right">
RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [Flay][2] and [Flog][3] to provide a quality report of your Ruby code.
## Table of Contents
- [RubyCritic](#rubycritic)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Analyzer Configuration](#analyzer-configuration)
- [Alternative Usage Methods](#alternative-usage-methods)
- [Rake Task](#rake-task)
- [Formatters](#formatters)
- [Compatibility](#compatibility)
- [Improving RubyCritic](#improving-rubycritic)
- [Contributors](#contributors)
- [Credits](#credits)
## Overview
This gem provides features such as:
1. An overview of your project:

2. An index of the project files with their respective number of smells:

3. An index of the smells detected:

4. When analysing code like the following:
```ruby
class Dirty
def awful(x, y)
if y
@screen = widgets.map {|w| w.each {|key| key += 3}}
end
end
end
```
It basically turns something like this:

Into something like this:

5. It uses your source control system (only Git, Mercurial and Perforce
are currently supported) to compare your currently uncommitted
changes with your last commit.
**Warning**: If your code is not as you expect it to be after running
RubyCritic, please check your source control system stash.
Checkout the `/docs` if you want to read more about our [core metrics](https://github.com/whitesmith/rubycritic/blob/main/docs/core-metrics.md).
## Getting Started
RubyCritic can be installed with the following command:
```bash
$ gem install rubycritic
```
If you'd rather install RubyCritic using Bundler, add this line to your
application's Gemfile:
```ruby
gem "rubycritic", require: false
```
And then execute:
```bash
$ bundle
```
## Usage
Running `rubycritic` with no
阅读完整原文
商业机会分析 AI 生成
托管式 RubyCritic CI/CD 代码审查机器人 (SaaS/GitHub App)
| 产品构想 | 构建 GitHub App 服务,在每次 Pull Request 时自动运行 RubyCritic 静态分析,比对分支差异并在 PR 中直接评论增量异味、复杂度变化及质量得分变动。 |
| 核心功能 | GitHub/GitLab PR 自动扫描、增量异味高亮提示、基于 minimum-score 的质量门禁阻止、历史指标趋势看板 |
| 目标用户 | 中小型 Ruby/Rails 研发团队、远程协作工程团队 |
| 难度/周期 | 中等 · 4-6 周 · 成本:极低(主要是轻量级应用服务器、Webhook 处理计算资源) |
| 收费模式 | 免费额度 + 团队订阅制(如每月 $15-49/仓库或团队席位收费) |
| 竞争风险 | 市场上已有成熟竞争对手(如 CodeClimate、SonarQube、Pronto),需通过更低廉的价格或更专注 RubyCritic 体验切入 |
| 依据 | 已验证事实(README 中提供 `--mode-ci`、`-b/--branch` 和 `-t/--maximum-decrease` 具备比对能力) |
企业级 Ruby 代码资产审计与技术债分析工具套件
| 产品构想 | 针对企业内网隔离环境或外包验收,提供一键生成专业 PDF/HTML 质量审计报告与债务评分的独立服务或本地打包方案,包含合规性检查与重构优先级建议。 |
| 核心功能 | 静态分析结果聚合离线报告、技术债量化折算工时估算、模块风险热力图导出、合规审计标准比对 |
| 目标用户 | 外包监理方、企业架构师、技术审计员、IT 管理层 |
| 难度/周期 | 较低 · 2-3 周 · 成本:极低(客户端打包与报告渲染模板开发) |
| 收费模式 | 单次报告授权费或按项目/年度买断式商业许可 |
| 竞争风险 | 企业客户采购决策周期长,Ruby 整体企业级新增市场规模有限 |
| 依据 | 数据支持的判断(RubyCritic 核心价值即在于报告可视化与异味归纳,可直接衍生出审计报告) |
IDE 智能重构与异味实时消除插件 (VSCode / RubyMine)
| 产品构想 | 开发集成 RubyCritic 及底层 Reek/Flay/Flog 的编辑器插件,结合大语言模型,在代码编写时实时标记异味并提供一键重构建议与修复补丁。 |
| 核心功能 | 行内异味波浪线提示、复杂度实时计算评分面板、结合 LLM 的异味一键重构补丁生成 |
| 目标用户 | 日常使用 VSCode / RubyMine 开发的 Ruby/Rails 工程师 |
| 难度/周期 | 中等 · 3-5 周 · 成本:低(插件开发成本 + 接入第三方 LLM API 的用量费用) |
| 收费模式 | 插件基础功能免费,LLM 驱动的自动重构与高级分析功能采用月度订阅或 API Token 计费 |
| 竞争风险 | 本地环境解析 Ruby Gem 依赖配置较繁琐;通用 AI 编程助手(如 Copilot、Cursor)正在挤压单语言插件空间 |
| 依据 | AI推测 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| goldbergyoni/nodebestpractices | 中文介绍暂未生成 ✅ The Node.js best practices list (July 2026) |
105,723 | Dockerfile |
| ryanmcdermott/clean-code-javascript | 中文介绍暂未生成 Clean Code concepts adapted for JavaScript |
94,692 | JavaScript |
| shanraisshan/claude-code-best-practice | 中文介绍暂未生成 from vibe coding to agentic engineering - practice makes cla |
68,973 | HTML |
| h5bp/html5-boilerplate | 中文介绍暂未生成 A professional front-end template for building fast, robust, |
57,669 | JavaScript |
| isocpp/CppCoreGuidelines | 中文介绍暂未生成 The C++ Core Guidelines are a set of tried-and-true guidelin |
45,466 | CSS |
| TheAlgorithms/JavaScript | 中文介绍暂未生成 Algorithms and Data Structures implemented in JavaScript for |
34,278 | JavaScript |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 2013-10-09,近 30 天仍在推送 |
| 社区活跃 | Star 3,508 / Fork 234 / Issue 35(数据支持,可自行核实) |
| 许可证 | MIT |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/whitesmith/rubycritic.git cd rubycritic # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。