Skip to content

Commit

Permalink
objectionary#3058: snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
levBagryansky committed Apr 26, 2024
1 parent 51a11a8 commit 3b27d45
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions eo-runtime/src/test/groovy/check-eo-classes-are-public.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ Collection<JavaClass> violations = stream_of(sources)
it.toFile().getName().startsWith("EO")
})
.map(path -> new ClassParser(path.toString()).parse())
.filter (clazz -> IsEoClass(clazz))
.filter (clazz -> is_eo_class(clazz))
.filter (clazz -> {
return !clazz.isPublic()
})
.map (clazz -> clazz.getClassName())
.collect(Collectors.toList())
if (!violations.isEmpty()) {
throw new IllegalStateException(
String.format(
"Not all EO classes are public: %s\n",
violations
)
String.format(
"Not all EO classes are public: %s\n",
violations
)
)
}

Expand All @@ -65,7 +65,7 @@ static Stream<Path> stream_of(Path[] paths) {
return accum
}

static boolean IsEoClass(JavaClass clazz) {
static boolean is_eo_class(JavaClass clazz) {
return clazz.className.startsWith("EO") &&
("org.eolang.Phi" in clazz.getInterfaceNames() ||
"org.eolang.PhDefault" == clazz.getSuperclassName()) &&
Expand Down

0 comments on commit 3b27d45

Please sign in to comment.