While Skylark is a Python subset, there are slight differences between Skylark/BUILD style vs. the Google Python conventions. For example (from the Skylark cookbook:
def macro(name, visibility=None):
# Creating a native genrule.
native.genrule(
name = name,
outs = [name + '.txt'],
cmd = 'echo hello > $@',
visibility = visibility,
)
Rule invocations such as native.genrule() follow the BUILD style rather than the standard Python function call style.
I think it would be good to write a Skylark Style Guide that defines a convention for Skylark code and lists some best practices.
While Skylark is a Python subset, there are slight differences between Skylark/BUILD style vs. the Google Python conventions. For example (from the Skylark cookbook:
Rule invocations such as
native.genrule()follow the BUILD style rather than the standard Python function call style.I think it would be good to write a Skylark Style Guide that defines a convention for Skylark code and lists some best practices.