Skip to content

Commit

Permalink
improve error message for attributes that should be private
Browse files Browse the repository at this point in the history
  • Loading branch information
Luro02 committed Apr 4, 2024
1 parent edd819b commit f20a866
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void process(CtTypeMember ctTypeMember) {
addLocalProblem(
ctField,
new LocalizedMessage(
"use-different-visibility",
"use-different-visibility-field",
Map.of(
"name", ctField.getSimpleName(),
"suggestion", Visibility.PRIVATE.toString()
Expand Down
1 change: 1 addition & 0 deletions autograder-core/src/main/resources/strings.de.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ use-guard-clauses = Der Code bricht den normalen Kontrollfluss durch zum Beispie
import-types = Statt den Pfad zum Typ anzugeben, sollte '{$type}' importiert werden. Datentypen aus dem selben Paket oder 'java.lang' müssen nicht explizit importiert werden.
use-different-visibility = Die Sichtbarkeit von '{$name}' sollte '{$suggestion}' sein.
use-different-visibility-field = Die Sichtbarkeit vom Feld '{$name}' sollte immer '{$suggestion}' sein.
avoid-recompiling-regex = Die Konstante wird nur mit 'Pattern.compile' oder 'Pattern.matches' verwendet. Konvertiere die Konstante zu einem Pattern mit dem Wert '{$suggestion}'.
Expand Down
1 change: 1 addition & 0 deletions autograder-core/src/main/resources/strings.en.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ use-guard-clauses = The code cancels the normal control-flow through for example
import-types = Instead of qualifying the type, '{$type}' should be imported. Types from the same package or 'java.lang' do not have to be imported explicitly.
use-different-visibility = The visibility of '{$name}' should be '{$suggestion}'.
use-different-visibility-field = The visibility of field '{$name}' should always be '{$suggestion}'.
avoid-recompiling-regex = The constant is only used with 'Pattern.compile' or 'Pattern.matches'. Convert the constant to a pattern with the value '{$suggestion}'.
Expand Down
Loading

0 comments on commit f20a866

Please sign in to comment.