Skip to content

Commit

Permalink
Merge pull request #299 from libaurea/fix/pkgname-underscore
Browse files Browse the repository at this point in the history
🐛 fix(check): allow underscore in package naming
  • Loading branch information
Luro02 authored Oct 24, 2023
2 parents 393e5c2 + 2dbe5ad commit 7dc546d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

@ExecutableCheck(reportedProblems = {ProblemType.PACKAGE_NAMING_CONVENTION})
public class PackageNamingConvention extends IntegratedCheck {
private static final Pattern PACKAGE_NAME_PATTERN = Pattern.compile("[a-z][a-z0-9]*");
private static final Pattern PACKAGE_NAME_PATTERN = Pattern.compile("[a-z][a-z0-9_]*");

private static <T> Set<T> intersection(Set<? extends T> left, Collection<T> right) {
Set<T> result = new HashSet<>(left);
Expand Down
2 changes: 1 addition & 1 deletion autograder-core/src/main/resources/strings.de.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ type-has-descriptive-name-pre-suffix = Der Name enthält unnötige Präfixe oder
type-has-descriptive-name-exception = Eine Klasse die von Exception erbt, sollte 'Exception' am Ende ihres Namens haben
package-naming-convention = Der Name eines Pakets sollte am besten ein Wort sein und alle Buchstaben sollten nach Konvention
klein sein. Zudem sollten keine Sonderzeichen auftreten wie '_'. An folgenden Stellen wird das
klein sein. Außer dem Zeichen '_' sollten zudem keine Sonderzeichen auftreten. An folgenden Stellen wird das
nicht eingehalten: '{$positions}'
variable-redundant-number-suffix = Der Bezeichner '{$name}' enthält eine redundante Zahl am Ende.
Expand Down
2 changes: 1 addition & 1 deletion autograder-core/src/main/resources/strings.en.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ type-has-descriptive-name-pre-suffix = The name contains redundant prefixes or s
type-has-descriptive-name-exception = A class that inherits from Exception should have 'Exception' at the end of its name
package-naming-convention = The name of a package should be a single word and all letters should be lowercase by convention.
Additionally, no special characters should occur like '_'. The following positions do not
Except for the character '_', no special characters should appear. The following positions do not
adhere to this: '{$positions}'
variable-redundant-number-suffix = The identifier '{$name}' has a redundant number at the end.
Expand Down

0 comments on commit 7dc546d

Please sign in to comment.