Answer the question
In order to leave comments, you need to log in
How do you share the importance of TODO in code?
The question is purely theoretical, but I'm wondering how decent people do it, not me. We all use the TODO, DEPRECATED and other annotations in one way or another in our code. But I would like to somehow separate the same TODOs in order of importance. For example: ordinary, important, very important TODO.
The system of using any postfixes looks logical. That is, "TODO something-there." But I never had any thoughts about unifying such an approach.
Maybe there are ready-made, more or less standardized and accepted by many (and therefore supported in the IDE) designations.
Answer the question
In order to leave comments, you need to log in
TODO should not be in the code, but in the task tracker, where there is prioritization. I have a negative attitude to TODO in the code.
// FIXME: Implement this.
// TODO: Enhance this comment.
// INFO: Let it be…
// HACK: I don't know why, but this works.
// WTF: How is it possible?
IDEs and common sense mostly parse the first three.
// FIXME something there - for TODOs that need to be fixed soon
// XXX something there - "pornographic" stick :)
// TODO something - just plans for the future
The most popular marks in the code are sections that require refactoring and pieces where a check is temporarily removed / a value is substituted / something is commented out for development time, etc.
In this regard, two additional types:
- REF - refactoring
- IMP - importance
//@todo REF This needs to be refactored
//@todo IMP Revert pre-deploy check
Regarding IDE support. For example, in my phpStorm, such todos are displayed in a special panel. Plus, it is possible to set different text colors for a particular type using a template.
Recommend ;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question