mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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:
@@ -22,9 +22,9 @@ class DifferentialDriveFeedforwardProtoTest
|
||||
@Override
|
||||
public void checkEquals(
|
||||
DifferentialDriveFeedforward testData, DifferentialDriveFeedforward data) {
|
||||
assertEquals(testData.m_kVLinear, data.m_kVLinear);
|
||||
assertEquals(testData.m_kALinear, data.m_kALinear);
|
||||
assertEquals(testData.m_kVAngular, data.m_kVAngular);
|
||||
assertEquals(testData.m_kAAngular, data.m_kAAngular);
|
||||
assertEquals(testData.kVLinear, data.kVLinear);
|
||||
assertEquals(testData.kALinear, data.kALinear);
|
||||
assertEquals(testData.kVAngular, data.kVAngular);
|
||||
assertEquals(testData.kAAngular, data.kAAngular);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ class DifferentialDriveFeedforwardStructTest extends StructTestBase<Differential
|
||||
@Override
|
||||
public void checkEquals(
|
||||
DifferentialDriveFeedforward testData, DifferentialDriveFeedforward data) {
|
||||
assertEquals(testData.m_kVLinear, data.m_kVLinear);
|
||||
assertEquals(testData.m_kALinear, data.m_kALinear);
|
||||
assertEquals(testData.m_kVAngular, data.m_kVAngular);
|
||||
assertEquals(testData.m_kAAngular, data.m_kAAngular);
|
||||
assertEquals(testData.kVLinear, data.kVLinear);
|
||||
assertEquals(testData.kALinear, data.kALinear);
|
||||
assertEquals(testData.kVAngular, data.kVAngular);
|
||||
assertEquals(testData.kAAngular, data.kAAngular);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ struct DifferentialDriveFeedforwardProtoTestData {
|
||||
decltype(1_V / 1_mps){4.4}, decltype(1_V / 1_mps_sq){4.5}};
|
||||
|
||||
static void CheckEq(const Type& testData, const Type& data) {
|
||||
EXPECT_EQ(testData.m_kVLinear.value(), data.m_kVLinear.value());
|
||||
EXPECT_EQ(testData.m_kALinear.value(), data.m_kALinear.value());
|
||||
EXPECT_EQ(testData.m_kVAngular.value(), data.m_kVAngular.value());
|
||||
EXPECT_EQ(testData.m_kAAngular.value(), data.m_kAAngular.value());
|
||||
EXPECT_EQ(testData.kVLinear.value(), data.kVLinear.value());
|
||||
EXPECT_EQ(testData.kALinear.value(), data.kALinear.value());
|
||||
EXPECT_EQ(testData.kVAngular.value(), data.kVAngular.value());
|
||||
EXPECT_EQ(testData.kAAngular.value(), data.kAAngular.value());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ struct DifferentialDriveFeedforwardStructTestData {
|
||||
decltype(1_V / 1_mps){4.4}, decltype(1_V / 1_mps_sq){4.5}};
|
||||
|
||||
static void CheckEq(const Type& testData, const Type& data) {
|
||||
EXPECT_EQ(testData.m_kVLinear.value(), data.m_kVLinear.value());
|
||||
EXPECT_EQ(testData.m_kALinear.value(), data.m_kALinear.value());
|
||||
EXPECT_EQ(testData.m_kVAngular.value(), data.m_kVAngular.value());
|
||||
EXPECT_EQ(testData.m_kAAngular.value(), data.m_kAAngular.value());
|
||||
EXPECT_EQ(testData.kVLinear.value(), data.kVLinear.value());
|
||||
EXPECT_EQ(testData.kALinear.value(), data.kALinear.value());
|
||||
EXPECT_EQ(testData.kVAngular.value(), data.kVAngular.value());
|
||||
EXPECT_EQ(testData.kAAngular.value(), data.kAAngular.value());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user