Skip to content

Commit

Permalink
Options schema updates microsoft#264 microsoft#265 microsoft#266
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite committed Jun 1, 2021
1 parent e1c1181 commit 9390ff6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Continue reading to see the changes included in the latest version.
- Source locations for rules failures are detected when using the `VisualStudioCode` style.
- General improvements:
- Preview channel will notify that a stable version is available. [#235](https://github.com/microsoft/PSRule-vscode/issues/235)
- Added PSRule options schema support updates.
- Added `Output.Banner` option. [#264](https://github.com/microsoft/PSRule-vscode/issues/264)
- Improved validation for the requires option. [#265](https://github.com/microsoft/PSRule-vscode/issues/265)
- Added support for new style options `VisualStudioCode` and `Detect`. [#266](https://github.com/microsoft/PSRule-vscode/issues/266)
- Engineering:
- Bump vscode engine to v1.56.0. [#241](https://github.com/microsoft/PSRule-vscode/pull/241)

Expand Down
53 changes: 47 additions & 6 deletions schemas/PSRule-options.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,28 @@
"enum": ["Detail", "Summary"],
"default": "Detail"
},
"banner": {
"title": "Banner format",
"description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, and SupportLinks.",
"markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, and `SupportLinks`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputbanner)",
"oneOf": [
{
"type": "string",
"enum": [
"None",
"Title",
"Source",
"SupportLinks",
"Default",
"Minimal"
]
},
{
"type": "integer"
}
],
"default": "Default"
},
"culture": {
"type": "array",
"title": "Culture",
Expand Down Expand Up @@ -353,10 +375,17 @@
"style": {
"type": "string",
"title": "Output Style",
"description": "The style that results will be presented in. The default is Client.",
"markdownDescription": "The style that results will be presented in. The default is `Client`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputstyle)",
"enum": ["Client", "Plain", "AzurePipelines", "GitHubActions"],
"default": "Client"
"description": "The style that results will be presented in. The default is Detect.",
"markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputstyle)",
"enum": [
"Client",
"Plain",
"AzurePipelines",
"GitHubActions",
"VisualStudioCode",
"Detect"
],
"default": "Detect"
}
},
"additionalProperties": false
Expand Down Expand Up @@ -440,8 +469,20 @@
"description": "Specifies the required version of a module to use.",
"markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#requires)",
"additionalProperties": {
"type": "string"
}
"type": "string",
"title": "Version constraint",
"description": "Specifies a module to constrain to a specific version.",
"markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#requires)",
"pattern": "^(@pre|@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$"
},
"defaultSnippets": [
{
"label": "Version constraint",
"body": {
"${1:Module}": "${2:'>=1.0.0'}"
}
}
]
},
"rule-option": {
"type": "object",
Expand Down

0 comments on commit 9390ff6

Please sign in to comment.