In JavaDoc, lines must be 80 characters or less (not including the not-shown parts of expressions like {@code}
and {@link}
). Is there a line length limit to KDoc? It's certainly not 80, as I've found lines in stdlib up to 112 characters long. Does anyone know?
There is no limit in line length for JavaDoc or KDoc. There are only good practices to make source code more readable (so you dan't have to scroll horizontally). 80 characters lines rule in java, is because it was created long time ago when there were small screens. Now you can use higher e.g. 120 characters limit. But don't make it too big (event if you have big monitor), because your team members can have smaller screens.
I just confirmed in my job project code that there are longer lines in java and it works fine.