Skip to content

Commit 4ceb3ee

Browse files
committed
Selectively disabled cops for methods and classes
Rubocop now requires that cops are scoped tighter. This reformats it so that only the specific method or class has the cop disabled.
1 parent fb6d66e commit 4ceb3ee

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

lib/http/options.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# frozen_string_literal: true
22

3-
# rubocop:disable Metrics/ClassLength
4-
53
require "http/headers"
64
require "openssl"
75
require "socket"
86
require "http/uri"
97

108
module HTTP
11-
class Options
9+
class Options # rubocop:disable Metrics/ClassLength
1210
@default_socket_class = TCPSocket
1311
@default_ssl_socket_class = OpenSSL::SSL::SSLSocket
1412
@default_timeout_class = HTTP::Timeout::Null

spec/support/black_hole.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
module BlackHole
44
class << self
5-
# rubocop:disable Style/MethodMissingSuper
6-
def method_missing(*)
5+
def method_missing(*) # rubocop:disable Style/MethodMissingSuper
76
self
87
end
9-
# rubocop:enable Style/MethodMissingSuper
108

119
def respond_to_missing?(*)
1210
true

spec/support/dummy_server/servlet.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# frozen_string_literal: true
33

44
class DummyServer < WEBrick::HTTPServer
5-
# rubocop:disable Metrics/ClassLength
6-
class Servlet < WEBrick::HTTPServlet::AbstractServlet
5+
class Servlet < WEBrick::HTTPServlet::AbstractServlet # rubocop:disable Metrics/ClassLength
76
def self.sockets
87
@sockets ||= []
98
end

0 commit comments

Comments
 (0)