mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00: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:
@@ -124,7 +124,6 @@ public class DataLogRecord {
|
||||
* Data contained in a start control record as created by DataLog.start() when writing the log.
|
||||
* This can be read by calling getStartData().
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public static class StartRecordData {
|
||||
StartRecordData(int entry, String name, String type, String metadata) {
|
||||
this.entry = entry;
|
||||
@@ -169,7 +168,6 @@ public class DataLogRecord {
|
||||
* Data contained in a set metadata control record as created by DataLog.setMetadata(). This can
|
||||
* be read by calling getSetMetadataData().
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public static class MetadataRecordData {
|
||||
MetadataRecordData(int entry, String metadata) {
|
||||
this.entry = entry;
|
||||
|
||||
@@ -119,7 +119,6 @@ class DataLogTest {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
private static int cloneCalls;
|
||||
|
||||
static class CloneableThing implements StructSerializable, Cloneable {
|
||||
@@ -201,10 +200,8 @@ class DataLogTest {
|
||||
public static final ThingStruct struct = new ThingStruct();
|
||||
}
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
private ByteArrayOutputStream data;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
private DataLog log;
|
||||
|
||||
@BeforeEach
|
||||
|
||||
Reference in New Issue
Block a user