package-name
What it does
Section titled “What it does”Reports a package whose name has an uppercase letter or an underscore.
Why it matters
Section titled “Why it matters”Package names in Kotlin and Java are in lowercase, joined without underscores, so a name with capitals looks like a class and does not match the directory on file systems that ignore case.
To fix, write the name in lowercase.
Example
Section titled “Example”package a.My_pkg
val x = 1Configuration
Section titled “Configuration”kotlin: lint: rules: package-name: warn # off (default), warn, errorEnabled by the presets: kotlin/ktlint.
Suppress one line with sudsy-disable-next-line package-name in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| ktlint | package-name |
full |