Repository: JetBrains/kotlin
File: plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/diagnostic/DefaultErrorMessagesParcelize.kt (Kotlin)

Code before:
import org.jetbrains.kotlin.diagnostics.rendering.Renderers.RENDER_CLASS_OR_OBJECT
import org.jetbrains.kotlin.diagnostics.rendering.Renderers.RENDER_TYPE_WITH_ANNOTATIONS

object DefaultErrorMessagesParcelize : DefaultErrorMessages.Extension {
    private val MAP = DiagnosticFactoryToRendererMap("Parcelize")
    override fun getMap() = MAP

    init {
        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_BE_CLASS,
            "'Parcelable' should be a class"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_DELEGATE_IS_NOT_ALLOWED,
            "Delegating 'Parcelable' is not allowed"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_NOT_BE_ENUM_CLASS,
            "'Parcelable' should not be a 'enum class'"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_BE_INSTANTIABLE,
            "'Parcelable' should not be a 'abstract' class"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_CANT_BE_INNER_CLASS,
            "'Parcelable' can't be an inner class"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_CANT_BE_LOCAL_CLASS,
            "'Parcelable' can't be a local class"
        )

        MAP.put(
            ErrorsParcelize.NO_PARCELABLE_SUPERTYPE,
            "No 'Parcelable' supertype"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR,
            "'Parcelable' should have a primary constructor"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY,
            "The primary constructor is empty, no data will be serialized to 'Parcel'"

Review comment (refactor):
```suggestion
            "'Parcelable' should not be an 'abstract' class"
```

Code after:
import org.jetbrains.kotlin.diagnostics.rendering.Renderers.RENDER_CLASS_OR_OBJECT
import org.jetbrains.kotlin.diagnostics.rendering.Renderers.RENDER_TYPE_WITH_ANNOTATIONS

object DefaultErrorMessagesParcelize : DefaultErrorMessages.Extension {
    private val MAP = DiagnosticFactoryToRendererMap("Parcelize")
    override fun getMap() = MAP

    init {
        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_BE_CLASS,
            "'Parcelable' should be a class"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_DELEGATE_IS_NOT_ALLOWED,
            "Delegating 'Parcelable' is not allowed"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_NOT_BE_ENUM_CLASS,
            "'Parcelable' should not be a 'enum class'"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_BE_INSTANTIABLE,
            "'Parcelable' should not be an 'abstract' class"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_CANT_BE_INNER_CLASS,
            "'Parcelable' can't be an inner class"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_CANT_BE_LOCAL_CLASS,
            "'Parcelable' can't be a local class"
        )

        MAP.put(
            ErrorsParcelize.NO_PARCELABLE_SUPERTYPE,
            "No 'Parcelable' supertype"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR,
            "'Parcelable' should have a primary constructor"
        )

        MAP.put(
            ErrorsParcelize.PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY,
            "The primary constructor is empty, no data will be serialized to 'Parcel'"