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

False positive on an SQL heredoc #32

Open
jhubert opened this issue Jul 7, 2019 · 1 comment
Open

False positive on an SQL heredoc #32

jhubert opened this issue Jul 7, 2019 · 1 comment

Comments

@jhubert
Copy link

jhubert commented Jul 7, 2019

The following code is triggering the RailsI18n/DecorateString cop. That doesn't seem like expected behavior, does it?

      sql = <<~SQL
        "#{table_name}"."id" IN (
          SELECT id
          FROM "#{table_name}",
               jsonb_to_recordset("#{table_name}"."tasks") AS tasks(due_on date)
          WHERE tasks.due_on >= ?
            AND tasks.due_on <= ?
        )
      SQL
@highb
Copy link
Contributor

highb commented Sep 5, 2019

I agree, we should probably have some heredoc strings that are ignored automatically. I don't have time to put up a PR at the moment, but I'll keep this on my backlog. Thanks for reporting this!

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

No branches or pull requests

2 participants