phone-number: remove punctuation or treat as error?

未关闭
#2,033 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
领域
documentation

调研方向

首先,将链接的 phone-number description.md 与 canonical-data.json 进行比较,尤其关注与标点相关的测试用例和预期错误。查看包含三条评论的线程,确认是否有任何已经确定的解释。完成的标准是标点策略已达成一致,并且 instructions 和 canonical tests 一致地表达了该策略。

由索引模型根据 Issue 内容生成。

描述

The instructions say that the "task is to clean up differently formatted telephone numbers by removing punctuation [...]".

But the test invalid with punctuations (and its predecessor) 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.

主要语言
Ruby
星标
362
派生
566
平均合并
15 小时 13 分钟
30 天内合并 PR
8

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

exercism/problem-specifications 的其他 Issue

查看 exercism/problem-specifications 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。