FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/src/Lexical/ToDoComment.qhelp at codeql-cli/v2.15.3 · github/codeql · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10k
Code
Issues
998
Pull requests
461
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Lexical
/
ToDoComment.qhelp
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (40 loc) · 1.57 KB
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Lexical
/
ToDoComment.qhelp
Copy path
File metadata and controls
53 lines (40 loc) · 1.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!
DOCTYPE
qhelp
PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<
qhelp
>
<
overview
>
<
p
>A comment that includes the word <
code
>TODO</
code
> often marks a part of
the code that is incomplete or broken, or highlights ambiguities in the
software's specification.</
p
>
<
p
>For example, this list of comments is typical of those found in real
programs:</
p
>
<
ul
>
<
li
><
code
>TODO: move this code somewhere else</
code
></
li
>
<
li
><
code
>TODO: find a better solution to this workaround</
code
></
li
>
<
li
><
code
>TODO: test this</
code
></
li
>
</
ul
>
</
overview
>
<
recommendation
>
<
p
>It is very important that <
code
>TODO</
code
> comments are
not just removed from the code. Each of them must be addressed in some way.</
p
>
<
p
>Simpler comments can usually be immediately addressed by fixing the code,
adding a test, doing some refactoring, or clarifying the intended behavior of
a feature.</
p
>
<
p
>In contrast, larger issues may require discussion, and a significant amount
of work to address. In these cases it is a good idea to move the comment to an
issue-tracking system, so that the issue can be tracked
and prioritized relative to other defects and feature requests.</
p
>
</
recommendation
>
<
example
>
<
p
>The following example shows a function where a TODO comment indicates a known limitation in the
existing implementation. The function should be reviewed, the limitation addressed and then the
comment deleted.</
p
>
<
sample
src
=
"
ToDoComment.py
"
/>
</
example
>
<
references
>
<
li
>
Wikipedia: <
a
href
=
"
http://en.wikipedia.org/wiki/Comment_%28computer_programming%29#Tags
"
>
Comment tags</
a
>.
</
li
>
</
references
>
</
qhelp
>
Back
|
FazBrowse Home
|
New Git URL