From 7ebfcf512aa0b13f0d0f504f1adc8c217cef0f11 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 9 May 2022 09:50:29 +0900 Subject: [PATCH] Tweak uniformity of expression was implemented This PR is unified word fluctuation. Use "offense" instead of "offence" --- .rubocop.yml | 3 +++ spec/rubocop/cli/disable_uncorrectable_spec.rb | 2 +- spec/rubocop/cop/security/compound_hash_spec.rb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 15a364c2adc..fb08d630ed0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -97,6 +97,8 @@ Metrics/ModuleLength: - 'spec/**/*.rb' Naming/InclusiveLanguage: + Enabled: true + CheckStrings: true FlaggedTerms: behaviour: Suggestions: @@ -106,6 +108,7 @@ Naming/InclusiveLanguage: - offense Exclude: - lib/rubocop/cop/naming/inclusive_language.rb + - spec/rubocop/cop/naming/inclusive_language_spec.rb RSpec/FilePath: Exclude: diff --git a/spec/rubocop/cli/disable_uncorrectable_spec.rb b/spec/rubocop/cli/disable_uncorrectable_spec.rb index 63f192d703a..1e45325dfb7 100644 --- a/spec/rubocop/cli/disable_uncorrectable_spec.rb +++ b/spec/rubocop/cli/disable_uncorrectable_spec.rb @@ -261,7 +261,7 @@ def our_function end end - context 'when exist offence for Layout/SpaceInsideArrayLiteralBrackets' do + context 'when exist offense for Layout/SpaceInsideArrayLiteralBrackets' do context 'when `EnforcedStyle: no_space`' do it 'does not disable anything for cops that support autocorrect' do create_file('example.rb', <<~RUBY) diff --git a/spec/rubocop/cop/security/compound_hash_spec.rb b/spec/rubocop/cop/security/compound_hash_spec.rb index c331abfba1a..d9856303ffd 100644 --- a/spec/rubocop/cop/security/compound_hash_spec.rb +++ b/spec/rubocop/cop/security/compound_hash_spec.rb @@ -178,7 +178,7 @@ def hash RUBY end - it 'registers an offence when using bitshift and OR' do + it 'registers an offense when using bitshift and OR' do expect_offense(<<~RUBY) def hash ([@addr, @mask_addr, @zone_id].hash << 1) | (ipv4? ? 0 : 1)