-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor: split words by language #8
refactor: split words by language #8
Conversation
Hey @davideprevosto Would you be able to take a look at the failing static analysis checks? From what I can see:
Thanks! P.S as @faissaloux suggested, could you rename the |
@JonPurvis I think the words files should live in a separated directory in Config to separate them from |
Ah yes good point @faissaloux, somehow I forgot we had tolerated.php now 😆 (have updated my comment) Agreed on a directory name change, but how about |
Emmmmm If someone gets there will know exactly what |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please make it more flexible to accept more languages by just adding more languages files on the profanities
directory without adding languages files to the code one by one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add this note SHOULD ALL WORDS BE lowercase!
to all words files on line 5
Hey @davideprevosto 👋 I'm keen to get this work into the package. Would you have any time soon to action the required changes? If not, I'd be happy to commit to this branch to finish the work off and get it merged 😄 |
Hi @JonPurvis, I tried to follow your instructions and I pushed a few changes. I run composer lint and I suppose Laravel Pint did its job. I also run composer test but I run into the following issue, I suppose I need to further investigate what I am doing wrong.
|
Hey @davideprevosto Not actually sure what could be causing that error. Do you get the same thing when you run |
Yes @JonPurvis, I am getting the same error
|
Okay, can you try running |
Hmm, that's odd. It works for me even with your changes. Although it does fix one thing: FileLineFinder::where(function (string $line) use (&$foundWords): bool {
return str_contains(strtolower($line), strtolower(array_values($foundWords ?? [])[0]));
}) to FileLineFinder::where(function (string $line) use (&$foundWords): bool {
return str_contains(strtolower($line), strtolower((string) array_values($foundWords ?? [])[0]));
}) If you make that change, and then amend the merge conflict, this branch should be good to merge. I'm not sure why refacto doesn't run properly on your machine 😢 |
Thanks @davideprevosto Are you also able to sort the merge conflict please? |
Thanks for the contribution @davideprevosto 🥳 I'll get a new release tagged later today! |
This Pull Request splits words by language. It also adds a first version of the Italian stop-words configuration.