Skip to content

Commit

Permalink
Update spotless to 1.15.0 and reformat the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiss committed Oct 28, 2022
1 parent fdfcbd1 commit ba62c02
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id 'com.diffplug.spotless' version "6.6.0" apply false
id "com.github.ben-manes.versions" version "0.42.0"

id 'de.thetaphi.forbiddenapis' version '3.3' apply false
id 'de.thetaphi.forbiddenapis' version '3.4' apply false

id 'com.carrotsearch.gradle.randomizedtesting' version '0.0.5' apply false
}
Expand Down
4 changes: 3 additions & 1 deletion core/src/main/java/org/carrot2/clustering/Cluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public class Cluster<T> {
/** This cluster's "score", interpretation left to algorithms. */
private Double score;

/** @return Returns a list of labels describing this cluster. */
/**
* @return Returns a list of labels describing this cluster.
*/
public List<String> getLabels() {
return labels;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,14 @@ private static final class PhraseCandidate {
/** If <code>false</code> the phrase should not be selected (various criteria). */
boolean selected = true;

/** @see STCClusteringAlgorithm#markSubSuperPhrases(ArrayList) */
/**
* @see STCClusteringAlgorithm#markSubSuperPhrases(ArrayList)
*/
boolean mostGeneral = true;

/** @see STCClusteringAlgorithm#markSubSuperPhrases(ArrayList) */
/**
* @see STCClusteringAlgorithm#markSubSuperPhrases(ArrayList)
*/
boolean mostSpecific = true;

PhraseCandidate(ClusterCandidate c, float coverage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ protected ContextLabelFilter(String enabledLabel) {
public abstract void filter(
PreprocessingContext context, boolean[] acceptedStems, boolean[] acceptedPhrases);

/** @return {@code true} if the filter is enabled. */
/**
* @return {@code true} if the filter is enabled.
*/
public final boolean isEnabled() {
return enabled.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,16 @@ private static final long asLong(int i1, int i2) {
return ((long) i1) << 32 | (i2 & 0xffffffffL);
}

/** @return Return the number of transitions (edges) in the tree. */
/**
* @return Return the number of transitions (edges) in the tree.
*/
public final int getTransitionsCount() {
return (this.transitions.size() / slots_per_transition) - 1;
}

/** @return Return the number of states in the tree. */
/**
* @return Return the number of states in the tree.
*/
public final int getStatesCount() {
return this.states.size() - 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public final class SuffixTreeBuilder {
/* */
private SuffixTree.IProgressCallback progressCallback;

/** @see #from(Sequence) */
/**
* @see #from(Sequence)
*/
private SuffixTreeBuilder(Sequence sequence) {
this.sequence = sequence;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

/** Test cases for {@link SubstringComparator}. */
public class SubstringComparatorTest extends TestBase {
/** @see "http://issues.carrot2.org/browse/CARROT-778" */
/**
* @see "http://issues.carrot2.org/browse/CARROT-778"
*/
@Test
public void testCarrot778() {
int[] tokensWordIndex = new int[1000];
Expand Down
2 changes: 1 addition & 1 deletion gradle/validation/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ allprojects { prj ->

spotless {
java {
googleJavaFormat('1.13.0')
googleJavaFormat('1.15.0')

licenseHeaderFile licenseHeader
lineEndings 'UNIX'
Expand Down

0 comments on commit ba62c02

Please sign in to comment.