google / google/open-location-code
Validation logic is inconsistent across languages
- Vorherrschende Sprache
- Java
- Sterne
- 4.4k
- Forks
- 530
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
There are two instances I found where validation logic for codes is inconsistent across languages:
1. Automatically expanding requested short code length if odd. Most of the
language implementations automatically add 1 to the length of requested codes
if the length indicates it is in the pair part of the code. Java, C++, Python,
and Javascript are the outliers.
2. Validate latitude and longitude bounds within validation logic for full
codes. Most of the language implementations only check the first two characters
for latitude/longitude bounds when within the validation logic for full codes,
not when generally checking if codes are valid. This does introduce a strange
case where a code is "valid", but is neither a valid short nor a valid long
code. C++ is the outlier here.
I have a PR out to fix this:
https://github.com/google/open-location-code/pull/750
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Validierungsimplementierungen in Java, C++, Python und JavaScript zu vergleichen, und prüfe anschließend den verknüpften Pull Request 750. Überprüfe, wie die Längen von Shortcodes und die Grenzen für Breiten- und Längengrad sprachübergreifend behandelt werden. Die Aufgabe ist abgeschlossen, wenn das Validierungsverhalten in den betroffenen Implementierungen konsistent ist und die relevanten Prüfungen erfolgreich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, java, javascript, python
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 20/100