Skip to content

Conversation

@sambostock
Copy link
Contributor

As we may increase the minimum RuboCop version requirement soon, we should make sure that if we do, we don't leave behind redundant version checks.

This adds a test to enforce they are cleaned up.

Example failure caused by adding a line checking against an old RuboCop version:

  1) Failure:
ConfigTest#test_config_does_not_check_for_rubocop_versions_below_minimum_version [test/config_test.rb:113]:
Error: The following RuboCop version checks are redundant given the required version in the gemspec:

     213: <% if rubocop_version >= "1.1" %>

Please remove these checks, or (if you intend to maintain compatibility) loosen the `rubocop` requirement in the gemspec.

@sambostock sambostock requested a review from a team as a code owner March 3, 2025 23:33
@sambostock sambostock force-pushed the no-redundant-version-checks branch from 86e09aa to d1386b5 Compare March 4, 2025 10:42
As we may increase the minimum RuboCop version requirement soon, we
should make sure that if we do, we don't leave behind redundant version
checks.

This adds a test to enforce they are cleaned up.
@sambostock sambostock force-pushed the no-redundant-version-checks branch from d1386b5 to a288883 Compare March 4, 2025 12:35
@sambostock sambostock merged commit 3aa83df into main Mar 4, 2025
20 checks passed
@sambostock sambostock deleted the no-redundant-version-checks branch March 4, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants