Currently, nameMapper: String => Option[String] only optionally adds an additional name that you can refer to a main method or argument, but it cannot remove the original name. The only way to remove the original name is by using an explicit name = "".
We should change the signature to nameMapper: String => Seq[String], where nameMapper returns all names that are allowed: nullNameMapper would return only the original name, kebabCaseNameMapper and snakeCaseNameMapper would return both the original name and the mapped name, and we would also be able to introduce kebabCaseOnlyNameMapper and snakeCaseOnlyNameMapper that return the mapped name without the original name
The original un-mapped name doesn't show up in the --help message and is mostly for backwards compatibility. This is probably not a big deal, but it would be nice if users who do not want the backwards compatibility shim to be able to opt out of it
Currently,
nameMapper: String => Option[String]only optionally adds an additional name that you can refer to a main method or argument, but it cannot remove the original name. The only way to remove the original name is by using an explicitname = "".We should change the signature to
nameMapper: String => Seq[String], wherenameMapperreturns all names that are allowed:nullNameMapperwould return only the original name,kebabCaseNameMapperandsnakeCaseNameMapperwould return both the original name and the mapped name, and we would also be able to introducekebabCaseOnlyNameMapperandsnakeCaseOnlyNameMapperthat return the mapped name without the original nameThe original un-mapped name doesn't show up in the
--helpmessage and is mostly for backwards compatibility. This is probably not a big deal, but it would be nice if users who do not want the backwards compatibility shim to be able to opt out of it