代码 todo 忘记
tickgit is a command-line tool and web application that helps developers do project management in their code, through the use of TODO comments and other plain-text markers. It’s a low-overhead way of managing your backlog without switching contexts.
tickgit是一个命令行工具和Web应用程序,可通过使用TODO注释和其他纯文本标记来帮助开发人员在其代码中进行项目管理。 这是一种无需切换上下文即可管理积压的开销很小的方法。
tickgit scans source code for TODO markers (and HACK, FIXME, XXX, etc.) and presents those code comments as tickets, with a fuller context derived from Git history (who added it, when, where etc.).
tickgit会扫描源代码中的TODO标记(以及HACK,FIXME,XXX等),并将这些代码注释显示为票证,并具有从Git历史记录(谁在何时何地添加了它)中获得的更完整的上下文。
I am a solo developer building tickgit and tickgit.com to help software engineers be more productive in their code. I hope you find this project interesting and useful!
我是一个独立开发人员,负责创建tickgit和tickgit.com,以帮助软件工程师提高其代码的生产率。 希望您觉得这个项目有趣且有用!
This article is part of The Roadmap, where we look at the creation and promotion of products from the developer’s perspective. We’ll share top lessons from product leaders, and give technical founders a space to share their early-stage products with you. If you’re interested in being featured, let us know.
本文是The Roadmap的一部分,我们从开发人员的角度研究产品的创建和促销。 我们将分享产品负责人的最新经验,并为技术创始人提供与您分享其早期产品的空间。 如果您有兴趣被推荐,请告诉我们 。
Project management is an essential part of software development, even for solo developers building a side-project. Plenty of existing ticketing and task management systems help teams and individuals track pending work really thoroughly. Sometimes, though, using TODO comments and other markers within a codebase ends up being a more efficient way of keeping tabs on what needs to get done.
项目管理是软件开发的重要组成部分,即使对于开发旁项目的单独开发人员也是如此。 大量现有的票务和任务管理系统可以帮助团队和个人彻底地跟踪待处理的工作。 但是,有时候, 在代码库中使用TODO注释和其他标记最终可以成为一种更高效的方法,可让您随时掌握需要完成的工作。
TODO comments (or FIXME, HACK, OPTIMIZE, XXX, etc.) are a common way developers indicate that an area of code is worth addressing and returning to. The Linux codebase has 4k+ of these types of comments, Kubernetes has 2k+.
TODO注释(或FIXME,HACK,OPTIMIZE,XXX等)是开发人员指出值得寻址并返回的代码区域的常用方式。 Linux代码库具有4k +的这些类型的注释, Kubernetes具有2k +的注释。
If this sort of thing is a familiar sight, you’ve no doubt seen or used them before:
如果您很熟悉这种事物,那么您之前肯定会看过或使用过它们:
// TODO: Get rid of this condition somehow. Perhaps with a dynamic version // of the @gate pragma.To-dos are easy to add and remove. You don’t need to leave your editor. They’re plaintext. You can include links to additional information. They’re flexible. You can even use emojis 😀✏️. You’re not constrained by the field requirements of an external ticketing system. You can be as thorough or succinct as you’d like in describing why you’re annotating an area of code.
待办事项很容易添加和删除。 您无需离开编辑器。 它们是纯文本。 您可以包括指向其他信息的链接。 他们很灵活。 您甚至可以使用表情符号😀✏️。 您不受外部票务系统的现场需求的束缚。 在描述为什么要注释代码区域时,您可以像想要的那样彻底或简洁。
To-dos are right next to the code they’re describing, which means you don’t lose the context of the codebase: the surrounding classes, functions, variables, etc. Using an external ticketing system requires you to either switch focus when trying to understand a ticket and the relevant pieces of code, or do a great deal of context-copying to help clarify your task.
待办事项就在它们描述的代码旁边,这意味着您不会失去代码库的上下文:周围的类,函数,变量等。使用外部票务系统需要您在尝试时切换焦点了解票证和相关代码段,或进行大量上下文复制以帮助您明确任务。
To-dos allow you to maintain your flow when writing code, and are often a lower mental burden than switching to and from tickets in an external system. To-dos, of course, can link back to an existing ticket for additional information if necessary.
待办事项可让您在编写代码时保持流程顺畅,并且与在外部系统中切换来回票证相比,通常可以减轻精神负担。 当然,如果有必要,待办事项可以链接回现有票证以获取更多信息。
Since TODO comments are part of your code, they’re stored in version control. They can undergo code-review in your PRs. They have a history and can be attributed to authors, versions, and commits. This can enable project management aware reports about burndown, team responsibilities, tech debt, development efficiency, etc.
由于TODO注释是代码的一部分,因此它们存储在版本控制中。 他们可以在您的PR中进行代码审查。 它们具有历史记录,可以归因于作者,版本和提交。 这可以使项目管理了解有关燃尽,团队责任,技术债务,开发效率等的报告。
The tickgit command-line tool is an open-source project that scans a Git codebase for TODO comments. It runs a Git blame and outputs results with references to file paths and line numbers.
tickgit命令行工具是一个开源项目,它会在Git代码库中扫描TODO注释。 它运行Git责备并输出引用文件路径和行号的结果。
It can be used to query ad-hoc for open TODO comments, and supports CSV output for consumption by other tools (spreadsheets, text processors, etc.).
它可用于临时查询开放的TODO注释,并支持CSV输出以供其他工具(电子表格,文本处理器等)使用。
Here’s an example output:
这是示例输出:
The CLI is currently pretty simple, but with plans to improve to enable more use cases, including:
CLI目前非常简单,但是计划进行改进以启用更多用例,包括:
Customization of phrases to match (don’t match XXX but match @TODO in comments)
自定义匹配的词组(不匹配XXX,但匹配@TODO注释)
Querying and filtering (show me all to-dos added this week, show me only mine, etc.) 查询和过滤(显示本周添加的所有待办事项,仅显示我的等) Aggregation queries count by author, average age by author, etc. 汇总查询按作者计数,按作者平均年龄等。 A CI mode to fail with an error if certain criteria are met (no to-dos in certain branches, max 5 to-dos per author, etc.) 如果满足某些条件,CI模式将失败并显示错误(某些分支机构没有待办事项,每位作者最多5项待办事项,等等) Extract links and customized parsing of comments (extract an assignee, a due date, etc.) 提取链接和自定义的注释解析(提取受让人,到期日等)The tickgit web application is a SaaS that currently integrates with GitHub. It’s free (no sign-up required) to use for public repositories. You can view open TODO comments, and some summary statistics including charts of counts by author and average age by author.
tickgit Web应用程序是SaaS,当前与GitHub集成。 它是免费的(无需注册)可用于公共存储库。 您可以查看未完成的待办事项注释,以及一些摘要统计信息,包括按作者计数的统计图和按作者统计的平均年龄。
Each TODO comment is presented as a card, which shows similar information as the CLI. Clicking through will bring you to the file and line of the TODO comment in the GitHub UI.
每个TODO注释均以卡的形式显示,其显示的信息与CLI相似。 单击将带您到GitHub UI中TODO注释的文件和行。
Private repositories are supported for $3/month (for individuals). All features of the free version (for public repos) are in the paid version for private repos.
私人存储库的每月费用为3美元(个人)。 免费版(用于公共回购)的所有功能都在私有版的付费版本中。
Some improvements that are on the way include:
正在进行的一些改进包括:
Subscribe to a repository’s TODO comments as a weekly email summary 订阅存储库的TODO注释作为每周电子邮件摘要 Improved querying and filtering (find my to-dos, to-dos older than a date, etc.) 改进的查询和过滤(查找待办事项,比日期早的待办事项等) Support for more Git hosts (GitLab, BitBucket, sourcehut etc.) 支持更多Git主机(GitLab,BitBucket,sourcehut等) Better integration with third-party tools like Trello, Jira and Slack 与Trello,Jira和Slack等第三方工具更好地集成Head over to tickgit.com and take it for a spin on one of your public repos. I hope you’ll be surprised at how much more efficiently you can work through the backlog you didn’t even know you had!
前往tickgit.com并试用您的一个公共存储库。 我希望您会惊讶于您甚至不知道自己所拥有的积压订单可以更有效地工作!
翻译自: https://www.sitepoint.com/never-forget-a-todo-comment-with-tickgit-your-repos-project-manager/
代码 todo 忘记