-
Notifications
You must be signed in to change notification settings - Fork 0
Rules
- object-should-have-a-description
- object-description-minimum-length
- field-should-have-a-description
- field-description-minimum-length
- flow-should-have-a-description
- flow-description-minimum-length
- validation-rule-description-minimum-length
- validation-rule-error-minimum-length
- metadata-should-have-prefix
Description
- Custom objects should have a description, describing how the object is used.
MetadataTypes
- Custom Object
Implementation
- Identifies metadata files that end with
.object-meta.xml
and have a__c
or__e
in the filename. - Checks for a
<description>
tag in the file.
Source: src/rules/object-should-have-a-description.ts
Description
- A custom object should have a description, describing how the object is used. The description should be at least
{option.minimumLength}
characters long.
MetadataTypes
- Custom Object
Implementation
- Identifies metadata files that end with
.object-meta.xml
and have a__c
or__e
in the filename. - Checks the length of the value in the
<description>
tag in the file against the{option.minimumLength}
Source: src/rules/object-description-minimum-length.ts
Options
Name | Description | Type | Example |
---|---|---|---|
minimumLength |
(optional, defaults to 50) The minimum length that the custom object description should meet. | integer | 30 |
Description
- Custom fields should have a description, describing how the field is used.
MetadataTypes
- Custom Field
Implementation
- Identifies metadata files that end with
.field-meta.xml
and have a__c
or__e
in the filename. - Checks the length of the value in the
<description>
tag in the file against the{option.minimumLength}
Source: src/rules/field-description-minimum-length.ts
Options
Name | Description | Type | Example |
---|---|---|---|
minimumLength |
(optional, defaults to 50) The minimum length that the custom field description should meet. | integer | 30 |
Description
- A custom field should have a description, describing how the field is used. The description should be at least
{option.minimumLength}
characters long.
MetadataTypes
- Custom Field
Implementation
- Identifies metadata files that end with
.field-meta.xml
and have a__c
or__e
in the filename. - Checks the length of the value in the
<description>
tag in the file against the{option.minimumLength}
Source: src/rules/field-description-minimum-length.ts
Options
Name | Description | Type | Example |
---|---|---|---|
minimumLength |
(optional, defaults to 50) The minimum length that the custom field description should meet. | integer | 30 |
Description
- Flows should have a description, describing how the Flow is used.
MetadataTypes
- Flow
Implementation
- Identifies metadata files that end with
.flow-meta.xml
. - Checks for a
<description>
tag in the file.
Source: src/rules/flow-should-have-a-description.ts
Description
- A Flow should have a description, describing how the flow is used. The description should be at least
{option.minimumLength}
characters long.
MetadataTypes
- Flow
Implementation
- Identifies metadata files that end with
.flow-meta.xml
- Checks the length of the value in the
<description>
tag in the file against the{option.minimumLength}
Source: src/rules/flow-description-minimum-length.ts
Options
Name | Description | Type | Example |
---|---|---|---|
minimumLength |
(optional, defaults to 50) The minimum length that the Flow description should meet. | integer | 30 |
Description
- A Validation Rule should have a description, describing how the Validation Rule is used. The description should be at least
{option.minimumLength}
characters long.
MetadataTypes
- Validation Rule
Implementation
- Identifies metadata files that end with
.validationRule-meta.xml
- Checks the length of the value in the
<description>
tag in the file against the{option.minimumLength}
Source: src/rules/validation-rule-description-minimum-length.ts
Options
Name | Description | Type | Example |
---|---|---|---|
minimumLength |
(optional, defaults to 50) The minimum length that the Validation Rule description should meet. | integer | 30 |
Description
- A Validation Rule should have a description, describing how the Validation Rule is used. The description should be at least
{option.minimumLength}
characters long.
MetadataTypes
- Validation Rule
Implementation
- Identifies metadata files that end with
.validationRule-meta.xml
- Checks the length of the value in the
<errorMessage>
tag in the file against the{option.minimumLength}
Source: src/rules/validation-rule-error-minimum-length.ts
Options
Name | Description | Type | Example |
---|---|---|---|
minimumLength |
(optional, defaults to 50) The minimum length that the Validation Rule error message should meet. | integer | 30 |
Description
- All metata must have an API name prefix of one of the following:
{option.prefixes}
or
Metadata of types:{option.types}
should have one of the following prefixes:{option.prefixes}
MetadataTypes
- All custom metadata, or the types defined in
option.types
Implementation
- This rule can be used to enforce certain naming conventions, eg. prefixing metadata names with
ACME_
.< - It identifies all custom metadata files, or metadata of the type definied in
options.types
.< - Some objects are implicitly custom (eg. Validation Rule), but for metadata like Custom Fields, it checks for the presence of a
__c
or__e
etc to avoid running against standard fields. - For the identified metadata files, it checks that the filename starts with one of the prefixes defined in
options.prefixes
.
Source: src/rules/metadata-should-have-prefix.ts
Options
Name | Description | Type | Example |
---|---|---|---|
prefixes |
(required) The prefixes you want the rule to check against | string (comma delimited) of prefixes | ACME_, EC_ |
types |
(optional) The types of metadata you want this rule to run against. If not specified, the rule will run against all custom metadata. | string (comma delimited) of metadata types, based on the file extension (case sensitive) - eg. For .flow-meta.xml use flow , for .validationRule-meta.xml use validationRule etc. |
field, fieldSet, listView |
exclude-namespaces |
(optional) The namespace of any custom metadata you wish to exclude from the rule | string (comma delimited) of namespaces | FinServ__, et4ae5__ |
- no-missing-description-on-objects
- no-missing-description-on-fields
- no-missing-description-on-flows
- no-missing-description-on-validation-rules
- description-min-length-on-objects
- description-min-length-on-fields
- description-min-length-on-flows
- description-min-length-on-validation-rules
- error-message-min-length-on-validation-rules
- no-missing-prefix-on-metadata
- no-prefix-on-metadata
- no-double-spaces-in-picklist-fields
- no-double-spaces-in-value-sets