Skip to content

v2.15.0

Compare
Choose a tag to compare
@sambostock sambostock released this 15 Feb 16:56
· 41 commits to main since this release
f4a923d

What's Changed

Enabled Cops

Changed Cops

  • Naming/InclusiveLanguage's AllowedRegex is changed to permit any unbroken word which includes master. (#564)
    The motivation for this change is to avoid continuously needing to add exclusions such as mastercard, remaster, etc. to the list, while still allowing the cop to catch problematic uses of the word master.
  • Style/FrozenStringLiteralComment's EnforcedStyle is changed from always to always_true. (#589)
    Consumers should aim to use frozen_string_literal: true in all files, but if certain files need frozen_string_literal: false, they should disable the cop in those files, mark them as TODO, or add them to the Exclude list.

Changed AllCops Configuration

  • NewCops is changed from enable to disable. (#581)
    This silences the warning about pending cops for consumers, as the style guide maintainers will triage them instead.

Minimum RuboCop Version

Despite enabling new cops, the minimum RuboCop version is unchanged from the previous release, and remains 1.51.0.

Details

This is possible due to the new approach taken in rubocop.yml, in which ERB is used to conditionally enable cops based on the RuboCop version. (#582, #593, #612)

<% rubocop_version = Gem.loaded_specs.fetch("rubocop").version %>

<% if rubocop_version >= "1.23" %>
Department/NewCopName:
  Enabled: true
<% end %>

The motivation for this is to try the approach ahead of rubocop-shopify including optional configuration for rubocop-* extensions, which would need to work without adding dependencies on the extensions, or their versions.

Relevant PRs

New Contributors

Full Changelog: v2.14.0...v2.15.0