question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LowerCamelcase doesn't work

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
oripwkcommented, Sep 11, 2017

Thanks guys. Uncapitalised does the job

0reactions
lloydmetacommented, Mar 9, 2019

I’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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found