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

前端 未结 10 1191
别跟我提以往
别跟我提以往 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:06

    I started with

    // TODO: Implement bubble sort.

    Then I joined a large project and sometimes I needed a todo to live longer than a WIP commit and so to distinguish my todos from my peers I name spaced my todo with my initials:

    // TODO: SM: Implement bubble sort

    Sometimes I wanted more visibility so I started to use pragma warnings in some places.

    #warning Implement bubble sort

    One day I decided to turn on hard mode by adding -Werror to my cflags. Unfortunately this makes pragma warnings useless because they prevent compilation. And so I went back to using // TODO: until Jeff Nadeau told me that I can put

    -Wno-error=#warnings

    in my cflags so as to not treat pragma warnings as errors. So now #warning and -Werror can live along side each other.

提交回复
热议问题