Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix current RuboCop offense #2055

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Conversation

Earlopain
Copy link
Contributor

Autocorrect would have been node.true_type? || node but I don't think that preserves the intention

$ bundle exec rubocop
Inspecting 278 files
........................................................................................................................................C.............................................................................................................................................

Offenses:

lib/rubocop/rspec/hook.rb:67:25: C: [Correctable] Style/RedundantCondition: Use double pipes || instead.
        node.true_type? ? true : node
                        ^^^^^^^^

278 files inspected, 1 offense detected, 1 offense autocorrectable

Autocorrect would have been `node.true_type? || node` but I don't think that preserves the intention

```
$ bundle exec rubocop
Inspecting 278 files
........................................................................................................................................C.............................................................................................................................................

Offenses:

lib/rubocop/rspec/hook.rb:67:25: C: [Correctable] Style/RedundantCondition: Use double pipes || instead.
        node.true_type? ? true : node
                        ^^^^^^^^

278 files inspected, 1 offense detected, 1 offense autocorrectable
```
@Earlopain Earlopain requested a review from a team as a code owner March 3, 2025 10:41
@ydah ydah merged commit d4000f8 into rubocop:master Mar 3, 2025
27 checks passed
@Earlopain Earlopain deleted the current-offense branch March 3, 2025 11:25
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