-
-
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
Add EnforcedStyle: refute to Rails/RefuteMethods #150
Labels
enhancement
New feature or request
Comments
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Dec 31, 2019
Fixes rubocop#150. This PR adds `EnforcedStyle: refute` for `Rails/RefuteMethods`. `EnforcedStyle: refute` is an alternative style to `EnforcedStyle: assert_not`. ```ruby # @example EnforcedStyle: refute # # bad # assert_not false # assert_not_empty [1, 2, 3] # assert_not_equal true, false # # # good # refute false # refute_empty [1, 2, 3] # refute_equal true, false ``` The default style keeps `EnforcedStyle: assert_not` because following the Rails coding style. > Use `assert_not` methods instead of refute. https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Dec 31, 2019
Fixes rubocop#150. This PR adds `EnforcedStyle: refute` for `Rails/RefuteMethods`. `EnforcedStyle: refute` is an alternative style to `EnforcedStyle: assert_not`. ```ruby # @example EnforcedStyle: refute # # bad # assert_not false # assert_not_empty [1, 2, 3] # assert_not_equal true, false # # # good # refute false # refute_empty [1, 2, 3] # refute_equal true, false ``` The default style keeps `EnforcedStyle: assert_not` because following the Rails coding conventions conventions. > Use `assert_not` methods instead of refute. https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
8 tasks
Just wondering, would this be more suited to rubocop-minitest than rubocop-rails? (I'm not sure how closely Rails is integrated with minitest). |
RuboCop Minitest is a linter for pure Minitest. The So I think RuboCop Rails is suitable. |
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Jan 12, 2020
Fixes rubocop#150. This PR adds `EnforcedStyle: refute` for `Rails/RefuteMethods`. `EnforcedStyle: refute` is an alternative style to `EnforcedStyle: assert_not`. ```ruby # @example EnforcedStyle: refute # # bad # assert_not false # assert_not_empty [1, 2, 3] # assert_not_equal true, false # # # good # refute false # refute_empty [1, 2, 3] # refute_equal true, false ``` The default style keeps `EnforcedStyle: assert_not` because following the Rails coding conventions conventions. > Use `assert_not` methods instead of refute. https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Feb 3, 2020
Fixes rubocop#150. This PR adds `EnforcedStyle: refute` for `Rails/RefuteMethods`. `EnforcedStyle: refute` is an alternative style to `EnforcedStyle: assert_not`. ```ruby # @example EnforcedStyle: refute # # bad # assert_not false # assert_not_empty [1, 2, 3] # assert_not_equal true, false # # # good # refute false # refute_empty [1, 2, 3] # refute_equal true, false ``` The default style keeps `EnforcedStyle: assert_not` because following the Rails coding conventions conventions. > Use `assert_not` methods instead of refute. https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Feb 20, 2020
Fixes rubocop#150. This PR adds `EnforcedStyle: refute` for `Rails/RefuteMethods`. `EnforcedStyle: refute` is an alternative style to `EnforcedStyle: assert_not`. ```ruby # @example EnforcedStyle: refute # # bad # assert_not false # assert_not_empty [1, 2, 3] # assert_not_equal true, false # # # good # refute false # refute_empty [1, 2, 3] # refute_equal true, false ``` The default style keeps `EnforcedStyle: assert_not` because following the Rails coding conventions conventions. > Use `assert_not` methods instead of refute. https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Mar 6, 2020
Fixes rubocop#150. This PR adds `EnforcedStyle: refute` for `Rails/RefuteMethods`. `EnforcedStyle: refute` is an alternative style to `EnforcedStyle: assert_not`. ```ruby # @example EnforcedStyle: refute # # bad # assert_not false # assert_not_empty [1, 2, 3] # assert_not_equal true, false # # # good # refute false # refute_empty [1, 2, 3] # refute_equal true, false ``` The default style keeps `EnforcedStyle: assert_not` because following the Rails coding conventions conventions. > Use `assert_not` methods instead of refute. https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
koic
added a commit
that referenced
this issue
Mar 18, 2020
…s_refute_methods [Fix #150] Add `EnforcedStyle: refute` for `Rails/RefuteMethods`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our project prefer to use
refute
instead ofassert_not
... so having an EnforcedStyle to define that would be nice.The text was updated successfully, but these errors were encountered: