From e95daf91f9aab0e17942b8f0dee3a4db8968cdf5 Mon Sep 17 00:00:00 2001 From: Laura Murphy-Clarkin Date: Sun, 10 May 2020 10:36:11 +0100 Subject: [PATCH] [Fix #7936] Mark Lint/BooleanSymbol as unsafe (#7941) --- CHANGELOG.md | 2 ++ config/default.yml | 3 ++- manual/cops_lint.md | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72d13521593..cd49ba61251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * [#7094](https://github.com/rubocop-hq/rubocop/issues/7094): Clarify alignment in `Layout/MultilineOperationIndentation`. ([@jonas054][]) * [#4245](https://github.com/rubocop-hq/rubocop/issues/4245): **(Breaking)** Inspect all files given on command line unless `--only-recognized-file-types` is given. ([@jonas054][]) * [#7390](https://github.com/rubocop-hq/rubocop/issues/7390): **(Breaking)** Enabling a cop overrides disabling its department. ([@jonas054][]) +* [#7936](https://github.com/rubocop-hq/rubocop/issues/7936): Mark `Lint/BooleanSymbol` as unsafe. ([@laurmurclar][]) ## 0.82.0 (2020-04-16) @@ -4490,3 +4491,4 @@ [@DracoAter]: https://github.com/DracoAter [@diogoosorio]: https://github.com/diogoosorio [@jeffcarbs]: https://github.com/jeffcarbs +[@laurmurclar]: https://github.com/laurmurclar diff --git a/config/default.yml b/config/default.yml index bc55a9f5c68..e873a61f4c7 100644 --- a/config/default.yml +++ b/config/default.yml @@ -1342,8 +1342,9 @@ Lint/BigDecimalNew: Lint/BooleanSymbol: Description: 'Check for `:true` and `:false` symbols.' Enabled: true + Safe: false VersionAdded: '0.50' - VersionChanged: '0.81' + VersionChanged: '0.83' Lint/CircularArgumentReference: Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument." diff --git a/manual/cops_lint.md b/manual/cops_lint.md index ecbe9febb25..9639eebe3f1 100644 --- a/manual/cops_lint.md +++ b/manual/cops_lint.md @@ -166,7 +166,7 @@ BigDecimal(123.456, 3) Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged --- | --- | --- | --- | --- -Enabled | Yes | Yes | 0.50 | 0.81 +Enabled | No | Yes (Unsafe) | 0.50 | 0.83 This cop checks for `:true` and `:false` symbols. In most cases it would be a typo.