Information about attributes of a rule an aspect is applied to.
Members
attr
struct rule_attributes.attr
attrs
dict provided to the rule
function. See example of use.
executable
struct rule_attributes.executable
struct
containing executable files defined in label type attributes marked as executable=True
. The struct fields correspond to the attribute names. Each value in the struct is either a File
or None
. If an optional attribute is not specified in the rule then the corresponding struct value is None
. If a label type is not marked as executable=True
, no corresponding struct field is generated. See example of use.
file
struct rule_attributes.file
struct
containing files defined in label type attributes marked as allow_single_file
. The struct fields correspond to the attribute names. The struct value is always a File
or None
. If an optional attribute is not specified in the rule then the corresponding struct value is None
. If a label type is not marked as allow_single_file
, no corresponding struct field is generated. It is a shortcut for:list(ctx.attr.<ATTR>.files)[0]
file
to access the (singular) default output of a dependency. See example of use.
files
struct rule_attributes.files
struct
containing files defined in label or label list type attributes. The struct fields correspond to the attribute names. The struct values are list
of File
s. It is a shortcut for:[f for t in ctx.attr.<ATTR> for f in t.files]
files
to access the default outputs of a dependency. See example of use.
kind
string rule_attributes.kind