You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While compiling files in Phoenix application that utilizes the Faker library, I'm encountering several warnings related to the usage of single-quoted strings and deprecated match patterns. These warnings may lead to confusion and potential issues in the future.
Warnings
Single-Quoted Strings Warning:
Warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead.
Warning: first..last inside match is deprecated, you must always match on the step: first..last//var or first..last//_ if you want to ignore it.
Occurrences:
lib/faker/lorem.ex:299 (Faker.Lorem.characters/1)
lib/faker/lorem.ex:333 (Faker.Lorem.paragraph/1)
lib/faker/lorem.ex:363 (Faker.Lorem.paragraphs/1)
lib/faker/lorem.ex:397 (Faker.Lorem.sentence/1)
lib/faker/lorem.ex:454 (Faker.Lorem.sentences/1)
lib/faker/lorem.ex:488 (Faker.Lorem.words/1)
lib/faker/pizza.ex:50 (Faker.Pizza.pizzas/1)
lib/faker/pizza.ex:105 (Faker.Pizza.toppings/1)
Screenshot
Steps to Reproduce
Add the Faker library to a Phoenix project.
Compile the project.
Observe the warnings in the output.
Suggested Fixes
Update all instances of single-quoted strings to double-quoted strings or use the ~c"" syntax where charlists are required.
Update deprecated match patterns to ensure they match on the step as required by the newer Elixir versions.
Environment
Elixir version: 1.17.2
Faker library version: 0.18.0
Note: I can take up this issue to fix it, but I am seeing 8 test failures while running mix test. Not sure if this is expected, so I don't know if it's OK to proceed.
Thank you for your attention to these issues!
The text was updated successfully, but these errors were encountered:
Description
While compiling files in Phoenix application that utilizes the Faker library, I'm encountering several warnings related to the usage of single-quoted strings and deprecated match patterns. These warnings may lead to confusion and potential issues in the future.
Warnings
Single-Quoted Strings Warning:
~c""
if you indeed want a charlist or use""
instead.lib/faker.ex:50
lib/faker/address.ex:6
lib/faker/lorem.ex:501
Deprecated Match Patterns Warning:
first..last
inside match is deprecated, you must always match on the step:first..last//var
orfirst..last//_
if you want to ignore it.lib/faker/lorem.ex:299
(Faker.Lorem.characters/1)lib/faker/lorem.ex:333
(Faker.Lorem.paragraph/1)lib/faker/lorem.ex:363
(Faker.Lorem.paragraphs/1)lib/faker/lorem.ex:397
(Faker.Lorem.sentence/1)lib/faker/lorem.ex:454
(Faker.Lorem.sentences/1)lib/faker/lorem.ex:488
(Faker.Lorem.words/1)lib/faker/pizza.ex:50
(Faker.Pizza.pizzas/1)lib/faker/pizza.ex:105
(Faker.Pizza.toppings/1)Screenshot
Steps to Reproduce
Suggested Fixes
~c""
syntax where charlists are required.Environment
Note: I can take up this issue to fix it, but I am seeing 8 test failures while running
mix test
. Not sure if this is expected, so I don't know if it's OK to proceed.Thank you for your attention to these issues!
The text was updated successfully, but these errors were encountered: