mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[build] Bring naming checkstyle rules up to date with Google Style guide (#1781)
Also update Checkstyle to 8.38. Google changed their style guide from the last time we imported it. This PR brings in those naming changes. The change they made is allowing single letter member, parameter, and local variable names. They also added a lambda naming scheme and I thought it would be good to bring that in too.
This commit is contained in:
@@ -37,7 +37,6 @@ public abstract class Trigger implements Sendable {
|
||||
*
|
||||
* @return whether get() return true or the internal table for SmartDashboard use is pressed.
|
||||
*/
|
||||
@SuppressWarnings("PMD.UselessParentheses")
|
||||
private boolean grab() {
|
||||
return get() || m_sendablePressed;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param i the integral value
|
||||
* @param d the derivative value
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(String name, double p, double i, double d) {
|
||||
super(name);
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output);
|
||||
@@ -69,7 +68,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param d the derivative value
|
||||
* @param period the time (in seconds) between calculations
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(String name, double p, double i, double d, double period) {
|
||||
super(name);
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output, period);
|
||||
@@ -83,7 +81,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param i the integral value
|
||||
* @param d the derivative value
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(double p, double i, double d) {
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output);
|
||||
}
|
||||
@@ -98,7 +95,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param d the derivative value
|
||||
* @param period the time (in seconds) between calculations
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(double p, double i, double d, double period) {
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output, period);
|
||||
}
|
||||
@@ -112,7 +108,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param d the derivative value
|
||||
* @param subsystem the subsystem that this command requires
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(String name, double p, double i, double d, Subsystem subsystem) {
|
||||
super(name, subsystem);
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output);
|
||||
@@ -129,7 +124,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param period the time (in seconds) between calculations
|
||||
* @param subsystem the subsystem that this command requires
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(String name, double p, double i, double d, double period,
|
||||
Subsystem subsystem) {
|
||||
super(name, subsystem);
|
||||
@@ -145,7 +139,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param d the derivative value
|
||||
* @param subsystem the subsystem that this command requires
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(double p, double i, double d, Subsystem subsystem) {
|
||||
super(subsystem);
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output);
|
||||
@@ -162,7 +155,6 @@ public abstract class PIDCommand extends Command {
|
||||
* @param period the time (in seconds) between calculations
|
||||
* @param subsystem the subsystem that this command requires
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDCommand(double p, double i, double d, double period, Subsystem subsystem) {
|
||||
super(subsystem);
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output, period);
|
||||
|
||||
@@ -55,7 +55,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
* @param i the integral value
|
||||
* @param d the derivative value
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDSubsystem(String name, double p, double i, double d) {
|
||||
super(name);
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output);
|
||||
@@ -71,7 +70,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
* @param d the derivative value
|
||||
* @param f the feed forward value
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDSubsystem(String name, double p, double i, double d, double f) {
|
||||
super(name);
|
||||
m_controller = new PIDController(p, i, d, f, m_source, m_output);
|
||||
@@ -89,7 +87,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
* @param f the feed forward value
|
||||
* @param period the time (in seconds) between calculations
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDSubsystem(String name, double p, double i, double d, double f, double period) {
|
||||
super(name);
|
||||
m_controller = new PIDController(p, i, d, f, m_source, m_output, period);
|
||||
@@ -104,7 +101,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
* @param i the integral value
|
||||
* @param d the derivative value
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDSubsystem(double p, double i, double d) {
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output);
|
||||
addChild("PIDController", m_controller);
|
||||
@@ -121,7 +117,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
* @param f the feed forward coefficient
|
||||
* @param period the time (in seconds) between calculations
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDSubsystem(double p, double i, double d, double f, double period) {
|
||||
m_controller = new PIDController(p, i, d, f, m_source, m_output, period);
|
||||
addChild("PIDController", m_controller);
|
||||
@@ -137,7 +132,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
* @param d the derivative value
|
||||
* @param period the time (in seconds) between calculations
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public PIDSubsystem(double p, double i, double d, double period) {
|
||||
m_controller = new PIDController(p, i, d, m_source, m_output, period);
|
||||
addChild("PIDController", m_controller);
|
||||
@@ -219,7 +213,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
*
|
||||
* @param t the absolute tolerance
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void setAbsoluteTolerance(double t) {
|
||||
m_controller.setAbsoluteTolerance(t);
|
||||
}
|
||||
@@ -230,7 +223,6 @@ public abstract class PIDSubsystem extends Subsystem {
|
||||
*
|
||||
* @param p the percent tolerance
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void setPercentTolerance(double p) {
|
||||
m_controller.setPercentTolerance(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user