Repository navigation
[1343] 修复 free-variables 作用域分析边界 - #1790
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#1779 已合入
main,新增非阻塞的free-variables文件检查。本 PR 是基于最新main的独立补充修复,不修改原 PR。What
define*的可选参数(name default)正确识别为局部绑定namedo绑定的更新表达式,补充未绑定名字检查let/letrec保守跳过,避免分析器异常非阻塞策略
保持
free-variables只报警、不影响退出状态。本 PR 不追求一次消除全部误报和漏报,后续根据真实检查结果渐进完善。真实文件
library/liii/path/fs.scm与goldfish/liii/list.scm的警告从 37 条降至 15 条。全仓--all --only free-variables仍有 14044 条警告,但规则显示 OK,退出码为 0。验证
xmake b goldfishbin/gf test tools/check/tests/liii/goldcheck/:199/199 PASSbin/gf fmt --check:PASSmax-file-lines、max-tree-depth:PASSbin/gf check --all --only free-variables:退出码 0;警告作为后续改进输入任务文档见 LiiiLabs/dev-agent 的 [1343] 文档 PR。