Repository navigation
Remove trailing spaces from kpop group names - #1958
Conversation
17 names in en/kpop.yml (4 in girl_groups, 13 in boy_bands) ended with a space, e.g. "4L " and "NCT ", so Kpop.girlGroups() and Kpop.boyBands() could return them with trailing whitespace. Trim them and add a test that checks no kpop name has leading or trailing whitespace.
PR Summary
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1958 +/- ##
============================================
- Coverage 92.52% 92.44% -0.09%
+ Complexity 3584 3581 -3
============================================
Files 348 348
Lines 7081 7081
Branches 694 694
============================================
- Hits 6552 6546 -6
- Misses 368 370 +2
- Partials 161 165 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
We should be able to use spotless to enforce this for at least the English files. Even if there are scenarios where ending blank space is wanted it should be able to handle exceptions. |
|
I'm wrong, it's inside quotes so that wouldn't help. It'd have to be enforced via unit test(s). |
|
I'm gonna merge this for now but I'm going to work on a more general way to handle it. |
17 names in
src/main/resources/en/kpop.ymlend with a space: 4 ingirl_groups("4L ","After School ","C-REAL ","Cupid ") and 13 inboy_bands("Hotshot ","IZ ","NCT ", ...).Kpop.girlGroups()andKpop.boyBands()return them as is, so callers can get names like"NCT "."4L"already appears without the space elsewhere in the file. I checked that no trimmed name duplicates another entry in the same list.This trims them and adds
KpopNamesWhitespaceTest, which loadsen/kpop.ymland checks that no entry in anykpoplist has leading or trailing whitespace. It is similar to the stock list cleanups in #1932 and #1944.I couldn't run Maven locally, so I ran the build on a fork:
KpopNamesWhitespaceTest.kpopNamesHaveNoSurroundingWhitespace ... [kpop.girl_groups](Tests run: 21543, Failures: 1). The other jobs of that run were cancelled after that failure.The commit in this PR is the squashed form of the fix branch (identical tree).