-
-
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
[Fix #578] Add Rails/RedundantPresenceValidationOnBelongsTo cop #594
[Fix #578] Add Rails/RedundantPresenceValidationOnBelongsTo cop #594
Conversation
It does not I'm afraid.
doesn't do anything, too. |
98469e2
to
cfcb90d
Compare
Ah, I removed the
Yep! This repository automation follows the rubocop/rubocop core, so |
spec/rubocop/cop/rails/redundant_presence_validation_on_belongs_to_spec.rb
Show resolved
Hide resolved
lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb
Outdated
Show resolved
Hide resolved
ee305dd
to
9ba3591
Compare
Green 🍏 |
# Match a class with a matching association, either by name or an explicit | ||
# `foreign_key` option | ||
# | ||
# @example source that matches - fk matches `foreign_key` option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you align the indents of @example
, @param
, and @return
to @!method
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand the note, but it appears that it's fine as is according to YARD doc. What do you think?
Note:
For backwards compatibility support, you do not need to indent the method's docstring text. If a
@!method
directive is seen with no indented block, the entire docstring is used as the new method's docstring text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I get it. There is no problem. Thank you for the documentation link.
lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb
Outdated
Show resolved
Hide resolved
8ced32c
to
301c7d4
Compare
Thanks! |
Sorry for messing up the original ticket number. Fixed the PR title. |
fix #578
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.and description in grammatically correct, complete sentences.
bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.