-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
85 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
# allowed:list | ||
|
||
The `allowed:list` plugin checks if values are allowed for a number of input formats. | ||
The `allowed:list` analyser checks if values in a list or map match against a list of allowed values. It can also enforce required values and flag deprecated values. | ||
|
||
## Plugin fields | ||
## Configuration | ||
|
||
::: warning | ||
TODO: Add details on how the logic works. | ||
::: | ||
| Field | Type | Required | Description | | ||
| ------------- | -------- | -------- | ---------------------------------------------------------- | | ||
| allowed | []string | No | List of allowed values | | ||
| required | []string | No | List of values that must be present | | ||
| deprecated | []string | No | List of deprecated values to flag | | ||
| exclude-keys | []string | No | For map inputs, keys to exclude from validation | | ||
| ignore | []string | No | List of values to ignore during validation | | ||
| package-match | string | No | If set, treats values as packages and matches package names | | ||
|
||
| Field | Description | Required | Default | | ||
| ------------- | ------------------------------ | :------: | :-----: | | ||
| package-match | The package to match against. | No | "" | | ||
| allowed | The list of allowed values. | No | [] | | ||
| required | The list of required values. | No | [] | | ||
| deprecated | The list of deprecated values. | No | [] | | ||
| exclude-keys | The list of keys to exclude. | No | [] | | ||
| ignore | The list of values to ignore. | No | [] | | ||
<Content :page-key="$site.pages.find(p => p.path === '/reference/common/analyse.html').key"/> | ||
|
||
## Supported Input Formats | ||
|
||
- `FormatListString`: Validates each string in the list | ||
- `FormatMapString`: Validates each value in the map | ||
- `FormatMapListString`: Validates each string in the lists contained in the map | ||
|
||
## Example Usage | ||
|
||
<Content :page-key="$site.pages.find(p => p.path === '/reference/common/analyse.html').key"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
# equals | ||
|
||
The `equals` plugin checks if a value is exactly equal to an input. | ||
The `equals` analyser checks if a value equals a given string. For map inputs, it checks if the value at a specified key equals the given string. | ||
|
||
## Plugin fields | ||
|
||
| Field | Description | Required | Default | | ||
| ----- | -------------------------------------------------------------- | :------: | :-----: | | ||
| value | The value to compare against. | Yes | "" | | ||
| key | A key to look up the value when the input is a map of strings. | No | [] | | ||
## Configuration | ||
|
||
| Field | Type | Required | Description | | ||
| ------- | ------ | -------- | ------------------------------------------------ | | ||
| value | string | Yes | The string value to compare against | | ||
| key | string | No | For map inputs, the key whose value to check | | ||
|
||
<Content :page-key="$site.pages.find(p => p.path === '/reference/common/analyse.html').key"/> | ||
|
||
## Supported Input Formats | ||
|
||
- `FormatString`: Checks if the string value equals the configured value | ||
- `FormatMapString`: Checks if the value at the specified key equals the configured value | ||
|
||
## Example Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# not:empty | ||
|
||
The `not:empty` analyser checks if a map contains any values. This is useful for ensuring configuration sections are populated. | ||
|
||
## Configuration | ||
|
||
No additional configuration is required beyond the common analyser fields. | ||
|
||
<Content :page-key="$site.pages.find(p => p.path === '/reference/common/analyse.html').key"/> | ||
|
||
## Supported Input Formats | ||
|
||
- `FormatMapNestedString`: Checks if the nested map contains any values | ||
|
||
## Example Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# regex:match | ||
|
||
The `regex:match` analyser checks if a value matches a given regular expression pattern. This is useful for validating that configuration values follow certain patterns. | ||
|
||
## Configuration | ||
|
||
| Field | Type | Required | Description | | ||
| ------- | ------ | -------- | ------------------------------------------------ | | ||
| pattern | string | Yes | The regular expression pattern that should match | | ||
|
||
|
||
<Content :page-key="$site.pages.find(p => p.path === '/reference/common/analyse.html').key"/> | ||
|
||
## Supported Input Formats | ||
|
||
- `FormatNil`: No validation performed | ||
- `FormatMapNestedString`: Checks all nested string values against the pattern | ||
- `FormatString`: Checks the string value against the pattern | ||
|
||
## Example Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# regex:not-match | ||
|
||
The `regex:not-match` analyser checks if a value does NOT match a given regular expression pattern. This is useful for ensuring certain patterns are absent from your configuration. | ||
|
||
## Configuration | ||
|
||
| Field | Type | Required | Description | | ||
| ------- | ------ | -------- | ---------------------------------------------------- | | ||
| pattern | string | Yes | The regular expression pattern that should NOT match | | ||
|
||
|
||
<Content :page-key="$site.pages.find(p => p.path === '/reference/common/analyse.html').key"/> | ||
|
||
## Supported Input Formats | ||
|
||
- `FormatNil`: No validation performed | ||
- `FormatMapNestedString`: Checks all nested string values against the pattern | ||
- `FormatString`: Checks the string value against the pattern | ||
|
||
## Example Usage |