登录 注册
其他
3,508
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Ruby
语言
—
创建时间
最近更新

项目能做什么

一款用于评估并生成报告的 Ruby 代码质量检测工具。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# RubyCritic

[![Gem Version](https://badge.fury.io/rb/rubycritic.svg)](http://badge.fury.io/rb/rubycritic)
[![Continuous Integration](https://github.com/whitesmith/rubycritic/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/whitesmith/rubycritic/actions/workflows/main.yml)
[![Code Climate](https://codeclimate.com/github/whitesmith/rubycritic/badges/gpa.svg)](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:
  ![RubyCritic overview screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/overview.png)

2. An index of the project files with their respective number of smells:
  ![RubyCritic code index screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/code.png)

3. An index of the smells detected:
  ![RubyCritic smells index screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/smells.png)

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:

  ![Reek output screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/reek.png)

  Into something like this:

  ![RubyCritic file code screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/smell-details.png)

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 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建时间待补全,最近推送
社区活跃Star 3,508 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。