Reformat build/soong for go 1.19
Test: none
Change-Id: I132368f0fcbdb5ea088b5b84dbe4ccfdd9e94cad
diff --git a/android/apex.go b/android/apex.go
index 934cf72..b583be3 100644
--- a/android/apex.go
+++ b/android/apex.go
@@ -711,8 +711,8 @@
// NewApexContents creates and initializes an ApexContents that is suitable
// for use with an apex module.
-// * contents is a map from a module name to information about its membership within
-// the apex.
+// - contents is a map from a module name to information about its membership within
+// the apex.
func NewApexContents(contents map[string]ApexMembership) *ApexContents {
return &ApexContents{
contents: contents,
diff --git a/android/arch.go b/android/arch.go
index b5bd2f0..a0895ed 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -524,26 +524,29 @@
// archMutator splits a module into a variant for each Target requested by the module. Target selection
// for a module is in three levels, OsClass, multilib, and then Target.
// OsClass selection is determined by:
-// - The HostOrDeviceSupported value passed in to InitAndroidArchModule by the module type factory, which selects
-// whether the module type can compile for host, device or both.
-// - The host_supported and device_supported properties on the module.
+// - The HostOrDeviceSupported value passed in to InitAndroidArchModule by the module type factory, which selects
+// whether the module type can compile for host, device or both.
+// - The host_supported and device_supported properties on the module.
+//
// If host is supported for the module, the Host and HostCross OsClasses are selected. If device is supported
// for the module, the Device OsClass is selected.
// Within each selected OsClass, the multilib selection is determined by:
-// - The compile_multilib property if it set (which may be overridden by target.android.compile_multilib or
-// target.host.compile_multilib).
-// - The default multilib passed to InitAndroidArchModule if compile_multilib was not set.
+// - The compile_multilib property if it set (which may be overridden by target.android.compile_multilib or
+// target.host.compile_multilib).
+// - The default multilib passed to InitAndroidArchModule if compile_multilib was not set.
+//
// Valid multilib values include:
-// "both": compile for all Targets supported by the OsClass (generally x86_64 and x86, or arm64 and arm).
-// "first": compile for only a single preferred Target supported by the OsClass. This is generally x86_64 or arm64,
-// but may be arm for a 32-bit only build.
-// "32": compile for only a single 32-bit Target supported by the OsClass.
-// "64": compile for only a single 64-bit Target supported by the OsClass.
-// "common": compile a for a single Target that will work on all Targets supported by the OsClass (for example Java).
-// "common_first": compile a for a Target that will work on all Targets supported by the OsClass
-// (same as "common"), plus a second Target for the preferred Target supported by the OsClass
-// (same as "first"). This is used for java_binary that produces a common .jar and a wrapper
-// executable script.
+//
+// "both": compile for all Targets supported by the OsClass (generally x86_64 and x86, or arm64 and arm).
+// "first": compile for only a single preferred Target supported by the OsClass. This is generally x86_64 or arm64,
+// but may be arm for a 32-bit only build.
+// "32": compile for only a single 32-bit Target supported by the OsClass.
+// "64": compile for only a single 64-bit Target supported by the OsClass.
+// "common": compile a for a single Target that will work on all Targets supported by the OsClass (for example Java).
+// "common_first": compile a for a Target that will work on all Targets supported by the OsClass
+// (same as "common"), plus a second Target for the preferred Target supported by the OsClass
+// (same as "first"). This is used for java_binary that produces a common .jar and a wrapper
+// executable script.
//
// Once the list of Targets is determined, the module is split into a variant for each Target.
//
@@ -1215,11 +1218,13 @@
// Returns the struct containing the properties specific to the given
// architecture type. These look like this in Blueprint files:
-// arch: {
-// arm64: {
-// key: value,
-// },
-// },
+//
+// arch: {
+// arm64: {
+// key: value,
+// },
+// },
+//
// This struct will also contain sub-structs containing to the architecture/CPU
// variants and features that themselves contain properties specific to those.
func getArchTypeStruct(ctx ArchVariantContext, archProperties interface{}, archType ArchType) (reflect.Value, bool) {
@@ -1231,11 +1236,12 @@
// Returns the struct containing the properties specific to a given multilib
// value. These look like this in the Blueprint file:
-// multilib: {
-// lib32: {
-// key: value,
-// },
-// },
+//
+// multilib: {
+// lib32: {
+// key: value,
+// },
+// },
func getMultilibStruct(ctx ArchVariantContext, archProperties interface{}, archType ArchType) (reflect.Value, bool) {
archPropValues := reflect.ValueOf(archProperties).Elem()
multilibProp := archPropValues.FieldByName("Multilib").Elem()
@@ -2010,9 +2016,10 @@
// arch-variant properties correspond to the values of the properties of the 'propertySet' struct
// that are specific to that axis/configuration. Each axis is independent, containing
// non-overlapping configs that correspond to the various "arch-variant" support, at this time:
-// arches (including multilib)
-// oses
-// arch+os combinations
+//
+// arches (including multilib)
+// oses
+// arch+os combinations
//
// For example, passing a struct { Foo bool, Bar string } will return an interface{} that can be
// type asserted back into the same struct, containing the config-specific property value specified
@@ -2165,17 +2172,21 @@
// Returns a struct matching the propertySet interface, containing properties specific to the targetName
// For example, given these arguments:
-// propertySet = BaseCompilerProperties
-// targetName = "android_arm"
+//
+// propertySet = BaseCompilerProperties
+// targetName = "android_arm"
+//
// And given this Android.bp fragment:
-// target:
-// android_arm: {
-// srcs: ["foo.c"],
-// }
-// android_arm64: {
-// srcs: ["bar.c"],
-// }
-// }
+//
+// target:
+// android_arm: {
+// srcs: ["foo.c"],
+// }
+// android_arm64: {
+// srcs: ["bar.c"],
+// }
+// }
+//
// This would return a BaseCompilerProperties with BaseCompilerProperties.Srcs = ["foo.c"]
func getTargetStructs(ctx ArchVariantContext, archProperties []interface{}, targetName string) []reflect.Value {
var propertyStructs []reflect.Value
diff --git a/android/bazel_paths.go b/android/bazel_paths.go
index c030aa8..bbdae96 100644
--- a/android/bazel_paths.go
+++ b/android/bazel_paths.go
@@ -221,9 +221,13 @@
// Transform a path (if necessary) to acknowledge package boundaries
//
// e.g. something like
-// async_safe/include/async_safe/CHECK.h
+//
+// async_safe/include/async_safe/CHECK.h
+//
// might become
-// //bionic/libc/async_safe:include/async_safe/CHECK.h
+//
+// //bionic/libc/async_safe:include/async_safe/CHECK.h
+//
// if the "async_safe" directory is actually a package and not just a directory.
//
// In particular, paths that extend into packages are transformed into absolute labels beginning with //.
@@ -303,20 +307,21 @@
// directory and Bazel target labels, excluding those included in the excludes argument (which
// should already be expanded to resolve references to Soong-modules). Valid elements of paths
// include:
-// * filepath, relative to local module directory, resolves as a filepath relative to the local
-// source directory
-// * glob, relative to the local module directory, resolves as filepath(s), relative to the local
-// module directory. Because Soong does not have a concept of crossing package boundaries, the
-// glob as computed by Soong may contain paths that cross package-boundaries that would be
-// unknowingly omitted if the glob were handled by Bazel. To allow identification and detect
-// (within Bazel) use of paths that cross package boundaries, we expand globs within Soong rather
-// than converting Soong glob syntax to Bazel glob syntax. **Invalid for excludes.**
-// * other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
-// or OutputFileProducer. These resolve as a Bazel label for a target. If the Bazel target is in
-// the local module directory, it will be returned relative to the current package (e.g.
-// ":<target>"). Otherwise, it will be returned as an absolute Bazel label (e.g.
-// "//path/to/dir:<target>"). If the reference to another module cannot be resolved,the function
-// will panic.
+// - filepath, relative to local module directory, resolves as a filepath relative to the local
+// source directory
+// - glob, relative to the local module directory, resolves as filepath(s), relative to the local
+// module directory. Because Soong does not have a concept of crossing package boundaries, the
+// glob as computed by Soong may contain paths that cross package-boundaries that would be
+// unknowingly omitted if the glob were handled by Bazel. To allow identification and detect
+// (within Bazel) use of paths that cross package boundaries, we expand globs within Soong rather
+// than converting Soong glob syntax to Bazel glob syntax. **Invalid for excludes.**
+// - other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
+// or OutputFileProducer. These resolve as a Bazel label for a target. If the Bazel target is in
+// the local module directory, it will be returned relative to the current package (e.g.
+// ":<target>"). Otherwise, it will be returned as an absolute Bazel label (e.g.
+// "//path/to/dir:<target>"). If the reference to another module cannot be resolved,the function
+// will panic.
+//
// Properties passed as the paths or excludes argument must have been annotated with struct tag
// `android:"path"` so that dependencies on other modules will have already been handled by the
// path_deps mutator.
diff --git a/android/bazel_test.go b/android/bazel_test.go
index e14649e..da4a915 100644
--- a/android/bazel_test.go
+++ b/android/bazel_test.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/android/config_bp2build.go b/android/config_bp2build.go
index 748be62..d6b2bcf 100644
--- a/android/config_bp2build.go
+++ b/android/config_bp2build.go
@@ -240,10 +240,12 @@
// ExportedVariableReferenceDictVariables is a mapping from variable names to a
// dictionary which references previously defined variables. This is used to
// create a Starlark output such as:
-// string_var1 = "string1
-// var_ref_dict_var1 = {
-// "key1": string_var1
-// }
+//
+// string_var1 = "string1
+// var_ref_dict_var1 = {
+// "key1": string_var1
+// }
+//
// This type of variable collection must be expanded last so that it recognizes
// previously defined variables.
type ExportedVariableReferenceDictVariables map[string]map[string]string
diff --git a/android/defaults.go b/android/defaults.go
index 54f44bc..03b2efb 100644
--- a/android/defaults.go
+++ b/android/defaults.go
@@ -151,12 +151,12 @@
// retrieve the values it is necessary to iterate over properties(). E.g. to get
// the commonProperties instance that have the real values:
//
-// d := myModule.(Defaults)
-// for _, props := range d.properties() {
-// if cp, ok := props.(*commonProperties); ok {
-// ... access property values in cp ...
-// }
-// }
+// d := myModule.(Defaults)
+// for _, props := range d.properties() {
+// if cp, ok := props.(*commonProperties); ok {
+// ... access property values in cp ...
+// }
+// }
//
// The rationale is that the properties on a defaults module apply to the
// defaultable modules using it, not to the defaults module itself. E.g. setting
diff --git a/android/fixture.go b/android/fixture.go
index 0690a5a..f718935 100644
--- a/android/fixture.go
+++ b/android/fixture.go
@@ -420,11 +420,13 @@
// instances.
//
// base - a list of already flattened and deduped preparers that will be applied first before
-// the list of additional preparers. Any duplicates of these in the additional preparers
-// will be ignored.
+//
+// the list of additional preparers. Any duplicates of these in the additional preparers
+// will be ignored.
//
// preparers - a list of additional unflattened, undeduped preparers that will be applied after the
-// base preparers.
+//
+// base preparers.
//
// Returns a deduped and flattened list of the preparers starting with the ones in base with any
// additional ones from the preparers list added afterwards.
@@ -498,10 +500,10 @@
// FixtureErrorHandler determines how to respond to errors reported by the code under test.
//
// Some possible responses:
-// * Fail the test if any errors are reported, see FixtureExpectsNoErrors.
-// * Fail the test if at least one error that matches a pattern is not reported see
-// FixtureExpectsAtLeastOneErrorMatchingPattern
-// * Fail the test if any unexpected errors are reported.
+// - Fail the test if any errors are reported, see FixtureExpectsNoErrors.
+// - Fail the test if at least one error that matches a pattern is not reported see
+// FixtureExpectsAtLeastOneErrorMatchingPattern
+// - Fail the test if any unexpected errors are reported.
//
// Although at the moment all the error handlers are implemented as simply a wrapper around a
// function this is defined as an interface to allow future enhancements, e.g. provide different
@@ -866,10 +868,12 @@
// that produced this result.
//
// e.g. assuming that this result was created by running:
-// GroupFixturePreparers(preparer1, preparer2, preparer3).RunTest(t)
+//
+// GroupFixturePreparers(preparer1, preparer2, preparer3).RunTest(t)
//
// Then this method will be equivalent to running:
-// GroupFixturePreparers(preparer1, preparer2, preparer3)
+//
+// GroupFixturePreparers(preparer1, preparer2, preparer3)
//
// This is intended for use by tests whose output is Android.bp files to verify that those files
// are valid, e.g. tests of the snapshots produced by the sdk module type.
diff --git a/android/module.go b/android/module.go
index a75a3cc..bf62080 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1109,7 +1109,7 @@
// property structs for architecture-specific versions of generic properties tagged with
// `android:"arch_variant"`.
//
-// InitAndroidModule should not be called if InitAndroidArchModule was called.
+// InitAndroidModule should not be called if InitAndroidArchModule was called.
func InitAndroidArchModule(m Module, hod HostOrDeviceSupported, defaultMultilib Multilib) {
InitAndroidModule(m)
diff --git a/android/paths.go b/android/paths.go
index f8e7018..74d9f13 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -387,20 +387,21 @@
}
// PathsForModuleSrc returns a Paths{} containing the resolved references in paths:
-// * filepath, relative to local module directory, resolves as a filepath relative to the local
-// source directory
-// * glob, relative to the local module directory, resolves as filepath(s), relative to the local
-// source directory.
-// * other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
-// or OutputFileProducer. These resolve as a filepath to an output filepath or generated source
-// filepath.
+// - filepath, relative to local module directory, resolves as a filepath relative to the local
+// source directory
+// - glob, relative to the local module directory, resolves as filepath(s), relative to the local
+// source directory.
+// - other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
+// or OutputFileProducer. These resolve as a filepath to an output filepath or generated source
+// filepath.
+//
// Properties passed as the paths argument must have been annotated with struct tag
// `android:"path"` so that dependencies on SourceFileProducer modules will have already been handled by the
// path_deps mutator.
// If a requested module is not found as a dependency:
-// * if ctx.Config().AllowMissingDependencies() is true, this module to be marked as having
+// - if ctx.Config().AllowMissingDependencies() is true, this module to be marked as having
// missing dependencies
-// * otherwise, a ModuleError is thrown.
+// - otherwise, a ModuleError is thrown.
func PathsForModuleSrc(ctx ModuleMissingDepsPathContext, paths []string) Paths {
return PathsForModuleSrcExcludes(ctx, paths, nil)
}
@@ -414,21 +415,22 @@
// PathsForModuleSrcExcludes returns a Paths{} containing the resolved references in paths, minus
// those listed in excludes. Elements of paths and excludes are resolved as:
-// * filepath, relative to local module directory, resolves as a filepath relative to the local
-// source directory
-// * glob, relative to the local module directory, resolves as filepath(s), relative to the local
-// source directory. Not valid in excludes.
-// * other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
-// or OutputFileProducer. These resolve as a filepath to an output filepath or generated source
-// filepath.
+// - filepath, relative to local module directory, resolves as a filepath relative to the local
+// source directory
+// - glob, relative to the local module directory, resolves as filepath(s), relative to the local
+// source directory. Not valid in excludes.
+// - other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
+// or OutputFileProducer. These resolve as a filepath to an output filepath or generated source
+// filepath.
+//
// excluding the items (similarly resolved
// Properties passed as the paths argument must have been annotated with struct tag
// `android:"path"` so that dependencies on SourceFileProducer modules will have already been handled by the
// path_deps mutator.
// If a requested module is not found as a dependency:
-// * if ctx.Config().AllowMissingDependencies() is true, this module to be marked as having
+// - if ctx.Config().AllowMissingDependencies() is true, this module to be marked as having
// missing dependencies
-// * otherwise, a ModuleError is thrown.
+// - otherwise, a ModuleError is thrown.
func PathsForModuleSrcExcludes(ctx ModuleMissingDepsPathContext, paths, excludes []string) Paths {
return PathsRelativeToModuleSourceDir(SourceInput{
Context: ctx,
@@ -548,13 +550,14 @@
// PathsAndMissingDepsForModuleSrcExcludes returns a Paths{} containing the resolved references in
// paths, minus those listed in excludes. Elements of paths and excludes are resolved as:
-// * filepath, relative to local module directory, resolves as a filepath relative to the local
-// source directory
-// * glob, relative to the local module directory, resolves as filepath(s), relative to the local
-// source directory. Not valid in excludes.
-// * other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
-// or OutputFileProducer. These resolve as a filepath to an output filepath or generated source
-// filepath.
+// - filepath, relative to local module directory, resolves as a filepath relative to the local
+// source directory
+// - glob, relative to the local module directory, resolves as filepath(s), relative to the local
+// source directory. Not valid in excludes.
+// - other modules using the ":name{.tag}" syntax. These modules must implement SourceFileProducer
+// or OutputFileProducer. These resolve as a filepath to an output filepath or generated source
+// filepath.
+//
// and a list of the module names of missing module dependencies are returned as the second return.
// Properties passed as the paths argument must have been annotated with struct tag
// `android:"path"` so that dependencies on SourceFileProducer modules will have already been handled by the
diff --git a/android/register.go b/android/register.go
index 4ff8fff..5832b1b 100644
--- a/android/register.go
+++ b/android/register.go
@@ -258,20 +258,20 @@
// Used to register build components from an init() method, e.g.
//
-// init() {
-// RegisterBuildComponents(android.InitRegistrationContext)
-// }
+// init() {
+// RegisterBuildComponents(android.InitRegistrationContext)
+// }
//
-// func RegisterBuildComponents(ctx android.RegistrationContext) {
-// ctx.RegisterModuleType(...)
-// ...
-// }
+// func RegisterBuildComponents(ctx android.RegistrationContext) {
+// ctx.RegisterModuleType(...)
+// ...
+// }
//
// Extracting the actual registration into a separate RegisterBuildComponents(ctx) function
// allows it to be used to initialize test context, e.g.
//
-// ctx := android.NewTestContext(config)
-// RegisterBuildComponents(ctx)
+// ctx := android.NewTestContext(config)
+// RegisterBuildComponents(ctx)
var InitRegistrationContext RegistrationContext = &initRegistrationContext{
moduleTypes: make(map[string]ModuleFactory),
singletonTypes: make(map[string]SingletonFactory),
diff --git a/android/rule_builder.go b/android/rule_builder.go
index 11da36c..155fbdf 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -1031,7 +1031,8 @@
// be also added to the dependencies returned by RuleBuilder.Tools.
//
// It is equivalent to:
-// cmd.Tool(ctx.Config().HostToolPath(ctx, tool))
+//
+// cmd.Tool(ctx.Config().HostToolPath(ctx, tool))
func (c *RuleBuilderCommand) BuiltTool(tool string) *RuleBuilderCommand {
if c.rule.ctx.Config().UseHostMusl() {
// If the host is using musl, assume that the tool was built against musl libc and include
@@ -1053,7 +1054,8 @@
// dependencies returned by RuleBuilder.Tools.
//
// It is equivalent to:
-// cmd.Tool(ctx.Config().PrebuiltBuildTool(ctx, tool))
+//
+// cmd.Tool(ctx.Config().PrebuiltBuildTool(ctx, tool))
func (c *RuleBuilderCommand) PrebuiltBuildTool(ctx PathContext, tool string) *RuleBuilderCommand {
return c.Tool(ctx.Config().PrebuiltBuildTool(ctx, tool))
}
diff --git a/android/sdk.go b/android/sdk.go
index a71f7f2..a477cba 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -430,13 +430,13 @@
// required for some members but not others. Traits can cause additional information to be output
// to the sdk snapshot or replace the default information exported for a member with something else.
// e.g.
-// * By default cc libraries only export the default image variants to the SDK. However, for some
-// members it may be necessary to export specific image variants, e.g. vendor, or recovery.
-// * By default cc libraries export all the configured architecture variants except for the native
-// bridge architecture variants. However, for some members it may be necessary to export the
-// native bridge architecture variants as well.
-// * By default cc libraries export the platform variant (i.e. sdk:). However, for some members it
-// may be necessary to export the sdk variant (i.e. sdk:sdk).
+// - By default cc libraries only export the default image variants to the SDK. However, for some
+// members it may be necessary to export specific image variants, e.g. vendor, or recovery.
+// - By default cc libraries export all the configured architecture variants except for the native
+// bridge architecture variants. However, for some members it may be necessary to export the
+// native bridge architecture variants as well.
+// - By default cc libraries export the platform variant (i.e. sdk:). However, for some members it
+// may be necessary to export the sdk variant (i.e. sdk:sdk).
//
// A sdk can request a module to provide no traits, one trait or a collection of traits. The exact
// behavior of a trait is determined by how SdkMemberType implementations handle the traits. A trait
@@ -447,17 +447,17 @@
// SdkPropertyName(). Each property contains a list of modules that are required to have that trait.
// e.g. something like this:
//
-// sdk {
-// name: "sdk",
-// ...
-// traits: {
-// recovery_image: ["module1", "module4", "module5"],
-// native_bridge: ["module1", "module2"],
-// native_sdk: ["module1", "module3"],
-// ...
-// },
-// ...
-// }
+// sdk {
+// name: "sdk",
+// ...
+// traits: {
+// recovery_image: ["module1", "module4", "module5"],
+// native_bridge: ["module1", "module2"],
+// native_sdk: ["module1", "module3"],
+// ...
+// },
+// ...
+// }
type SdkMemberTrait interface {
// SdkPropertyName returns the name of the traits property on an sdk module.
SdkPropertyName() string
@@ -639,20 +639,19 @@
// The basic implementation should look something like this, where ModuleType is
// the name of the module type being supported.
//
-// type moduleTypeSdkMemberType struct {
-// android.SdkMemberTypeBase
-// }
+// type moduleTypeSdkMemberType struct {
+// android.SdkMemberTypeBase
+// }
//
-// func init() {
-// android.RegisterSdkMemberType(&moduleTypeSdkMemberType{
-// SdkMemberTypeBase: android.SdkMemberTypeBase{
-// PropertyName: "module_types",
-// },
-// }
-// }
+// func init() {
+// android.RegisterSdkMemberType(&moduleTypeSdkMemberType{
+// SdkMemberTypeBase: android.SdkMemberTypeBase{
+// PropertyName: "module_types",
+// },
+// }
+// }
//
-// ...methods...
-//
+// ...methods...
type SdkMemberType interface {
// SdkPropertyName returns the name of the member type property on an sdk module.
SdkPropertyName() string
diff --git a/android/soong_config_modules.go b/android/soong_config_modules.go
index bd73645..b25f248 100644
--- a/android/soong_config_modules.go
+++ b/android/soong_config_modules.go
@@ -190,77 +190,78 @@
//
// Each soong_config_variable supports an additional value `conditions_default`. The properties
// specified in `conditions_default` will only be used under the following conditions:
-// bool variable: the variable is unspecified or not set to a true value
-// value variable: the variable is unspecified
-// string variable: the variable is unspecified or the variable is set to a string unused in the
-// given module. For example, string variable `test` takes values: "a" and "b",
-// if the module contains a property `a` and `conditions_default`, when test=b,
-// the properties under `conditions_default` will be used. To specify that no
-// properties should be amended for `b`, you can set `b: {},`.
+//
+// bool variable: the variable is unspecified or not set to a true value
+// value variable: the variable is unspecified
+// string variable: the variable is unspecified or the variable is set to a string unused in the
+// given module. For example, string variable `test` takes values: "a" and "b",
+// if the module contains a property `a` and `conditions_default`, when test=b,
+// the properties under `conditions_default` will be used. To specify that no
+// properties should be amended for `b`, you can set `b: {},`.
//
// For example, an Android.bp file could have:
//
-// soong_config_module_type {
-// name: "acme_cc_defaults",
-// module_type: "cc_defaults",
-// config_namespace: "acme",
-// variables: ["board"],
-// bool_variables: ["feature"],
-// value_variables: ["width"],
-// properties: ["cflags", "srcs"],
-// }
+// soong_config_module_type {
+// name: "acme_cc_defaults",
+// module_type: "cc_defaults",
+// config_namespace: "acme",
+// variables: ["board"],
+// bool_variables: ["feature"],
+// value_variables: ["width"],
+// properties: ["cflags", "srcs"],
+// }
//
-// soong_config_string_variable {
-// name: "board",
-// values: ["soc_a", "soc_b"],
-// }
+// soong_config_string_variable {
+// name: "board",
+// values: ["soc_a", "soc_b"],
+// }
//
-// acme_cc_defaults {
-// name: "acme_defaults",
-// cflags: ["-DGENERIC"],
-// soong_config_variables: {
-// board: {
-// soc_a: {
-// cflags: ["-DSOC_A"],
-// },
-// soc_b: {
-// cflags: ["-DSOC_B"],
-// },
-// conditions_default: {
-// cflags: ["-DSOC_DEFAULT"],
-// },
-// },
-// feature: {
-// cflags: ["-DFEATURE"],
-// conditions_default: {
-// cflags: ["-DFEATURE_DEFAULT"],
-// },
-// },
-// width: {
-// cflags: ["-DWIDTH=%s"],
-// conditions_default: {
-// cflags: ["-DWIDTH=DEFAULT"],
-// },
-// },
-// },
-// }
+// acme_cc_defaults {
+// name: "acme_defaults",
+// cflags: ["-DGENERIC"],
+// soong_config_variables: {
+// board: {
+// soc_a: {
+// cflags: ["-DSOC_A"],
+// },
+// soc_b: {
+// cflags: ["-DSOC_B"],
+// },
+// conditions_default: {
+// cflags: ["-DSOC_DEFAULT"],
+// },
+// },
+// feature: {
+// cflags: ["-DFEATURE"],
+// conditions_default: {
+// cflags: ["-DFEATURE_DEFAULT"],
+// },
+// },
+// width: {
+// cflags: ["-DWIDTH=%s"],
+// conditions_default: {
+// cflags: ["-DWIDTH=DEFAULT"],
+// },
+// },
+// },
+// }
//
-// cc_library {
-// name: "libacme_foo",
-// defaults: ["acme_defaults"],
-// srcs: ["*.cpp"],
-// }
+// cc_library {
+// name: "libacme_foo",
+// defaults: ["acme_defaults"],
+// srcs: ["*.cpp"],
+// }
//
// If an acme BoardConfig.mk file contained:
//
-// SOONG_CONFIG_NAMESPACES += acme
-// SOONG_CONFIG_acme += \
-// board \
-// feature \
+// SOONG_CONFIG_NAMESPACES += acme
+// SOONG_CONFIG_acme += \
+// board \
+// feature \
//
-// SOONG_CONFIG_acme_board := soc_a
-// SOONG_CONFIG_acme_feature := true
-// SOONG_CONFIG_acme_width := 200
+// SOONG_CONFIG_acme_board := soc_a
+// SOONG_CONFIG_acme_feature := true
+// SOONG_CONFIG_acme_width := 200
//
// Then libacme_foo would build with cflags "-DGENERIC -DSOC_A -DFEATURE".
func SoongConfigModuleTypeFactory() Module {
diff --git a/android/soongconfig/modules.go b/android/soongconfig/modules.go
index 212b752..7d21b75 100644
--- a/android/soongconfig/modules.go
+++ b/android/soongconfig/modules.go
@@ -343,23 +343,26 @@
//
// For example, the acme_cc_defaults example above would
// produce a reflect.Value whose type is:
-// *struct {
-// Soong_config_variables struct {
-// Board struct {
-// Soc_a interface{}
-// Soc_b interface{}
-// }
-// }
-// }
+//
+// *struct {
+// Soong_config_variables struct {
+// Board struct {
+// Soc_a interface{}
+// Soc_b interface{}
+// }
+// }
+// }
+//
// And whose value is:
-// &{
-// Soong_config_variables: {
-// Board: {
-// Soc_a: (*struct{ Cflags []string })(nil),
-// Soc_b: (*struct{ Cflags []string })(nil),
-// },
-// },
-// }
+//
+// &{
+// Soong_config_variables: {
+// Board: {
+// Soc_a: (*struct{ Cflags []string })(nil),
+// Soc_b: (*struct{ Cflags []string })(nil),
+// },
+// },
+// }
func CreateProperties(factory blueprint.ModuleFactory, moduleType *ModuleType) reflect.Value {
var fields []reflect.StructField
diff --git a/android/testing.go b/android/testing.go
index 85bdca4..b4429ca 100644
--- a/android/testing.go
+++ b/android/testing.go
@@ -688,17 +688,17 @@
//
// The parts of this structure which are changed are:
// * BuildParams
-// * Args
-// * All Path, Paths, WritablePath and WritablePaths fields.
+// - Args
+// - All Path, Paths, WritablePath and WritablePaths fields.
//
// * RuleParams
-// * Command
-// * Depfile
-// * Rspfile
-// * RspfileContent
-// * SymlinkOutputs
-// * CommandDeps
-// * CommandOrderOnly
+// - Command
+// - Depfile
+// - Rspfile
+// - RspfileContent
+// - SymlinkOutputs
+// - CommandDeps
+// - CommandOrderOnly
//
// See PathRelativeToTop for more details.
//
diff --git a/android/variable.go b/android/variable.go
index 86b8c8f..2d7b0bf 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -702,20 +702,20 @@
//
// If the ProductConfigProperties map contains these items, as parsed from the .bp file:
//
-// library_linking_strategy: {
-// prefer_static: {
-// static_libs: [
-// "lib_a",
-// "lib_b",
-// ],
-// },
-// conditions_default: {
-// shared_libs: [
-// "lib_a",
-// "lib_b",
-// ],
-// },
-// },
+// library_linking_strategy: {
+// prefer_static: {
+// static_libs: [
+// "lib_a",
+// "lib_b",
+// ],
+// },
+// conditions_default: {
+// shared_libs: [
+// "lib_a",
+// "lib_b",
+// ],
+// },
+// },
//
// Static_libs {Library_linking_strategy ANDROID prefer_static} [lib_a lib_b]
// Shared_libs {Library_linking_strategy ANDROID conditions_default} [lib_a lib_b]
@@ -728,13 +728,13 @@
// instead of putting lib_a and lib_b directly into dynamic_deps without a
// select:
//
-// dynamic_deps = select({
-// "//build/bazel/product_variables:android__library_linking_strategy__prefer_static": [],
-// "//conditions:default": [
-// "//foo/bar:lib_a",
-// "//foo/bar:lib_b",
-// ],
-// }),
+// dynamic_deps = select({
+// "//build/bazel/product_variables:android__library_linking_strategy__prefer_static": [],
+// "//conditions:default": [
+// "//foo/bar:lib_a",
+// "//foo/bar:lib_b",
+// ],
+// }),
func (props *ProductConfigProperties) zeroValuesForNamespacedVariables() {
// A map of product config properties to the zero values of their respective
// property value.
diff --git a/androidmk/androidmk/androidmk.go b/androidmk/androidmk/androidmk.go
index aaafdc7..2e8810f 100644
--- a/androidmk/androidmk/androidmk.go
+++ b/androidmk/androidmk/androidmk.go
@@ -421,9 +421,9 @@
// For example, if prefix is "foo" and name is "bar" with a value of "baz", then
// the following variable will be generated:
//
-// foo {
-// bar: "baz"
-// }
+// foo {
+// bar: "baz"
+// }
//
// If prefix is the empty string and name is "foo" with a value of "bar", the
// following variable will be generated (if it is a property):
diff --git a/androidmk/parser/make_strings.go b/androidmk/parser/make_strings.go
index 8afbe7e..be36859 100644
--- a/androidmk/parser/make_strings.go
+++ b/androidmk/parser/make_strings.go
@@ -38,10 +38,10 @@
// For example, "$(FOO)/bar/baz" will be represented as the
// following lists:
//
-// {
-// Strings: ["", "/bar/baz"],
-// Variables: ["FOO"]
-// }
+// {
+// Strings: ["", "/bar/baz"],
+// Variables: ["FOO"]
+// }
type MakeString struct {
StringPos Pos
Strings []string
diff --git a/apex/bp2build.go b/apex/bp2build.go
index 221ab13..d28f512 100644
--- a/apex/bp2build.go
+++ b/apex/bp2build.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/apex/key.go b/apex/key.go
index 9c5bb05..d449589 100644
--- a/apex/key.go
+++ b/apex/key.go
@@ -105,7 +105,7 @@
m.keyName = pubKeyName
}
-////////////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////////
// apex_keys_text
type apexKeysText struct {
output android.OutputPath
diff --git a/apex/prebuilt.go b/apex/prebuilt.go
index 187e0df..172a201 100644
--- a/apex/prebuilt.go
+++ b/apex/prebuilt.go
@@ -364,16 +364,16 @@
// While it may be possible to provide sufficient information to determine whether two prebuilt_apex
// modules were compatible it would be a lot of work and would not provide much benefit for a couple
// of reasons:
-// * The number of prebuilt_apex modules that will be exporting files for the same module will be
-// low as the prebuilt_apex only exports files for the direct dependencies that require it and
-// very few modules are direct dependencies of multiple prebuilt_apex modules, e.g. there are a
-// few com.android.art* apex files that contain the same contents and could export files for the
-// same modules but only one of them needs to do so. Contrast that with source apex modules which
-// need apex specific variants for every module that contributes code to the apex, whether direct
-// or indirect.
-// * The build cost of a prebuilt_apex variant is generally low as at worst it will involve some
-// extra copying of files. Contrast that with source apex modules that has to build each variant
-// from source.
+// - The number of prebuilt_apex modules that will be exporting files for the same module will be
+// low as the prebuilt_apex only exports files for the direct dependencies that require it and
+// very few modules are direct dependencies of multiple prebuilt_apex modules, e.g. there are a
+// few com.android.art* apex files that contain the same contents and could export files for the
+// same modules but only one of them needs to do so. Contrast that with source apex modules which
+// need apex specific variants for every module that contributes code to the apex, whether direct
+// or indirect.
+// - The build cost of a prebuilt_apex variant is generally low as at worst it will involve some
+// extra copying of files. Contrast that with source apex modules that has to build each variant
+// from source.
func (p *prebuiltCommon) apexInfoMutator(mctx android.TopDownMutatorContext) {
// Collect direct dependencies into contents.
@@ -703,28 +703,29 @@
// e.g. make dex implementation jars available for java_import modules listed in exported_java_libs,
// it does so as follows:
//
-// 1. It creates a `deapexer` module that actually extracts the files from the `.apex` file and
-// makes them available for use by other modules, at both Soong and ninja levels.
+// 1. It creates a `deapexer` module that actually extracts the files from the `.apex` file and
+// makes them available for use by other modules, at both Soong and ninja levels.
//
-// 2. It adds a dependency onto those modules and creates an apex specific variant similar to what
-// an `apex` module does. That ensures that code which looks for specific apex variant, e.g.
-// dexpreopt, will work the same way from source and prebuilt.
+// 2. It adds a dependency onto those modules and creates an apex specific variant similar to what
+// an `apex` module does. That ensures that code which looks for specific apex variant, e.g.
+// dexpreopt, will work the same way from source and prebuilt.
//
-// 3. The `deapexer` module adds a dependency from the modules that require the exported files onto
-// itself so that they can retrieve the file paths to those files.
+// 3. The `deapexer` module adds a dependency from the modules that require the exported files onto
+// itself so that they can retrieve the file paths to those files.
//
// It also creates a child module `selector` that is responsible for selecting the appropriate
// input apex for both the prebuilt_apex and the deapexer. That is needed for a couple of reasons:
-// 1. To dedup the selection logic so it only runs in one module.
-// 2. To allow the deapexer to be wired up to a different source for the input apex, e.g. an
-// `apex_set`.
//
-// prebuilt_apex
-// / | \
-// / | \
-// V V V
-// selector <--- deapexer <--- exported java lib
+// 1. To dedup the selection logic so it only runs in one module.
//
+// 2. To allow the deapexer to be wired up to a different source for the input apex, e.g. an
+// `apex_set`.
+//
+// prebuilt_apex
+// / | \
+// / | \
+// V V V
+// selector <--- deapexer <--- exported java lib
func (p *Prebuilt) createPrebuiltApexModules(ctx android.TopDownMutatorContext) {
baseModuleName := p.BaseModuleName()
diff --git a/bazel/aquery.go b/bazel/aquery.go
index 418b143..05f6ed4 100644
--- a/bazel/aquery.go
+++ b/bazel/aquery.go
@@ -52,8 +52,9 @@
// AqueryDepset is a depset definition from Bazel's aquery response. This is
// akin to the `depSetOfFiles` in the response proto, except:
-// * direct artifacts are enumerated by full path instead of by ID
-// * it has a hash of the depset contents, instead of an int ID (for determinism)
+// - direct artifacts are enumerated by full path instead of by ID
+// - it has a hash of the depset contents, instead of an int ID (for determinism)
+//
// A depset is a data structure for efficient transitive handling of artifact
// paths. A single depset consists of one or more artifact paths and one or
// more "child" depsets.
diff --git a/bazel/properties.go b/bazel/properties.go
index bffd97b..963e27b 100644
--- a/bazel/properties.go
+++ b/bazel/properties.go
@@ -1225,15 +1225,18 @@
// DeduplicateAxesFromBase ensures no duplication of items between the no-configuration value and
// configuration-specific values. For example, if we would convert this StringListAttribute as:
-// ["a", "b", "c"] + select({
-// "//condition:one": ["a", "d"],
-// "//conditions:default": [],
-// })
+//
+// ["a", "b", "c"] + select({
+// "//condition:one": ["a", "d"],
+// "//conditions:default": [],
+// })
+//
// after this function, we would convert this StringListAttribute as:
-// ["a", "b", "c"] + select({
-// "//condition:one": ["d"],
-// "//conditions:default": [],
-// })
+//
+// ["a", "b", "c"] + select({
+// "//condition:one": ["d"],
+// "//conditions:default": [],
+// })
func (sla *StringListAttribute) DeduplicateAxesFromBase() {
base := sla.Value
for axis, configToList := range sla.ConfigurableValues {
diff --git a/bp2build/cc_prebuilt_library_conversion_test.go b/bp2build/cc_prebuilt_library_conversion_test.go
index 74ad005..32c3f4d 100644
--- a/bp2build/cc_prebuilt_library_conversion_test.go
+++ b/bp2build/cc_prebuilt_library_conversion_test.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/bp2build/cc_prebuilt_library_static_test.go b/bp2build/cc_prebuilt_library_static_test.go
index 7498e50..489a53d 100644
--- a/bp2build/cc_prebuilt_library_static_test.go
+++ b/bp2build/cc_prebuilt_library_static_test.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/bpfix/bpfix/bpfix.go b/bpfix/bpfix/bpfix.go
index 94b28dc..ddaa98a 100644
--- a/bpfix/bpfix/bpfix.go
+++ b/bpfix/bpfix/bpfix.go
@@ -553,7 +553,9 @@
// If a variable is LOCAL_MODULE, get its value from the 'name' attribute.
// This handles the statement
-// LOCAL_SRC_FILES := $(LOCAL_MODULE)
+//
+// LOCAL_SRC_FILES := $(LOCAL_MODULE)
+//
// which occurs often.
func resolveLocalModule(mod *parser.Module, val parser.Expression) parser.Expression {
if varLocalName, ok := val.(*parser.Variable); ok {
@@ -567,9 +569,9 @@
}
// etcPrebuiltModuleUpdate contains information on updating certain parts of a defined module such as:
-// * changing the module type from prebuilt_etc to a different one
-// * stripping the prefix of the install path based on the module type
-// * appending additional boolean properties to the prebuilt module
+// - changing the module type from prebuilt_etc to a different one
+// - stripping the prefix of the install path based on the module type
+// - appending additional boolean properties to the prebuilt module
type etcPrebuiltModuleUpdate struct {
// The prefix of the install path defined in local_module_path. The prefix is removed from local_module_path
// before setting the 'filename' attribute.
diff --git a/cc/afdo.go b/cc/afdo.go
index 66e9732..fb66bbe 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -66,8 +66,9 @@
}
// Get list of profile file names, ordered by level of specialisation. For example:
-// 1. libfoo_arm64.afdo
-// 2. libfoo.afdo
+// 1. libfoo_arm64.afdo
+// 2. libfoo.afdo
+//
// Add more specialisation as needed.
func getProfileFiles(ctx android.BaseModuleContext, moduleName string) []string {
var files []string
diff --git a/cc/fuzz.go b/cc/fuzz.go
index dfc718e..8a8c107 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -152,10 +152,10 @@
// IsValidSharedDependency takes a module and determines if it is a unique shared library
// that should be installed in the fuzz target output directories. This function
// returns true, unless:
-// - The module is not an installable shared library, or
-// - The module is a header or stub, or
-// - The module is a prebuilt and its source is available, or
-// - The module is a versioned member of an SDK snapshot.
+// - The module is not an installable shared library, or
+// - The module is a header or stub, or
+// - The module is a prebuilt and its source is available, or
+// - The module is a versioned member of an SDK snapshot.
func IsValidSharedDependency(dependency android.Module) bool {
// TODO(b/144090547): We should be parsing these modules using
// ModuleDependencyTag instead of the current brute-force checking.
diff --git a/cc/genrule.go b/cc/genrule.go
index 239064f..4ef990c 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -41,13 +41,13 @@
// variations. The following environment variables will be set when the command
// execute:
//
-// CC_ARCH the name of the architecture the command is being executed for
+// CC_ARCH the name of the architecture the command is being executed for
//
-// CC_MULTILIB "lib32" if the architecture the command is being executed for is 32-bit,
-// "lib64" if it is 64-bit.
+// CC_MULTILIB "lib32" if the architecture the command is being executed for is 32-bit,
+// "lib64" if it is 64-bit.
//
-// CC_NATIVE_BRIDGE the name of the subdirectory that native bridge libraries are stored in if
-// the architecture has native bridge enabled, empty if it is disabled.
+// CC_NATIVE_BRIDGE the name of the subdirectory that native bridge libraries are stored in if
+// the architecture has native bridge enabled, empty if it is disabled.
func GenRuleFactory() android.Module {
module := genrule.NewGenRule()
diff --git a/cc/image.go b/cc/image.go
index 921b2bb..e65a9aa 100644
--- a/cc/image.go
+++ b/cc/image.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go
index 56fd5fc..ef38a06 100644
--- a/cc/ndk_headers.go
+++ b/cc/ndk_headers.go
@@ -148,12 +148,12 @@
// to the sysroot base + "usr/include" + to directory + directory component.
// ndk_headers requires the license file to be specified. Example:
//
-// Given:
-// sysroot base = "ndk/sysroot"
-// from = "include/foo"
-// to = "bar"
-// header = "include/foo/woodly/doodly.h"
-// output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
+// Given:
+// sysroot base = "ndk/sysroot"
+// from = "include/foo"
+// to = "bar"
+// header = "include/foo/woodly/doodly.h"
+// output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
func ndkHeadersFactory() android.Module {
module := &headerModule{}
module.AddProperties(&module.properties)
@@ -275,15 +275,17 @@
return module
}
-// preprocessed_ndk_header {
-// name: "foo",
-// preprocessor: "foo.sh",
-// srcs: [...],
-// to: "android",
-// }
+// preprocessed_ndk_header {
+// name: "foo",
+// preprocessor: "foo.sh",
+// srcs: [...],
+// to: "android",
+// }
//
// Will invoke the preprocessor as:
-// $preprocessor -o $SYSROOT/usr/include/android/needs_preproc.h $src
+//
+// $preprocessor -o $SYSROOT/usr/include/android/needs_preproc.h $src
+//
// For each src in srcs.
type preprocessedHeadersProperties struct {
// The preprocessor to run. Must be a program inside the source directory
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 0879257..2bbfc4a 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -84,12 +84,11 @@
//
// Example:
//
-// ndk_library {
-// name: "libfoo",
-// symbol_file: "libfoo.map.txt",
-// first_version: "9",
-// }
-//
+// ndk_library {
+// name: "libfoo",
+// symbol_file: "libfoo.map.txt",
+// first_version: "9",
+// }
type libraryProperties struct {
// Relative path to the symbol map.
// An example file can be seen here: TODO(danalbert): Make an example.
diff --git a/cc/prebuilt.go b/cc/prebuilt.go
index 8c404d3..a2d4503 100644
--- a/cc/prebuilt.go
+++ b/cc/prebuilt.go
@@ -348,10 +348,10 @@
// TODO(b/228623543): The below is not entirely true until the bug is fixed. For now, both targets are always generated
// Implements bp2build for cc_prebuilt_library modules. This will generate:
-// * Only a prebuilt_library_static if the shared.enabled property is set to false across all variants.
-// * Only a prebuilt_library_shared if the static.enabled property is set to false across all variants
-// * Both a prebuilt_library_static and prebuilt_library_shared if the aforementioned properties are not false across
-// all variants
+// - Only a prebuilt_library_static if the shared.enabled property is set to false across all variants.
+// - Only a prebuilt_library_shared if the static.enabled property is set to false across all variants
+// - Both a prebuilt_library_static and prebuilt_library_shared if the aforementioned properties are not false across
+// all variants
//
// In all cases, prebuilt_library_static target names will be appended with "_bp2build_cc_library_static".
func prebuiltLibraryBp2Build(ctx android.TopDownMutatorContext, module *Module) {
diff --git a/cc/snapshot_prebuilt.go b/cc/snapshot_prebuilt.go
index 9d40ad0..792ffe3 100644
--- a/cc/snapshot_prebuilt.go
+++ b/cc/snapshot_prebuilt.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -263,12 +263,12 @@
// version, snapshot arch, etc. It also adds a special suffix to Soong module name, so it doesn't
// collide with source modules. e.g. the following example module,
//
-// vendor_snapshot_static {
-// name: "libbase",
-// arch: "arm64",
-// version: 30,
-// ...
-// }
+// vendor_snapshot_static {
+// name: "libbase",
+// arch: "arm64",
+// version: 30,
+// ...
+// }
//
// will be seen as "libbase.vendor_static.30.arm64" by Soong.
type BaseSnapshotDecorator struct {
@@ -370,7 +370,6 @@
}
}
-//
// Module definitions for snapshots of libraries (shared, static, header).
//
// Modules (vendor|recovery)_snapshot_(shared|static|header) are defined here. Shared libraries and
@@ -630,7 +629,6 @@
var _ snapshotSanitizer = (*snapshotLibraryDecorator)(nil)
-//
// Module definitions for snapshots of executable binaries.
//
// Modules (vendor|recovery)_snapshot_binary are defined here. They have their prebuilt executable
@@ -728,7 +726,6 @@
return module.Init()
}
-//
// Module definitions for snapshots of object files (*.o).
//
// Modules (vendor|recovery)_snapshot_object are defined here. They have their prebuilt object
diff --git a/cc/snapshot_utils.go b/cc/snapshot_utils.go
index de50ef5..cf4617d 100644
--- a/cc/snapshot_utils.go
+++ b/cc/snapshot_utils.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/cc/vendor_public_library.go b/cc/vendor_public_library.go
index 65a2b0c..f2c8545 100644
--- a/cc/vendor_public_library.go
+++ b/cc/vendor_public_library.go
@@ -28,17 +28,16 @@
//
// Example:
//
-// vendor_public_library {
-// name: "libfoo",
-// symbol_file: "libfoo.map.txt",
-// export_public_headers: ["libfoo_headers"],
-// }
+// vendor_public_library {
+// name: "libfoo",
+// symbol_file: "libfoo.map.txt",
+// export_public_headers: ["libfoo_headers"],
+// }
//
-// cc_headers {
-// name: "libfoo_headers",
-// export_include_dirs: ["include"],
-// }
-//
+// cc_headers {
+// name: "libfoo_headers",
+// export_include_dirs: ["include"],
+// }
type vendorPublicLibraryProperties struct {
// Relative path to the symbol map.
Symbol_file *string
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index e7c05ac..77e6f6f 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/cc/vndk_prebuilt.go b/cc/vndk_prebuilt.go
index 31b6d10..37819a4 100644
--- a/cc/vndk_prebuilt.go
+++ b/cc/vndk_prebuilt.go
@@ -29,26 +29,25 @@
//
// Example:
//
-// vndk_prebuilt_shared {
-// name: "libfoo",
-// version: "27",
-// target_arch: "arm64",
-// vendor_available: true,
-// product_available: true,
-// vndk: {
-// enabled: true,
-// },
-// export_include_dirs: ["include/external/libfoo/vndk_include"],
-// arch: {
-// arm64: {
-// srcs: ["arm/lib64/libfoo.so"],
-// },
-// arm: {
-// srcs: ["arm/lib/libfoo.so"],
-// },
-// },
-// }
-//
+// vndk_prebuilt_shared {
+// name: "libfoo",
+// version: "27",
+// target_arch: "arm64",
+// vendor_available: true,
+// product_available: true,
+// vndk: {
+// enabled: true,
+// },
+// export_include_dirs: ["include/external/libfoo/vndk_include"],
+// arch: {
+// arm64: {
+// srcs: ["arm/lib64/libfoo.so"],
+// },
+// arm: {
+// srcs: ["arm/lib/libfoo.so"],
+// },
+// },
+// }
type vndkPrebuiltProperties struct {
// VNDK snapshot version.
Version *string
@@ -250,25 +249,25 @@
// vndk_prebuilt_shared installs Vendor Native Development kit (VNDK) snapshot
// shared libraries for system build. Example:
//
-// vndk_prebuilt_shared {
-// name: "libfoo",
-// version: "27",
-// target_arch: "arm64",
-// vendor_available: true,
-// product_available: true,
-// vndk: {
-// enabled: true,
-// },
-// export_include_dirs: ["include/external/libfoo/vndk_include"],
-// arch: {
-// arm64: {
-// srcs: ["arm/lib64/libfoo.so"],
-// },
-// arm: {
-// srcs: ["arm/lib/libfoo.so"],
-// },
-// },
-// }
+// vndk_prebuilt_shared {
+// name: "libfoo",
+// version: "27",
+// target_arch: "arm64",
+// vendor_available: true,
+// product_available: true,
+// vndk: {
+// enabled: true,
+// },
+// export_include_dirs: ["include/external/libfoo/vndk_include"],
+// arch: {
+// arm64: {
+// srcs: ["arm/lib64/libfoo.so"],
+// },
+// arm: {
+// srcs: ["arm/lib/libfoo.so"],
+// },
+// },
+// }
func VndkPrebuiltSharedFactory() android.Module {
module := vndkPrebuiltSharedLibrary()
return module.Init()
diff --git a/cmd/sbox/sbox.go b/cmd/sbox/sbox.go
index 4f7451d..91e3540 100644
--- a/cmd/sbox/sbox.go
+++ b/cmd/sbox/sbox.go
@@ -208,7 +208,6 @@
//
// returns an exec.Cmd that can be ran from within sbox context if no error, or nil if error.
// caller must ensure script is cleaned up if function succeeds.
-//
func createCommandScript(rawCommand, scriptPath, scriptPathInSandbox string) (*exec.Cmd, error) {
err := os.WriteFile(scriptPath, []byte(rawCommand), 0644)
if err != nil {
diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go
index 7bc9ab2..afb3de3 100644
--- a/dexpreopt/class_loader_context.go
+++ b/dexpreopt/class_loader_context.go
@@ -25,11 +25,11 @@
)
// This comment describes the following:
-// 1. the concept of class loader context (CLC) and its relation to classpath
-// 2. how PackageManager constructs CLC from shared libraries and their dependencies
-// 3. build-time vs. run-time CLC and why this matters for dexpreopt
-// 4. manifest fixer: a tool that adds missing <uses-library> tags to the manifests
-// 5. build system support for CLC
+// 1. the concept of class loader context (CLC) and its relation to classpath
+// 2. how PackageManager constructs CLC from shared libraries and their dependencies
+// 3. build-time vs. run-time CLC and why this matters for dexpreopt
+// 4. manifest fixer: a tool that adds missing <uses-library> tags to the manifests
+// 5. build system support for CLC
//
// 1. Class loader context
// -----------------------
@@ -59,15 +59,16 @@
// loaders are not duplicated (at runtime there is a single class loader instance for each library).
//
// Example: A has <uses-library> tags B, C and D; C has <uses-library tags> B and D;
-// D has <uses-library> E; B and E have no <uses-library> dependencies. The CLC is:
-// A
-// ├── B
-// ├── C
-// │ ├── B
-// │ └── D
-// │ └── E
-// └── D
-// └── E
+//
+// D has <uses-library> E; B and E have no <uses-library> dependencies. The CLC is:
+// A
+// ├── B
+// ├── C
+// │ ├── B
+// │ └── D
+// │ └── E
+// └── D
+// └── E
//
// CLC defines the lookup order of libraries when resolving Java classes used by the library/app.
// The lookup order is important because libraries may contain duplicate classes, and the class is
@@ -188,7 +189,6 @@
// rule generation phase.
//
// ClassLoaderContext is a structure that represents CLC.
-//
type ClassLoaderContext struct {
// The name of the library.
Name string
@@ -249,7 +249,6 @@
// generates a build rule that includes conditional CLC for all versions, extracts the target SDK
// version from the manifest, and filters the CLCs based on that version. Exact final CLC that is
// passed to dex2oat is unknown to the build system, and gets known only at Ninja stage.
-//
type ClassLoaderContextMap map[int][]*ClassLoaderContext
// Compatibility libraries. Some are optional, and some are required: this is the default that
@@ -485,7 +484,6 @@
// constructs class loader context on device.
//
// TODO(b/132357300): remove "android.hidl.manager" and "android.hidl.base" for non-system apps.
-//
func fixClassLoaderContext(clcMap ClassLoaderContextMap) {
required, optional := clcMap.UsesLibs()
usesLibs := append(required, optional...)
diff --git a/etc/snapshot_etc.go b/etc/snapshot_etc.go
index b54a8a6..0d65ab6 100644
--- a/etc/snapshot_etc.go
+++ b/etc/snapshot_etc.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/finder/finder.go b/finder/finder.go
index c5196c8..054ccd6 100644
--- a/finder/finder.go
+++ b/finder/finder.go
@@ -736,15 +736,15 @@
// because we know this separator won't appear in the json that we're parsing.
//
// The newline byte can only appear in a UTF-8 stream if the newline character appears, because:
-// - The newline character is encoded as "0000 1010" in binary ("0a" in hex)
-// - UTF-8 dictates that bytes beginning with a "0" bit are never emitted as part of a multibyte
-// character.
+// - The newline character is encoded as "0000 1010" in binary ("0a" in hex)
+// - UTF-8 dictates that bytes beginning with a "0" bit are never emitted as part of a multibyte
+// character.
//
// We know that the newline character will never appear in our json string, because:
-// - If a newline character appears as part of a data string, then json encoding will
-// emit two characters instead: '\' and 'n'.
-// - The json encoder that we use doesn't emit the optional newlines between any of its
-// other outputs.
+// - If a newline character appears as part of a data string, then json encoding will
+// emit two characters instead: '\' and 'n'.
+// - The json encoder that we use doesn't emit the optional newlines between any of its
+// other outputs.
const lineSeparator = byte('\n')
func (f *Finder) readLine(reader *bufio.Reader) ([]byte, error) {
diff --git a/genrule/genrule.go b/genrule/genrule.go
index b796877..6686c87 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -976,9 +976,7 @@
var Bool = proptools.Bool
var String = proptools.String
-//
// Defaults
-//
type Defaults struct {
android.ModuleBase
android.DefaultsModuleBase
diff --git a/java/app_import.go b/java/app_import.go
index 4bab14b..d6dca38 100644
--- a/java/app_import.go
+++ b/java/app_import.go
@@ -461,19 +461,19 @@
// android_app_import imports a prebuilt apk with additional processing specified in the module.
// DPI-specific apk source files can be specified using dpi_variants. Example:
//
-// android_app_import {
-// name: "example_import",
-// apk: "prebuilts/example.apk",
-// dpi_variants: {
-// mdpi: {
-// apk: "prebuilts/example_mdpi.apk",
-// },
-// xhdpi: {
-// apk: "prebuilts/example_xhdpi.apk",
-// },
-// },
-// presigned: true,
-// }
+// android_app_import {
+// name: "example_import",
+// apk: "prebuilts/example.apk",
+// dpi_variants: {
+// mdpi: {
+// apk: "prebuilts/example_mdpi.apk",
+// },
+// xhdpi: {
+// apk: "prebuilts/example_xhdpi.apk",
+// },
+// },
+// presigned: true,
+// }
func AndroidAppImportFactory() android.Module {
module := &AndroidAppImport{}
module.AddProperties(&module.properties)
diff --git a/java/classpath_element.go b/java/classpath_element.go
index 753e7f8..4962916 100644
--- a/java/classpath_element.go
+++ b/java/classpath_element.go
@@ -97,11 +97,11 @@
// the list with its Contents field.
//
// Requirements/Assumptions:
-// * A fragment can be associated with more than one apex but each apex must only be associated with
-// a single fragment from the fragments list.
-// * All of a fragment's contents must appear as a contiguous block in the same order in the
-// libraries list.
-// * Each library must only appear in a single fragment.
+// - A fragment can be associated with more than one apex but each apex must only be associated with
+// a single fragment from the fragments list.
+// - All of a fragment's contents must appear as a contiguous block in the same order in the
+// libraries list.
+// - Each library must only appear in a single fragment.
//
// The apex is used to identify which libraries belong to which fragment. First a mapping is created
// from apex to fragment. Then the libraries are iterated over and any library in an apex is
@@ -109,13 +109,15 @@
// standalone and have their own element.
//
// e.g. Given the following input:
-// libraries: com.android.art:core-oj, com.android.art:core-libart, framework, ext
-// fragments: com.android.art:art-bootclasspath-fragment
+//
+// libraries: com.android.art:core-oj, com.android.art:core-libart, framework, ext
+// fragments: com.android.art:art-bootclasspath-fragment
//
// Then this will return:
-// ClasspathFragmentElement(art-bootclasspath-fragment, [core-oj, core-libart]),
-// ClasspathLibraryElement(framework),
-// ClasspathLibraryElement(ext),
+//
+// ClasspathFragmentElement(art-bootclasspath-fragment, [core-oj, core-libart]),
+// ClasspathLibraryElement(framework),
+// ClasspathLibraryElement(ext),
func CreateClasspathElements(ctx ClasspathElementContext, libraries []android.Module, fragments []android.Module) ClasspathElements {
// Create a map from apex name to the fragment module. This makes it easy to find the fragment
// associated with a particular apex.
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index b4cd07a..4e416fc 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -418,7 +418,6 @@
//
// The location is passed as an argument to the ART tools like dex2oat instead of the real path.
// ART tools will then reconstruct the architecture-specific real path.
-//
func (image *bootImageVariant) imageLocations() (imageLocationsOnHost []string, imageLocationsOnDevice []string) {
if image.extends != nil {
imageLocationsOnHost, imageLocationsOnDevice = image.extends.getVariant(image.target).imageLocations()
diff --git a/java/droiddoc.go b/java/droiddoc.go
index 9663922..901419c 100644
--- a/java/droiddoc.go
+++ b/java/droiddoc.go
@@ -158,9 +158,7 @@
Compat_config *string `android:"path"`
}
-//
// Common flags passed down to build rule
-//
type droiddocBuilderFlags struct {
bootClasspathArgs string
classpathArgs string
@@ -193,9 +191,7 @@
return false
}
-//
// Javadoc
-//
type Javadoc struct {
android.ModuleBase
android.DefaultableModuleBase
@@ -548,9 +544,7 @@
rule.Build("javadoc", "javadoc")
}
-//
// Droiddoc
-//
type Droiddoc struct {
Javadoc
@@ -827,9 +821,7 @@
rule.Build("javadoc", desc)
}
-//
// Exported Droiddoc Directory
-//
var droiddocTemplateTag = dependencyTag{name: "droiddoc-template"}
type ExportedDroiddocDirProperties struct {
@@ -862,9 +854,7 @@
d.deps = android.PathsForModuleSrc(ctx, []string{filepath.Join(path, "**/*")})
}
-//
// Defaults
-//
type DocDefaults struct {
android.ModuleBase
android.DefaultsModuleBase
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 115388b..8baf4d3 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -42,9 +42,7 @@
ctx.RegisterModuleType("prebuilt_stubs_sources", PrebuiltStubsSourcesFactory)
}
-//
// Droidstubs
-//
type Droidstubs struct {
Javadoc
android.SdkBase
diff --git a/java/genrule.go b/java/genrule.go
index 5047c41..208e1f4 100644
--- a/java/genrule.go
+++ b/java/genrule.go
@@ -43,23 +43,23 @@
//
// Use a java_genrule to package generated java resources:
//
-// java_genrule {
-// name: "generated_resources",
-// tools: [
-// "generator",
-// "soong_zip",
-// ],
-// srcs: ["generator_inputs/**/*"],
-// out: ["generated_android_icu4j_resources.jar"],
-// cmd: "$(location generator) $(in) -o $(genDir) " +
-// "&& $(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
-// }
+// java_genrule {
+// name: "generated_resources",
+// tools: [
+// "generator",
+// "soong_zip",
+// ],
+// srcs: ["generator_inputs/**/*"],
+// out: ["generated_android_icu4j_resources.jar"],
+// cmd: "$(location generator) $(in) -o $(genDir) " +
+// "&& $(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
+// }
//
-// java_library {
-// name: "lib_with_generated_resources",
-// srcs: ["src/**/*.java"],
-// static_libs: ["generated_resources"],
-// }
+// java_library {
+// name: "lib_with_generated_resources",
+// srcs: ["src/**/*.java"],
+// static_libs: ["generated_resources"],
+// }
func GenRuleFactory() android.Module {
module := genrule.NewGenRule()
diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go
index 1c42495..655021f 100644
--- a/java/platform_compat_config.go
+++ b/java/platform_compat_config.go
@@ -280,7 +280,7 @@
return &platformCompatConfigSingleton{}
}
-//============== merged_compat_config =================
+// ============== merged_compat_config =================
type globalCompatConfigProperties struct {
// name of the file into which the metadata will be copied.
Filename *string
diff --git a/java/sdk_library.go b/java/sdk_library.go
index 490c031..8f499b1 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -2129,11 +2129,12 @@
// The type of a structure that contains a field of type sdkLibraryScopeProperties
// for each apiscope in allApiScopes, e.g. something like:
-// struct {
-// Public sdkLibraryScopeProperties
-// System sdkLibraryScopeProperties
-// ...
-// }
+//
+// struct {
+// Public sdkLibraryScopeProperties
+// System sdkLibraryScopeProperties
+// ...
+// }
var allScopeStructType = createAllScopePropertiesStructType()
// Dynamically create a structure type for each apiscope in allApiScopes.
@@ -2556,9 +2557,7 @@
return requiredFilesFromPrebuiltApexForImport(name)
}
-//
// java_sdk_library_xml
-//
type sdkLibraryXml struct {
android.ModuleBase
android.DefaultableModuleBase
diff --git a/java/sdk_library_external.go b/java/sdk_library_external.go
index 0acaa13..4f83981 100644
--- a/java/sdk_library_external.go
+++ b/java/sdk_library_external.go
@@ -49,9 +49,10 @@
// Get partition group of java module that can be used at inter-partition dependency check.
// We currently have three groups
-// (system, system_ext) => system partition group
-// (vendor, odm) => vendor partition group
-// (product) => product partition group
+//
+// (system, system_ext) => system partition group
+// (vendor, odm) => vendor partition group
+// (product) => product partition group
func (j *Module) partitionGroup(ctx android.EarlyModuleContext) partitionGroup {
// system and system_ext partition can be treated as the same in terms of inter-partition dependency.
if j.Platform() || j.SystemExtSpecific() {
diff --git a/mk2rbc/mk2rbc.go b/mk2rbc/mk2rbc.go
index 2707f0c..aa48e63 100644
--- a/mk2rbc/mk2rbc.go
+++ b/mk2rbc/mk2rbc.go
@@ -14,13 +14,13 @@
// Convert makefile containing device configuration to Starlark file
// The conversion can handle the following constructs in a makefile:
-// * comments
-// * simple variable assignments
-// * $(call init-product,<file>)
-// * $(call inherit-product-if-exists
-// * if directives
-// All other constructs are carried over to the output starlark file as comments.
+// - comments
+// - simple variable assignments
+// - $(call init-product,<file>)
+// - $(call inherit-product-if-exists
+// - if directives
//
+// All other constructs are carried over to the output starlark file as comments.
package mk2rbc
import (
diff --git a/mk2rbc/soong_variables.go b/mk2rbc/soong_variables.go
index de46925..a52ec4f 100644
--- a/mk2rbc/soong_variables.go
+++ b/mk2rbc/soong_variables.go
@@ -32,8 +32,8 @@
// Scans the makefile Soong uses to generate soong.variables file,
// collecting variable names and types from the lines that look like this:
-// $(call add_json_XXX, <...>, $(VAR))
//
+// $(call add_json_XXX, <...>, $(VAR))
func FindSoongVariables(mkFile string, includeFileScope mkparser.Scope, registrar variableRegistrar) error {
ctx := context{includeFileScope, registrar}
return ctx.doFind(mkFile)
diff --git a/python/python.go b/python/python.go
index eb0d3ca..8364169 100644
--- a/python/python.go
+++ b/python/python.go
@@ -438,9 +438,9 @@
}
// DepsMutator mutates dependencies for this module:
-// * handles proto dependencies,
-// * if required, specifies launcher and adds launcher dependencies,
-// * applies python version mutations to Python dependencies
+// - handles proto dependencies,
+// - if required, specifies launcher and adds launcher dependencies,
+// - applies python version mutations to Python dependencies
func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
android.ProtoDeps(ctx, &p.protoProperties)
diff --git a/scripts/build_broken_logs.go b/scripts/build_broken_logs.go
index 82ba749..bb4b9fd 100644
--- a/scripts/build_broken_logs.go
+++ b/scripts/build_broken_logs.go
@@ -19,12 +19,12 @@
// To use, download the logs.zip from one or more branches, and extract them
// into subdirectories of the current directory. So for example, I have:
//
-// ./aosp-master/aosp_arm/std_full.log
-// ./aosp-master/aosp_arm64/std_full.log
-// ./aosp-master/...
-// ./internal-master/aosp_arm/std_full.log
-// ./internal-master/aosp_arm64/std_full.log
-// ./internal-master/...
+// ./aosp-master/aosp_arm/std_full.log
+// ./aosp-master/aosp_arm64/std_full.log
+// ./aosp-master/...
+// ./internal-master/aosp_arm/std_full.log
+// ./internal-master/aosp_arm64/std_full.log
+// ./internal-master/...
//
// Then I use `go run path/to/build_broken_logs.go *`
package main
diff --git a/sdk/build_release.go b/sdk/build_release.go
index 0494a28..20b33d6 100644
--- a/sdk/build_release.go
+++ b/sdk/build_release.go
@@ -369,7 +369,9 @@
// structure which are not supported by the specified target build release.
//
// A property is pruned if its field has a tag of the form:
-// `supported_build_releases:"<build-release-set>"`
+//
+// `supported_build_releases:"<build-release-set>"`
+//
// and the resulting build release set does not contain the target build release. Properties that
// have no such tag are assumed to be supported by all releases.
func newPropertyPrunerByBuildRelease(propertiesStruct interface{}, targetBuildRelease *buildRelease) *propertyPruner {
diff --git a/sdk/member_trait.go b/sdk/member_trait.go
index 4229ca8..0843306 100644
--- a/sdk/member_trait.go
+++ b/sdk/member_trait.go
@@ -68,7 +68,6 @@
// A list of sdkMemberTraitListProperty instances is created, one per member trait that provides:
// * a reference to the member trait.
// * a getter for the corresponding field in the properties struct.
-//
func createDynamicSdkMemberTraits(sdkMemberTraits []android.SdkMemberTrait) *dynamicSdkMemberTraits {
var listProperties []*sdkMemberTraitListProperty
diff --git a/sdk/member_type.go b/sdk/member_type.go
index 10669fe..98f5982 100644
--- a/sdk/member_type.go
+++ b/sdk/member_type.go
@@ -80,7 +80,6 @@
// * a reference to the member type.
// * a getter for the corresponding field in the properties struct.
// * a dependency tag that identifies the member type of a resolved dependency.
-//
func createDynamicSdkMemberTypes(sdkMemberTypes []android.SdkMemberType) *dynamicSdkMemberTypes {
var listProperties []*sdkMemberTypeListProperty
diff --git a/shared/env.go b/shared/env.go
index 152729b..b7d3baf 100644
--- a/shared/env.go
+++ b/shared/env.go
@@ -32,10 +32,11 @@
//
// e.g. OUT_DIR = "out"
// is converted to:
-// {
-// "Key": "OUT_DIR",
-// "Value": "out",
-// },
+//
+// {
+// "Key": "OUT_DIR",
+// "Value": "out",
+// },
func EnvFileContents(envDeps map[string]string) ([]byte, error) {
contents := make(envFileData, 0, len(envDeps))
for key, value := range envDeps {
diff --git a/snapshot/recovery_snapshot.go b/snapshot/recovery_snapshot.go
index f1e31ca..ac002be 100644
--- a/snapshot/recovery_snapshot.go
+++ b/snapshot/recovery_snapshot.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/snapshot/snapshot.go b/snapshot/snapshot.go
index 294f8b6..206ecc9 100644
--- a/snapshot/snapshot.go
+++ b/snapshot/snapshot.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/snapshot/snapshot_base.go b/snapshot/snapshot_base.go
index 4a14f2e..8e5dfe4 100644
--- a/snapshot/snapshot_base.go
+++ b/snapshot/snapshot_base.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/snapshot/util.go b/snapshot/util.go
index f447052..806ac90 100644
--- a/snapshot/util.go
+++ b/snapshot/util.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/snapshot/vendor_snapshot.go b/snapshot/vendor_snapshot.go
index 9bd26c2..8f7b8c2 100644
--- a/snapshot/vendor_snapshot.go
+++ b/snapshot/vendor_snapshot.go
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/third_party/zip/reader_test.go b/third_party/zip/reader_test.go
index 11c6d6e..5f97f5c 100644
--- a/third_party/zip/reader_test.go
+++ b/third_party/zip/reader_test.go
@@ -615,7 +615,6 @@
//
// It's here in hex for the same reason as rZipBytes above: to avoid
// problems with on-disk virus scanners or other zip processors.
-//
func biggestZipBytes() []byte {
s := `
0000000 50 4b 03 04 14 00 08 00 08 00 00 00 00 00 00 00
diff --git a/ui/signal/signal.go b/ui/signal/signal.go
index 4929a7b..552545d 100644
--- a/ui/signal/signal.go
+++ b/ui/signal/signal.go
@@ -31,13 +31,12 @@
// same time we do. Most of the time this means we just need to ignore the signal and we'll
// just see errors from all of our subprocesses. But in case that fails, when we get a signal:
//
-// 1. Wait two seconds to exit normally.
-// 2. Call cancel() which is normally the cancellation of a Context. This will send a SIGKILL
-// to any subprocesses attached to that context.
-// 3. Wait two seconds to exit normally.
-// 4. Call cleanup() to close the log/trace buffers, then panic.
-// 5. If another two seconds passes (if cleanup got stuck, etc), then panic.
-//
+// 1. Wait two seconds to exit normally.
+// 2. Call cancel() which is normally the cancellation of a Context. This will send a SIGKILL
+// to any subprocesses attached to that context.
+// 3. Wait two seconds to exit normally.
+// 4. Call cleanup() to close the log/trace buffers, then panic.
+// 5. If another two seconds passes (if cleanup got stuck, etc), then panic.
func SetupSignals(log logger.Logger, cancel, cleanup func()) {
signals := make(chan os.Signal, 5)
signal.Notify(signals, os.Interrupt, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM)