TODO in code

Aleksey Razbakov - Dec 1 '17 - - Dev Community

For example you write a code, which you want to improve later.
For now your simple function can solve the problem.
But later you want to use some library to calculate all.

// TODO: replace with vendor
function calculateTax($price, $country) {
    return $price;
}
Enter fullscreen mode Exit fullscreen mode

Is it a good idea to leave TODO comments in code and merge this code to master?

Here are few references

NO:

YES:

Github Action to Create Issues from Code TODOs

.github/workflows/todo.yml:

name: Create Issues from Code TODOs

# Controls when the workflow will run
on:
    # Triggers the workflow on push events but only for the master branch
    push:
        branches: [main]

jobs:
    build:
        runs-on: ubuntu-latest
        steps:
            -   uses: actions/checkout@v3
            -   name: TODO to Issue
                uses: alstr/todo-to-issue-action@v4
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player