Skip to content

Remove trailing spaces from kpop group names - #1958

Merged
kingthorin merged 1 commit into
datafaker-net:mainfrom
ChandraChaan:fix/kpop-whitespace-pr
Nov 4, 2026
Merged

kingthorin merged 1 commit into
datafaker-net:mainfrom
ChandraChaan:fix/kpop-whitespace-pr

Conversation

@ChandraChaan

Copy link
Copy Markdown
Contributor

17 names in src/main/resources/en/kpop.yml end with a space: 4 in girl_groups ("4L ", "After School ", "C-REAL ", "Cupid ") and 13 in boy_bands ("Hotshot ", "IZ ", "NCT ", ...). Kpop.girlGroups() and Kpop.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 loads en/kpop.yml and checks that no entry in any kpop list 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:

  • Test only, without the fix: Java CI fails on JDK 25 / ubuntu-arm with KpopNamesWhitespaceTest.kpopNamesHaveNoSurroundingWhitespace ... [kpop.girl_groups] (Tests run: 21543, Failures: 1). The other jobs of that run were cancelled after that failure.
  • Test with the fix: Java CI passes on 14 of 16 jobs (JDK 17, 21, 25 and 27 on ubuntu, ubuntu-arm and windows, and macOS with JDK 21 and 25). The two macOS jobs for JDK 17 and 27 were cancelled before any step ran, so they gave no result. The build runs Maven in quiet mode, so passing tests are not listed individually.

The commit in this PR is the squashed form of the fix branch (identical tree).

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.
@what-the-diff

what-the-diff Bot commented Nov 4, 2026

Copy link
Copy Markdown

PR Summary

  • Keeps K-pop group names clean and consistent
    Removes extra spaces around names in the English data file and adds a check to prevent them from being reintroduced. This helps ensure names display consistently wherever they’re used.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.44%. Comparing base (43aaf85) to head (7ae9e07).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kingthorin

Copy link
Copy Markdown
Collaborator

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.

@kingthorin

Copy link
Copy Markdown
Collaborator

I'm wrong, it's inside quotes so that wouldn't help.

It'd have to be enforced via unit test(s).

@kingthorin

Copy link
Copy Markdown
Collaborator

I'm gonna merge this for now but I'm going to work on a more general way to handle it.

@kingthorin
kingthorin merged commit 8883fa2 into datafaker-net:main Nov 4, 2026
17 checks passed
@asolntsev asolntsev added this to the 3.0.0 milestone Nov 7, 2026
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

Successfully merging this pull request may close these issues.

4 participants