mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Don't force public variables to use Hungarian notation (#8774)
People generally have expressed a dislike for the Hungarian notation used in member variables, especially in examples/templates, and our styleguide shouldn't be forced on downstream consumers, so this removes all Hungarian notation from the examples/templates. There are _some_ benefits to Hungarian for private member variables (like knowing what's a member vs. local in a PR review) so we'll keep private member variables the same for now, but public variables should no longer use Hungarian notation, since it looks much worse. A new PMD XPath rule has been added to accomplish this goal. Some other non-compliant variables were fixed for the new rule.
This commit is contained in:
@@ -25,6 +25,7 @@ import org.wpilib.util.Color;
|
||||
class OpModeRobotTest {
|
||||
static final double kPeriod = 0.02;
|
||||
|
||||
@SuppressWarnings("PMD.PublicFieldNamingConvention")
|
||||
public static class MockOpMode implements OpMode {
|
||||
public final AtomicInteger m_disabledPeriodicCount = new AtomicInteger(0);
|
||||
public final AtomicInteger m_startCount = new AtomicInteger(0);
|
||||
@@ -65,6 +66,7 @@ class OpModeRobotTest {
|
||||
OneArgOpMode(MockRobot robot) {}
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.PublicFieldNamingConvention")
|
||||
static class MockRobot extends OpModeRobot {
|
||||
public final AtomicInteger m_driverStationConnectedCount = new AtomicInteger(0);
|
||||
public final AtomicInteger m_nonePeriodicCount = new AtomicInteger(0);
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.wpilib.simulation.SimHooks;
|
||||
class TimedRobotTest {
|
||||
static final double kPeriod = 0.02;
|
||||
|
||||
@SuppressWarnings("PMD.PublicFieldNamingConvention")
|
||||
static class MockRobot extends TimedRobot {
|
||||
public final AtomicInteger m_simulationInitCount = new AtomicInteger(0);
|
||||
public final AtomicInteger m_disabledInitCount = new AtomicInteger(0);
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class TimesliceRobotTest {
|
||||
@SuppressWarnings("PMD.PublicFieldNamingConvention")
|
||||
static class MockRobot extends TimesliceRobot {
|
||||
public final AtomicInteger m_robotPeriodicCount = new AtomicInteger(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user