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:
@@ -24,18 +24,15 @@ public final class TimestampedBoolean {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedBooleanArray {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean[] value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedDouble {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final double value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedDoubleArray {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final double[] value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedFloat {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final float value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedFloatArray {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final float[] value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedInteger {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedIntegerArray {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long[] value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedRaw {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final byte[] value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedString {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final String value;
|
||||
}
|
||||
|
||||
@@ -24,18 +24,15 @@ public final class TimestampedStringArray {
|
||||
/**
|
||||
* Timestamp in local time base.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long timestamp;
|
||||
|
||||
/**
|
||||
* Timestamp in server time base. May be 0 or 1 for locally set values.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final long serverTime;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public final String[] value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user