|
2 | 2 | { |
3 | 3 | hints: [ |
4 | 4 | { |
5 | | - absent: "if", |
6 | | - text: "Begin with \"if\" as we will return 0 when there is a problem." |
| 5 | + absent: "^ if", |
| 6 | + text: "Begin with \"if\" as we will return 0 when there is a problem.", |
| 7 | + examples: [ |
| 8 | + [ " foo " ], |
| 9 | + ], |
7 | 10 | }, |
8 | 11 | { |
9 | | - absent: String.raw`\(`, |
10 | | - text: "Need \"(...)\" around the condition after an if statement." |
| 12 | + absent: String.raw`\(.*\)`, |
| 13 | + text: "Need \"(...)\" around the condition after an if statement.", |
| 14 | + examples: [ |
| 15 | + [ " if " ], |
| 16 | + ], |
11 | 17 | }, |
12 | 18 | { |
13 | | - absent: ">", |
14 | | - text: "Need comparison \"if ( ... > ....)\"" |
| 19 | + absent: "[<>]", |
| 20 | + text: "Need comparison \"if ( ... > ....)\"", |
| 21 | + examples: [ |
| 22 | + [ " if ( x )" ], |
| 23 | + ], |
15 | 24 | }, |
16 | 25 | { |
17 | 26 | absent: String.raw`s -> s3 -> rrec \. length`, |
18 | | - text: "Need to compare a value with s->s3->rrec.length" |
| 27 | + text: "Need to compare a value with s->s3->rrec.length", |
| 28 | + examples: [ |
| 29 | + [ " if ( length > 3 )" ], |
| 30 | + ], |
19 | 31 | }, |
20 | 32 | { |
21 | | - absent: "return", |
22 | | - text: "Need \"return 0;\" to skip attempts to send a too-long response." |
| 33 | + absent: "return 0 ;", |
| 34 | + text: "Need \"return 0;\" to skip attempts to send a too-long response.", |
| 35 | + }, |
| 36 | + { |
| 37 | + absent: "^ if", |
| 38 | + text: "Begin with \"if\" as we will return 0 when there is a problem.", |
| 39 | + index: 1, |
| 40 | + }, |
| 41 | + { |
| 42 | + absent: String.raw`\(.*\)`, |
| 43 | + text: "Need \"(...)\" around the condition after an if statement.", |
| 44 | + index: 1, |
| 45 | + }, |
| 46 | + { |
| 47 | + absent: "[<>]", |
| 48 | + text: "Need comparison \"if ( ... > ....)\"", |
| 49 | + index: 1, |
| 50 | + }, |
| 51 | + { |
| 52 | + absent: String.raw`s -> s3 -> rrec \. length`, |
| 53 | + text: "Need to compare a value with s->s3->rrec.length", |
| 54 | + index: 1, |
| 55 | + }, |
| 56 | + { |
| 57 | + absent: "return 0 ;", |
| 58 | + text: "Need \"return 0;\" to skip attempts to send a too-long response.", |
| 59 | + index: 1, |
| 60 | + }, |
| 61 | + { |
| 62 | + absent: "payload", |
| 63 | + text: "Need to consider the payload length.", |
| 64 | + index: 1, |
23 | 65 | }, |
24 | 66 | ], |
25 | 67 | definitions: [ |
|
0 commit comments