Skip to content

Commit

Permalink
Add start of string to regexps in DisabledConfigFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
kpost authored and bbatsov committed Jan 12, 2024
1 parent 4e392b2 commit c51dfec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/formatter/disabled_config_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def filtered_config(cfg)
# 'Enabled' option will be put into file only if exclude
# limit is exceeded.
rejected_keys = ['Enabled']
rejected_keys << /^EnforcedStyle\w*/ unless auto_gen_enforced_style?
rejected_keys << /\AEnforcedStyle\w*/ unless auto_gen_enforced_style?
cfg.reject { |key| include_or_match?(rejected_keys, key) }
end

Expand Down

0 comments on commit c51dfec

Please sign in to comment.