代码 todo 忘记_永远不要忘记您的仓库项目经理tickgit的TODO评论
代碼 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的一部分,我們從開發人員的角度研究產品的創建和促銷。 我們將分享產品負責人的最新經驗,并為技術創始人提供與您分享其早期產品的空間。 如果您有興趣被推薦,請告訴我們 。
為什么? (Why?)
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評論? (Why // TODO Comments?)
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.待辦事項很簡單 (TODOs Are Easy)
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.
待辦事項很容易添加和刪除。 您無需離開編輯器。 它們是純文本。 您可以包括指向其他??信息的鏈接。 他們很靈活。 您甚至可以使用表情符號😀??。 您不受外部票務系統的現場需求的束縛。 在描述為什么要注釋代碼區域時,您可以像想要的那樣徹底或簡潔。
無上下文切換 (No Context Switching)
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.
待辦事項可讓您在編寫代碼時保持流程順暢,并且與在外部系統中切換來回票證相比,通常可以減輕精神負擔。 當然,如果有必要,待辦事項可以鏈接回現有票證以獲取更多信息。
可通過您的代碼進行跟蹤 (Trackable with Your Code)
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 Command-line Tool)
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.) 提取鏈接和自定義的注釋解析(提取受讓人,到期日等)
tickgit.com (tickgit.com)
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 忘記
總結
以上是生活随笔為你收集整理的代码 todo 忘记_永远不要忘记您的仓库项目经理tickgit的TODO评论的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 用python实现FMM和BMM
- 下一篇: java 上传图片 生成缩略图_上传图片