bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k stars 378 forks source link

Support rules map_kind in go and proto languages #1870

Open lbcjbb opened 2 months ago

lbcjbb commented 2 months ago

What type of PR is this?

Bug fix

What package or component does this PR mostly affect?

What does this PR do? Why is it needed?

This PR takes into account the rule mapping defined with the # gazelle:map_kind instructions for all Go and Proto rules.

lbcjbb commented 1 month ago

I've added some tests, but I needed to move the map_kind logic from //cmd/gazelle to a new shareable internal package (9e4702a81d45d9c302a5e8c424754bd21a5923d0), to be used in go and proto languages tests (8a8d69a5bf365fa0e104d6ae2d51cbe340cd0822).