message: Test that documentation generation code is covered.
diff: #include "gmock/gmock.h"
  #include "gtest/gtest.h"
  #include "absl/memory/memory.h"
  +#include "absl/strings/match.h"
  #include "absl/strings/string_view.h"
  #include "common/util/file_util.h"
  #include "common/util/logging.h"
  @@ -331,5 +332,25 @@ TEST_F(VerilogLinterTest, ModuleBodyLineLengthWaived) {
  EXPECT_EQ(diagnostics.second, "");
  }
  +TEST(VerilogLinterDocumentationTest, AllRulesHelpDescriptions) {
  + std::ostringstream stream;
  + verilog::GetLintRuleDescriptionsHelpFlag(&stream, "all");
  + // Spot-check a few patterns, must mostly make sure generation
  + // works without any fatal errors.
  + EXPECT_TRUE(absl::StrContains(stream.str(), "line-length"));
  + EXPECT_TRUE(absl::StrContains(stream.str(), "posix-eof"));
  + EXPECT_TRUE(absl::StrContains(stream.str(), "Enabled by default:"));
  +}
  +
  +TEST(VerilogLinterDocumentationTest, AllRulesMarkdown) {
  + std::ostringstream stream;
  + verilog::GetLintRuleDescriptionsMarkdown(&stream);
  + // Spot-check a few patterns, must mostly make sure generation
  + // works without any fatal errors.
  + EXPECT_TRUE(absl::StrContains(stream.str(), "line-length"));
  + EXPECT_TRUE(absl::StrContains(stream.str(), "posix-eof"));
  + EXPECT_TRUE(absl::StrContains(stream.str(), "Enabled by default:"));
  +}
  +
  } // namespace
  } // namespace verilog
  