Skip to content

Commit

Permalink
Adding analyzer feedback to design.md for log levels concept exercise (
Browse files Browse the repository at this point in the history
…#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]>
  • Loading branch information
manumafe98 and sanderploegsma authored Jan 31, 2024
1 parent 07f0da7 commit e6fa002
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions exercises/concept/log-levels/.meta/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@
This exercise's prerequisites Concepts are:

- `basics`: know how to define methods.

## Analyzer

This exercise could benefit from the following rules in the [analyzer]:

- `essential`: Verify that the solution does not hard-code the log levels (`[ERROR]:`, `[WARNING]:`, `[INFO]:`)
- `actionable`: If the student did not reuse the implementation of the `message` and `logLevel` methods in the `reformat` method, instruct them to do so.
- `actionable`: If the solution did not use `substring` in the methods `message` and `logLevel`, instruct the student to do so.
- `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.

If the solution does not receive any of the above feedback, it must be exemplar.
Leave a `celebratory` comment to celebrate the success!

[analyzer]: https://github.com/exercism/java-analyzer

0 comments on commit e6fa002

Please sign in to comment.