-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
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:
- Warning: single-quoted strings represent charlists. Use
~c""if you indeed want a charlist or use""instead.- Example:
@alphabet 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
- Occurrences:
lib/faker.ex:50lib/faker/address.ex:6lib/faker/lorem.ex:501
- Example:
- Warning: single-quoted strings represent charlists. Use
-
Deprecated Match Patterns Warning:
- Warning:
first..lastinside match is deprecated, you must always match on the step:first..last//varorfirst..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)
- Occurrences:
- Warning:
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
