Title: [RULE] PSScriptAnalyzerSettingsSchema · Issue #1279 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: [RULE] PSScriptAnalyzerSettingsSchema · Issue #1279 · PowerShell/PSScriptAnalyzer
X Title: [RULE] PSScriptAnalyzerSettingsSchema · Issue #1279 · PowerShell/PSScriptAnalyzer
Description: User Story As a writer of PSScriptAnalyzer settings files I want static code checking of the structure of PSScriptAnalyzer settings files so that I can catch schematic violations early and easily. Specification Details The static schema ...
Open Graph Description: User Story As a writer of PSScriptAnalyzer settings files I want static code checking of the structure of PSScriptAnalyzer settings files so that I can catch schematic violations early and easily. ...
X Description: User Story As a writer of PSScriptAnalyzer settings files I want static code checking of the structure of PSScriptAnalyzer settings files so that I can catch schematic violations early and easily. ...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/1279
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[RULE] PSScriptAnalyzerSettingsSchema","articleBody":"## User Story\r\n\r\n- As a writer of PSScriptAnalyzer settings files\r\n- I want static code checking of the structure of PSScriptAnalyzer settings files\r\n- so that I can catch schematic violations early and easily.\r\n\r\n## Specification Details\r\n\r\nThe static schema for an `Invoke-ScriptAnalyzer -Settings` hashtable is not formally documented in a rigorous format at present. However, the current implementation implicitly adheres to the following as expressed using [JSON Schema](http://json-schema.org) (with the exception of case-sensitivity):\r\n\r\n```json\r\n{\r\n \"$schema\": \"http://json-schema.org/draft-07/schema\",\r\n \"title\": \"PSScriptAnalyzerSettings\",\r\n \"type\": \"object\",\r\n \"definitions\": {\r\n \"SeverityString\": {\r\n \"type\": \"string\",\r\n \"pattern\": \"Error|Warning|Information\"\r\n },\r\n \"stringOrStrings\": {\r\n \"oneOf\": [\r\n {\r\n \"type\": \"string\"\r\n },\r\n {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"properties\": {\r\n \"CustomRulePath\": {\r\n \"$ref\": \"#/definitions/stringOrStrings\"\r\n },\r\n \"ExcludeRules\": {\r\n \"$ref\": \"#/definitions/stringOrStrings\"\r\n },\r\n \"IncludeDefaultRules\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"IncludeRules\": {\r\n \"$ref\": \"#/definitions/stringOrStrings\"\r\n },\r\n \"RecurseCustomRulePath\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"Rules\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"object\"\r\n }\r\n },\r\n \"Severity\": {\r\n \"oneOf\": [\r\n {\r\n \"$ref\": \"#/definitions/SeverityString\"\r\n },\r\n {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/definitions/SeverityString\"\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"additionalProperties\": false\r\n}\r\n```\r\n\r\nThe static schema of an `Invoke-ScriptAnalyzer -Settings` hashtable, as currently implemented and as expressed above (but with the addition of global case-insensitivity), shall serve as the specification for the proposed \"PSScriptAnalyzerSettingsSchema\" rule. Additional requirements are as follows:\r\n\r\n- The schema utilized by the \"PSScriptAnalyzerSettingsSchema\" rule MUST be enforced by the `Invoke-ScriptAnalyzer` command.\r\n- The implementation of the \"PSScriptAnalyzerSettingsSchema\" rule SHOULD share source code for validation logic with the `Invoke-ScriptAnalyzer` command in an appropriately modular fashion such that changes to the aforementioned schema's specification correspond one-to-one to changes in the source code.\r\n\r\n## PSScriptAnalyzer Version\r\n\r\nThe latest version of PSScriptAnalyzer as of this writing is 1.18.1.\r\n\r\n","author":{"url":"https://github.com/travisclagrone","@type":"Person","name":"travisclagrone"},"datePublished":"2019-06-30T13:58:56Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/1279"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0a901fff-6f6e-103d-bc9a-058d6fdbe49c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A782:1B7D0E:38B316:4B1CD4:6AFCE74C |
| html-safe-nonce | fbfaef8d8632a309fb3eb6e772a9338843723869676333c9b2e632a81d8a2699 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzgyOjFCN0QwRTozOEIzMTY6NEIxQ0Q0OjZBRkNFNzRDIiwidmlzaXRvcl9pZCI6IjgwMjU5NzUzMTAxNzQxODUyOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 399b9f4e19ea9019b695b77b3eb1ee380682662d022e3a7e3f83485ea752a8f0 |
| hovercard-subject-tag | issue:462408007 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/1279/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5c479ee8e145c231b4ac158fa5624d1f318c4113c61be97d572a21959d268a4b/PowerShell/PSScriptAnalyzer/issues/1279 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5c479ee8e145c231b4ac158fa5624d1f318c4113c61be97d572a21959d268a4b/PowerShell/PSScriptAnalyzer/issues/1279 |
| og:image:alt | User Story As a writer of PSScriptAnalyzer settings files I want static code checking of the structure of PSScriptAnalyzer settings files so that I can catch schematic violations early and easily. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | travisclagrone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 99aede4c5f55ec5cf06666a8c9e03ebf9f85f7231223e7f1c38c16e5504835b3 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ecfd63ca125ec74b42f74eeb158b3fa081c8c497 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width