1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-03 07:03:00 +00:00

Add a little bit of source code checking to Gradle

- Adds a CheckStyle configuration which is pretty similar to CC's
   existing one.
 - Add the Gradle license plugin.
 - Ensure the existing source code is compatible with these additional
   checks.

See #239
This commit is contained in:
SquidDev
2019-06-08 00:28:03 +01:00
parent 7d428030df
commit a0e7c4a74c
54 changed files with 349 additions and 143 deletions

View File

@@ -253,14 +253,14 @@ public class NetworkTest
assertEquals( Sets.newHashSet(), cE.allPeripherals().keySet(), "C's peripheral set should be empty" );
}
private static final int BRUTE_SIZE = 16;
private static final int TOGGLE_CONNECTION_TIMES = 5;
private static final int TOGGLE_NODE_TIMES = 5;
@Test
@Disabled( "Takes a long time to run, mostly for stress testing" )
public void testLarge()
{
final int BRUTE_SIZE = 16;
final int TOGGLE_CONNECTION_TIMES = 5;
final int TOGGLE_NODE_TIMES = 5;
Grid<IWiredNode> grid = new Grid<>( BRUTE_SIZE );
grid.map( ( existing, pos ) -> new NetworkElement( null, null, "n_" + pos ).getNode() );
@@ -324,7 +324,7 @@ public class NetworkTest
}
}
private static class NetworkElement implements IWiredElement
private static final class NetworkElement implements IWiredElement
{
private final World world;
private final Vec3d position;
@@ -433,7 +433,7 @@ public class NetworkTest
private final T[] box;
@SuppressWarnings( "unchecked" )
public Grid( int size )
Grid( int size )
{
this.size = size;
this.box = (T[]) new Object[size * size * size];