Skip to content

Allow nameMapper to disable default name #104

Open
@lihaoyi

Description

@lihaoyi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions