Repository navigation
Remove stray space from Alabama postcode 36877 - #1957
Merged
kingthorin merged 1 commit intoNov 4, 2026
Merged
Conversation
_US.yml listed " 36877" with a leading space in postcode_by_state.AL, the only entry among the US postcodes that is not five digits. Address.zipCodeByState returns the value as is, so it could return the space-prefixed code for AL. The county table in the same file has '36877'. Fix the entry and add a test that checks every US postcode_by_state entry has five digits.
PR Summary
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1957 +/- ##
============================================
- Coverage 92.41% 92.40% -0.02%
Complexity 3579 3579
============================================
Files 348 348
Lines 7081 7081
Branches 694 694
============================================
- Hits 6544 6543 -1
Misses 371 371
- Partials 166 167 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kingthorin
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_US.ymlhas" 36877"(with a leading space) inpostcode_by_state.AL, between"36875"and"36879". It is the only entry in the USpostcode_by_statelists that is not five digits, and the county table in the same file has'36877'.Address.zipCodeByStatereturns the value untrimmed, so for Alabama it can return a code with a leading space.This removes the space. I also added
UsPostcodesByStateTest, which loads_US.ymland checks that everypostcode_by_stateentry matches[0-9]{5}.AddressTest.testZipCodeByStatechecks the same pattern, but it picks a random state and a random code, so it almost never hits this one entry.I couldn't run Maven locally, so I ran the build on a fork:
UsPostcodesByStateTest.everyPostcodeByStateHasFiveDigits ... [postcodes of AL]listing" 36877". 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).