Repository navigation
docs(规格): T0 补齐——探针修一处空壳绿(空语料 0==0 PASS)+ tokenize 两口径(9/10 含 LSP 站)+ 字面量花括号拆四格 - #174
Merged
Merged
Conversation
…量花括号四格拆表(1 真 + 1 注释提及,零字符);探针修一处空壳绿(清单走工作副本 + 读失败被吞 ⇒ 空语料 0==0 PASS)改 fail-closed + 清单内容同源
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.
这是什么
#173 的补齐(T0 规格 + 探针的第二版)。#173 合的是 849 行 / 1081 行;本 PR 是 899 行 / 1169 行(+206 / −68)。
一、修掉一处空壳绿(本 PR 最重要的一条)
探针旧版:文件清单走工作副本
os.walk、内容走jj file show,而读失败被except SystemExit: continue吞掉 ⇒ 语料变成空集 ⇒--form断言0 == 0直接 PASS(rc=0)。⇒ 这就是「空壳绿」:判据看起来绿,实际什么都没测。三处修:
PROBE ERROR+rc=1,绝不返回 0;--rev时清单走jj file list -r,不再 walk 工作副本 ⇒ 落后检出不能静默缩小语料;prefixes=(".")永不匹配真实相对路径 ⇒ 又成空集)。实测:stale 下带
--rev的判据现在一律rc=1+ 明确提示;去掉--rev读完好的工作副本,13 条文档命令逐条行为与文档一致。二、两处计数/措辞按实测改(一处是改我的读数)
①
tokenize()调用点 —— 两个口径都写死:src/compiler/(T1/T2/T5 复核面)grep -rnE '\btokenize\('= 12 → −定义行 = 11 → −2 处纯注释提及 = 9src/**全域src/lsp/lsp.cr:173(真调用)⇒ 计划 §7.2 写的「12」= 裸 grep 命中行数(含定义行与 2 处注释),出处已写清。我先前给作者的「9 处」限定在
src/compiler/*.cr,漏了 LSP 那一处 —— 作者保留两口径是对的,否则 T5 按清单复核时会漏 LSP 站点。② 字面量花括号拆四格(原文自相矛盾已消除):
src/compiler内 1 处真字面量花括号(= 2 个字符)=elf.cr:45,不退场;另 1 处注释提及 =parser.cr:1201(且那是 struct 模式,:1202逐字EXPR_STRUCTPAT)⇒ 零字符,T4 既不算「要改的」也不算「不退场的」。三、复验读数(完好的工作副本)
struct-lit= 14/8 · 18/9 · 32(src/compiler= 1)·colon-positions= 227 档 / 行内 7354 / 行尾 region 开启 0 / CANDIDATE 0 ·tokenize-sites= 12 / 1 定义 / 2 注释 / 9 / 10 ·semi-resolvers --spec= 35/35,MISSING 0、stale 0。本 PR 只改这两档,未改任何其它文件。