Skip to content

Commit

Permalink
Merge pull request #1509 from r7kamura/feature/require-order
Browse files Browse the repository at this point in the history
Enable `Style/RequireOrder` cop
  • Loading branch information
pirj authored Dec 11, 2022
2 parents 0e97cc3 + 7c6ebdd commit 63908ab
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ Style/FormatStringToken:
Exclude:
- spec/rubocop/**/*.rb

Style/RequireOrder:
Enabled: true

# Enable some of RuboCop's pending cops.

Layout/LineContinuationSpacing:
Expand Down
2 changes: 1 addition & 1 deletion bin/build_config
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ $LOAD_PATH.unshift(File.join(__dir__, '..', 'lib'))
require 'yard'

require 'rubocop-rspec'
require 'rubocop/rspec/description_extractor'
require 'rubocop/rspec/config_formatter'
require 'rubocop/rspec/description_extractor'

glob = File.join('lib', 'rubocop', 'cop', 'rspec',
'{,capybara,factory_bot,rails}', '*.rb')
Expand Down
32 changes: 18 additions & 14 deletions lib/rubocop-rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,39 @@
require 'rubocop'

require_relative 'rubocop/rspec'
require_relative 'rubocop/rspec/version'
require_relative 'rubocop/rspec/inject'
require_relative 'rubocop/rspec/language/node_pattern'
require_relative 'rubocop/rspec/node'
require_relative 'rubocop/rspec/version'
require_relative 'rubocop/rspec/wording'
require_relative 'rubocop/rspec/language/node_pattern'

# Dependent on `RuboCop::RSpec::Language::NodePattern`.
require_relative 'rubocop/rspec/language'

require_relative 'rubocop/rspec/factory_bot/language'

require_relative 'rubocop/cop/rspec/mixin/top_level_group'
require_relative 'rubocop/cop/rspec/mixin/variable'
require_relative 'rubocop/cop/rspec/mixin/capybara_help'
require_relative 'rubocop/cop/rspec/mixin/css_selector'
require_relative 'rubocop/cop/rspec/mixin/final_end_location'
require_relative 'rubocop/cop/rspec/mixin/comments_help'
require_relative 'rubocop/cop/rspec/mixin/empty_line_separation'
require_relative 'rubocop/cop/rspec/mixin/inside_example_group'
require_relative 'rubocop/cop/rspec/mixin/metadata'
require_relative 'rubocop/cop/rspec/mixin/namespace'
require_relative 'rubocop/cop/rspec/mixin/css_selector'
require_relative 'rubocop/cop/rspec/mixin/skip_or_pending'
require_relative 'rubocop/cop/rspec/mixin/capybara_help'
require_relative 'rubocop/cop/rspec/mixin/metadata'
require_relative 'rubocop/cop/rspec/mixin/top_level_group'
require_relative 'rubocop/cop/rspec/mixin/variable'

# Dependent on `RuboCop::Cop::RSpec::FinalEndLocation`.
require_relative 'rubocop/cop/rspec/mixin/comments_help'
require_relative 'rubocop/cop/rspec/mixin/empty_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/cop/rspec/base'
require_relative 'rubocop/rspec/align_let_brace'
require_relative 'rubocop/rspec/factory_bot'
require_relative 'rubocop/rspec/concept'
require_relative 'rubocop/rspec/corrector/move_node'
require_relative 'rubocop/rspec/example'
require_relative 'rubocop/rspec/example_group'
require_relative 'rubocop/rspec/factory_bot'
require_relative 'rubocop/rspec/hook'

RuboCop::RSpec::Inject.defaults!

Expand Down
20 changes: 0 additions & 20 deletions spec/project/project_requires_spec.rb

This file was deleted.

2 changes: 1 addition & 1 deletion tasks/cops_documentation.rake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

require 'yard'
require 'rubocop'
require 'rubocop-rspec'
require 'rubocop/cops_documentation_generator'
require 'yard'

YARD::Rake::YardocTask.new(:yard_for_generate_documentation) do |task|
task.files = ['lib/rubocop/cop/**/*.rb']
Expand Down

0 comments on commit 63908ab

Please sign in to comment.