More accurate modified line counts
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- tooling
调研方向
首先跟踪建议的行替换是如何生成的,以及修改行是如何计数的;复现 issue 中从嵌套到模块级别的 Scheme 示例。确定应如何区分移动的行和修改的行,然后验证所得计数是否与预期的 pull request 大小以及 --max-modified-lines 的行为一致。
由索引模型根据 Issue 内容生成。
描述
If Resyntax suggests replacing this code:
(define (foo)
(define (bar)
42)
... hundreds of lines of code ...)
With this code:
(define (foo)
... hundreds of lines of code ...)
(define (bar)
42)
Then something odd happens with modified line counting. GitHub will say that the diff removes two lines (the original nested bar definition) and adds three lines (the new, module-level bar definition). Resyntax, however, will say that hundreds of lines of code were modified because everything in foo after the original nested bar definition has to be included in the line replacement. Using ~focus-replacement-on doesn't help either, because we're not changing an expression within a nested context: we're moving it to a different context entirely. This causes --max-modified-lines to appear to disagree with the GitHub pull request size.
A possible fix might be to inspect the line-replacement generated by a suggestion and do something a bit smarter to determine whether any lines were simply moved instead of actually modified.
- 主要语言
- Racket
- 星标
- 70
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jackfirth/resyntax 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
documentation
难度 4/5 3-5 天 新手友好度 45/100
-
testing
难度 4/5 3-5 天 新手友好度 45/100
-
testing
难度 3/5 1-2 天 新手友好度 75/100
-
testing
难度 4/5 3-5 天 新手友好度 68/100
查看 jackfirth/resyntax 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
vercel-labs/just-bash#464 ·
-
Bug
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/safe-publish#594 ·
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
bug feat:crypto feat:utils
难度 2/5 1-3 小时 新手友好度 70/100