exercism / exercism/problem-specifications

phone-number: remove punctuation or treat as error?

Ouverte
#2,033 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Ruby
Étoiles
358
Forks
563
Merge moyen
18 h 41 min
PR mergées (30 j)
2

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.