LowerCamelcase doesn't work
See original GitHub issueI’m using version "com.beachape" %% "enumeratum" % "1.5.12"
with Scala 2.12, and LowerCamelcase prints the names with everything lowercase, no capitals at all.
Given the following example, I would expect howAreYou
to be printed, but what’s printed is howareyou
:
import enumeratum.{Enum, EnumEntry}
import enumeratum.EnumEntry.LowerCamelcase
import scala.collection.immutable.IndexedSeq
sealed trait Thing extends EnumEntry with LowerCamelcase
object Thing extends Enum[Thing] {
val values: IndexedSeq[Thing] = findValues
case object HowAreYou extends Thing
}
println(Thing.HowAreYou.entryName)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
What is the lowerCamelCase naming convention? - TechTarget
Learn about lowerCamelCase, a naming convention in which a name contains multiple words joined together as a single word with a lowercase first...
Read more >(replace) CamelCase function not work properly
Strings are immutable. replace() does *not * modify the string on which it's used. It returns the modified string, which you aren't capturing....
Read more >camelcase - npm
Correctly handles Unicode strings. If you use this on untrusted user input, don't forget to limit the length to something reasonable. Install.
Read more >Effective Dart: Style
DO format your code using dart format . Formatting is tedious work and is particularly time-consuming during refactoring. Fortunately, you don't have to...
Read more >Dynamic alter methods do not convert to proper ... - Drupal
which technically will work, but violate coding standards for following lowerCamelCase naming for methods. Instead, they should be like this ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks guys.
Uncapitalised
does the jobI’ve given it some thought and I think that trying to make all of these stackable traits work with each other 100% of the time is going to be a very nasty exercise. Inheritance is a pretty poor way of composing behaviour to begin with IMO (though convenient!); and you’re bound to find some corner cases here and there.
My thinking is that we should improve the documentation and call it a day.