From 28f8d944c9e743d922eb829179f4788ecfaa0f0e Mon Sep 17 00:00:00 2001 From: Ryan Rosenblum Date: Mon, 12 Aug 2019 14:38:02 -0400 Subject: [PATCH] Deprecate the SafeMode module --- CHANGELOG.md | 1 + lib/rubocop/cop/mixin/safe_mode.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5404c040b817..0f05d3256ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ * [#5265](https://github.com/rubocop-hq/rubocop/issues/5265): Improved `Layout/ExtraSpacing` cop to handle nested consecutive assignments. ([@jfelchner][]) * [#7215](https://github.com/rubocop-hq/rubocop/issues/7215): Make it clear what's wrong in the message from `Style/GuardClause`. ([@jonas054][]) * [#7245](https://github.com/rubocop-hq/rubocop/pull/7245): Make cops detect string interpolations in more contexts: inside of backticks, regular expressions, and symbols. ([@buehmann][]) +* Deprecate the `SafeMode` option. Users will need to upgrade `rubocop-performance` to 1.15.0+ before the `SafeMode` module is removed. ([@rrosenblum][]) ## 0.73.0 (2019-07-16) diff --git a/lib/rubocop/cop/mixin/safe_mode.rb b/lib/rubocop/cop/mixin/safe_mode.rb index e49b50f93d9f..c1540837f8a2 100644 --- a/lib/rubocop/cop/mixin/safe_mode.rb +++ b/lib/rubocop/cop/mixin/safe_mode.rb @@ -4,6 +4,9 @@ module RuboCop module Cop # Common functionality for Rails safe mode. module SafeMode + warn 'The `SafeMode` option will be removed in `RuboCop` 0.76. ' \ + 'Please update `rubocop-performance` to 1.15.0 or higher.' + private def rails_safe_mode?