Use upper case numeric literal suffixes

When declaring literal numbers such as Long or Float, use upper case suffix. For example, prefer 2L to 2l.

Reason

Depending on the font and the syntax highlighting scheme, some letters look a lot like numbers. In some configurations, for example, l (lower case L) and 1 (one) are basically indistinguishable. Github, for instance, while not the worst offender, isn’t doing a great job there.

To the casual reader, the following has a fair chance of looking like a list of Ints, but a Long sneaked in:

List(1, 11, 111, 111l, 11111, 11111, 11111)

Using upper-case letters makes this more obvious:

List(1, 11, 111, 111L, 11111, 11111, 11111)

Checked by

LinterRule
Scalastyle