Run diagnostics in a separate visitor
CheckValid() is already quite complicated and adding more to the method
seems not to be scalable.
Bug: 168028537
Test: aidl_unittests
Change-Id: I41a11ce028d8b8f018e80e7203b0d6a955d3768b
diff --git a/aidl_unittest.cpp b/aidl_unittest.cpp
index f985575..e654086 100644
--- a/aidl_unittest.cpp
+++ b/aidl_unittest.cpp
@@ -4325,7 +4325,7 @@
" -Weverything -o out -h out p/Foo.aidl");
CaptureStderr();
EXPECT_EQ(0, aidl::compile_aidl(options, io_delegate_));
- EXPECT_EQ("WARNING: p/Foo.aidl:1.1-10: Interface names should start with I.[-Winterface-name]\n",
+ EXPECT_EQ("WARNING: p/Foo.aidl:1.1-10: Interface names should start with I. [-Winterface-name]\n",
GetCapturedStderr());
}
@@ -4335,7 +4335,7 @@
" -Weverything -Werror -o out -h out p/Foo.aidl");
CaptureStderr();
EXPECT_EQ(1, aidl::compile_aidl(options, io_delegate_));
- EXPECT_EQ("ERROR: p/Foo.aidl:1.1-10: Interface names should start with I.[-Winterface-name]\n",
+ EXPECT_EQ("ERROR: p/Foo.aidl:1.1-10: Interface names should start with I. [-Winterface-name]\n",
GetCapturedStderr());
}