google / google/open-location-code

Validation logic is inconsistent across languages

Aperta
#751 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
4.4k
Fork
530
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by comparing the validation implementations in Java, C++, Python, and JavaScript, then review the linked pull request 750. Check how short-code lengths and latitude/longitude bounds are handled across languages. Done means the validation behavior is consistent in the affected implementations and the relevant checks pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, java, javascript, python
Ambito
backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.