Skip to content

Conversation

Earlopain
Copy link
Contributor

Fix #1477

To do that, be more specific about what type you expect to call blank? on (strings only).

Caused by #1467


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.
# @!method comment_present?(node)
def_node_matcher :comment_present?, <<~PATTERN
(hash <(pair {(sym :comment) (str "comment")} (_ !blank?)) ...>)
(hash <(pair {(sym :comment) (str "comment")} !{nil | (str blank?)}) ...>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(hash <(pair {(sym :comment) (str "comment")} !{nil | (str blank?)}) ...>)
(hash <(pair {(sym :comment) (str "comment")} !{nil (str blank?)}) ...>)
…mment is passed as a local variable To do that, be more specific about what type you expect to call blank? on (strings only). Caused by rubocop#1467
@Earlopain Earlopain force-pushed the schema-comment-local-var branch from 41305ed to 43427f6 Compare May 8, 2025 11:10
@koic koic merged commit 2a44746 into rubocop:master May 8, 2025
16 checks passed
@koic
Copy link
Member

koic commented May 8, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants