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/aos/logging/context.cc b/aos/logging/context.cc
index 9eaac50..02ad3eb 100644
--- a/aos/logging/context.cc
+++ b/aos/logging/context.cc
@@ -18,10 +18,11 @@
extern char *program_invocation_name;
extern char *program_invocation_short_name;
+#include "glog/logging.h"
+
#include "aos/die.h"
#include "aos/logging/implementations.h"
#include "aos/thread_local.h"
-#include "glog/logging.h"
namespace aos {
namespace logging {
diff --git a/aos/logging/dynamic_logging.h b/aos/logging/dynamic_logging.h
index 7309bfc..0dfd181 100644
--- a/aos/logging/dynamic_logging.h
+++ b/aos/logging/dynamic_logging.h
@@ -1,8 +1,9 @@
#include <string>
+#include "glog/logging.h"
+
#include "aos/events/event_loop.h"
#include "aos/logging/dynamic_log_command_generated.h"
-#include "glog/logging.h"
// The purpose of this class is to listen for /aos aos.logging.DynamicLogCommand
// and make changes to the log level of the current application based on that
diff --git a/aos/logging/dynamic_logging_test.cc b/aos/logging/dynamic_logging_test.cc
index e9cb475..2d051a8 100644
--- a/aos/logging/dynamic_logging_test.cc
+++ b/aos/logging/dynamic_logging_test.cc
@@ -2,11 +2,12 @@
#include <sys/stat.h>
+#include "glog/logging.h"
+#include "gtest/gtest.h"
+
#include "aos/events/event_loop.h"
#include "aos/events/simulated_event_loop.h"
#include "aos/testing/path.h"
-#include "glog/logging.h"
-#include "gtest/gtest.h"
using aos::testing::ArtifactPath;
diff --git a/aos/logging/implementations_test.cc b/aos/logging/implementations_test.cc
index 5f98c35..d08f85f 100644
--- a/aos/logging/implementations_test.cc
+++ b/aos/logging/implementations_test.cc
@@ -4,11 +4,12 @@
#include <cinttypes>
#include <string>
-#include "aos/logging/printf_formats.h"
-#include "aos/time/time.h"
#include "glog/logging.h"
#include "gtest/gtest.h"
+#include "aos/logging/printf_formats.h"
+#include "aos/time/time.h"
+
using ::testing::AssertionFailure;
using ::testing::AssertionResult;
using ::testing::AssertionSuccess;
diff --git a/aos/logging/interface.cc b/aos/logging/interface.cc
index 336dbc0..233357d 100644
--- a/aos/logging/interface.cc
+++ b/aos/logging/interface.cc
@@ -6,10 +6,11 @@
#include <functional>
#include <type_traits>
+#include "glog/logging.h"
+
#include "aos/die.h"
#include "aos/logging/context.h"
#include "aos/logging/implementations.h"
-#include "glog/logging.h"
namespace aos {
namespace logging {
diff --git a/aos/logging/log_namer.cc b/aos/logging/log_namer.cc
index ed57caa..3deb89d 100644
--- a/aos/logging/log_namer.cc
+++ b/aos/logging/log_namer.cc
@@ -14,9 +14,10 @@
#include <ctime>
#include <string>
-#include "aos/configuration.h"
#include "glog/logging.h"
+#include "aos/configuration.h"
+
DEFINE_string(logging_folder,
#ifdef AOS_ARCHITECTURE_arm_frc
"",
diff --git a/aos/logging/log_namer.h b/aos/logging/log_namer.h
index 44e93bf..a993d31 100644
--- a/aos/logging/log_namer.h
+++ b/aos/logging/log_namer.h
@@ -1,8 +1,8 @@
#ifndef AOS_LOGGING_LOG_NAMER_H_
#define AOS_LOGGING_LOG_NAMER_H_
-#include <string>
#include <optional>
+#include <string>
namespace aos {
namespace logging {