Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
I've added this typo to the `Naming/InclusiveLanguage` configuration
because I see it occasionally.
  • Loading branch information
koic committed Jan 25, 2023
1 parent aa08c25 commit 6d45fd5
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ Naming/InclusiveLanguage:
Enabled: true
CheckStrings: true
FlaggedTerms:
' a offense':
Suggestions:
- an offense
auto-correct:
Suggestions:
- autocorrect
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rspec/expect_offense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module RSpec
#
# This mixin makes it easier to specify strict offense expectations
# in a declarative and visual fashion. Just type out the code that
# should generate a offense, annotate code by writing '^'s
# should generate an offense, annotate code by writing '^'s
# underneath each character that should be highlighted, and follow
# the carets with a string (separated by a space) that is the
# message of the offense. You can include multiple offenses in
Expand Down
6 changes: 3 additions & 3 deletions spec/rubocop/cop/style/class_and_module_children_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class BazClass < FooClass::BarClass
context 'compact style' do
let(:cop_config) { { 'EnforcedStyle' => 'compact' } }

it 'registers a offense for classes with nested children' do
it 'registers an offense for classes with nested children' do
expect_offense(<<~RUBY)
class FooClass
^^^^^^^^ Use compact module/class definition instead of nested style.
Expand All @@ -205,7 +205,7 @@ class FooClass::BarClass
RUBY
end

it 'registers a offense for modules with nested children' do
it 'registers an offense for modules with nested children' do
expect_offense(<<~RUBY)
module FooModule
^^^^^^^^^ Use compact module/class definition instead of nested style.
Expand Down Expand Up @@ -367,7 +367,7 @@ class BazModule
RUBY
end

it 'registers a offense for classes with nested one-liner children' do
it 'registers an offense for classes with nested one-liner children' do
expect_offense(<<~RUBY)
class FooClass
^^^^^^^^ Use compact module/class definition instead of nested style.
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/formatter/fuubar_style_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def offense(severity, status = :uncorrected)
end
end

context 'when a offense is detected in a file and autocorrected' do
context 'when an offense is detected in a file and autocorrected' do
before { formatter.file_finished(files[0], [offense(:convention, :corrected)]) }

it 'is green' do
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/formatter/pacman_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
end
end

context 'when a offense is detected in a file' do
context 'when an offense is detected in a file' do
let(:location) { FakeLocation.new(line: 1, column: 5) }
let(:expected_character) { Rainbow(described_class::GHOST).red }
let(:offenses) { [RuboCop::Cop::Offense.new(:error, location, 'message', 'CopA')] }
Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/formatter/quiet_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
end
end

context 'when a offense detected' do
context 'when an offense detected' do
it 'handles pluralization correctly' do
formatter.report_summary(1, 1, 0, 0)
expect(output.string).to eq(<<~OUTPUT)
Expand All @@ -100,7 +100,7 @@
end
end

context 'when a offense detected and a offense correctable' do
context 'when an offense detected and an offense correctable' do
it 'handles pluralization correctly' do
formatter.report_summary(1, 1, 0, 1)
expect(output.string).to eq(<<~OUTPUT)
Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/formatter/simple_text_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
end
end

context 'when a offense detected' do
context 'when an offense detected' do
it 'handles pluralization correctly' do
formatter.report_summary(1, 1, 0, 0)
expect(output.string).to eq(<<~OUTPUT)
Expand All @@ -123,7 +123,7 @@
end
end

context 'when a offense detected and a offense autocorrectable' do
context 'when an offense detected and an offense autocorrectable' do
it 'handles pluralization correctly' do
formatter.report_summary(1, 1, 0, 1)
expect(output.string).to eq(<<~OUTPUT)
Expand Down

0 comments on commit 6d45fd5

Please sign in to comment.