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,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/estimator/AngleStatistics.hpp"
#include <numbers>
#include <gtest/gtest.h>
#include "wpi/math/estimator/AngleStatistics.hpp"
#include "wpi/math/linalg/EigenCore.hpp"
TEST(AngleStatisticsTest, Mean) {

View File

@@ -2,6 +2,8 @@
// 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/estimator/DifferentialDrivePoseEstimator3d.hpp"
#include <limits>
#include <random>
#include <tuple>
@@ -10,7 +12,6 @@
#include <gtest/gtest.h>
#include "wpi/math/estimator/DifferentialDrivePoseEstimator3d.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"

View File

@@ -2,6 +2,8 @@
// 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/estimator/DifferentialDrivePoseEstimator.hpp"
#include <limits>
#include <numbers>
#include <random>
@@ -11,7 +13,6 @@
#include <gtest/gtest.h>
#include "wpi/math/estimator/DifferentialDrivePoseEstimator.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/geometry/Rotation2d.hpp"
#include "wpi/math/kinematics/DifferentialDriveKinematics.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/estimator/ExtendedKalmanFilter.hpp"
#include <cmath>
#include <vector>
#include <Eigen/QR>
#include <gtest/gtest.h>
#include "wpi/math/estimator/ExtendedKalmanFilter.hpp"
#include "wpi/math/linalg/EigenCore.hpp"
#include "wpi/math/system/NumericalJacobian.hpp"
#include "wpi/math/system/plant/DCMotor.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/estimator/KalmanFilter.hpp"
#include <array>
#include <cmath>
#include <Eigen/Core>
#include <gtest/gtest.h>
#include "wpi/math/estimator/KalmanFilter.hpp"
#include "wpi/math/system/plant/DCMotor.hpp"
#include "wpi/math/system/plant/LinearSystemId.hpp"
#include "wpi/units/moment_of_inertia.hpp"

View File

@@ -2,6 +2,8 @@
// 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/estimator/MecanumDrivePoseEstimator3d.hpp"
#include <limits>
#include <random>
#include <tuple>
@@ -9,7 +11,6 @@
#include <gtest/gtest.h>
#include "wpi/math/estimator/MecanumDrivePoseEstimator3d.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"

View File

@@ -2,6 +2,8 @@
// 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/estimator/MecanumDrivePoseEstimator.hpp"
#include <limits>
#include <numbers>
#include <random>
@@ -10,7 +12,6 @@
#include <gtest/gtest.h>
#include "wpi/math/estimator/MecanumDrivePoseEstimator.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"

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/estimator/MerweScaledSigmaPoints.hpp"
#include <gtest/gtest.h>
TEST(MerweScaledSigmaPointsTest, ZeroMean) {
wpi::math::MerweScaledSigmaPoints<2> sigmaPoints;
auto points = sigmaPoints.SquareRootSigmaPoints(

View File

@@ -2,6 +2,8 @@
// 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/estimator/MerweUKF.hpp"
#include <algorithm>
#include <cmath>
#include <numbers>
@@ -11,7 +13,6 @@
#include <gtest/gtest.h>
#include "wpi/math/estimator/AngleStatistics.hpp"
#include "wpi/math/estimator/MerweUKF.hpp"
#include "wpi/math/linalg/EigenCore.hpp"
#include "wpi/math/system/Discretization.hpp"
#include "wpi/math/system/NumericalIntegration.hpp"

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/estimator/S3SigmaPoints.hpp"
#include <gtest/gtest.h>
TEST(S3SigmaPointsTest, Simplex) {
constexpr double alpha = 1e-3;
constexpr double beta = 2;

View File

@@ -2,6 +2,8 @@
// 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/estimator/S3UKF.hpp"
#include <algorithm>
#include <cmath>
#include <numbers>
@@ -11,7 +13,6 @@
#include <gtest/gtest.h>
#include "wpi/math/estimator/AngleStatistics.hpp"
#include "wpi/math/estimator/S3UKF.hpp"
#include "wpi/math/linalg/EigenCore.hpp"
#include "wpi/math/system/Discretization.hpp"
#include "wpi/math/system/NumericalIntegration.hpp"

View File

@@ -2,6 +2,8 @@
// 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/estimator/SwerveDrivePoseEstimator3d.hpp"
#include <limits>
#include <random>
#include <tuple>
@@ -10,7 +12,6 @@
#include <fmt/format.h>
#include <gtest/gtest.h>
#include "wpi/math/estimator/SwerveDrivePoseEstimator3d.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"

View File

@@ -2,6 +2,8 @@
// 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/estimator/SwerveDrivePoseEstimator.hpp"
#include <limits>
#include <numbers>
#include <random>
@@ -11,7 +13,6 @@
#include <fmt/format.h>
#include <gtest/gtest.h>
#include "wpi/math/estimator/SwerveDrivePoseEstimator.hpp"
#include "wpi/math/geometry/Pose2d.hpp"
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"