liquid-java / liquid-java/liquidjava

Change instance variable numbers for line numbers instead of counter

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

还没有人认领这个 Issue。

enhancement good first issue
主要语言
Java
星标
67
派生
36
平均合并
10 天 18 小时
30 天内合并 PR
3

描述

Whenever we are creating a new instance of a variable or a fresh one, we keep the variable name and concatenate it with an incremental counter (e.g., a0, x1, y2).
A simple change would be to use the line number where this value was introduced, instead of the counter.
Example:

Image

The error could be `#x_25 == #x_24 - 10` where `24` and `25` are the lines where these were introduced.
A question could be, if multiple vars are changed could we still use the same tactic? Lets try and make some tests to see.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先定位创建新实例变量名的代码,以及针对生成名称的现有测试。检查在每个引入位置如何获得行号,然后添加测试,覆盖提议的基于行的名称,以及多个变量同时发生变化的情况;完成的标准是测试定义并确认预期的命名行为。

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

评估

技术栈
java
领域
compilers
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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