mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add Checkstyle WhitespaceAfter check (#466)
This commit is contained in:
committed by
Fred Silberberg
parent
a5cd24e7ea
commit
7187e005d4
@@ -78,6 +78,7 @@
|
||||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="WhitespaceAfter"/>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
@@ -168,6 +169,7 @@
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="TypecastParenPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
|
||||
|
||||
@@ -33,7 +33,7 @@ public class DigitalInput extends DigitalSource implements LiveWindowSendable {
|
||||
checkDigitalChannel(channel);
|
||||
m_channel = channel;
|
||||
|
||||
m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte)channel), true);
|
||||
m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte) channel), true);
|
||||
|
||||
LiveWindow.addSensor("DigitalInput", channel, this);
|
||||
HAL.report(tResourceType.kResourceType_DigitalInput, channel);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class DigitalOutput extends DigitalSource implements LiveWindowSendable {
|
||||
checkDigitalChannel(channel);
|
||||
m_channel = channel;
|
||||
|
||||
m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte)channel), false);
|
||||
m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte) channel), false);
|
||||
|
||||
HAL.report(tResourceType.kResourceType_DigitalOutput, channel);
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ public class DriverStation implements RobotState.Interface {
|
||||
*/
|
||||
public boolean waitForData(double timeout) {
|
||||
long startTime = Utility.getFPGATime();
|
||||
long timeoutMicros = (long)(timeout * 1000000);
|
||||
long timeoutMicros = (long) (timeout * 1000000);
|
||||
m_dataMutex.lock();
|
||||
try {
|
||||
try {
|
||||
|
||||
@@ -86,7 +86,7 @@ public class Relay extends SensorBase implements MotorSafety, LiveWindowSendable
|
||||
private void initRelay() {
|
||||
SensorBase.checkRelayChannel(m_channel);
|
||||
|
||||
int portHandle = RelayJNI.getPort((byte)m_channel);
|
||||
int portHandle = RelayJNI.getPort((byte) m_channel);
|
||||
if (m_direction == Direction.kBoth || m_direction == Direction.kForward) {
|
||||
m_forwardHandle = RelayJNI.initializeRelayPort(portHandle, true);
|
||||
HAL.report(tResourceType.kResourceType_Relay, m_channel);
|
||||
|
||||
@@ -61,7 +61,7 @@ public abstract class RobotBase {
|
||||
|
||||
NetworkTable.setNetworkIdentity("Robot");
|
||||
NetworkTable.setPersistentFilename("/home/lvuser/networktables.ini");
|
||||
NetworkTable.setServerMode();// must be before b
|
||||
NetworkTable.setServerMode(); // must be before b
|
||||
m_ds = DriverStation.getInstance();
|
||||
NetworkTable.getTable(""); // forces network tables to initialize
|
||||
NetworkTable.getTable("LiveWindow").getSubTable("~STATUS~").putBoolean("LW Enabled", false);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class CommandSequentialGroupTest extends AbstractCommandTest {
|
||||
assertCommandState(command1, 1, 1, 1, 0, 0);
|
||||
assertCommandState(command2, 0, 0, 0, 0, 0);
|
||||
assertCommandState(command3, 0, 0, 0, 0, 0);
|
||||
sleep(1000);// command 1 timeout
|
||||
sleep(1000); // command 1 timeout
|
||||
Scheduler.getInstance().run();
|
||||
assertCommandState(command1, 1, 1, 1, 0, 1);
|
||||
assertCommandState(command2, 1, 1, 1, 0, 0);
|
||||
@@ -78,7 +78,7 @@ public class CommandSequentialGroupTest extends AbstractCommandTest {
|
||||
assertCommandState(command1, 1, 1, 1, 0, 1);
|
||||
assertCommandState(command2, 1, 2, 2, 0, 0);
|
||||
assertCommandState(command3, 0, 0, 0, 0, 0);
|
||||
sleep(2000);// command 2 timeout
|
||||
sleep(2000); // command 2 timeout
|
||||
Scheduler.getInstance().run();
|
||||
assertCommandState(command1, 1, 1, 1, 0, 1);
|
||||
assertCommandState(command2, 1, 2, 2, 0, 1);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BuiltInAccelerometerTest extends AbstractComsSetup {
|
||||
@Parameters
|
||||
public static Collection<Accelerometer.Range[]> generateData() {
|
||||
return Arrays.asList(new Accelerometer.Range[][]{{Accelerometer.Range.k2G},
|
||||
{Accelerometer.Range.k4G}, {Accelerometer.Range.k8G},});
|
||||
{Accelerometer.Range.k4G}, {Accelerometer.Range.k8G}});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user