Is there a convention for where rules related to a...
# plugins
w
Is there a convention for where rules related to a subsystem should go? I've seen them at a top-level rules.py file, or in util_rules, or in the subsystem itself. In my example, it's relating to an ExternalTool, that another tool (Subsystem) relies upon
1
h
i usually put them in the subsystem file itself if the functionality is related
w
golang kinda puts some of these in the subsystem file or util_rules, as appropriate. Terraform has this in a tool.py Docker also kinda does both
@hundreds-father-404 Okay, I like that approach, but I didn't notice examples until recently, so I thought maybe it was an anti-pattern 🙂
h
black/subsystem.py
for example
w
Oh, I remember why I inferred this. It was a while ago related to whether a Subsystem needed a
rules
method, or whether that was AH! I remember: https://github.com/pantsbuild/pants/issues/14181 This made me think that Subsystems had to be handled separately
I've been stuck in that logic ever since, which I kinda just inferred myself
h
ah yeah, rip bad docs
😁 1
w
Feel like we need some custom pylint pants rules or something 🙂
1