Skip to content

Commit

Permalink
Enable stricter version of Naming/FileName cop
Browse files Browse the repository at this point in the history
The `ExpectMatchingDefinition` option for this cop is `false` by
default. However, setting it to `true` is useful because it identifies
things like typos in names of classes, modules and their files.

I've made a few exceptions, because they weren't straitforward to fix,
but it would be nice to avoid these exceptions at some point.
  • Loading branch information
floehopper committed Jan 3, 2025
1 parent 818b5c2 commit e08c553
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,16 @@ Style/OptionalBooleanParameter:
Style/FetchEnvVar:
AllowedVars:
- MOCHA_RUN_INTEGRATION_TESTS

Naming/FileName:
ExpectMatchingDefinition: true
CheckDefinitionPathHierarchyRoots:
- test/unit
- test/acceptance
Exclude:
- lib/mocha/version.rb
- lib/mocha/minitest.rb
- lib/mocha/test_unit.rb
- lib/mocha/ruby_version.rb
- lib/mocha/macos_version.rb
- test/test_helper.rb

0 comments on commit e08c553

Please sign in to comment.