Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checkstyle check for deprecation #7738

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions styleguide/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,6 @@ module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
</module>
<module name="CommentsIndentation" />
<module name="PackageDeclaration" />
<module name="MissingDeprecated"/>
</module>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public MecanumControllerCommand(
* @param outputDriveVoltages A MecanumDriveMotorVoltages object containing the output motor
* voltages.
* @param requirements The subsystems to require.
* @deprecated MecanumControllerCommand does not allow for much visibility for troubleshooting.
* Compose HolonomicDriveController within a subystem.
Comment on lines +175 to +176
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated MecanumControllerCommand does not allow for much visibility for troubleshooting.
* Compose HolonomicDriveController within a subystem.
* @deprecated Use {@link MecanumVoltagesConsumer} instead of {@code Consumer<MecanumDriveMotorVoltages}.

The deprecation was added in #6760, and the MecanumVoltagesConsumer overloads are not deprecated. We could deprecate those as well for the in the original codereason, but that would be a separate PR.

*/
@Deprecated(since = "2025", forRemoval = true)
public MecanumControllerCommand(
Expand Down Expand Up @@ -308,6 +310,8 @@ public MecanumControllerCommand(
* @param outputDriveVoltages A MecanumDriveMotorVoltages object containing the output motor
* voltages.
* @param requirements The subsystems to require.
* @deprecated MecanumControllerCommand does not allow for much visibility for troubleshooting.
* Compose HolonomicDriveController within a subystem.
Comment on lines +313 to +314
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated MecanumControllerCommand does not allow for much visibility for troubleshooting.
* Compose HolonomicDriveController within a subystem.
* @deprecated Use {@link MecanumVoltagesConsumer} instead of {@code Consumer<MecanumDriveMotorVoltages>}.

*/
@Deprecated(since = "2025", forRemoval = true)
public MecanumControllerCommand(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public double getDt() {
* @param velocityRadPerSec The velocity setpoint.
* @param accelRadPerSecSquared The acceleration setpoint.
* @return The computed feedforward.
* @deprecated Use {@link #calculateWithVelocities(double, double, double)} instead
*/
@Deprecated(forRemoval = true, since = "2025")
public double calculate(
Expand Down Expand Up @@ -174,6 +175,7 @@ public double calculate(double positionRadians, double velocity) {
* @param nextVelocity The next velocity setpoint in radians per second.
* @param dt Time between velocity setpoints in seconds.
* @return The computed feedforward in volts.
* @deprecated Use {@link #calculateWithVelocities(double, double, double)} instead.
*/
@SuppressWarnings("removal")
@Deprecated(forRemoval = true, since = "2025")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public double getDt() {
* @param velocity The velocity setpoint.
* @param acceleration The acceleration setpoint.
* @return The computed feedforward.
* @deprecated Use {@link #calculateWithVelocities(double, double)}.
*/
@SuppressWarnings("removal")
@Deprecated(forRemoval = true, since = "2025")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

package edu.wpi.first.math.kinematics;

/** Represents the motor voltages for a mecanum drive drivetrain. */
/**
* Represents the motor voltages for a mecanum drive drivetrain.
*
* @deprecated use a fuctional interface intead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated use a fuctional interface intead.
* @deprecated Use {@link MecanumControllerCommand.MecanumVoltagesConsumer}

*/
@Deprecated(since = "2025", forRemoval = true)
public class MecanumDriveMotorVoltages {
/** Voltage of the front left motor. */
Expand Down
Loading