Skip to content

Commit

Permalink
Simplify reference builder
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Dec 11, 2022
1 parent 1d545b7 commit 4f1c9a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/rspec/config_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ConfigFormatter
EXTENSION_ROOT_DEPARTMENT = %r{^(RSpec/)}.freeze
SUBDEPARTMENTS = %(RSpec/Capybara RSpec/FactoryBot RSpec/Rails)
AMENDMENTS = %(Metrics/BlockLength)
COP_DOC_BASE_URL = 'https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/'
COP_DOC_BASE_URL = 'https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/'

def initialize(config, descriptions)
@config = config
Expand Down Expand Up @@ -47,7 +47,7 @@ def replace_nil(config)
end

def reference(cop)
COP_DOC_BASE_URL + cop.sub('RSpec/', '')
COP_DOC_BASE_URL + cop
end

attr_reader :config, :descriptions
Expand Down

0 comments on commit 4f1c9a2

Please sign in to comment.