https://kotlinlang.org logo
#ktlint
Title
# ktlint
e

Emil Kantis

08/10/2022, 7:10 PM
Possibly false negative from
spacing-between-declarations-with-annotations
? 🧵
Only getting an error on marked line for this code:
Copy code
@Serializable
data class EmploymentAgreement(
   @Contextual
   val firstEmploymentDate: LocalDate,
   val employmentLevel: Double,
   @Contextual
   val activeFrom: LocalDate,
   @Contextual // Why no issue here?
   val activeTo: LocalDate?,
   val vacationDays: String,
   @Contextual
   val employmentTerminationDate: LocalDate?,
   val employmentType: String,

) {
   @Serializable
   enum class EmploymentType {
      @SerialName("Visstidsanställning")
      Hourly,
      @SerialName("Tillsvidareanställning") // Only this line reports an issue with Ktlint
      Full
   }
}
p

Paul Dingemans

08/10/2022, 8:08 PM
Can you please create an issue for it on https://github.com/pinterest/ktlint/issues
e

Emil Kantis

08/10/2022, 8:15 PM
Will do. Wasn't sure if it was a real problem or not.. 🙂
I guess the rule doesn't apply to parameter declarations? Should it?
4 Views