From bd7d07c13510ec010a56c7ef39e6a371e36d1094 Mon Sep 17 00:00:00 2001 From: Kah Goh Date: Wed, 18 Feb 2026 07:46:05 +0800 Subject: [PATCH] Fix parameters in Java comments Updates the parameters to match the form used for the other tracks. Fixes exercism/exercism#6776. --- analyzer-comments/java/general/constructor_too_long.md | 2 +- analyzer-comments/java/general/exemplar.md | 2 +- analyzer-comments/java/general/file_not_found.md | 4 ++-- analyzer-comments/java/general/method_too_long.md | 4 ++-- analyzer-comments/java/general/reuse_code.md | 2 +- analyzer-comments/java/general/use_proper_class_name.md | 2 +- analyzer-comments/java/general/use_proper_method_name.md | 2 +- analyzer-comments/java/log-levels/use_substring_method_v2.md | 2 +- .../java/salary-calculator/use_ternary_operators.md | 2 +- analyzer-comments/java/secrets/use_bitwise_operator.md | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/analyzer-comments/java/general/constructor_too_long.md b/analyzer-comments/java/general/constructor_too_long.md index 494f1d7bb..18a9b346e 100644 --- a/analyzer-comments/java/general/constructor_too_long.md +++ b/analyzer-comments/java/general/constructor_too_long.md @@ -1,6 +1,6 @@ # constructor too long -Consider breaking down the following constructor(s) into calls to other semantically meaningful methods: `%s` +Consider breaking down the following constructor(s) into calls to other semantically meaningful methods: `%{constructorNames}` The constructor has more lines of code than this exercise generally requires. This might be acceptable, but it could be an indication that the constructor is doing too much work directly and should be delegating some of that work to other methods. diff --git a/analyzer-comments/java/general/exemplar.md b/analyzer-comments/java/general/exemplar.md index e132c2be6..fdcbe1bdb 100644 --- a/analyzer-comments/java/general/exemplar.md +++ b/analyzer-comments/java/general/exemplar.md @@ -1,5 +1,5 @@ # Exemplar -🎉 Your solution to %s is exemplar, congratulations! +🎉 Your solution to %{exerciseName} is exemplar, congratulations! It is exactly what we think is the most idiomatic implementation of the tasks at hand. Rejoice! diff --git a/analyzer-comments/java/general/file_not_found.md b/analyzer-comments/java/general/file_not_found.md index 3a29d8b48..1c4526557 100644 --- a/analyzer-comments/java/general/file_not_found.md +++ b/analyzer-comments/java/general/file_not_found.md @@ -2,8 +2,8 @@ The expected solution file was not found. -Upload the solution file `./src/main/java/%s`: +Upload the solution file `./src/main/java/%{solutionFile}`: ``` -$ exercism submit ./src/main/java/%s +$ exercism submit ./src/main/java/%{solutionFile} ``` diff --git a/analyzer-comments/java/general/method_too_long.md b/analyzer-comments/java/general/method_too_long.md index e6affe0b5..ee866daa2 100644 --- a/analyzer-comments/java/general/method_too_long.md +++ b/analyzer-comments/java/general/method_too_long.md @@ -1,8 +1,8 @@ # method too long -Consider breaking down the following method(s) into calls to other semantically meaningful methods: `%s` +Consider breaking down the following method(s) into calls to other semantically meaningful methods: `%{methodNames}` The method has more lines of code than this exercise generally requires. This might be acceptable, but it could be an indication that the method is doing too much work directly and should be delegating some of that work to other methods. Try to keep everything inside a method at one level of abstraction. -For example, iterating through the elements of a loop could be in one method while manipulating each individual element could be in another. \ No newline at end of file +For example, iterating through the elements of a loop could be in one method while manipulating each individual element could be in another. diff --git a/analyzer-comments/java/general/reuse_code.md b/analyzer-comments/java/general/reuse_code.md index b78b30a2b..41fa38d0f 100644 --- a/analyzer-comments/java/general/reuse_code.md +++ b/analyzer-comments/java/general/reuse_code.md @@ -1,4 +1,4 @@ # Reuse code -The `%s` method should reuse the logic implemented in `%s`. +The `%{callingMethod}` method should reuse the logic implemented in `%{methodToCall}`. Reusing existing methods can help make code easier to maintain. diff --git a/analyzer-comments/java/general/use_proper_class_name.md b/analyzer-comments/java/general/use_proper_class_name.md index fe8eb0be9..f54e6ea87 100644 --- a/analyzer-comments/java/general/use_proper_class_name.md +++ b/analyzer-comments/java/general/use_proper_class_name.md @@ -2,4 +2,4 @@ The class name should match the file name. -Rename the class to `%s`. +Rename the class to `%{className}`. diff --git a/analyzer-comments/java/general/use_proper_method_name.md b/analyzer-comments/java/general/use_proper_method_name.md index 42db82644..3293c0830 100644 --- a/analyzer-comments/java/general/use_proper_method_name.md +++ b/analyzer-comments/java/general/use_proper_method_name.md @@ -2,7 +2,7 @@ The method name should match exactly what was used in the tests. -Rename the method to `%s`. +Rename the method to `%{methodName}`. **NOTE**: Don't modify the tests to match a different method name. In general, try to only add additional tests (if desired). diff --git a/analyzer-comments/java/log-levels/use_substring_method_v2.md b/analyzer-comments/java/log-levels/use_substring_method_v2.md index dddc1b021..58e776396 100644 --- a/analyzer-comments/java/log-levels/use_substring_method_v2.md +++ b/analyzer-comments/java/log-levels/use_substring_method_v2.md @@ -1,5 +1,5 @@ # use substring method -Consider using the [substring][substring-method] method in `%s` to solve this exercise. +Consider using the [substring][substring-method] method in `%{inMethod}` to solve this exercise. [substring-method]: https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#substring-int-int- diff --git a/analyzer-comments/java/salary-calculator/use_ternary_operators.md b/analyzer-comments/java/salary-calculator/use_ternary_operators.md index 7cab55c50..a380851c1 100644 --- a/analyzer-comments/java/salary-calculator/use_ternary_operators.md +++ b/analyzer-comments/java/salary-calculator/use_ternary_operators.md @@ -1,3 +1,3 @@ # use ternary operators -As the goal of this exercise is to learn about ternary operators consider using them in `%s` to solve this exercise. +As the goal of this exercise is to learn about ternary operators consider using them in `%{inMethod}` to solve this exercise. diff --git a/analyzer-comments/java/secrets/use_bitwise_operator.md b/analyzer-comments/java/secrets/use_bitwise_operator.md index 39611e2a2..ec3a336a6 100644 --- a/analyzer-comments/java/secrets/use_bitwise_operator.md +++ b/analyzer-comments/java/secrets/use_bitwise_operator.md @@ -1,4 +1,4 @@ # use bitwise operator -The `%s` method should use the operator `%s`. +The `%{calledMethod}` method should use the operator `%{operatorToUse}`. As this concept exercise intends to teach how Bitwise operators work