Skip to content

Commit e6fa002

Browse files
Adding analyzer feedback to design.md for log levels concept exercise (#2694)
* Adding analyzer feedback to design.md for log levels concept exercise * Updating analyzer information Adding celebratory comment Modifying string.format to be informative instead of actionable * Adding essential analyzer topic * Applying suggestion on string.format * Update exercises/concept/log-levels/.meta/design.md Co-authored-by: Sander Ploegsma <[email protected]> --------- Co-authored-by: Sander Ploegsma <[email protected]>
1 parent 07f0da7 commit e6fa002

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

exercises/concept/log-levels/.meta/design.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,17 @@
2222
This exercise's prerequisites Concepts are:
2323

2424
- `basics`: know how to define methods.
25+
26+
## Analyzer
27+
28+
This exercise could benefit from the following rules in the [analyzer]:
29+
30+
- `essential`: Verify that the solution does not hard-code the log levels (`[ERROR]:`, `[WARNING]:`, `[INFO]:`)
31+
- `actionable`: If the student did not reuse the implementation of the `message` and `logLevel` methods in the `reformat` method, instruct them to do so.
32+
- `actionable`: If the solution did not use `substring` in the methods `message` and `logLevel`, instruct the student to do so.
33+
- `informative`: If the solution uses `String.format` in the `reformat` method, inform the student that this cause a small performance penalty compared to string concatenation.
34+
35+
If the solution does not receive any of the above feedback, it must be exemplar.
36+
Leave a `celebratory` comment to celebrate the success!
37+
38+
[analyzer]: https://github.com/exercism/java-analyzer

0 commit comments

Comments
 (0)