exercism / exercism/problem-specifications

phone-number: remove punctuation or treat as error?

Abierto
#2,033 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Ruby
Estrellas
358
Forks
563
Merge medio
18 h 41 min
PR fusionados (30 d)
2

Descripción

The [instructions](https://github.com/exercism/problem-specifications/blob/ee62cc9d562d3b9895f7cf2e817d32a4d56ba29c/exercises/phone-number/description.md?plain=1#L17) say that the "*task is to clean up differently formatted telephone numbers by removing punctuation [...]*".

But the test [invalid with punctuations](https://github.com/exercism/problem-specifications/blob/ee62cc9d562d3b9895f7cf2e817d32a4d56ba29c/exercises/phone-number/canonical-data.json#L124-L138) (and its [predecessor](https://github.com/exercism/problem-specifications/blob/ee62cc9d562d3b9895f7cf2e817d32a4d56ba29c/exercises/phone-number/canonical-data.json)) seem to imply that certain punctuation characters are forbidden, especially since it wants the error "punctuations not permitted".

Frankly, I'm not sure what the exercise wants: Is there a list of allowed punctuation characters like '+-()' or a list of disallowed punctuation like '@:!'?

*Personally* I would either list the allowed punctuation characters in the instructions or in one of the tests explicitly, or deprecate that test and just expect the solutions to remove *all* punctuation characters without error.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.