RuboCop::Vicenzo
📖 Documentation
Installation
Add it to the development/test group of your Gemfile:
group :development, :test do
gem 'rubocop-vicenzo', '~> 0.6.0', require: false
end
The version above is kept current automatically on every release; pin to whichever version you prefer.
Or let Bundler add the latest version for you:
bundle add rubocop-vicenzo --group=development --require=false
If bundler is not being used to manage dependencies, install the gem by executing:
gem install rubocop-vicenzo
Usage
You need to tell RuboCop to load the Vicenzo extension. There are three ways to do this:
RuboCop configuration file
Put this into your .rubocop.yml.
plugins: rubocop-vicenzo
Alternatively, use the following array notation when specifying multiple extensions.
plugins:
- rubocop-other-extension
- rubocop-vicenzo
Now you can run rubocop and it will automatically load the RuboCop Vicenzo
cops together with the standard cops.
[!NOTE] The plugin system is supported in RuboCop 1.72+. In earlier versions, use
requireinstead ofplugins.
Command line
rubocop --plugin rubocop-vicenzo
Development
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install.
Releases are automated: the version, the CHANGELOG.md, the git tag and the push
to rubygems.org are all derived from
Conventional Commits by release-please.
There is no version to edit and no release command to run by hand — see
CONTRIBUTING.md.
Documentation
The documentation site is built with Antora and published automatically to GitHub Pages on every new release.
To build it locally, you will need Node.js (v20+) installed. Then install Antora:
npm install -g @antora/cli @antora/site-generator
Generate the AsciiDoc pages from the cop sources and build the site:
bundle exec rake docs:generate
antora antora-playbook.yml
The site will be available at build/site/index.html.
Generate binstubs
If you want is possible change the command bundle exec something by bin/something generating binstubs
bundle binstubs rake rspec-core rubocop
Creating a new cop
bundle exec rake 'new_cop[Vicenzo/OptionalNamespace/CopName]'
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/bvicenzo/rubocop-vicenzo. Read CONTRIBUTING.md first — it covers the commit conventions the release automation depends on. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Rubocop::Vicenzo project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.