Title: Expose C# API for hosted scenarios + allow AST to be passed directly · Issue #1056 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Expose C# API for hosted scenarios + allow AST to be passed directly · Issue #1056 · PowerShell/PSScriptAnalyzer
X Title: Expose C# API for hosted scenarios + allow AST to be passed directly · Issue #1056 · PowerShell/PSScriptAnalyzer
Description: A fairly large ask, but I would be very happy doing the work. Just want to discuss it with everyone. In PowerShell EditorServices, we have a hosted PowerShell environment and do a lot of parsing and AST analysis separately from PSScriptA...
Open Graph Description: A fairly large ask, but I would be very happy doing the work. Just want to discuss it with everyone. In PowerShell EditorServices, we have a hosted PowerShell environment and do a lot of parsing an...
X Description: A fairly large ask, but I would be very happy doing the work. Just want to discuss it with everyone. In PowerShell EditorServices, we have a hosted PowerShell environment and do a lot of parsing an...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/1056
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Expose C# API for hosted scenarios + allow AST to be passed directly","articleBody":"A fairly large ask, but I would be very happy doing the work. Just want to discuss it with everyone.\r\n\r\nIn PowerShell EditorServices, we have a hosted PowerShell environment and do a lot of parsing and AST analysis separately from PSScriptAnalyzer. And we are often generating a new AST with every document change. This means PSScriptAnalyzer is doing a fair amount of duplicate work when we call it, since it only accepts input as a string or a filepath.\r\n\r\nOur ideal would be to be able to embed PSScriptAnalyzer with a C# API call, pass in our own hosted PowerShell session as its engine in the constructor, and then send pre-parsed ASTs to PSScriptAnalyzer for analysis. The cmdlets would then wrap or be an alternative entry point for this API.\r\n\r\n@JamesWTruher and I have discussed something like this before, but I just want to document the desire. He and I also discussed being able to only use rules that use the parser, rather than the whole engine.\r\n\r\nAnyway, to summarise:\r\n- We'd like to pass AST objects directly to PSSA, rather than having to reparse strings\r\n- Ideally we could do this in C# (no `ps.AddCommand(\"Invoke-ScriptAnalyzer\").Invoke()`)\r\n- Even more ideally we could pass in our own hosted PowerShell runtime for the analyzer to use, rather than have it spin up its own.","author":{"url":"https://github.com/rjmholt","@type":"Person","name":"rjmholt"},"datePublished":"2018-08-18T23:53:11Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/1056"}
| 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:0e9be100-5124-d398-24d1-22bef96ce5a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9074:424A8:EE17C:1591CD:6AFDCD3B |
| html-safe-nonce | ffb531bb53a42cf5ac4f0c88c7275bd316ad1a666389bc3ac6b77ea0a58855aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDc0OjQyNEE4OkVFMTdDOjE1OTFDRDo2QUZEQ0QzQiIsInZpc2l0b3JfaWQiOiI4MjM4NzM1Njc2MzQ2ODQ2NTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a5489afb2db54512a5febfb7b051148debb6d7371fb3ea98b3bc02217d7f3acc |
| hovercard-subject-tag | issue:351860833 |
| 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/1056/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8865760d79f1bb6d0d343c6e81198935db22967df45da3f69dcca57ebbac1fc6/PowerShell/PSScriptAnalyzer/issues/1056 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8865760d79f1bb6d0d343c6e81198935db22967df45da3f69dcca57ebbac1fc6/PowerShell/PSScriptAnalyzer/issues/1056 |
| og:image:alt | A fairly large ask, but I would be very happy doing the work. Just want to discuss it with everyone. In PowerShell EditorServices, we have a hosted PowerShell environment and do a lot of parsing an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rjmholt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 26886a40b582b821a7a76351e0a2f42b6d6160854b6e2520db24f31fd7be5da7 |
| 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 | 68ebaa631a1d248d69ebde4b9c5defd3a19aeb2f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width