#[non_exhaustive]pub enum Check {
InvalidIdentifier,
InvalidPackage,
DuplicateType,
DuplicateValue,
DuplicateFunction,
DuplicateRaw,
PropertyWithoutTypeOrValue,
EnumEntryMissingArguments,
FunctionWithoutBody,
ImportCollision,
}Expand description
Which check produced a Diagnostic.
Consumers match on this to override a severity, so it is the stable name of a check rather than its message.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidIdentifier
A declared name is not something Kotlin can write.
InvalidPackage
A file’s package is not a legal Kotlin package path.
DuplicateType
Two type declarations in one scope share a name — classes, fun interfaces and type aliases all live in Kotlin’s classifier
namespace.
DuplicateValue
Two value declarations in one scope share a name — properties and
val/var constructor parameters.
DuplicateFunction
Two functions in one scope share a name and a parameter type list. Same-named functions with different parameters are overloads and pass.
DuplicateRaw
Two Raw blocks in one scope share a name. Identical ones are merged
rather than reported (see merge_files), so this
means two different blocks are claiming one identity.
PropertyWithoutTypeOrValue
A property has no type, no value and no accessors — val x alone,
which is never legal.
EnumEntryMissingArguments
An enum class declares primary-constructor parameters, but an entry
passes no arguments.
FunctionWithoutBody
A function has no body somewhere a bodiless function is not allowed.
ImportCollision
Two distinct FQNs referenced from raw text share a simple name, so the text cannot be made to refer to both.