rubocop-extension-generator
rubocop-extension-generator copied to clipboard
A generator of RuboCop's custom cops gem.
## Actual behavior I run the command: ``` $ rubocop-extension-generator rubocop-foobar ``` And I got the following files: ```ruby # rubocop-foobar/sig/rubocop/foobar.rbs module Rubocop module Foobar VERSION: String # See the...
Since we use the `YAML` constant, it would be best practice to `require 'yaml'`, even if _technically_ the fact that we `require 'rubocop'` means that's probably happened already. Added this...
The generator expects to patch RSpec files, so specifying anything other than `rspec` as the test framework would break generation. Therefore, it makes sense to specify it ourselves, and save...
The smoke test was broken. This minimally fixes it, and adds a workflow to run it.
The Gemfile generated by `bundle gem` may already contain the `gem 'rspec'`. (This depends on BUNDLE_GEM__TEST) In that case, the following error will occur: ``` [!] There was an error...
The newer version of bundle (e.g. 2.1.4) seems to have new option to automatically include either rspec or minitest, e.g. via: ``` BUNDLE_GEM__TEST: "rspec" ``` Check existing `gem 'rspec'` declaration...
Passing the extension's config through `ConfigLoader.load_file`, rather than using the private `load_yaml_configuration` method, ensures that `require` / `inherit_from` declarations are handled properly. By loading the extensions additional `Cop` definitions prior...
Update smoke tests to run, and pass for known failures In the same spirit as https://github.com/rubocop/rubocop-extension-generator/pull/20, this was my attempt to get the smoke tests working - There are a...