github/rubocop-github
关于
用于检查 GitHub Ruby 项目代码风格的工具
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文RuboCop GitHub
This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects, and is the home of GitHub's Ruby Style Guide.
Usage
Add rubocop-github to your Gemfile, along with its dependencies:
gem "rubocop-github", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false
Inherit all of the stylistic rules and cops through an inheritance declaration in your .rubocop.yml:
# .rubocop.yml
inherit_gem:
rubocop-github:
- config/default.yml # generic Ruby rules and cops
- config/rails.yml # Rails-specific rules and cops
Alternatively, only require the additional custom cops in your .rubocop.yml without inheriting/enabling the other stylistic rules:
# .rubocop.yml
require:
- rubocop-github # generic Ruby cops only
- rubocop-github-rails # Rails-specific cops only
💭 Looking for config/accessibility.yml and the GitHub/Accessibility configs? They have been moved to a new gem.
For more granular control over which of RuboCop's rules are enabled for your project, both from this gem and your own configs, consider using the DisabledByDefault: true option under AllCops in your project's .rubocop.yml file. This will disable all cops by default, and you can then explicitly enable the ones you want by setting Enabled: true. See the RuboCop docs for more information.
Legacy usage
If you are using a rubocop version < 1.0.0, you can use rubocop-github version 0.16.2 (see the README from that version for more details).
Testing
bundle install
bundle exec rake test
The Cops
All cops are located under lib/rubocop/cop/github.
探索相关项目
加载中…