-
Notifications
You must be signed in to change notification settings - Fork 0
Rules
Tom Carman edited this page Jun 26, 2024
·
55 revisions
- 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-should-have-a-description
- validation-rule-description-minimum-length
- validation-rule-error-minimum-length
Rule | Description | Metadata | Implementation | Options |
---|---|---|---|---|
object-should-have-a-description | Custom objects should have a description, describing how the object is used. | Custom Object | 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. src/rules/object-should-have-a-description.ts |
|
object-description-minimum-length | A custom object should have a description, describing how the object is used. The description should be at least {option.minimumLength} characters long. |
Custom Object | Identifies metadata files that end with .object-meta.xml and have a __c or __e in the filename. Inspects the length of the value in the <description> tag in the file. src/rules/object-description-minimum-length.ts |
minimumLength (integer) |
field-should-have-a-description | Custom fields should have a description, describing how the field is used. | Custom Field | Identifies metadata files that end with .field-meta.xml and have a __c or __e in the filename. Checks for a <description> tag in the file. src/rules/field-should-have-a-description.ts |
|
field-description-minimum-length | A custom field should have a description, describing how the field is used. The description should be at least {option.minimumLength} characters long. |
Custom Field | Identifies metadata files that end with .field-meta.xml and have a __c or __e in the filename. Inspects the length of the value in the <description> tag in the file. src/rules/field-description-minimum-length.ts |
minimumLength (integer) |
flow-should-have-a-description | Flows should have a description, describing how the Flow is used. | Flow | Identifies metadata files that end with .flow-meta.xml . Checks for a <description> tag in the file. src/rules/flow-should-have-a-description.ts |
|
flow-description-minimum-length | A Flow should have a description, describing how the Flow is used. The description should be at least {option.minimumLength} characters long. |
Flow | Identifies metadata files that end with .flow-meta.xml . Inspects the length of the value in the <description> tag in the file. src/rules/flow-description-minimum-length.ts |
minimumLength (integer) |
validation-rule-should-have-a-description | Validation rules should have a description, describing how the rule is used. | Validation Rule | Identifies metadata files that end with .validationRule-meta.xml . Checks for a <description> tag in the file. src/rules/validation-rule-should-have-a-description.ts |
|
validation-rule-description-minimum-length | A validation rule should have a description, describing how the rule is used. The description should be at least {option.minimumLength} characters long. |
Validation Rule | Identifies metadata files that end with .validationRule-meta.xml . Inspects the length of the value in the <description> tag in the file. src/rules/validation-rule-description-minimum-length.ts |
minimumLength (integer) |
validation-rule-error-minimum-length | A validation rule should have a clear error message, describing how the user should resolve the error. The error message should be at least {option.minimumLength} characters long. |
Validation Rule | Identifies metadata files that end with .validationRule-meta.xml . Inspects the length of the value in the <errorMessage> tag in the file. src/rules/validation-rule-error-minimum-length.ts |
minimumLength (integer) |
metadata-should-have-prefix | All metata must have a prefix of one of the following: {option.prefixes} or Metadata of types: {option.types} should have one of the following prefixes: {option.prefixes}
|
All custom metadata, or the types defined in option.types
|
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 .src/rules/metadata-should-have-prefix.ts |
option: prefixes (required) type: comma delimited list of strings eg. ACME_, EC_ description: The prefixes you want the rule to check against . option: types (optional, if not specified, checks against all custom metadata)type: comma delimited string of metadata types, based on the file extension (case sensitive) - eg. For .flow-meta.xml use flow , for .validationRule-meta.xml use validationRule etc.description: This defines the metadata types you want the rule to run against. option: exclude-namespaces type: comma delimited string of namespaces you want to prevent the rule running against - eg. FinServ__, et4ae5__ description: Can be used to stop the rule running against metadata belonging to managed packages. |
- 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