Skip to content

Commit

Permalink
(FACT-3428) Naming/{ClassAndModuleCamelCase,MethodName}
Browse files Browse the repository at this point in the history
Enforce CamelCase for classes and modules and snake_case for methods
except for some of the win32 mocks, because they mock classes we don't control
like `class HKEY_LOCAL_MACHINE`
  • Loading branch information
joshcooper committed Jan 8, 2024
1 parent dea028c commit eca5591
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
9 changes: 9 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ 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/**/*'
Expand Down
15 changes: 0 additions & 15 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +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: 3
# This cop supports safe autocorrection (--autocorrect).
Performance/RegexpMatch:
Expand Down

0 comments on commit eca5591

Please sign in to comment.