-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Skylark style guide #63
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)type: documentation (cleanup)
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)type: documentation (cleanup)