Skip to content

Improve documentation on what names are generated by the various functions #493

@yav

Description

@yav

Many of the naming methods do not describe what they do, so the only way to know is to try look through the source code, or do experimentation trying to guess what they might have done, which is not a great experience.

Here is an example of one that has good documentation:

A FieldNamer that strips the _ off of the field name, lowercases the name, and skips the field if it doesn't start with an '_'.

Here is an example of one that has bad documentation:

A FieldNamer for abbreviatedFields.

This second style would make sense, if abbreviatedFields had some documentation but that's not the case. In any case,
documenting that the namer is used by some other function doesn't seem nearly as useful as saying what it does.

Similarly, the functions that generate prisms, makePrismLabels, and makePrisms should say how the names/labels of the prisms are derived from the name of the constructor. It would also be handy of these were configurable, in a style similar
to what happens with fields.

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