Add MethodParamPad, OneStatementPerLine and EmptyStatement Checkstyle checks (#5272)

This commit is contained in:
Roman Leventov 2018-01-18 20:29:23 +01:00 committed by Slim
parent d6932c1621
commit 87c744ac1d
16 changed files with 28 additions and 20 deletions

View File

@ -148,7 +148,6 @@ public class IncrementalIndexRowTypeBenchmark
@Setup(Level.Iteration) @Setup(Level.Iteration)
public void setup2() throws IOException public void setup2() throws IOException
{ {
;
incIndex = makeIncIndex(); incIndex = makeIncIndex();
incFloatIndex = makeIncIndex(); incFloatIndex = makeIncIndex();
incStrIndex = makeIncIndex(); incStrIndex = makeIncIndex();

View File

@ -51,6 +51,8 @@
<suppress checks="Indentation" files="[\\/]target[\\/]generated-test-sources[\\/]" /> <suppress checks="Indentation" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="Indentation" files="ProtoTestEventWrapper.java" /> <suppress checks="Indentation" files="ProtoTestEventWrapper.java" />
<suppress checks="OneStatementPerLine" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<!-- extendedset is a fork of Alessandro Colantonio's CONCISE (COmpressed 'N' Composable Integer SEt) repository and licensed to Metamarkets under a CLA is not true. --> <!-- extendedset is a fork of Alessandro Colantonio's CONCISE (COmpressed 'N' Composable Integer SEt) repository and licensed to Metamarkets under a CLA is not true. -->
<suppress checks="Header" files="[\\/]extendedset[\\/]" /> <suppress checks="Header" files="[\\/]extendedset[\\/]" />
</suppressions> </suppressions>

View File

@ -99,6 +99,12 @@
<property name="caseIndent" value="2"/> <property name="caseIndent" value="2"/>
</module> </module>
<module name="MethodParamPad">
<property name="allowLineBreaks" value="true"/>
</module>
<module name="OneStatementPerLine"/>
<module name="EmptyStatement"/>
<module name="ModifierOrder" /> <module name="ModifierOrder" />
<module name="Regexp"> <module name="Regexp">

View File

@ -154,7 +154,7 @@ public class EventReceiverFirehoseTestClient
? MediaType.APPLICATION_JSON ? MediaType.APPLICATION_JSON
: SmileMediaTypes.APPLICATION_JACKSON_SMILE; : SmileMediaTypes.APPLICATION_JACKSON_SMILE;
totalEventsPosted += postEvents(events, mapper, mediaType); totalEventsPosted += postEvents(events, mapper, mediaType);
;
expectedEventsPosted += events.size(); expectedEventsPosted += events.size();
events = new ArrayList<>(); events = new ArrayList<>();
} }

View File

@ -87,7 +87,7 @@ public class DruidTestRunnerFactory implements ITestRunnerFactory
Injector injector = DruidTestModuleFactory.getInjector(); Injector injector = DruidTestModuleFactory.getInjector();
IntegrationTestingConfig config = injector.getInstance(IntegrationTestingConfig.class); IntegrationTestingConfig config = injector.getInstance(IntegrationTestingConfig.class);
HttpClient client = injector.getInstance(Key.get(HttpClient.class, TestClient.class)); HttpClient client = injector.getInstance(Key.get(HttpClient.class, TestClient.class));
;
waitUntilInstanceReady(client, config.getCoordinatorUrl()); waitUntilInstanceReady(client, config.getCoordinatorUrl());
waitUntilInstanceReady(client, config.getIndexerUrl()); waitUntilInstanceReady(client, config.getIndexerUrl());
waitUntilInstanceReady(client, config.getBrokerUrl()); waitUntilInstanceReady(client, config.getBrokerUrl());

View File

@ -152,7 +152,7 @@ public class TimewarpOperator<T> implements PostProcessingOperator<T>
if (startOffset < 0) { if (startOffset < 0) {
startOffset += periodMillis; startOffset += periodMillis;
} }
;
start -= startOffset; start -= startOffset;
// tOffset is the offset time t within the last period // tOffset is the offset time t within the last period

View File

@ -35,11 +35,12 @@ public class ClientMergeQueryTest
private static final String DATA_SOURCE = "data_source"; private static final String DATA_SOURCE = "data_source";
public static final DateTime START = DateTimes.nowUtc(); public static final DateTime START = DateTimes.nowUtc();
private static final Interval INTERVAL = new Interval(START, START.plus(1)); private static final Interval INTERVAL = new Interval(START, START.plus(1));
private static final DataSegment DATA_SEGMENT = new DataSegment(DATA_SOURCE, INTERVAL, START.toString(), null, private static final DataSegment DATA_SEGMENT =
null, null, null, 0, 0); new DataSegment(DATA_SOURCE, INTERVAL, START.toString(), null, null, null, null, 0, 0);
private static final List<DataSegment> SEGMENT_LIST = Lists.newArrayList(DATA_SEGMENT); private static final List<DataSegment> SEGMENT_LIST = Lists.newArrayList(DATA_SEGMENT);
private static final List<AggregatorFactory> AGGREGATOR_LIST = Lists.newArrayList(); private static final List<AggregatorFactory> AGGREGATOR_LIST = Lists.newArrayList();
private static final ClientMergeQuery CLIENT_MERGE_QUERY = new ClientMergeQuery(DATA_SOURCE, SEGMENT_LIST, AGGREGATOR_LIST);; private static final ClientMergeQuery CLIENT_MERGE_QUERY =
new ClientMergeQuery(DATA_SOURCE, SEGMENT_LIST, AGGREGATOR_LIST);
@Test @Test
public void testGetType() public void testGetType()

View File

@ -74,7 +74,7 @@ public class LookupNodeDiscoveryTest
EasyMock.expect(druidNodeDiscovery.getAllNodes()) EasyMock.expect(druidNodeDiscovery.getAllNodes())
.andReturn(ImmutableSet.of(node1, node2, node3)) .andReturn(ImmutableSet.of(node1, node2, node3))
.anyTimes();; .anyTimes();
EasyMock.replay(druidNodeDiscoveryProvider, druidNodeDiscovery); EasyMock.replay(druidNodeDiscoveryProvider, druidNodeDiscovery);

View File

@ -107,7 +107,7 @@ public class TieredBrokerHostSelectorTest
}; };
EasyMock.expect(druidNodeDiscoveryProvider.getForNodeType(DruidNodeDiscoveryProvider.NODE_TYPE_BROKER)) EasyMock.expect(druidNodeDiscoveryProvider.getForNodeType(DruidNodeDiscoveryProvider.NODE_TYPE_BROKER))
.andReturn(druidNodeDiscovery);; .andReturn(druidNodeDiscovery);
EasyMock.replay(druidNodeDiscoveryProvider); EasyMock.replay(druidNodeDiscoveryProvider);

View File

@ -175,7 +175,7 @@ public class ResetCluster extends GuiceRunnable
log.info("Deleting all TaskLogs."); log.info("Deleting all TaskLogs.");
log.info("==========================================================================="); log.info("===========================================================================");
TaskLogKiller taskLogKiller = injector.getInstance(TaskLogKiller.class);; TaskLogKiller taskLogKiller = injector.getInstance(TaskLogKiller.class);
taskLogKiller.killAll(); taskLogKiller.killAll();
} }
catch (Exception ex) { catch (Exception ex) {