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

docs: README examples no longer match v0.21.0's output

已关闭 适合新手
#261 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
go
领域
documentation

调研方向

从 README.md 中引用的章节开始:第 1472–1525 行附近的示例、-V=full 的说明、格式错误指令表以及行号示例。在 commit 510cad4 上运行文档中列出的命令,并将输出与 README 的每个代码块进行比较。更新过时或不完整的示例和陈述,统一行号规范,并在可行时为 survey 和 inspect 代码块添加 golden test;当文档中的输出和陈述与命令一致时,即为完成。

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

描述

documentation P3

These were checked by running the commands at 510cad4.

Example output

  • "Silencing an unused report" (README.md:591-594): it runs plain declscope ./..., which is strict by default, but shows the loose wording nothing it reaches takes a scope. v0.21.0 prints …on B: it already has shared scope, and the same for T.F.

  • Survey and inspect samples (README.md:1472-1525): several numbers are out of date, and rows are silently left out.

    Item README v0.21.0
    Survey declared 20 29
    markdown → cell mutual empty yes
    markdown → cell reached 7 of 10 7 of 18
    markdown → sink 5 of 17, 28 uses 5 of 18, 25 uses
    golden → (core) 4 of 78 4 of 79
    format → json 2 of 105 2 of 107
    Open declarations 114 109

    The survey sample leaves out the Packages — qualify table. The inspect sample drops rows such as json → summary from the middle of the table, and cuts the "Declarations crossed" sentence short.

Statements

  • -V=full (README.md:227) says "A build from a checkout answers devel". go build in a checkout answers a VCS version. Only go run, or a build with -buildvcs=false, answers devel.

  • The malformed-directive table (README.md:628-630) gives one directive's message for another:

    Input README Actual
    //declscope:core twice duplicate declscope:namespace directive duplicate declscope:core directive
    Two identical ignores duplicate declscope:shared directive duplicate declscope:ignore directive
    A stray //declscope:core declscope:namespace must appear… declscope:core must appear…
  • Line numbers are counted two ways. Most examples treat the // file.go caption as outside the file (lines 114-115, 770-778, 1066 and 1159). The strict-fix example (534-537) and the account.go example (1100) count it as line 1.

Suggested fix

  • Regenerate the samples, or mark them as excerpts.
  • Use <name> in the message table.
  • Pick one convention for line numbers.
  • A golden test over the survey and inspect README blocks would keep them from drifting again.
主要语言
Go
星标
42
派生
1
平均合并
57 分钟
30 天内合并 PR
135

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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