Upgrade wpiformat and use clang-format's include sorting (#8350)

This PR also uses the newly added -default-branch flag to generate the list of changed files with respect to the correct branch (2027).
This commit is contained in:
Tyler Veness
2025-11-11 18:05:12 -08:00
committed by GitHub
parent a0f4727179
commit 1705b2d61c
321 changed files with 677 additions and 628 deletions

View File

@@ -2,12 +2,12 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
#include <cmath>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
static constexpr double kEpsilon = 1E-9;
TEST(ChassisSpeedsTest, Discretize) {

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/units/angular_velocity.hpp"
#include "wpi/units/length.hpp"
#include "wpi/units/velocity.hpp"

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/DifferentialDriveOdometry3d.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/math/kinematics/DifferentialDriveOdometry3d.hpp"
static constexpr double kEpsilon = 1E-9;

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/DifferentialDriveOdometry.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
#include "wpi/math/kinematics/DifferentialDriveOdometry.hpp"
static constexpr double kEpsilon = 1E-9;

View File

@@ -2,10 +2,10 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <gtest/gtest.h>
#include "wpi/math/kinematics/DifferentialDriveWheelSpeeds.hpp"
#include <gtest/gtest.h>
TEST(DifferentialDriveWheelSpeedsTest, Plus) {
const wpi::math::DifferentialDriveWheelSpeeds left{1.0_mps, 0.5_mps};
const wpi::math::DifferentialDriveWheelSpeeds right{2.0_mps, 1.5_mps};

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/units/angular_velocity.hpp"
using namespace wpi::math;

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/MecanumDriveOdometry3d.hpp"
#include <limits>
#include <random>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/MecanumDriveOdometry3d.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
using namespace wpi::math;

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/MecanumDriveOdometry.hpp"
#include <limits>
#include <random>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/MecanumDriveOdometry.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
using namespace wpi::math;

View File

@@ -2,10 +2,10 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <gtest/gtest.h>
#include "wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp"
#include <gtest/gtest.h>
TEST(MecanumDriveWheelSpeedsTest, Plus) {
const wpi::math::MecanumDriveWheelSpeeds left{1.0_mps, 0.5_mps, 2.0_mps,
1.5_mps};

View File

@@ -2,12 +2,13 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/geometry/Translation2d.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/units/angular_velocity.hpp"
using namespace wpi::math;

View File

@@ -2,13 +2,14 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/SwerveDriveOdometry3d.hpp"
#include <limits>
#include <random>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/SwerveDriveOdometry3d.hpp"
#include "wpi/math/trajectory/Trajectory.hpp"
#include "wpi/math/trajectory/TrajectoryConfig.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"

View File

@@ -2,13 +2,14 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/SwerveDriveOdometry.hpp"
#include <limits>
#include <random>
#include <gtest/gtest.h>
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/SwerveDriveOdometry.hpp"
#include "wpi/math/trajectory/Trajectory.hpp"
#include "wpi/math/trajectory/TrajectoryConfig.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"

View File

@@ -2,10 +2,11 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/SwerveModulePosition.hpp"
#include <gtest/gtest.h>
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/kinematics/SwerveModulePosition.hpp"
TEST(SwerveModulePositionTest, Equality) {
wpi::math::SwerveModulePosition position1{2_m, 90_deg};

View File

@@ -2,10 +2,11 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/SwerveModuleState.hpp"
#include <gtest/gtest.h>
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/kinematics/SwerveModuleState.hpp"
static constexpr double kEpsilon = 1E-9;

View File

@@ -2,11 +2,12 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/proto/SwerveDriveKinematicsProto.hpp"
#include <gtest/gtest.h>
#include "../../ProtoTestBase.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/proto/SwerveDriveKinematicsProto.hpp"
using namespace wpi::math;

View File

@@ -2,11 +2,12 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/math/kinematics/struct/SwerveDriveKinematicsStruct.hpp"
#include <gtest/gtest.h>
#include "../../StructTestBase.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/kinematics/struct/SwerveDriveKinematicsStruct.hpp"
using namespace wpi::math;