Skip to content

Commit

Permalink
Merge pull request #2668 from joshcooper/rubocop_4_Naming
Browse files Browse the repository at this point in the history
(FACT-3428) Resolve Naming cops
  • Loading branch information
cthorn42 authored Jan 10, 2024
2 parents f1db991 + eca5591 commit 1d55746
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 36 deletions.
18 changes: 18 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ Metrics/ModuleLength:
Metrics/PerceivedComplexity:
Enabled: false

Naming/ClassAndModuleCamelCase:
Exclude:
- 'spec/mocks/win32.rb'

Naming/MethodName:
Exclude:
- 'spec/mocks/win32ole.rb'
- 'spec/mocks/ffi.rb'

Naming/PredicateName:
Exclude:
- 'spec/**/*'

Naming/VariableNumber:
Exclude:
- 'lib/facter/resolvers/windows/ffi/networking_ffi.rb'
- 'lib/facter/util/facts/windows_release_finder.rb'

Style/IfUnlessModifier:
Enabled: false

Expand Down
35 changes: 0 additions & 35 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: AllowedNames.
# AllowedNames: module_parent
Naming/ClassAndModuleCamelCase:
Exclude:
- 'spec/mocks/win32.rb'

# Offense count: 15
# Configuration parameters: AllowedPatterns.
# SupportedStyles: snake_case, camelCase
Naming/MethodName:
EnforcedStyle: snake_case
Exclude:
- 'spec/mocks/**/*'

# Offense count: 1
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# ForbiddenPrefixes: is_, has_, have_
# AllowedMethods: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'lib/facter/custom_facts/core/suitable.rb'

# Offense count: 4
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
Naming/VariableNumber:
Exclude:
- 'lib/facter/resolvers/windows/ffi/networking_ffi.rb'
- 'lib/facter/util/facts/windows_release_finder.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
Performance/RegexpMatch:
Expand Down
2 changes: 1 addition & 1 deletion lib/facter/custom_facts/core/suitable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Suitable
# @return [void]
#
# @api public
def has_weight(weight)
def has_weight(weight) # rubocop:disable Naming/PredicateName
@weight = weight
self
end
Expand Down

0 comments on commit 1d55746

Please sign in to comment.