realm-kotlin icon indicating copy to clipboard operation
realm-kotlin copied to clipboard

Add Lint rule to avoid the use of `toKString`

Open cmelchior opened this issue 3 years ago • 0 comments

This method is generally unsafe when working with data from Realm as it assume strings are zero-terminated, which is not the case for Realm data. See e.g. https://medium.com/@vanniktech/writing-your-first-ktlint-rule-5a1707f4ca5b

Instead we should use our own custom toKotlinString and toNullableKotlinString

cmelchior avatar Jun 20 '22 14:06 cmelchior