fix formatting problem (#169)
This commit is contained in:
parent
10851c2c5b
commit
2b38b2f8bd
|
@ -24,10 +24,10 @@ https://docs.bazel.build/versions/master/skylark/config.html#user-defined-build-
|
|||
BuildSettingInfo = provider(
|
||||
doc = "A singleton provider that contains the raw value of a build setting",
|
||||
fields = {
|
||||
"value": "The value of the build setting in the current configuration. "
|
||||
+ "This value may come from the command line or an upstream transition, "
|
||||
+ "or else it will be the build setting's default."
|
||||
}
|
||||
"value": "The value of the build setting in the current configuration. " +
|
||||
"This value may come from the command line or an upstream transition, " +
|
||||
"or else it will be the build setting's default.",
|
||||
},
|
||||
)
|
||||
|
||||
def _impl(ctx):
|
||||
|
@ -75,15 +75,16 @@ def _string_impl(ctx):
|
|||
if len(allowed_values) == 0 or value in ctx.attr.values:
|
||||
return BuildSettingInfo(value = value)
|
||||
else:
|
||||
fail("Error setting "+ str(ctx.label) + ": invalid value '" + value + "'. Allowed values are " + str(allowed_values))
|
||||
fail("Error setting " + str(ctx.label) + ": invalid value '" + value + "'. Allowed values are " + str(allowed_values))
|
||||
|
||||
string_flag = rule(
|
||||
implementation = _string_impl,
|
||||
build_setting = config.string(flag = True),
|
||||
attrs = {
|
||||
"values" : attr.string_list(
|
||||
doc = "The list of allowed values for this setting. An error is raised if any other value is given."
|
||||
)},
|
||||
"values": attr.string_list(
|
||||
doc = "The list of allowed values for this setting. An error is raised if any other value is given.",
|
||||
),
|
||||
},
|
||||
doc = "A string-typed build setting that can be set on the command line",
|
||||
)
|
||||
|
||||
|
@ -91,8 +92,9 @@ string_setting = rule(
|
|||
implementation = _string_impl,
|
||||
build_setting = config.string(),
|
||||
attrs = {
|
||||
"values" : attr.string_list(
|
||||
doc = "The list of allowed values for this setting. An error is raised if any other value is given."
|
||||
)},
|
||||
"values": attr.string_list(
|
||||
doc = "The list of allowed values for this setting. An error is raised if any other value is given.",
|
||||
),
|
||||
},
|
||||
doc = "A string-typed build setting that cannot be set on the command line",
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue