Skip to content

Commit

Permalink
remove formatting noise
Browse files Browse the repository at this point in the history
  • Loading branch information
Billlynch committed Apr 29, 2024
1 parent ac02dc8 commit 7a23595
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,26 @@ public Void generate() {
final SemanticVersion.ChangeType changeType = changeTypeOptional.get();

SemverOut semverOut = new SemverOut(options, jApiClasses, (change, semanticVersionLevel) -> {
switch (semanticVersionLevel) {
case MAJOR:
if (changeType.ordinal() > SemanticVersion.ChangeType.MAJOR.ordinal()) {
warn("Incompatibility detected: Requires semantic version level " + semanticVersionLevel + ": " + change);
}
break;
case MINOR:
if (changeType.ordinal() > SemanticVersion.ChangeType.MINOR.ordinal()) {
warn("Incompatibility detected: Requires semantic version level " + semanticVersionLevel + ": " + change);
}
break;
case PATCH:
if (changeType.ordinal() > SemanticVersion.ChangeType.PATCH.ordinal()) {
warn("Incompatibility detected: Requires semantic version level " + semanticVersionLevel + ": " + change);
}
break;
default:
// Ignore
}
});
switch(semanticVersionLevel) {
case MAJOR:
if (changeType.ordinal() > SemanticVersion.ChangeType.MAJOR.ordinal()) {
warn("Incompatibility detected: Requires semantic version level " + semanticVersionLevel + ": " + change);
}
break;
case MINOR:
if (changeType.ordinal() > SemanticVersion.ChangeType.MINOR.ordinal()) {
warn("Incompatibility detected: Requires semantic version level " + semanticVersionLevel + ": " + change);
}
break;
case PATCH:
if (changeType.ordinal() > SemanticVersion.ChangeType.PATCH.ordinal()) {
warn("Incompatibility detected: Requires semantic version level " + semanticVersionLevel + ": " + change);
}
break;
default:
// Ignore
}
});

String semver = semverOut.generate();
if (changeType == SemanticVersion.ChangeType.MINOR && semver.equals(SemverOut.SEMVER_MAJOR)) {
Expand Down Expand Up @@ -311,7 +311,7 @@ public void visit(Iterator<JApiImplementedInterface> iterator, JApiImplementedIn
private boolean breakBuildIfCausedByExclusion(JApiImplementedInterface jApiImplementedInterface) {
if (!breakBuildIfCausedByExclusion) {
CtClass ctClass = jApiImplementedInterface.getCtClass();
return !classExcluded(ctClass);
return !classExcluded(ctClass);
}
return true;
}
Expand Down Expand Up @@ -406,7 +406,7 @@ private boolean breakBuildIfCausedByExclusion(JApiSuperclass jApiSuperclass) {
Optional<CtClass> newSuperclassOptional = jApiSuperclass.getNewSuperclass();
if (newSuperclassOptional.isPresent()) {
CtClass ctClass = newSuperclassOptional.get();
return !classExcluded(ctClass);
return !classExcluded(ctClass);
}
}
return true;
Expand Down

0 comments on commit 7a23595

Please sign in to comment.