Name starts with a package name
Reports exported names that start with a package name. This inspection does not report such names in the main
package.
Example:
The MyPackageGetIP
name will be highlighted as it starts with the package name.
According to Package Names at github.com/golang, all references to names in a package will be done using the package name, so one can omit that name from the identifiers. For example, if you are in a package foo
, you do not need a type FooFile
, which clients will write as foo.FooFile
. Instead, we name the type File
, which clients will write as foo.File
.
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
GoNameStartsWithPackageName- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Go, 243.23131 |