I’ve written a custom ktlint rule but when I try t...
# getting-started
d
I’ve written a custom ktlint rule but when I try to run it with gradle using the ktlint plugin I get the following
Copy code
Too many element types registered. Out of (short) range. Most of element types (14991) were registered for 'Language: kotlin'
I’m completely stuck on this, it works fine if I run the ktlint binary with the jar file directly, seems like its something to do with the gradle plugin?
ok so this was some weird plugin caching problem. I could see that when I made changes to my custom plugin they weren’t being used by the ktlintCheck task, I then ran it with the
--info
flag and it somehow cleaned things up
c
#ktlint might help
d
oh nice, hadn’t found that channel, thanks