Run idmap2 static-checks and fix formatting issues

Bug: 130324774
Test: builds
Change-Id: I2cf9d3aa268ffe38e525fadee9d81fc6aefe19b1
diff --git a/cmds/idmap2/libidmap2/BinaryStreamVisitor.cpp b/cmds/idmap2/libidmap2/BinaryStreamVisitor.cpp
index 9651328..dee2d21 100644
--- a/cmds/idmap2/libidmap2/BinaryStreamVisitor.cpp
+++ b/cmds/idmap2/libidmap2/BinaryStreamVisitor.cpp
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
+#include "idmap2/BinaryStreamVisitor.h"
+
 #include <algorithm>
 #include <cstring>
 #include <string>
 
 #include "android-base/macros.h"
 
-#include "idmap2/BinaryStreamVisitor.h"
-
 namespace android::idmap2 {
 
 void BinaryStreamVisitor::Write16(uint16_t value) {
diff --git a/cmds/idmap2/libidmap2/CommandLineOptions.cpp b/cmds/idmap2/libidmap2/CommandLineOptions.cpp
index d5fd2ce..5b0ae92 100644
--- a/cmds/idmap2/libidmap2/CommandLineOptions.cpp
+++ b/cmds/idmap2/libidmap2/CommandLineOptions.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include "idmap2/CommandLineOptions.h"
+
 #include <algorithm>
 #include <iomanip>
 #include <iostream>
@@ -24,8 +26,6 @@
 #include <vector>
 
 #include "android-base/macros.h"
-
-#include "idmap2/CommandLineOptions.h"
 #include "idmap2/Result.h"
 
 namespace android::idmap2 {
diff --git a/cmds/idmap2/libidmap2/FileUtils.cpp b/cmds/idmap2/libidmap2/FileUtils.cpp
index a9b68cd..3e8e329 100644
--- a/cmds/idmap2/libidmap2/FileUtils.cpp
+++ b/cmds/idmap2/libidmap2/FileUtils.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include "idmap2/FileUtils.h"
+
 #include <dirent.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -33,8 +35,6 @@
 #include "android-base/stringprintf.h"
 #include "private/android_filesystem_config.h"
 
-#include "idmap2/FileUtils.h"
-
 namespace android::idmap2::utils {
 
 std::unique_ptr<std::vector<std::string>> FindFiles(const std::string& root, bool recurse,
diff --git a/cmds/idmap2/libidmap2/Idmap.cpp b/cmds/idmap2/libidmap2/Idmap.cpp
index 49470b4..aec1a6f 100644
--- a/cmds/idmap2/libidmap2/Idmap.cpp
+++ b/cmds/idmap2/libidmap2/Idmap.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include "idmap2/Idmap.h"
+
 #include <algorithm>
 #include <iostream>
 #include <iterator>
@@ -28,14 +30,12 @@
 #include "android-base/macros.h"
 #include "android-base/stringprintf.h"
 #include "androidfw/AssetManager2.h"
-#include "utils/String16.h"
-#include "utils/String8.h"
-
-#include "idmap2/Idmap.h"
 #include "idmap2/ResourceUtils.h"
 #include "idmap2/Result.h"
 #include "idmap2/SysTrace.h"
 #include "idmap2/ZipFile.h"
+#include "utils/String16.h"
+#include "utils/String8.h"
 
 namespace android::idmap2 {
 
diff --git a/cmds/idmap2/libidmap2/Policies.cpp b/cmds/idmap2/libidmap2/Policies.cpp
index 7c45556..0a0cecf 100644
--- a/cmds/idmap2/libidmap2/Policies.cpp
+++ b/cmds/idmap2/libidmap2/Policies.cpp
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
+#include "idmap2/Policies.h"
+
 #include <iterator>
 #include <map>
 #include <string>
 #include <vector>
 
 #include "androidfw/ResourceTypes.h"
-
 #include "idmap2/Idmap.h"
-#include "idmap2/Policies.h"
 #include "idmap2/Result.h"
 
 namespace android::idmap2 {
diff --git a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp
index fc967799..fbf2c77 100644
--- a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp
+++ b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
+#include "idmap2/PrettyPrintVisitor.h"
+
 #include <string>
 
 #include "android-base/macros.h"
 #include "android-base/stringprintf.h"
 #include "androidfw/ApkAssets.h"
-
-#include "idmap2/PrettyPrintVisitor.h"
 #include "idmap2/ResourceUtils.h"
 #include "idmap2/Result.h"
 
diff --git a/cmds/idmap2/libidmap2/RawPrintVisitor.cpp b/cmds/idmap2/libidmap2/RawPrintVisitor.cpp
index 1149c90..dd14fd4 100644
--- a/cmds/idmap2/libidmap2/RawPrintVisitor.cpp
+++ b/cmds/idmap2/libidmap2/RawPrintVisitor.cpp
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
+#include "idmap2/RawPrintVisitor.h"
+
 #include <cstdarg>
 #include <string>
 
 #include "android-base/macros.h"
 #include "android-base/stringprintf.h"
 #include "androidfw/ApkAssets.h"
-
-#include "idmap2/RawPrintVisitor.h"
 #include "idmap2/ResourceUtils.h"
 #include "idmap2/Result.h"
 
diff --git a/cmds/idmap2/libidmap2/ResourceUtils.cpp b/cmds/idmap2/libidmap2/ResourceUtils.cpp
index a24836d..71ba3f0 100644
--- a/cmds/idmap2/libidmap2/ResourceUtils.cpp
+++ b/cmds/idmap2/libidmap2/ResourceUtils.cpp
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
+#include "idmap2/ResourceUtils.h"
+
 #include <memory>
 #include <string>
 
 #include "androidfw/StringPiece.h"
 #include "androidfw/Util.h"
-
-#include "idmap2/ResourceUtils.h"
 #include "idmap2/Result.h"
 #include "idmap2/Xml.h"
 #include "idmap2/ZipFile.h"
diff --git a/cmds/idmap2/libidmap2/Result.cpp b/cmds/idmap2/libidmap2/Result.cpp
index 471dab2..1eac25f 100644
--- a/cmds/idmap2/libidmap2/Result.cpp
+++ b/cmds/idmap2/libidmap2/Result.cpp
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
+#include "idmap2/Result.h"
+
 #include <cstdarg>
 
 #include "android-base/stringprintf.h"
 
-#include "idmap2/Result.h"
-
 namespace android::idmap2 {
 
 // NOLINTNEXTLINE(cert-dcl50-cpp)
diff --git a/cmds/idmap2/libidmap2/Xml.cpp b/cmds/idmap2/libidmap2/Xml.cpp
index 0075a92..2645868 100644
--- a/cmds/idmap2/libidmap2/Xml.cpp
+++ b/cmds/idmap2/libidmap2/Xml.cpp
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
+#include "idmap2/Xml.h"
+
 #include <map>
 #include <memory>
 #include <string>
 #include <utility>
 
-#include "idmap2/Xml.h"
-
 namespace android::idmap2 {
 
 std::unique_ptr<const Xml> Xml::Create(const uint8_t* data, size_t size, bool copyData) {
diff --git a/cmds/idmap2/libidmap2/ZipFile.cpp b/cmds/idmap2/libidmap2/ZipFile.cpp
index 0f07324..812fd6e 100644
--- a/cmds/idmap2/libidmap2/ZipFile.cpp
+++ b/cmds/idmap2/libidmap2/ZipFile.cpp
@@ -14,11 +14,12 @@
  * limitations under the License.
  */
 
+#include "idmap2/ZipFile.h"
+
 #include <memory>
 #include <string>
 
 #include "idmap2/Result.h"
-#include "idmap2/ZipFile.h"
 
 namespace android::idmap2 {