Skip to content

Commit 5b04937

Browse files
committed
Rubocop: Stop selectively disabling cops we routinely disable
1 parent 28c7ec2 commit 5b04937

25 files changed

+45
-42
lines changed

.rubocop.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@ Metrics/ModuleLength:
336336
Metrics/ParameterLists:
337337
Enabled: false
338338

339-
Metrics/PerceivedComplexity:
340-
Enabled: true
341-
342339
Naming/AccessorMethodName:
343340
Enabled: false
344341

@@ -815,3 +812,9 @@ Style/FormatStringToken:
815812

816813
Style/MultilineTernaryOperator:
817814
Enabled: false
815+
816+
Metrics/AbcSize:
817+
Enabled: false
818+
819+
Metrics/PerceivedComplexity:
820+
Enabled: false

lib/vanagon/cli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CLI
4242
help print this help
4343
DOCOPT
4444

45-
def parse(argv) # rubocop:disable Metrics/AbcSize
45+
def parse(argv)
4646
parsed_options = parse_options(argv)
4747
sub_command = parsed_options['<command>']
4848
sub_argv = parsed_options['<args>']

lib/vanagon/cli/build.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def parse(argv)
4141
exit 1
4242
end
4343

44-
def run(options) # rubocop:disable Metrics/AbcSize
44+
def run(options)
4545
project = options[:project_name]
4646
platform_list = options[:platforms].split(',')
4747
target_list = []

lib/vanagon/cli/build_requirements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def parse(argv)
3232
exit 1
3333
end
3434

35-
def run(options) # rubocop:disable Metrics/AbcSize
35+
def run(options)
3636
platform = options[:platform]
3737
project = options[:project_name]
3838
driver = Vanagon::Driver.new(platform, project)

lib/vanagon/cli/list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def output(list, use_spaces)
2929
return list
3030
end
3131

32-
def run(options) # rubocop:disable Metrics/AbcSize
32+
def run(options)
3333
check_directories(options)
3434

3535
default_list = topic_list(File.dirname(__FILE__), '..', 'platform', 'defaults')

lib/vanagon/component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def self.load_component(name, configdir, settings, platform)
156156
# @param settings [Hash] the settings to be used in the component
157157
# @param platform [Vanagon::Platform] the platform to build the component for
158158
# @return [Vanagon::Component] the component with the given settings and platform
159-
def initialize(name, settings, platform) # rubocop:disable Metrics/AbcSize
159+
def initialize(name, settings, platform)
160160
@name = name
161161
@settings = settings
162162
@platform = platform
@@ -313,7 +313,7 @@ def deprecated_rewrite_url
313313
# makefile template
314314
#
315315
# @param workdir [String] working directory to put the source into
316-
def get_source(workdir, cachedir = nil) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
316+
def get_source(workdir, cachedir = nil)
317317
opts = options.merge({ workdir: workdir, cachedir: cachedir, dirname: dirname })
318318
if url || !mirrors.empty?
319319
if %w[y yes true 1].include? ENV.fetch('VANAGON_USE_MIRRORS', 'n').downcase

lib/vanagon/component/dsl.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def conflicts(pkgname, version = nil)
176176
# service_type [String] type of the service (network, application, system, etc)
177177
# init_system [String] the init system on which to install service (sysv, systemd)
178178
# link_target [String] executable service file should be linked to
179-
def install_service(service_file, default_file = nil, service_name = @component.name, **options) # rubocop:disable Metrics/AbcSize
179+
def install_service(service_file, default_file = nil, service_name = @component.name, **options)
180180
init_system = options[:init_system] || @component.platform.servicetype
181181
servicedir = @component.platform.get_service_dir(init_system)
182182

@@ -246,7 +246,7 @@ def install_service(service_file, default_file = nil, service_name = @component.
246246
# @param owner [String] owner of the file
247247
# @param group [String] group owner of the file
248248
# # @param sudo [Boolean] whether to use sudo to create the file and set mode
249-
def install_file(source, target, mode: nil, owner: nil, group: nil, sudo: false) # rubocop:disable Metrics/AbcSize
249+
def install_file(source, target, mode: nil, owner: nil, group: nil, sudo: false)
250250
sudo_check = sudo ? "#{sudo_bin} " : ""
251251

252252
@component.install << "#{sudo_check}#{@component.platform.install} -d '#{File.dirname(target)}'"
@@ -421,7 +421,7 @@ def add_source(uri, options = {})
421421
# @param mode [String] octal mode to apply to the directory
422422
# @param owner [String] owner of the directory
423423
# @param group [String] group of the directory
424-
def directory(dir, mode: nil, owner: nil, group: nil) # rubocop:disable Metrics/AbcSize
424+
def directory(dir, mode: nil, owner: nil, group: nil)
425425
install_flags = ['-d']
426426
if @component.platform.is_windows?
427427
unless mode.nil? && owner.nil? && group.nil?

lib/vanagon/component/rules.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def initialize(component, project, platform)
4747
# in the returned rules.
4848
#
4949
# @return [Array<Makefile::Rule>]
50-
def rules # rubocop:disable Metrics/AbcSize
50+
def rules
5151
list_of_rules = [
5252
component_rule,
5353
unpack_rule,

lib/vanagon/component/source.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class << self
1919
# @param workdir [String] working directory to fetch the source into
2020
# @param cacheedir [String] directory to cache source files and git repos
2121
# @return [Vanagon::Component::Source] the correct subtype for the given source
22-
def source(uri_instance, **options) # rubocop:disable Metrics/AbcSize
22+
def source(uri_instance, **options)
2323
# Sometimes the uri comes in as a string, but sometimes it's already been
2424
# coerced into a URI object. The individual source providers will turn
2525
# the passed uri into a URI object if needed, but for this method we

lib/vanagon/component/source/git.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def default_options # rubocop:disable Lint/DuplicateMethods
9494
# @param url [String] url of git repo to use as source
9595
# @param ref [String] ref to checkout from git repo
9696
# @param workdir [String] working directory to clone into
97-
def initialize(url, workdir:, cachedir: nil, **options) # rubocop:disable Metrics/AbcSize
97+
def initialize(url, workdir:, cachedir: nil, **options)
9898
opts = default_options.merge(options.reject { |k, v| v.nil? })
9999

100100
# Ensure that #url returns a URI object

0 commit comments

Comments
 (0)