How can I mark “To Do” comments in Xcode?

前端 未结 10 1166
别跟我提以往
别跟我提以往 2020-12-04 05:39

Currently I\'m working on an iOS based Image Manipulation task.

Problem:

I\'m working on different modules. So If I need to add something in a module in fu

10条回答
  •  攒了一身酷
    2020-12-04 06:14

    With the script below your can see all required tags like warnings.

    1. Select your project in the Project Navigator
    2. Open the target in the sidebar and move to the "Build Phases" tab
    3. Click on "+" sign
    4. Select "New Run Script Build Phase" Script adding
    5. Add below script to "Run Script" Ready Script The script:

      KEYWORDS="TODO:|FIXME:|DevTeam:|XXX:"
      find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
      

    enter image description here

    Original answer was taken from Here

    Another alternative is XToDo plugin for Xcode.

提交回复
热议问题