Ⅰ. 插件描述
A Ruby static code analyzer and formatter, based on the community Ruby style guide.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bbatsov/rubocop'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bbatsov/rubocop'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bbatsov/rubocop'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bbatsov/rubocop
Ⅳ. 文档说明
<p align="center">

</p>
Role models are important. <br/>
-- Officer Alex J. Murphy / RoboCop
RuboCop is a Ruby static code analyzer and code formatter. Out of
the box it will enforce many of the guidelines outlined in the
community [Ruby Style
Guide](https://rubystyle.guide).
RuboCop is extremely flexible and most aspects of its behavior can be tweaked via various
configuration options.
Apart from reporting problems in your code, RuboCop can also
automatically fix some of the problems for you.
Please consider financially supporting its ongoing development.
Installation
RuboCop's installation is pretty standard:
$ gem install rubocopIf you'd rather install RuboCop using bundler, add a line for it in your Gemfile (but set the require option to false, as it is a standalone tool):
gem 'rubocop', require: falseRuboCop's development is moving at a very rapid pace and there are
often backward-incompatible changes between minor releases (since we
haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
might want to use a conservative version lock in your Gemfile:
gem 'rubocop', '~> 0.80.1', require: falseQuickstart
Just type rubocop in a Ruby project's folder and watch the magic happen.
$ cd my/cool/ruby/project
$ rubocopDocumentation
You can read a lot more about RuboCop in its official docs.
Compatibility
RuboCop supports the following Ruby implementations:
- MRI 2.3+
- JRuby 9.2+
Team
Here's a list of RuboCop's core developers:
- Bozhidar Batsov (author & head maintainer)
- Jonas Arvidsson
- Yuji Nakayama (retired)
- Evgeni Dzhelyov (retired)
- Ted Johansson
- Masataka Kuwabara
- Koichi Ito
- Maxim Krizhanovski
Logo
RuboCop's logo was created by Dimiter Petrov. You can find the logo in various
formats here.
The logo is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.
Contributors
Here's a list of
all the people who have contributed to the development of RuboCop.
I'm extremely grateful to each and every one of them!
If you'd like to contribute to RuboCop, please take the time to go
through our short
contribution guidelines.
Converting more of the Ruby Style Guide into RuboCop cops is our top
priority right now. Writing a new cop is a great way to dive into RuboCop!
Of course, bug reports and suggestions for improvements are always
- GitHub pull requests are even better! :-)
Funding
While RuboCop is free software and will always be, the project would benefit immensely from some funding.
Raising a monthly budget of a couple of thousand dollars would make it possible to pay people to work on
certain complex features, fund other development related stuff (e.g. hardware, conference trips) and so on.
Raising a monthly budget of over $5000 would open the possibility of someone working full-time on the project
which would speed up the pace of development significantly.
We welcome both individual and corporate sponsors! We also offer a
wide array of funding channels to account for your preferences
(although
currently Open Collective is our
preferred funding platform).
If you're working in a company that's making significant use of RuboCop we'd appreciate it if you suggest to your company
to become a RuboCop sponsor.
You can support the development of RuboCop via
Salt,
Patreon,
PayPal
and Open Collective.
Open Collective Backers
Support us with a monthly donation and help us continue our activities. [Become a backer]
Open Collective Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]
Changelog
RuboCop's changelog is available here.
Copyright
Copyright (c) 2012-2020 Bozhidar Batsov. See LICENSE.txt for
further details.