展示HN:Codereport – 使用命令行界面在你的代码库中跟踪待办事项、重构和错误

2作者: pulko大约 1 个月前原帖
我厌倦了 TODO、临时解决方案和永远得不到解决的重构。在我参与的大多数代码库中: - TODO 分散在各个文件/应用/消息中 - “关键”修复并没有真正阻止人们收回债务 - PR 评论或工单不足以采取有效行动 因此,我创建了 codereport,这是一款命令行工具,可以在代码库中存储结构化的后续跟进信息(.codereports/)。每个报告跟踪: - 文件 + 行范围(src/foo.rs:42-88) - 标签(todo、重构、bug、关键) - 严重性(可以配置为在 CI 中阻止) - 可选的到期日期 - 所有者(CODEOWNERS → git blame 作为后备) 您可以列出、解决或删除报告,生成带有热图和关键绩效指标的最小 HTML 仪表板,并在 CI 中运行 codereport check,如果有任何阻止或过期的事项仍然开放,则会使合并失败。 它是以代码库为中心的,不依赖于任何外部服务。 我很好奇: - 这样的工具是否适合您的工作流程? - 在代码库中以 YAML 格式存储报告是否合理? - CI 强制执行是否会感觉有用还是令人烦恼? 命令行工具: [https://crates.io/crates/codereport](https://crates.io/crates/codereport) + codereport.pulko-app.com
查看原文
I got tired of TODOs, temporary hacks, and refactors that never get addressed. In most repos I work on:<p>- TODOs are scattered across files&#x2F;apps&#x2F;messages - “Critical” fixes don’t actually block people from collecting debt - PR comments or tickets aren’t enough actionable<p>So I built codereport, a CLI that stores structured follow-ups in the repo itself (.codereports&#x2F;). Each report tracks:<p>- file + line range (src&#x2F;foo.rs:42-88) - tag (todo, refactor, buggy, critical) - severity (you can configure it to be blocking in CI) - optional expiration date - owner (CODEOWNERS → git blame fallback)<p>You can list, resolve, or delete reports, generate a minimal HTML dashboard with heatmaps and KPIs, and run codereport check in CI to fail merges if anything blocking or expired is still open.<p>It’s repo-first, and doesn’t rely on any external services.<p>I’m curious:<p>Would a tool like this fit in your workflow? Is storing reports in YAML in the repo reasonable? Would CI enforcement feel useful or annoying?<p>CLI: <a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;codereport" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;codereport</a> + codereport.pulko-app.com