Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
diff --git a/cc/pgo.go b/cc/pgo.go
index 3cf550a..ada694b 100644
--- a/cc/pgo.go
+++ b/cc/pgo.go
@@ -103,7 +103,7 @@
}
func (props *PgoProperties) getPgoProfileFile(ctx BaseModuleContext) android.OptionalPath {
- profile_file := *props.Pgo.Profile_file
+ profileFile := *props.Pgo.Profile_file
// Test if the profile_file is present in any of the PGO profile projects
for _, profileProject := range getPgoProfileProjects(ctx.DeviceConfig()) {
@@ -112,24 +112,24 @@
// <profile_file>.<arbitrary-version> when available. This
// works around an issue where ccache serves stale cache
// entries when the profile file has changed.
- globPattern := filepath.Join(profileProject, profile_file+".*")
- versioned_profiles, err := ctx.GlobWithDeps(globPattern, nil)
+ globPattern := filepath.Join(profileProject, profileFile+".*")
+ versionedProfiles, err := ctx.GlobWithDeps(globPattern, nil)
if err != nil {
ctx.ModuleErrorf("glob: %s", err.Error())
}
- path := android.ExistentPathForSource(ctx, profileProject, profile_file)
+ path := android.ExistentPathForSource(ctx, profileProject, profileFile)
if path.Valid() {
- if len(versioned_profiles) != 0 {
- ctx.PropertyErrorf("pgo.profile_file", "Profile_file has multiple versions: "+filepath.Join(profileProject, profile_file)+", "+strings.Join(versioned_profiles, ", "))
+ if len(versionedProfiles) != 0 {
+ ctx.PropertyErrorf("pgo.profile_file", "Profile_file has multiple versions: "+filepath.Join(profileProject, profileFile)+", "+strings.Join(versionedProfiles, ", "))
}
return path
}
- if len(versioned_profiles) > 1 {
- ctx.PropertyErrorf("pgo.profile_file", "Profile_file has multiple versions: "+strings.Join(versioned_profiles, ", "))
- } else if len(versioned_profiles) == 1 {
- return android.OptionalPathForPath(android.PathForSource(ctx, versioned_profiles[0]))
+ if len(versionedProfiles) > 1 {
+ ctx.PropertyErrorf("pgo.profile_file", "Profile_file has multiple versions: "+strings.Join(versionedProfiles, ", "))
+ } else if len(versionedProfiles) == 1 {
+ return android.OptionalPathForPath(android.PathForSource(ctx, versionedProfiles[0]))
}
}