-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Rails/ActionControllerFlashBeforeRender reports false positives with multiline if/else, redirect_to #843
Labels
bug
Something isn't working
Comments
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 27, 2022
…shBeforeRender` Fixes rubocop#843. This PR fixes a false positive for `Rails/ActionControllerFlashBeforeRender` when using `flash` in the multiline statements as `if` branch before `redirect_to`.
9 tasks
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 27, 2022
…shBeforeRender` Fixes rubocop#843. This PR fixes a false positive for `Rails/ActionControllerFlashBeforeRender` when using `flash` in multiline `if` branch before `redirect_to`.
koic
added a commit
that referenced
this issue
Oct 27, 2022
…on_controller_flash_before_render [Fix #843] Fix a false positive for `Rails/ActionControllerFlashBeforeRender`
This was referenced Nov 2, 2022
rnestler
added a commit
to renuo/applications-setup-guide
that referenced
this issue
Jan 23, 2023
This cop seems to have quite a lot false positives pop up every now and then which are actually harmful since we won't render the flash in these cases. See rubocop/rubocop-rails#843 and renuo/vdrb-kas@7978dd7
rnestler
added a commit
to renuo/applications-setup-guide
that referenced
this issue
Jan 23, 2023
This cop seems to have quite a lot false positives pop up every now and then which are actually harmful since we won't render the flash in these cases. See rubocop/rubocop-rails#843 and renuo/vdrb-kas@7978dd7
rnestler
added a commit
to renuo/applications-setup-guide
that referenced
this issue
Mar 2, 2023
This cop seems to have quite a lot false positives pop up every now and then which are actually harmful since we won't render the flash in these cases. See rubocop/rubocop-rails#843 and renuo/vdrb-kas@7978dd7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RuboCop reports a false positive with if/else and
redirect_to
Follow up from #825
Expected behavior
Rubocop does not report errors
Actual behavior
Steps to reproduce the problem
rubocop_rails_825.rb
filebundle exec rubocop --require rubocop-rails --only Rails/ActionControllerFlashBeforeRender rubocop_rails_825.rb
RuboCop version
Also tested against rubocop-rails main
The text was updated successfully, but these errors were encountered: