Run clang-format on the entire repo

This patch clang-formats the entire repo. Third-party code is
excluded.

I needed to fix up the .clang-format file so that all the header
includes are ordered properly. I could have sworn that it used to work
without the extra modification, but I guess not.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I64bb9f2c795401393f9dfe2fefc4f04cb36b52f6
diff --git a/y2023/autonomous/auto_splines.cc b/y2023/autonomous/auto_splines.cc
index 20593f9..aa6497c 100644
--- a/y2023/autonomous/auto_splines.cc
+++ b/y2023/autonomous/auto_splines.cc
@@ -1,7 +1,7 @@
 #include "y2023/autonomous/auto_splines.h"
 
-#include "frc971/control_loops/control_loops_generated.h"
 #include "aos/flatbuffer_merge.h"
+#include "frc971/control_loops/control_loops_generated.h"
 
 namespace y2023 {
 namespace autonomous {
diff --git a/y2023/constants.cc b/y2023/constants.cc
index 4ef5670..3d49cf8 100644
--- a/y2023/constants.cc
+++ b/y2023/constants.cc
@@ -8,9 +8,10 @@
 #endif
 
 #include "absl/base/call_once.h"
+#include "glog/logging.h"
+
 #include "aos/mutex/mutex.h"
 #include "aos/network/team_number.h"
-#include "glog/logging.h"
 #include "y2023/control_loops/superstructure/roll/integral_roll_plant.h"
 #include "y2023/control_loops/superstructure/wrist/integral_wrist_plant.h"
 
diff --git a/y2023/constants/constants_sender.cc b/y2023/constants/constants_sender.cc
index 77fb24d..757a374 100644
--- a/y2023/constants/constants_sender.cc
+++ b/y2023/constants/constants_sender.cc
@@ -1,10 +1,11 @@
+#include "gflags/gflags.h"
+#include "glog/logging.h"
+
 #include "aos/configuration.h"
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
 #include "aos/json_to_flatbuffer.h"
 #include "frc971/constants/constants_sender_lib.h"
-#include "gflags/gflags.h"
-#include "glog/logging.h"
 #include "y2023/constants/constants_generated.h"
 #include "y2023/constants/constants_list_generated.h"
 
diff --git a/y2023/constants/simulated_constants_sender.cc b/y2023/constants/simulated_constants_sender.cc
index 8bfc17d..3793234 100644
--- a/y2023/constants/simulated_constants_sender.cc
+++ b/y2023/constants/simulated_constants_sender.cc
@@ -1,8 +1,8 @@
-#include "y2023/constants/constants_generated.h"
-#include "y2023/constants/constants_list_generated.h"
 #include "aos/events/simulated_event_loop.h"
 #include "aos/testing/path.h"
 #include "frc971/constants/constants_sender_lib.h"
+#include "y2023/constants/constants_generated.h"
+#include "y2023/constants/constants_list_generated.h"
 
 namespace y2023 {
 bool SendSimulationConstants(aos::SimulatedEventLoopFactory *factory, int team,
diff --git a/y2023/control_loops/drivetrain/target_selector_test.cc b/y2023/control_loops/drivetrain/target_selector_test.cc
index 21f3fe6..3b04b42 100644
--- a/y2023/control_loops/drivetrain/target_selector_test.cc
+++ b/y2023/control_loops/drivetrain/target_selector_test.cc
@@ -1,7 +1,8 @@
 #include "y2023/control_loops/drivetrain/target_selector.h"
 
-#include "frc971/input/joystick_state_generated.h"
 #include "gtest/gtest.h"
+
+#include "frc971/input/joystick_state_generated.h"
 #include "y2023/constants/simulated_constants_sender.h"
 
 using Side = frc971::control_loops::drivetrain::RobotSide;
diff --git a/y2023/control_loops/superstructure/arm/arm_trajectory_gen.cc b/y2023/control_loops/superstructure/arm/arm_trajectory_gen.cc
index 578bf1f..699cfcf 100644
--- a/y2023/control_loops/superstructure/arm/arm_trajectory_gen.cc
+++ b/y2023/control_loops/superstructure/arm/arm_trajectory_gen.cc
@@ -1,13 +1,14 @@
 #include <iostream>
 #include <memory>
 
+#include "gflags/gflags.h"
+#include "glog/logging.h"
+
 #include "aos/events/shm_event_loop.h"
 #include "aos/flatbuffers.h"
 #include "aos/init.h"
 #include "aos/json_to_flatbuffer.h"
 #include "frc971/control_loops/double_jointed_arm/graph.h"
-#include "gflags/gflags.h"
-#include "glog/logging.h"
 #include "y2023/constants.h"
 #include "y2023/control_loops/superstructure/arm/arm_constants.h"
 #include "y2023/control_loops/superstructure/arm/arm_trajectories_generated.h"
diff --git a/y2023/control_loops/superstructure/arm/trajectory.cc b/y2023/control_loops/superstructure/arm/trajectory.cc
index 88e3d1b..cbdfee8 100644
--- a/y2023/control_loops/superstructure/arm/trajectory.cc
+++ b/y2023/control_loops/superstructure/arm/trajectory.cc
@@ -1,12 +1,13 @@
 #include "y2023/control_loops/superstructure/arm/trajectory.h"
 
 #include "Eigen/Dense"
+#include "gflags/gflags.h"
+
 #include "aos/logging/logging.h"
 #include "frc971/control_loops/dlqr.h"
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 #include "frc971/control_loops/jacobian.h"
 #include "frc971/control_loops/runge_kutta.h"
-#include "gflags/gflags.h"
 #include "y2023/control_loops/superstructure/arm/arm_trajectories_generated.h"
 
 DEFINE_double(lqr_proximal_pos, 0.5, "Position LQR gain");
diff --git a/y2023/control_loops/superstructure/arm/trajectory.h b/y2023/control_loops/superstructure/arm/trajectory.h
index e498168..7994d60 100644
--- a/y2023/control_loops/superstructure/arm/trajectory.h
+++ b/y2023/control_loops/superstructure/arm/trajectory.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "Eigen/Dense"
+
 #include "frc971/control_loops/binomial.h"
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 #include "frc971/control_loops/fixed_quadrature.h"
diff --git a/y2023/control_loops/superstructure/arm/trajectory_plot.cc b/y2023/control_loops/superstructure/arm/trajectory_plot.cc
index 24bc8dd..16c8771 100644
--- a/y2023/control_loops/superstructure/arm/trajectory_plot.cc
+++ b/y2023/control_loops/superstructure/arm/trajectory_plot.cc
@@ -1,10 +1,11 @@
+#include "gflags/gflags.h"
+
 #include "aos/init.h"
 #include "frc971/analysis/in_process_plotter.h"
 #include "frc971/control_loops/binomial.h"
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 #include "frc971/control_loops/double_jointed_arm/ekf.h"
 #include "frc971/control_loops/fixed_quadrature.h"
-#include "gflags/gflags.h"
 #include "y2023/control_loops/superstructure/arm/arm_constants.h"
 #include "y2023/control_loops/superstructure/arm/generated_graph.h"
 #include "y2023/control_loops/superstructure/arm/trajectory.h"
@@ -62,7 +63,8 @@
             << ", kAlpha2Max=" << FLAGS_alpha2_max;
 
   const ::Eigen::DiagonalMatrix<double, 3> alpha_unitizer(
-      (::Eigen::DiagonalMatrix<double, 3>().diagonal() << (1.0 / FLAGS_alpha0_max),
+      (::Eigen::DiagonalMatrix<double, 3>().diagonal()
+           << (1.0 / FLAGS_alpha0_max),
        (1.0 / FLAGS_alpha1_max), (1.0 / FLAGS_alpha2_max))
           .finished());
   trajectory.OptimizeTrajectory(alpha_unitizer, FLAGS_vmax_plan);
diff --git a/y2023/control_loops/superstructure/arm/trajectory_test.cc b/y2023/control_loops/superstructure/arm/trajectory_test.cc
index bcf338c..8af7ba7 100644
--- a/y2023/control_loops/superstructure/arm/trajectory_test.cc
+++ b/y2023/control_loops/superstructure/arm/trajectory_test.cc
@@ -1,8 +1,9 @@
 #include "y2023/control_loops/superstructure/arm/trajectory.h"
 
+#include "gtest/gtest.h"
+
 #include "frc971/control_loops/double_jointed_arm/dynamics.h"
 #include "frc971/control_loops/double_jointed_arm/ekf.h"
-#include "gtest/gtest.h"
 #include "y2023/control_loops/superstructure/arm/arm_constants.h"
 #include "y2023/control_loops/superstructure/roll/integral_hybrid_roll_plant.h"
 #include "y2023/control_loops/superstructure/roll/integral_roll_plant.h"
diff --git a/y2023/control_loops/superstructure/end_effector.cc b/y2023/control_loops/superstructure/end_effector.cc
index b600bbb..8628359 100644
--- a/y2023/control_loops/superstructure/end_effector.cc
+++ b/y2023/control_loops/superstructure/end_effector.cc
@@ -18,9 +18,9 @@
       beambreak_(false) {}
 
 void EndEffector::RunIteration(
-    const ::aos::monotonic_clock::time_point timestamp,
-    RollerGoal roller_goal, double falcon_current, double cone_position,
-    bool beambreak, double *roller_voltage, bool preloaded_with_cone) {
+    const ::aos::monotonic_clock::time_point timestamp, RollerGoal roller_goal,
+    double falcon_current, double cone_position, bool beambreak,
+    double *roller_voltage, bool preloaded_with_cone) {
   *roller_voltage = 0.0;
 
   constexpr double kMinCurrent = 40.0;
diff --git a/y2023/control_loops/superstructure/led_indicator.h b/y2023/control_loops/superstructure/led_indicator.h
index dfdf4b1..eb5f037 100644
--- a/y2023/control_loops/superstructure/led_indicator.h
+++ b/y2023/control_loops/superstructure/led_indicator.h
@@ -1,10 +1,11 @@
 #ifndef Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_LED_INDICATOR_H_
 #define Y2023_CONTROL_LOOPS_SUPERSTRUCTURE_LED_INDICATOR_H_
 
+#include "ctre/phoenix/led/CANdle.h"
+
 #include "aos/events/event_loop.h"
 #include "aos/network/message_bridge_client_generated.h"
 #include "aos/network/message_bridge_server_generated.h"
-#include "ctre/phoenix/led/CANdle.h"
 #include "frc971/control_loops/control_loop.h"
 #include "frc971/control_loops/control_loops_generated.h"
 #include "frc971/control_loops/drivetrain/drivetrain_output_generated.h"
diff --git a/y2023/control_loops/superstructure/superstructure_lib_test.cc b/y2023/control_loops/superstructure/superstructure_lib_test.cc
index b555277..26b88f3 100644
--- a/y2023/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2023/control_loops/superstructure/superstructure_lib_test.cc
@@ -1,13 +1,14 @@
 #include <chrono>
 #include <memory>
 
+#include "gtest/gtest.h"
+
 #include "aos/events/logging/log_writer.h"
 #include "frc971/control_loops/capped_test_plant.h"
 #include "frc971/control_loops/control_loop_test.h"
 #include "frc971/control_loops/position_sensor_sim.h"
 #include "frc971/control_loops/subsystem_simulator.h"
 #include "frc971/control_loops/team_number_test_environment.h"
-#include "gtest/gtest.h"
 #include "y2023/constants/simulated_constants_sender.h"
 #include "y2023/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
 #include "y2023/control_loops/superstructure/roll/integral_roll_plant.h"
diff --git a/y2023/control_loops/superstructure/superstructure_replay.cc b/y2023/control_loops/superstructure/superstructure_replay.cc
index 9bd3ae2..6f23ec2 100644
--- a/y2023/control_loops/superstructure/superstructure_replay.cc
+++ b/y2023/control_loops/superstructure/superstructure_replay.cc
@@ -3,6 +3,8 @@
 // replayed, so that it can then be run through the plotting tool or analyzed
 // in some other way. The original superstructure status data will be on the
 // /original/superstructure channel.
+#include "gflags/gflags.h"
+
 #include "aos/events/logging/log_reader.h"
 #include "aos/events/logging/log_writer.h"
 #include "aos/events/simulated_event_loop.h"
@@ -10,7 +12,6 @@
 #include "aos/json_to_flatbuffer.h"
 #include "aos/logging/log_message_generated.h"
 #include "aos/network/team_number.h"
-#include "gflags/gflags.h"
 #include "y2023/constants.h"
 #include "y2023/control_loops/superstructure/superstructure.h"
 
diff --git a/y2023/joystick_republish.cc b/y2023/joystick_republish.cc
index 9542001..ae6f340 100644
--- a/y2023/joystick_republish.cc
+++ b/y2023/joystick_republish.cc
@@ -1,13 +1,13 @@
 #include <sys/resource.h>
 #include <sys/time.h>
 
+#include "glog/logging.h"
+
 #include "aos/configuration.h"
-#include "aos/init.h"
 #include "aos/events/shm_event_loop.h"
 #include "aos/flatbuffer_merge.h"
 #include "aos/init.h"
 #include "frc971/input/joystick_state_generated.h"
-#include "glog/logging.h"
 
 DEFINE_string(config, "aos_config.json", "Config file to use.");
 
diff --git a/y2023/localizer/localizer.cc b/y2023/localizer/localizer.cc
index 79a7f21..76784fb 100644
--- a/y2023/localizer/localizer.cc
+++ b/y2023/localizer/localizer.cc
@@ -1,9 +1,10 @@
 #include "y2023/localizer/localizer.h"
 
+#include "gflags/gflags.h"
+
 #include "aos/containers/sized_array.h"
 #include "frc971/control_loops/drivetrain/localizer_generated.h"
 #include "frc971/control_loops/pose.h"
-#include "gflags/gflags.h"
 #include "y2023/constants.h"
 #include "y2023/localizer/utils.h"
 
diff --git a/y2023/localizer/localizer_replay.cc b/y2023/localizer/localizer_replay.cc
index 27f0d18..27fdd85 100644
--- a/y2023/localizer/localizer_replay.cc
+++ b/y2023/localizer/localizer_replay.cc
@@ -1,3 +1,5 @@
+#include "gflags/gflags.h"
+
 #include "aos/configuration.h"
 #include "aos/events/logging/log_reader.h"
 #include "aos/events/logging/log_writer.h"
@@ -6,7 +8,6 @@
 #include "aos/json_to_flatbuffer.h"
 #include "aos/network/team_number.h"
 #include "aos/util/simulation_logger.h"
-#include "gflags/gflags.h"
 #include "y2023/control_loops/drivetrain/drivetrain_base.h"
 #include "y2023/localizer/localizer.h"
 
@@ -35,14 +36,12 @@
   // open logfiles
   aos::logger::LogReader reader(logfiles, &config.message());
 
-  reader.RemapLoggedChannel("/localizer",
-                            "y2023.localizer.Status");
+  reader.RemapLoggedChannel("/localizer", "y2023.localizer.Status");
   for (const auto pi : {"pi1", "pi2", "pi3", "pi4"}) {
     reader.RemapLoggedChannel(absl::StrCat("/", pi, "/camera"),
                               "y2023.localizer.Visualization");
   }
-  reader.RemapLoggedChannel("/localizer",
-                            "frc971.controls.LocalizerOutput");
+  reader.RemapLoggedChannel("/localizer", "frc971.controls.LocalizerOutput");
 
   auto factory =
       std::make_unique<aos::SimulatedEventLoopFactory>(reader.configuration());
diff --git a/y2023/localizer/localizer_test.cc b/y2023/localizer/localizer_test.cc
index 2cb5756..f7efc9c 100644
--- a/y2023/localizer/localizer_test.cc
+++ b/y2023/localizer/localizer_test.cc
@@ -1,12 +1,13 @@
 #include "y2023/localizer/localizer.h"
 
+#include "gtest/gtest.h"
+
 #include "aos/events/logging/log_writer.h"
 #include "aos/events/simulated_event_loop.h"
 #include "frc971/control_loops/drivetrain/drivetrain_test_lib.h"
 #include "frc971/control_loops/drivetrain/localizer_generated.h"
 #include "frc971/control_loops/pose.h"
 #include "frc971/vision/target_map_generated.h"
-#include "gtest/gtest.h"
 #include "y2023/constants/simulated_constants_sender.h"
 #include "y2023/control_loops/drivetrain/drivetrain_base.h"
 #include "y2023/localizer/status_generated.h"
diff --git a/y2023/localizer/map_expander.cc b/y2023/localizer/map_expander.cc
index e13c0a1..32efcd8 100644
--- a/y2023/localizer/map_expander.cc
+++ b/y2023/localizer/map_expander.cc
@@ -1,6 +1,7 @@
+#include "gflags/gflags.h"
+
 #include "aos/init.h"
 #include "aos/util/file.h"
-#include "gflags/gflags.h"
 #include "y2023/localizer/map_expander_lib.h"
 
 DEFINE_string(target_map, "y2023/vision/maps/target_map.json",
diff --git a/y2023/localizer/map_expander_lib.h b/y2023/localizer/map_expander_lib.h
index 773a769..5579e18 100644
--- a/y2023/localizer/map_expander_lib.h
+++ b/y2023/localizer/map_expander_lib.h
@@ -1,9 +1,10 @@
 #ifndef Y2023_LOCALIZER_MAP_EXPANDER_LIB_H_
 #define Y2023_LOCALIZER_MAP_EXPANDER_LIB_H_
 
-#include <Eigen/Dense>
 #include <map>
 
+#include <Eigen/Dense>
+
 #include "aos/flatbuffers.h"
 #include "aos/json_to_flatbuffer.h"
 #include "frc971/vision/target_map_generated.h"
diff --git a/y2023/localizer/map_expander_lib_test.cc b/y2023/localizer/map_expander_lib_test.cc
index 5b353a1..d4a248b 100644
--- a/y2023/localizer/map_expander_lib_test.cc
+++ b/y2023/localizer/map_expander_lib_test.cc
@@ -1,6 +1,7 @@
 #include "y2023/localizer/map_expander_lib.h"
 
 #include "gtest/gtest.h"
+
 #include "aos/testing/flatbuffer_eq.h"
 
 namespace y2023::localizer::testing {
diff --git a/y2023/ssd_profiler.cc b/y2023/ssd_profiler.cc
index 2805680..e40f81a 100644
--- a/y2023/ssd_profiler.cc
+++ b/y2023/ssd_profiler.cc
@@ -5,11 +5,12 @@
 
 #include <chrono>
 
+#include "gflags/gflags.h"
+#include "glog/logging.h"
+
 #include "aos/init.h"
 #include "aos/realtime.h"
 #include "aos/time/time.h"
-#include "gflags/gflags.h"
-#include "glog/logging.h"
 
 namespace chrono = std::chrono;
 
@@ -22,7 +23,7 @@
 DEFINE_uint32(chunks, 1, "Chunks to write using writev.");
 DEFINE_uint32(chunk_size, 512, "Chunk size to write using writev.");
 
-int main(int argc, char ** argv) {
+int main(int argc, char **argv) {
   aos::InitGoogle(&argc, &argv);
 
   std::vector<uint8_t> data;
@@ -52,13 +53,14 @@
     iovec[i].iov_base = &data[i * FLAGS_chunk_size];
     iovec[i].iov_len = FLAGS_chunk_size;
   }
-  iovec[FLAGS_chunks - 1].iov_base = &data[(FLAGS_chunks - 1) * FLAGS_chunk_size];
-  iovec[FLAGS_chunks - 1].iov_len = data.size() - (FLAGS_chunks - 1) * FLAGS_chunk_size;
+  iovec[FLAGS_chunks - 1].iov_base =
+      &data[(FLAGS_chunks - 1) * FLAGS_chunk_size];
+  iovec[FLAGS_chunks - 1].iov_len =
+      data.size() - (FLAGS_chunks - 1) * FLAGS_chunk_size;
 
-  int fd = open(
-      FLAGS_file.c_str(),
-      O_RDWR | O_CLOEXEC | O_CREAT | (FLAGS_direct ? O_DIRECT : 0),
-      0774);
+  int fd =
+      open(FLAGS_file.c_str(),
+           O_RDWR | O_CLOEXEC | O_CREAT | (FLAGS_direct ? O_DIRECT : 0), 0774);
   PCHECK(fd != -1);
 
   const aos::monotonic_clock::time_point start_time =
diff --git a/y2023/vision/BUILD b/y2023/vision/BUILD
index ca057fd..d5168c1 100644
--- a/y2023/vision/BUILD
+++ b/y2023/vision/BUILD
@@ -86,6 +86,7 @@
         "//third_party:opencv",
         "//y2023/constants:constants_fbs",
         "//y2023/constants:simulated_constants_sender",
+        "@org_tuxfamily_eigen//:eigen",
     ],
 )
 
@@ -122,6 +123,7 @@
         "//third_party:opencv",
         "//third_party/apriltag",
         "//y2023/constants:constants_fbs",
+        "@org_tuxfamily_eigen//:eigen",
     ],
 )
 
diff --git a/y2023/vision/april_detection_test.cc b/y2023/vision/april_detection_test.cc
index b92557c..fea5105 100644
--- a/y2023/vision/april_detection_test.cc
+++ b/y2023/vision/april_detection_test.cc
@@ -1,17 +1,18 @@
 #include <string>
 
+#include "glog/logging.h"
+#include "gtest/gtest.h"
+
 #include "aos/events/simulated_event_loop.h"
 #include "aos/flatbuffer_merge.h"
 #include "aos/json_to_flatbuffer.h"
 #include "aos/testing/path.h"
-#include "aprilrobotics.h"
 #include "frc971/constants/constants_sender_lib.h"
 #include "frc971/vision/target_mapper.h"
 #include "frc971/vision/vision_generated.h"
-#include "glog/logging.h"
-#include "gtest/gtest.h"
 #include "y2023/constants/constants_generated.h"
 #include "y2023/constants/constants_list_generated.h"
+#include "y2023/vision/aprilrobotics.h"
 
 namespace y2023::vision::testing {
 class AprilDetectionTest : public ::testing::Test {
diff --git a/y2023/vision/aprilrobotics.h b/y2023/vision/aprilrobotics.h
index 01e3138..123f352 100644
--- a/y2023/vision/aprilrobotics.h
+++ b/y2023/vision/aprilrobotics.h
@@ -1,6 +1,13 @@
 
 #include <string>
 
+#include "Eigen/Dense"
+#include "opencv2/core/eigen.hpp"
+#include "opencv2/imgproc.hpp"
+#include "third_party/apriltag/apriltag.h"
+#include "third_party/apriltag/apriltag_pose.h"
+#include "third_party/apriltag/tag16h5.h"
+
 #include "aos/events/event_loop.h"
 #include "aos/events/shm_event_loop.h"
 #include "aos/network/team_number.h"
@@ -12,11 +19,6 @@
 #include "frc971/vision/target_mapper.h"
 #include "frc971/vision/vision_generated.h"
 #include "frc971/vision/visualize_robot.h"
-#include "opencv2/core/eigen.hpp"
-#include "opencv2/imgproc.hpp"
-#include "third_party/apriltag/apriltag.h"
-#include "third_party/apriltag/apriltag_pose.h"
-#include "third_party/apriltag/tag16h5.h"
 #include "y2023/constants/constants_generated.h"
 
 namespace y2023 {
diff --git a/y2023/vision/aprilrobotics_main.cc b/y2023/vision/aprilrobotics_main.cc
index 6870ae1..5e5bad7 100644
--- a/y2023/vision/aprilrobotics_main.cc
+++ b/y2023/vision/aprilrobotics_main.cc
@@ -1,7 +1,7 @@
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
-#include "y2023/vision/aprilrobotics.h"
 #include "frc971/constants/constants_sender_lib.h"
+#include "y2023/vision/aprilrobotics.h"
 
 DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
 
diff --git a/y2023/vision/calibrate_extrinsics.cc b/y2023/vision/calibrate_extrinsics.cc
index 7e650a3..91bdefd 100644
--- a/y2023/vision/calibrate_extrinsics.cc
+++ b/y2023/vision/calibrate_extrinsics.cc
@@ -1,7 +1,8 @@
 #include "Eigen/Dense"
 #include "Eigen/Geometry"
-
 #include "absl/strings/str_format.h"
+#include <opencv2/core/eigen.hpp>
+
 #include "aos/events/logging/log_reader.h"
 #include "aos/events/logging/log_writer.h"
 #include "aos/init.h"
@@ -16,8 +17,6 @@
 #include "y2023/constants/constants_generated.h"
 #include "y2023/vision/vision_util.h"
 
-#include <opencv2/core/eigen.hpp>
-
 DEFINE_string(pi, "pi-7971-2", "Pi name to calibrate.");
 DEFINE_bool(plot, false, "Whether to plot the resulting data.");
 DEFINE_string(target_type, "charuco_diamond",
diff --git a/y2023/vision/camera_reader.cc b/y2023/vision/camera_reader.cc
index 3001c04..d5f39a0 100644
--- a/y2023/vision/camera_reader.cc
+++ b/y2023/vision/camera_reader.cc
@@ -3,6 +3,7 @@
 
 #include "absl/strings/str_cat.h"
 #include "absl/strings/str_split.h"
+
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
 #include "aos/realtime.h"
diff --git a/y2023/vision/foxglove_image_converter.cc b/y2023/vision/foxglove_image_converter.cc
index 8f3032b..bfaafc8 100644
--- a/y2023/vision/foxglove_image_converter.cc
+++ b/y2023/vision/foxglove_image_converter.cc
@@ -1,7 +1,6 @@
-#include "frc971/vision/foxglove_image_converter_lib.h"
-
-#include "aos/init.h"
 #include "aos/events/shm_event_loop.h"
+#include "aos/init.h"
+#include "frc971/vision/foxglove_image_converter_lib.h"
 
 DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
 
diff --git a/y2023/vision/game_pieces.h b/y2023/vision/game_pieces.h
index a99a99b..442d95c 100644
--- a/y2023/vision/game_pieces.h
+++ b/y2023/vision/game_pieces.h
@@ -4,7 +4,6 @@
 #include "aos/events/shm_event_loop.h"
 #include "frc971/vision/vision_generated.h"
 #include "y2023/vision/game_pieces_generated.h"
-
 #include "y2023/vision/yolov5.h"
 
 namespace y2023 {
diff --git a/y2023/vision/image_logger.cc b/y2023/vision/image_logger.cc
index 29a95db..c2cfa0a 100644
--- a/y2023/vision/image_logger.cc
+++ b/y2023/vision/image_logger.cc
@@ -1,14 +1,15 @@
 #include <sys/resource.h>
 #include <sys/time.h>
 
+#include "gflags/gflags.h"
+#include "glog/logging.h"
+
 #include "aos/configuration.h"
 #include "aos/events/logging/log_writer.h"
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
 #include "aos/logging/log_namer.h"
 #include "frc971/input/joystick_state_generated.h"
-#include "gflags/gflags.h"
-#include "glog/logging.h"
 
 DEFINE_string(config, "aos_config.json", "Config file to use.");
 
diff --git a/y2023/vision/localization_verifier.cc b/y2023/vision/localization_verifier.cc
index 3b366fa..c16f874 100644
--- a/y2023/vision/localization_verifier.cc
+++ b/y2023/vision/localization_verifier.cc
@@ -1,8 +1,9 @@
+#include "glog/logging.h"
+
 #include "aos/init.h"
 #include "frc971/constants/constants_sender_lib.h"
 #include "frc971/control_loops/drivetrain/localization/localizer_output_generated.h"
 #include "frc971/vision/vision_generated.h"
-#include "glog/logging.h"
 #include "y2023/localizer/localizer.h"
 #include "y2023/localizer/utils.h"
 
@@ -89,12 +90,12 @@
 
     const std::string_view pi_name =
         camera->calibration()->node_name()->string_view();
-    event_loop.MakeWatcher(absl::StrCat("/", pi_name, "/camera"),
-                           [H_robot_camera, &localizer_fetcher](
-                               const frc971::vision::TargetMap &target_map) {
-                             HandleDetections(target_map, H_robot_camera,
-                                              &localizer_fetcher);
-                           });
+    event_loop.MakeWatcher(
+        absl::StrCat("/", pi_name, "/camera"),
+        [H_robot_camera,
+         &localizer_fetcher](const frc971::vision::TargetMap &target_map) {
+          HandleDetections(target_map, H_robot_camera, &localizer_fetcher);
+        });
   }
   event_loop.Run();
 }
diff --git a/y2023/vision/target_mapping.cc b/y2023/vision/target_mapping.cc
index 804583c..985a412 100644
--- a/y2023/vision/target_mapping.cc
+++ b/y2023/vision/target_mapping.cc
@@ -1,3 +1,12 @@
+#include "Eigen/Dense"
+#include "opencv2/aruco.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/core/eigen.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+
 #include "aos/configuration.h"
 #include "aos/events/logging/log_reader.h"
 #include "aos/events/simulated_event_loop.h"
@@ -7,13 +16,6 @@
 #include "frc971/vision/calibration_generated.h"
 #include "frc971/vision/target_mapper.h"
 #include "frc971/vision/visualize_robot.h"
-#include "opencv2/aruco.hpp"
-#include "opencv2/calib3d.hpp"
-#include "opencv2/core/eigen.hpp"
-#include "opencv2/features2d.hpp"
-#include "opencv2/highgui.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc.hpp"
 #include "y2023/constants/simulated_constants_sender.h"
 #include "y2023/vision/aprilrobotics.h"
 #include "y2023/vision/vision_util.h"
diff --git a/y2023/vision/viewer.cc b/y2023/vision/viewer.cc
index 4fb96bc..b518a8e 100644
--- a/y2023/vision/viewer.cc
+++ b/y2023/vision/viewer.cc
@@ -1,15 +1,15 @@
+#include "absl/strings/match.h"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
 #include <opencv2/highgui/highgui.hpp>
 #include <opencv2/imgproc.hpp>
 
-#include "absl/strings/match.h"
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
 #include "aos/json_to_flatbuffer.h"
 #include "aos/time/time.h"
 #include "frc971/constants/constants_sender_lib.h"
 #include "frc971/vision/vision_generated.h"
-#include "opencv2/calib3d.hpp"
-#include "opencv2/imgproc.hpp"
 #include "y2023/vision/vision_util.h"
 
 DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
diff --git a/y2023/vision/vision_util.h b/y2023/vision/vision_util.h
index 79f5c92..1f4d099 100644
--- a/y2023/vision/vision_util.h
+++ b/y2023/vision/vision_util.h
@@ -3,6 +3,7 @@
 #include <string_view>
 
 #include "opencv2/imgproc.hpp"
+
 #include "y2023/constants/constants_generated.h"
 
 namespace y2023::vision {
diff --git a/y2023/vision/yolov5.cc b/y2023/vision/yolov5.cc
index 7df4ffb..11f3a49 100644
--- a/y2023/vision/yolov5.cc
+++ b/y2023/vision/yolov5.cc
@@ -8,12 +8,12 @@
 #include <tflite/public/edgetpu_c.h>
 
 #include <chrono>
-#include <opencv2/dnn.hpp>
 #include <string>
 
 #include "absl/types/span.h"
 #include "gflags/gflags.h"
 #include "glog/logging.h"
+#include <opencv2/dnn.hpp>
 
 DEFINE_double(conf_threshold, 0.9,
               "Threshold value for confidence scores. Detections with a "
diff --git a/y2023/vision/yolov5.h b/y2023/vision/yolov5.h
index 7e2a521..9853b4f 100644
--- a/y2023/vision/yolov5.h
+++ b/y2023/vision/yolov5.h
@@ -6,11 +6,12 @@
 #include <cstdint>
 #include <fstream>
 #include <iostream>
+#include <vector>
+
 #include <opencv2/core.hpp>
 #include <opencv2/highgui/highgui.hpp>
 #include <opencv2/imgcodecs.hpp>
 #include <opencv2/imgproc.hpp>
-#include <vector>
 
 namespace y2023 {
 namespace vision {
diff --git a/y2023/wpilib_interface.cc b/y2023/wpilib_interface.cc
index b1f9018..cc911ab 100644
--- a/y2023/wpilib_interface.cc
+++ b/y2023/wpilib_interface.cc
@@ -12,6 +12,7 @@
 #include <thread>
 
 #include "ctre/phoenix/CANifier.h"
+
 #include "frc971/wpilib/ahal/AnalogInput.h"
 #include "frc971/wpilib/ahal/Counter.h"
 #include "frc971/wpilib/ahal/DigitalGlitchFilter.h"
@@ -22,6 +23,11 @@
 #include "frc971/wpilib/ahal/VictorSP.h"
 #undef ERROR
 
+#include "ctre/phoenix/cci/Diagnostics_CCI.h"
+#include "ctre/phoenix/motorcontrol/can/TalonFX.h"
+#include "ctre/phoenix/motorcontrol/can/TalonSRX.h"
+#include "ctre/phoenixpro/TalonFX.hpp"
+
 #include "aos/commonmath.h"
 #include "aos/containers/sized_array.h"
 #include "aos/events/event_loop.h"
@@ -33,10 +39,6 @@
 #include "aos/util/log_interval.h"
 #include "aos/util/phased_loop.h"
 #include "aos/util/wrapping_counter.h"
-#include "ctre/phoenix/cci/Diagnostics_CCI.h"
-#include "ctre/phoenix/motorcontrol/can/TalonFX.h"
-#include "ctre/phoenix/motorcontrol/can/TalonSRX.h"
-#include "ctre/phoenixpro/TalonFX.hpp"
 #include "frc971/autonomous/auto_mode_generated.h"
 #include "frc971/control_loops/drivetrain/drivetrain_position_generated.h"
 #include "frc971/input/robot_state_generated.h"