Skip to content

Commit f670cd0

Browse files
committed
(maint) Drop Metrics/AbcSize
It's mostly useless, disable it.
1 parent b11969e commit f670cd0

File tree

6 files changed

+8
-24
lines changed

6 files changed

+8
-24
lines changed

.rubocop.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ require:
1313

1414
Layout/LineLength:
1515
Max: 120
16+
Exclude:
17+
- spec/facter/resolvers/gce_spec.rb
1618

1719
Lint/RaiseException:
1820
Enabled: true
@@ -51,25 +53,7 @@ Naming/ClassAndModuleCamelCase:
5153
- 'spec/mocks/**/*'
5254

5355
Metrics/AbcSize:
54-
Max: 16
55-
Exclude:
56-
- 'spec/custom_facts/util/parser_spec.rb'
57-
- 'spec/custom_facts/core/logging_spec.rb'
58-
- 'lib/facter/custom_facts/util/values.rb'
59-
- 'lib/facter/custom_facts/util/loader.rb'
60-
- 'lib/facter/custom_facts/util/confine.rb'
61-
- 'lib/facter/custom_facts/util/confine.rb'
62-
- 'lib/facter/custom_facts/core/execution/windows.rb'
63-
- 'lib/facter/custom_facts/core/execution/base.rb'
64-
- 'lib/facter/custom_facts/core/resolvable.rb'
65-
- 'lib/facter/resolvers/bsd/ffi/ffi_helper.rb'
66-
- 'install.rb'
67-
- 'scripts/generate_changelog.rb'
68-
- 'lib/facter/resolvers/aix/ffi/ffi_helper.rb'
69-
- 'lib/facter/custom_facts/core/execution/popen3.rb'
70-
- 'lib/facter.rb'
71-
- 'lib/facter/framework/parsers/query_parser.rb'
72-
- 'lib/facter/framework/core/fact_manager.rb'
56+
Enabled: false
7357

7458
Metrics/PerceivedComplexity:
7559
Exclude:

lib/facter/resolvers/freebsd/swap_memory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def post_resolve(fact_name, _options)
1313
@fact_list.fetch(fact_name) { read_swap_memory(fact_name) }
1414
end
1515

16-
def read_swap_memory(fact_name) # rubocop:disable Metrics/AbcSize
16+
def read_swap_memory(fact_name)
1717
output = Facter::Core::Execution.execute('swapinfo -k', logger: log)
1818
data = output.split("\n")[1..-1].map { |line| line.split(/\s+/) }
1919

lib/facter/resolvers/macosx/swap_memory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def post_resolve(fact_name, _options)
1313
@fact_list.fetch(fact_name) { read_swap_memory(fact_name) }
1414
end
1515

16-
def read_swap_memory(fact_name) # rubocop:disable Metrics/AbcSize
16+
def read_swap_memory(fact_name)
1717
output = Facter::Core::Execution.execute('sysctl -n vm.swapusage', logger: log)
1818
data = output.match(/^total = ([\d.]+)M used = ([\d.]+)M free = ([\d.]+)M (\(encrypted\))$/)
1919

lib/facter/resolvers/solaris/mountpoints.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def exclude_auto_home_mounts!
2121
end
2222
end
2323

24-
def read_mounts(fact_name) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
24+
def read_mounts(fact_name) # rubocop:disable Metrics/MethodLength
2525
@mounts = []
2626
@auto_home_paths = []
2727

lib/facter/util/api_debugger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Facter
44
module Util
55
module ApiDebugger
6-
def self.prepended(receiver) # rubocop:disable Metrics/AbcSize
6+
def self.prepended(receiver)
77
exclude, print_caller = parse_options(ENV['API_DEBUG'])
88

99
receiver_methods = receiver.instance_methods - Object.methods

lib/facter/util/resolvers/ffi/hostname.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def self.getffihostname
3636
raw_hostname.read_string
3737
end
3838

39-
def self.getffiaddrinfo(hostname) # rubocop:disable Metrics/AbcSize
39+
def self.getffiaddrinfo(hostname)
4040
ret = FFI::MemoryPointer.new(:pointer)
4141

4242
hints = Facter::Util::Resolvers::Ffi::AddrInfo.new

0 commit comments

Comments
 (0)