values-in-order
Overview
This rule belongs to the custom-rules-linting ruleset and states that:
The target values being validated must be orded in an ascending or descending order depending upon the chosen scheme.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Values are out of order. |
| Code | CUSTOMRULES_L003 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | Custom Rules |
| Tags | custom rules semantic linting order ascending descending |
Suggested Fixes
- If you are validating a list of string values, ensure that the list items are arranged in an alphabetical order for ascending order cases.
- If you are validating a list of numeric values, ensure that the list items are arranged in an increasing order for ascending cases and decreasing order for descending cases.
- If you are validating an object, ensure that the object keys are arranged in an alphabetical order for ascending order cases.
- Ensure that you have configured the rule sorting scheme correctly i.e. the
Ascendingargument is set asfalseif the target values are expected to be ordered in a descending manner.