bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
761 stars 302 forks source link

Support multiple packages in the same diectory in Goland #6772

Open bdleitner opened 1 day ago

bdleitner commented 1 day ago

Description of the feature request:

A common (recommended, even) pattern within Google is to have multiple packages in the same directory, with one build target per package (commonly, one file per go package).

This can be done with bazel using Golang and everything will compile, but Golang will highlight the package names and complain, saying "multiple packages in the directory ..."

multiple_packages

I haven't found a way to disable this inspection. Since bazel will already fail to build if there's more than one package in the srcs for a target, the best solution here would be if the Goland warning could manifest if that scenario occurs (source files with different packages included in the same go_library), but disabling that warning entirely would be better than what it is now.

Which category does this issue belong to?

GoLand

What underlying problem are you trying to solve with this feature?

Avoid spurious warnings from the IDE.

What operating system, Intellij IDE and programming languages are you using? Please provide specific versions.

Windows 10

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

bdleitner commented 14 hours ago

I tried to edit the text and apparently instead of just editing this #6773 as a duplicate. Sorry about that.