From 963223f265d4f4d28e4457429021dc44f670f5bc Mon Sep 17 00:00:00 2001 From: Robert Fletcher Date: Fri, 19 Jun 2020 12:17:09 -0700 Subject: [PATCH] Add mixins folder This moves several files to a new `mixins/` folder. I was going to add some new macros, per [this comment][1], but thought it might clutter things up a bit to put them in the root folder. I thought of adding a `macros/` folder, but decided to emulate the [rubocop source][2] instead. [1]: https://github.com/rubocop-hq/rubocop-rspec/pull/934#issuecomment-643813427 [2]: https://github.com/rubocop-hq/rubocop/tree/master/lib/rubocop/cop/mixin --- lib/rubocop-rspec.rb | 14 ++++++++------ .../{rspec => cop/rspec/mixin}/align_let_brace.rb | 0 .../rspec/mixin}/blank_line_separation.rb | 0 .../rspec/mixin}/final_end_location.rb | 0 .../rspec/mixin}/top_level_describe.rb | 0 .../{rspec => cop/rspec/mixin}/top_level_group.rb | 0 lib/rubocop/{rspec => cop/rspec/mixin}/variable.rb | 0 7 files changed, 8 insertions(+), 6 deletions(-) rename lib/rubocop/{rspec => cop/rspec/mixin}/align_let_brace.rb (100%) rename lib/rubocop/{rspec => cop/rspec/mixin}/blank_line_separation.rb (100%) rename lib/rubocop/{rspec => cop/rspec/mixin}/final_end_location.rb (100%) rename lib/rubocop/{rspec => cop/rspec/mixin}/top_level_describe.rb (100%) rename lib/rubocop/{rspec => cop/rspec/mixin}/top_level_group.rb (100%) rename lib/rubocop/{rspec => cop/rspec/mixin}/variable.rb (100%) diff --git a/lib/rubocop-rspec.rb b/lib/rubocop-rspec.rb index 93b586449..49c01e8eb 100644 --- a/lib/rubocop-rspec.rb +++ b/lib/rubocop-rspec.rb @@ -9,21 +9,23 @@ require_relative 'rubocop/rspec/version' require_relative 'rubocop/rspec/inject' require_relative 'rubocop/rspec/node' -require_relative 'rubocop/rspec/top_level_describe' require_relative 'rubocop/rspec/wording' require_relative 'rubocop/rspec/language' require_relative 'rubocop/rspec/language/node_pattern' -require_relative 'rubocop/rspec/top_level_group' + +require_relative 'rubocop/cop/rspec/mixin/align_let_brace' +require_relative 'rubocop/cop/rspec/mixin/top_level_describe' +require_relative 'rubocop/cop/rspec/mixin/top_level_group' +require_relative 'rubocop/cop/rspec/mixin/variable' +require_relative 'rubocop/cop/rspec/mixin/final_end_location' +require_relative 'rubocop/cop/rspec/mixin/blank_line_separation' + require_relative 'rubocop/rspec/concept' require_relative 'rubocop/rspec/example_group' require_relative 'rubocop/rspec/example' require_relative 'rubocop/rspec/hook' -require_relative 'rubocop/rspec/variable' require_relative 'rubocop/cop/rspec/cop' -require_relative 'rubocop/rspec/align_let_brace' require_relative 'rubocop/rspec/factory_bot' -require_relative 'rubocop/rspec/final_end_location' -require_relative 'rubocop/rspec/blank_line_separation' require_relative 'rubocop/rspec/corrector/move_node' RuboCop::RSpec::Inject.defaults! diff --git a/lib/rubocop/rspec/align_let_brace.rb b/lib/rubocop/cop/rspec/mixin/align_let_brace.rb similarity index 100% rename from lib/rubocop/rspec/align_let_brace.rb rename to lib/rubocop/cop/rspec/mixin/align_let_brace.rb diff --git a/lib/rubocop/rspec/blank_line_separation.rb b/lib/rubocop/cop/rspec/mixin/blank_line_separation.rb similarity index 100% rename from lib/rubocop/rspec/blank_line_separation.rb rename to lib/rubocop/cop/rspec/mixin/blank_line_separation.rb diff --git a/lib/rubocop/rspec/final_end_location.rb b/lib/rubocop/cop/rspec/mixin/final_end_location.rb similarity index 100% rename from lib/rubocop/rspec/final_end_location.rb rename to lib/rubocop/cop/rspec/mixin/final_end_location.rb diff --git a/lib/rubocop/rspec/top_level_describe.rb b/lib/rubocop/cop/rspec/mixin/top_level_describe.rb similarity index 100% rename from lib/rubocop/rspec/top_level_describe.rb rename to lib/rubocop/cop/rspec/mixin/top_level_describe.rb diff --git a/lib/rubocop/rspec/top_level_group.rb b/lib/rubocop/cop/rspec/mixin/top_level_group.rb similarity index 100% rename from lib/rubocop/rspec/top_level_group.rb rename to lib/rubocop/cop/rspec/mixin/top_level_group.rb diff --git a/lib/rubocop/rspec/variable.rb b/lib/rubocop/cop/rspec/mixin/variable.rb similarity index 100% rename from lib/rubocop/rspec/variable.rb rename to lib/rubocop/cop/rspec/mixin/variable.rb