Skip to content

Releases: Shopify/ruby-style-guide

v2.15.1

15 Feb 18:45
fecd514
Compare
Choose a tag to compare

What's Changed

Bug fixes

  • Add missing files to gemspec & bump version to 2.15.1 by @sambostock in #615
    This should fix the cannot load such file -- rubocop/shopify/gem_version_string_comparable_backport error present in v2.15.0.

Full Changelog: v2.15.0...v2.15.1

v2.15.0

15 Feb 16:56
f4a923d
Compare
Choose a tag to compare

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

v2.14.0

09 Jun 20:22
v2.14.0
375cde7
Compare
Choose a tag to compare

What's Changed

Enabled Cops

Changed Cops

  • Tweak Naming/InclusiveLanguage AllowedRegex to allow more git repository links (#535)

Minimum Rubocop Version

The minimum Rubocop version is now 1.51.0 (#541).

Relevant PRs

New Contributors

Full Changelog: v2.13.0...v2.14.0

v2.13.0

11 Apr 15:26
259a946
Compare
Choose a tag to compare

What's Changed

Enabled Cops

The following cops have been enabled:

Changed Cops

  • Layout/LineLength now allows inline # rubocop:disable ... comments to exceed the line length. (#488)
  • Layout/LineLength now allows def test_... lines to exceed the line length limit, making it consistent with test "..." do lines, which were already permitted to exceed the limit. (#496)
  • Naming/MethodName now allows methods starting with test_ to violate the snake_case convention. (#511)
  • Style/AndOr now allows and and or outside of conditionals (which must still use && and || instead). (#515)

Minimum Rubocop Version

The minimum Rubocop version is now 1.50.0 (#525).

Relevant PRs

New Contributors

Full Changelog: v2.12.0...v2.13.0

v2.12.0

30 Jan 22:24
a1e210c
Compare
Choose a tag to compare

What's Changed

Enabled Cops

The following cops have been enabled:

Disabled Cops

The following cops have been disabled:

  • Gemspec/DevelopmentDependencies (#486)

Minimum Rubocop Version

The minimum rubocop version is now 1.44. (#486)

Full Changelog: v2.11.1...v2.12.0

v2.11.1

02 Jan 18:18
c6b9582
Compare
Choose a tag to compare
  • Disable Style/OperatorMethodCall rule by @Korri in #474
    (The autocorrect would introduce syntax errors in some edge cases.)

v2.11.0

02 Jan 16:58
dc1d4ee
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.10.1...v2.11.0

v2.10.1

02 Jan 14:29
7d1034e
Compare
Choose a tag to compare

Full Changelog: v2.10.0...v2.10.1

2.10.0

12 Sep 21:58
v2.10.0
71f6759
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.9.0...v2.10.0

2.9.0

05 Aug 19:58
81820c9
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.8.0...v2.9.0