build(checkstyle): update to version 10.2, update .idea to match (#5027)
parent
f4d3d5da01
commit
114f175778
|
@ -3,12 +3,12 @@
|
|||
<component name="CheckStyle-IDEA">
|
||||
<option name="configuration">
|
||||
<map>
|
||||
<entry key="active-configuration" value="PROJECT_RELATIVE:$PROJECT_DIR$/config/metrics/checkstyle/checkstyle.xml:Terasology" />
|
||||
<entry key="checkstyle-version" value="8.45" />
|
||||
<entry key="active-configuration-0" value="PROJECT_RELATIVE:$PROJECT_DIR$/config/metrics/checkstyle/checkstyle.xml:Terasology;All" />
|
||||
<entry key="checkstyle-version" value="10.2" />
|
||||
<entry key="copy-libs" value="false" />
|
||||
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
|
||||
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
|
||||
<entry key="location-2" value="PROJECT_RELATIVE:$PROJECT_DIR$/config/metrics/checkstyle/checkstyle.xml:Terasology" />
|
||||
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks;All" />
|
||||
<entry key="location-1" value="BUNDLED:(bundled):Google Checks;All" />
|
||||
<entry key="location-2" value="PROJECT_RELATIVE:$PROJECT_DIR$/config/metrics/checkstyle/checkstyle.xml:Terasology;All" />
|
||||
<entry key="property-2.samedir" value="$PROJECT_DIR$/config/metrics/checkstyle" />
|
||||
<entry key="scan-before-checkin" value="true" />
|
||||
<entry key="scanscope" value="AllSourcesWithTests" />
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="FindBugs-IDEA">
|
||||
<excludeFilterFiles>
|
||||
<filter file="$PROJECT_DIR$/config/metrics/findbugs/findbugs-exclude.xml" enabled="true" />
|
||||
</excludeFilterFiles>
|
||||
</component>
|
||||
</project>
|
|
@ -42,6 +42,8 @@ tasks.withType<Test> {
|
|||
configure<CheckstyleExtension> {
|
||||
isIgnoreFailures = false
|
||||
|
||||
toolVersion = "10.2"
|
||||
|
||||
val checkstyleDir = rootDir.resolve("config/metrics/checkstyle")
|
||||
configDirectory.set(checkstyleDir)
|
||||
setConfigProperties("samedir" to checkstyleDir)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.terasology.documentation;
|
||||
|
||||
|
@ -6,9 +6,9 @@ import com.google.common.collect.Multimaps;
|
|||
import com.google.common.collect.SortedSetMultimap;
|
||||
import org.terasology.engine.core.module.ExternalApiWhitelist;
|
||||
import org.terasology.engine.core.module.ModuleManager;
|
||||
import org.terasology.engine.testUtil.ModuleManagerFactory;
|
||||
import org.terasology.gestalt.module.ModuleEnvironment;
|
||||
import org.terasology.gestalt.module.sandbox.API;
|
||||
import org.terasology.engine.testUtil.ModuleManagerFactory;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
|
@ -95,9 +95,9 @@ public final class ApiScraper {
|
|||
}
|
||||
}
|
||||
sortedApi.putAll("external", ExternalApiWhitelist.CLASSES.stream()
|
||||
.map(clazz->clazz.getName() + " (CLASS)").collect(Collectors.toSet()));
|
||||
.map(clazz -> clazz.getName() + " (CLASS)").collect(Collectors.toSet()));
|
||||
sortedApi.putAll("external", ExternalApiWhitelist.PACKAGES.stream()
|
||||
.map(packagee->packagee + " (PACKAGE)").collect(Collectors.toSet()));
|
||||
.map(packagee -> packagee + " (PACKAGE)").collect(Collectors.toSet()));
|
||||
|
||||
System.out.println("# Modding API:\n");
|
||||
for (String key : sortedApi.keySet()) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.terasology.documentation.apiScraper;
|
||||
|
||||
|
@ -8,9 +8,9 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.terasology.engine.core.module.ExternalApiWhitelist;
|
||||
import org.terasology.engine.core.module.ModuleManager;
|
||||
import org.terasology.engine.testUtil.ModuleManagerFactory;
|
||||
import org.terasology.gestalt.module.ModuleEnvironment;
|
||||
import org.terasology.gestalt.module.sandbox.API;
|
||||
import org.terasology.engine.testUtil.ModuleManagerFactory;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -101,9 +101,9 @@ final class CompleteApiScraper {
|
|||
}
|
||||
}
|
||||
api.putAll(EXTERNAL, ExternalApiWhitelist.CLASSES.stream()
|
||||
.map(clazz->clazz.getName() + " (CLASS)").collect(Collectors.toSet()));
|
||||
.map(clazz -> clazz.getName() + " (CLASS)").collect(Collectors.toSet()));
|
||||
api.putAll(EXTERNAL, ExternalApiWhitelist.PACKAGES.stream()
|
||||
.map(packagee->packagee + " (PACKAGE)").collect(Collectors.toSet()));
|
||||
.map(packagee -> packagee + " (PACKAGE)").collect(Collectors.toSet()));
|
||||
|
||||
//Puts the information in the StringBuffer
|
||||
StringBuffer stringApi = new StringBuffer();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.terasology.engine.world.generation.facets;
|
||||
|
@ -46,7 +46,7 @@ public abstract class BooleanFacetTest {
|
|||
@Test
|
||||
public void testRelBounds() {
|
||||
Assertions.assertThrows(IllegalArgumentException.class,
|
||||
()->facet.set(-15, -15, -15, true));
|
||||
()-> facet.set(-15, -15, -15, true));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.terasology.math;
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class IntegerRangeTest {
|
|||
validateRange(range, Integer.MAX_VALUE - 3, Integer.MAX_VALUE - 2, Integer.MAX_VALUE - 1, Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
private void validateRange(IntegerRange range, Integer...numbers) {
|
||||
private void validateRange(IntegerRange range, Integer... numbers) {
|
||||
Iterator<Integer> iterator = range.iterator();
|
||||
for (Integer number : numbers) {
|
||||
assertTrue(iterator.hasNext());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.terasology.engine.rendering.dag;
|
||||
|
||||
|
@ -11,11 +11,11 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.terasology.engine.context.Context;
|
||||
import org.terasology.engine.core.SimpleUri;
|
||||
import org.terasology.engine.rendering.ShaderManager;
|
||||
import org.terasology.engine.rendering.dag.dependencyConnections.BufferPairConnection;
|
||||
import org.terasology.engine.rendering.dag.dependencyConnections.DependencyConnection;
|
||||
import org.terasology.engine.rendering.dag.dependencyConnections.FboConnection;
|
||||
import org.terasology.gestalt.naming.Name;
|
||||
import org.terasology.engine.rendering.ShaderManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -71,8 +71,8 @@ public class RenderGraph {
|
|||
public void replaceNode(Node aNode, Node byNode) {
|
||||
// Add connections from a node being replaced; This should in theory be sufficient and once we call setDep over
|
||||
// all new nodes again, everything should be set
|
||||
aNode.getInputConnections().forEach((k, v)->byNode.getInputConnections().replace(k, v));
|
||||
aNode.getOutputConnections().forEach((k, v)->byNode.getOutputConnections().replace(k, v));
|
||||
aNode.getInputConnections().forEach((k, v)-> byNode.getInputConnections().replace(k, v));
|
||||
aNode.getOutputConnections().forEach((k, v)-> byNode.getOutputConnections().replace(k, v));
|
||||
|
||||
nodeMap.replace(aNode.getUri(), byNode);
|
||||
akaNodeMap.replace(aNode.getAka(), byNode);
|
||||
|
@ -224,7 +224,7 @@ public class RenderGraph {
|
|||
throw new RuntimeException("Cycle detected in the DAG: topological sorting not possible!");
|
||||
}
|
||||
|
||||
topologicalList.forEach((key)->key.postInit(context));
|
||||
topologicalList.forEach((key)-> key.postInit(context));
|
||||
|
||||
return topologicalList;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.terasology.engine.rendering.dag.dependencyConnections;
|
||||
|
@ -105,7 +105,7 @@ public abstract class DependencyConnection<T> {
|
|||
* Remove connections
|
||||
*/
|
||||
public void disconnect() {
|
||||
this.connectedConnections.forEach((k, v)->v.connectedConnections.remove(this.getName()));
|
||||
this.connectedConnections.forEach((k, v) -> v.connectedConnections.remove(this.getName()));
|
||||
this.connectedConnections.clear();
|
||||
if (this.connectionType == Type.INPUT) {
|
||||
this.data = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Terasology Foundation
|
||||
// Copyright 2022 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.terasology.engine.rendering.nui.widgets.browser.ui;
|
||||
|
||||
|
@ -43,7 +43,7 @@ public interface ParagraphRenderable {
|
|||
void renderContents(Canvas canvas, Vector2i startPos, ContainerRenderSpace containerRenderSpace, int leftIndent, int rightIndent,
|
||||
ParagraphRenderStyle defaultStyle, HorizontalAlign horizontalAlign, HyperlinkRegister hyperlinkRegister);
|
||||
|
||||
public interface HyperlinkRegister {
|
||||
interface HyperlinkRegister {
|
||||
void registerHyperlink(Rectanglei region, String hyperlink);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue