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/y2018/control_loops/superstructure/arm/arm.cc b/y2018/control_loops/superstructure/arm/arm.cc
index ab5deea..0749e3f 100644
--- a/y2018/control_loops/superstructure/arm/arm.cc
+++ b/y2018/control_loops/superstructure/arm/arm.cc
@@ -4,9 +4,9 @@
#include <iostream>
#include "aos/logging/logging.h"
-#include "y2018/constants.h"
#include "frc971/control_loops/double_jointed_arm/demo_path.h"
#include "frc971/control_loops/double_jointed_arm/dynamics.h"
+#include "y2018/constants.h"
#include "y2018/control_loops/superstructure/arm/arm_constants.h"
#include "y2018/control_loops/superstructure/arm/generated_graph.h"
@@ -172,7 +172,7 @@
break;
}
}
- [[fallthrough]];
+ [[fallthrough]];
case State::GOTO_PATH:
if (outputs_disabled) {
diff --git a/y2018/control_loops/superstructure/arm/arm.h b/y2018/control_loops/superstructure/arm/arm.h
index 51d6c4d..0b0a6a4 100644
--- a/y2018/control_loops/superstructure/arm/arm.h
+++ b/y2018/control_loops/superstructure/arm/arm.h
@@ -2,18 +2,18 @@
#define Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_H_
#include "aos/time/time.h"
-#include "frc971/zeroing/zeroing.h"
-#include "y2018/constants.h"
#include "frc971/control_loops/double_jointed_arm/dynamics.h"
#include "frc971/control_loops/double_jointed_arm/ekf.h"
-#include "y2018/control_loops/superstructure/arm/generated_graph.h"
#include "frc971/control_loops/double_jointed_arm/graph.h"
#include "frc971/control_loops/double_jointed_arm/trajectory.h"
+#include "frc971/zeroing/zeroing.h"
+#include "y2018/constants.h"
+#include "y2018/control_loops/superstructure/arm/generated_graph.h"
#include "y2018/control_loops/superstructure/superstructure_position_generated.h"
#include "y2018/control_loops/superstructure/superstructure_status_generated.h"
-using frc971::control_loops::arm::TrajectoryFollower;
using frc971::control_loops::arm::EKF;
+using frc971::control_loops::arm::TrajectoryFollower;
namespace y2018 {
namespace control_loops {
diff --git a/y2018/control_loops/superstructure/arm/arm_constants.h b/y2018/control_loops/superstructure/arm/arm_constants.h
index 1697a8e..932da7a 100644
--- a/y2018/control_loops/superstructure/arm/arm_constants.h
+++ b/y2018/control_loops/superstructure/arm/arm_constants.h
@@ -44,10 +44,9 @@
.num_distal_motors = 2.0,
};
+} // namespace arm
+} // namespace superstructure
+} // namespace control_loops
+} // namespace y2018
-} // namespace arm
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2018
-
-#endif // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_CONSTANTS_H_
+#endif // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_ARM_ARM_CONSTANTS_H_
diff --git a/y2018/control_loops/superstructure/arm/trajectory_plot.cc b/y2018/control_loops/superstructure/arm/trajectory_plot.cc
index 0cee664..7fdde3f 100644
--- a/y2018/control_loops/superstructure/arm/trajectory_plot.cc
+++ b/y2018/control_loops/superstructure/arm/trajectory_plot.cc
@@ -1,9 +1,10 @@
+#include "gflags/gflags.h"
+
#include "aos/init.h"
#include "frc971/analysis/in_process_plotter.h"
#include "frc971/control_loops/double_jointed_arm/dynamics.h"
#include "frc971/control_loops/double_jointed_arm/ekf.h"
#include "frc971/control_loops/double_jointed_arm/trajectory.h"
-#include "gflags/gflags.h"
#include "y2018/control_loops/superstructure/arm/arm_constants.h"
#include "y2018/control_loops/superstructure/arm/generated_graph.h"