C++: Add another test for CommentedOutCode.ql

This commit is contained in:
Jonas Jensen 2019-01-17 09:15:25 +01:00
Родитель 371c09d4e5
Коммит 92b48bf6af
2 изменённых файлов: 41 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,7 @@
| test2.cpp:13:1:13:33 | /* JSON example: {"foo":"bar"} */ | This comment appears to contain commented-out code |
| test2.cpp:33:1:33:17 | // { 1, 2, 3, 4 } | This comment appears to contain commented-out code |
| test2.cpp:35:1:35:26 | // Example: { 1, 2, 3, 4 } | This comment appears to contain commented-out code |
| test2.cpp:37:1:37:39 | // int myFunction() { return myValue; } | This comment appears to contain commented-out code |
| test.c:2:1:2:22 | // commented out code; | This comment appears to contain commented-out code |
| test.c:4:1:7:8 | // some; | This comment appears to contain commented-out code |
| test.c:9:1:13:8 | // also; | This comment appears to contain commented-out code |

Просмотреть файл

@ -0,0 +1,37 @@
/*
* This sentence contains a semicolon;
* however, this doesn't make it code.
*/
// This sentence contains a semicolon;
// however, this doesn't make it code.
/* Mention a ';' */
/* Mention a '{' */
/* JSON example: {"foo":"bar"} */
/* JSON example in backticks: `{"foo":"bar"}` */
/* JSON example in quotes: '{"foo":"bar"}' */
/*
* Code example: `return 0;`.
*/
// Code example:
//
// return 0;
// Code example:
//
// ```
// return 0;
// ```
// { 1, 2, 3, 4 }
// Example: { 1, 2, 3, 4 }
// int myFunction() { return myValue; }