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

Credo.Check.Readability.StringSigils warning being thrown with multiline string #655

Closed
wittjosiah opened this issue May 15, 2019 · 1 comment

Comments

@wittjosiah
Copy link

Environment

  • Credo version (mix credo -v): 1.0.3
  • Erlang/Elixir version (elixir -v): 1.8.1
  • Operating system: macOS

What were you trying to do?

Use multiline string to wrap SQL query similar to:

    execute(
      """
      INSERT INTO
        my_table ("group", name)
      SELECT
        "group",
        name
      FROM another_table;
      """,
      "DELETE FROM my_table;"
    )

Seems similar to #611 but using github dep I was still getting the issue.

Note quotes were needed around column name because it is an SQL keyword.

Expected outcome

No error from Credo.Check.Readability.StringSigils since ~s cannot be used here because the string has () in it which ends the sigil.

Actual outcome

┃ [R] ↘ More than 3 quotes found inside string literal, consider using a sigil
┃       instead.
@wittjosiah
Copy link
Author

After updating to 1.0.5 the issue seems to have been fixed.

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

1 participant