Open stingion opened 2 years ago
The public modifiers are added by KotlinPoet, and are not configurable. They are added for good reason though, for compatibility with people using Explict API mode; see the docs here:
Note: In order to maximize portability, KotlinPoet generates code with explicit visibility modifiers. This ensures compatibility with both standard Kotlin projects as well as projects using explicit API mode.
Is there an actual issue with having the explicit public
modifiers?
No serious issue, but "public" is default in Kotlin. So Idea IDE, Sonar, etc. highlighting it as unnecessary. It is proposed to make the presence of this work at least configurable while DGS Kotlin code generation.
Subj. Example:
Recommend: