Inconsistency: an attribute code maximum length validation does not conform to the database field maximum length

Inconsistency: attribute code maximum length validation does not conform to the database field maximum length

The column attribute_code of the eav_attribute table has length of 255 characters:

But Magento 2 code wrongly limits attribute code the length to 30 characters:

See also another bug: The diagnostic message «An attribute code must be fewer than %1 characters.» is semantically wrong.

GitHub issue: 2073