Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildozer new command: copy rule #134

Open
srawlins opened this issue Aug 30, 2017 · 3 comments · May be fixed by #1078
Open

Buildozer new command: copy rule #134

srawlins opened this issue Aug 30, 2017 · 3 comments · May be fixed by #1078

Comments

@srawlins
Copy link

I'd like a buildozer command that copies a rule. Right now buildozer has copy <attr> <from_rule> to copy attribute values, and new <rule_kind> <rule_name> to make a new rule, but I would like:

  • a new command copy_rule <from_rule> <rule_name>
  • or perhaps a new arg on new: new <rule_kind> <rule_name> [based_on <from_rule>]

This can only be achieved today using scary usage of things like print rule or print startline and print endline combined with sed or something... 😨 some other tricky scripting.

@pmbethe09
Copy link
Member

buildozer 'copy_rule //a:b' //b:c //d:e ...

SGTM -- are you able to send a PR?

@jmcrawford45
Copy link

@pmbethe09 I came across this issue a few days back and ended up using print rule for my use case. I think copy_rule would be useful, and I can put up a PR for buildozer 'copy_rule //a:b' //b:c //d:e ...; however, I wanted to check in first that this is still desirable since it's been a few years.

@jmcrawford45 jmcrawford45 linked a pull request Jul 31, 2022 that will close this issue
@rossc719g
Copy link

Is this something that might see the light of day? Or is it too stale to be resurrected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants