Skip to content

Commit

Permalink
Also strip package statements with uppercase characters
Browse files Browse the repository at this point in the history
  • Loading branch information
rien committed Nov 3, 2022
1 parent 6bef355 commit 03b4969
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion i18n/en
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ i18n_errors='errors'
i18n_warning='warning'
i18n_warnings='warnings'
i18n_wrong_class_name='Your class should be called "%s".'
i18n_forgot_import='You are trying to use an unknown class "%s". Might you have forgotten an import? If you are using a package it should not contain uppercase characters.'
i18n_forgot_import='You are trying to use an unknown class "%s". Might you have forgotten an import?'
i18n_assign_to_final='Variables declared to be "final" can be assigned to only once. Remove the keyword "final" from the variable "%s" to solve this.'
i18n_raw_type='Generic classes should be passed a type.'
i18n_compilation_error='Compilation error'
Expand Down
2 changes: 1 addition & 1 deletion i18n/nl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ i18n_errors='fouten'
i18n_warning='waarschuwing'
i18n_warnings='waarschuwingen'
i18n_wrong_class_name='De naam van je klasse hoort "%s" te zijn.'
i18n_forgot_import='Je probeert een onbekende klasse "%s" te gebruiken. Mogelijks ben je de noodzakelijke import vergeten. Als je een package gebruikt mag die geen hoofdletters bevatten.'
i18n_forgot_import='Je probeert een onbekende klasse "%s" te gebruiken. Mogelijks ben je de noodzakelijke import vergeten.'
i18n_assign_to_final='Variabelen die als "final" zijn gedeclareerd, kunnen niet meer worden aangepast eens ze een waarde hebben. Verwijder het keyword "final" bij de variabele "%s" om dit op te lossen.'
i18n_raw_type='Het is aangeraden een type mee te geven aan generieke klassen.'
i18n_compilation_error='Compilatiefout'
Expand Down
4 changes: 2 additions & 2 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ fi
# Create the Input.java class, containing the submitted code
cat "$(jq -r '.source' "$config")" > "$filename"

# Very conservative removal of package statements
sed -i '1,2{/^package [a-z0-9_.]*;/d}' "$filename"
# Conservative removal of package statements
sed -i '1,2{/^package [a-zA-Z0-9_.]*;/d}' "$filename"

# Compiling the user code
[ "$allow_compilation_warnings" = 'true' ] || compile_opt='-Werror'
Expand Down

0 comments on commit 03b4969

Please sign in to comment.