Skip to content

[gazelle] Allow library and test naming convention to be selected#431

Open
shs96c wants to merge 1 commit intobazel-contrib:mainfrom
shs96c:naming-convention
Open

[gazelle] Allow library and test naming convention to be selected#431
shs96c wants to merge 1 commit intobazel-contrib:mainfrom
shs96c:naming-convention

Conversation

@shs96c
Copy link
Copy Markdown
Collaborator

@shs96c shs96c commented Feb 19, 2026

When migrating existing repos to use gazelle, it's likely that there are established naming conventions for targets. For example, some repos may use lib as the name for the main java_library target in a directory rather than naming it after the directory.

This change allows users to choose a naming convention. If nothing is chosen, the existing behaviour is followed.

When migrating existing repos to use gazelle, it's likely that there
are established naming conventions for targets. For example, some
repos may use `lib` as the name for the main `java_library` target
in a directory rather than naming it after the directory.

This change allows users to choose a naming convention. If nothing
is chosen, the existing behaviour is followed.

func (jei *JavaExportIndex) NewJavaExportResolveInfoFromRule(repoName string, r *rule.Rule, file *rule.File) *JavaExportResolveInfo {
lbl := label.New(repoName, file.Pkg, r.Name())
func (jei *JavaExportIndex) NewJavaExportResolveInfoFromRule(r *rule.Rule, file *rule.File) *JavaExportResolveInfo {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repoName was always the empty string since we only create targets in the main workspace....

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 this pull request may close these issues.

1 participant