Names

name

In CRS and bpt a name refers to a textual identifier matching a specific form.

A valid name must match the following requirements:

  1. Must begin with a lowercase ASCII alphabetic character

  2. Must not contain any capital letter characters.

  3. May only contain ASCII alphanumeric characters and the ASCII dot “.”, underscore “_”, and hyphen “-“.

  4. Must not contain any adjacent punctuation characters.

  5. Must end with a letter or digit.

A CRS name can be validated by testing against the following regular expression

^([a-z][a-z0-9]*)([._-][a-z0-9]+)*$

It checks the following rules:

  1. A name must begin with a lowercase ASCII alphabetic character (Must match ^[a-z]).

  2. A name may not be an empty string.

  3. A name may not contain any capital letter characters.

  4. A name may only contain ASCII alphanumeric characters and the ASCII dot “.”, underscore “_”, and hyphen “-“.

  5. A name may not contain any adjacent punctuation characters.

  6. A name must end with a letter or a digit.

These name restrictions are currently in place to simplify path handling and prevent havok from filepath normalization on certain filesystems. Future revisions will likely loosen these requirements.

Examples

Name string

Is valid?

Reason

foo.bar

✔️

my-library.baz

✔️

foo_bar

✔️

somename

✔️

something-else

✔️

foo.

Names may not end with a punctuation character

Foo

Names may not contain capital letters

4g

Names may not begin with a digit

_mylibrary

Names may not begin with underscores

foo__bar

Names may not contain adjacent punctuation or underscores

foo..bar

‘‘

my-pkg.SomeLibrary

Names may not contain capital letters.