add clang_tidy properties to bp2build

Bug: 195029134
Test: m bp2build
Change-Id: I9ca2436ef792911be72788b6640287726a609e2f
diff --git a/cc/bp2build.go b/cc/bp2build.go
index d6d052f..2f79cae 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -66,6 +66,26 @@
 	Native_coverage bazel.BoolAttribute
 
 	sdkAttributes
+
+	tidyAttributes
+}
+
+type tidyAttributes struct {
+	Tidy                  *bool
+	Tidy_flags            []string
+	Tidy_checks           []string
+	Tidy_checks_as_errors []string
+}
+
+func (m *Module) convertTidyAttributes(moduleAttrs *tidyAttributes) {
+	for _, f := range m.features {
+		if tidy, ok := f.(*tidyFeature); ok {
+			moduleAttrs.Tidy = tidy.Properties.Tidy
+			moduleAttrs.Tidy_flags = tidy.Properties.Tidy_flags
+			moduleAttrs.Tidy_checks = tidy.Properties.Tidy_checks
+			moduleAttrs.Tidy_checks_as_errors = tidy.Properties.Tidy_checks_as_errors
+		}
+	}
 }
 
 // groupSrcsByExtension partitions `srcs` into groups based on file extension.