Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

More accurate modified line counts

未关闭
#347 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

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

调研方向

首先跟踪建议的行替换是如何生成的,以及修改行是如何计数的;复现 issue 中从嵌套到模块级别的 Scheme 示例。确定应如何区分移动的行和修改的行,然后验证所得计数是否与预期的 pull request 大小以及 --max-modified-lines 的行为一致。

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

描述

bug

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

贡献指南

打开贡献指南

从这里开始

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

jackfirth/resyntax 的其他 Issue

查看 jackfirth/resyntax 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

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