René's URL Explorer Experiment


Title: Refactor Script Analyzer to be used as a .NET library by daviwil · Pull Request #262 · PowerShell/PSScriptAnalyzer · GitHub

Open Graph Title: Refactor Script Analyzer to be used as a .NET library by daviwil · Pull Request #262 · PowerShell/PSScriptAnalyzer

X Title: Refactor Script Analyzer to be used as a .NET library by daviwil · Pull Request #262 · PowerShell/PSScriptAnalyzer

Description: Hi everyone, This is a refactoring of Script Analyzer to enable it to be used as a library in a .NET application. The bulk of the work was moving existing logic from the Invoke-ScriptAnalyzer cmdlet into the ScriptAnalyzer class. The means by which I achieved this move are not ideal; further refactoring will be needed to remove reliance on singleton instances of the ScriptAnalyzer and Helper classes. When we spoke at the meeting on Friday, we had agreed that using a PSHostUserInterface instance would be a good way to factor out the usage of Cmdlet.WriteX calls and avoid Console.WriteLine. After further inspection, I decided to create an IOutputWriter interface because PSHostUserInterface doesn't provide methods like WriteError(ErrorRecord) and ThrowTerminatingError. Let me know whether you think this is the right approach. Please let me know if there are any coding or style guidelines I might have missed. I have made sure that all of the existing Pester tests run after my changes. Thanks!

Open Graph Description: Hi everyone, This is a refactoring of Script Analyzer to enable it to be used as a library in a .NET application. The bulk of the work was moving existing logic from the Invoke-ScriptAnalyzer cmdl...

X Description: Hi everyone, This is a refactoring of Script Analyzer to enable it to be used as a library in a .NET application. The bulk of the work was moving existing logic from the Invoke-ScriptAnalyzer cmdl...

Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/pull/262

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2352e258-ad2b-b17a-e243-f30d25845e9c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC388:9A536:25D30FC:34E3D68:6AFD4A08
html-safe-nonce621011c917d046f7fae0ce240bfb093f090cebbbe87283ba211aa02008297f2f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzg4OjlBNTM2OjI1RDMwRkM6MzRFM0Q2ODo2QUZENEEwOCIsInZpc2l0b3JfaWQiOiIxODI3Njg1NzM2NDY0MDc1MjczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace12943af43188a07c91762330f3696cf57973194f29b5833e9ccad995fe058c4
hovercard-subject-tagpull_request:38835948
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
twitter:imagehttps://avatars.githubusercontent.com/u/79405?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/79405?s=400&v=4
og:image:altHi everyone, This is a refactoring of Script Analyzer to enable it to be used as a library in a .NET application. The bulk of the work was moving existing logic from the Invoke-ScriptAnalyzer cmdl...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id33149177
octolytics-dimension-repository_nwoPowerShell/PSScriptAnalyzer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33149177
octolytics-dimension-repository_network_root_nwoPowerShell/PSScriptAnalyzer
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F262%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F262%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=PowerShell%2FPSScriptAnalyzer
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
PowerShellhttps://github.com/PowerShell
PSScriptAnalyzerhttps://github.com/PowerShell/PSScriptAnalyzer
Codehttps://github.com/PowerShell/PSScriptAnalyzer
Issues407 (407)https://github.com/PowerShell/PSScriptAnalyzer/issues
Pull requests34 (34)https://github.com/PowerShell/PSScriptAnalyzer/pulls
Discussionshttps://github.com/PowerShell/PSScriptAnalyzer/discussions
Actionshttps://github.com/PowerShell/PSScriptAnalyzer/actions
Projectshttps://github.com/PowerShell/PSScriptAnalyzer/projects
Wikihttps://github.com/PowerShell/PSScriptAnalyzer/wiki
Security and qualityhttps://github.com/PowerShell/PSScriptAnalyzer/security
Insightshttps://github.com/PowerShell/PSScriptAnalyzer/insights
Sign up for GitHub https://github.com/signup?return_to=%2FPowerShell%2FPSScriptAnalyzer%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FPowerShell%2FPSScriptAnalyzer%2Fissues%2Fnew%2Fchoose
Raghu Shantha (raghushantha)https://github.com/raghushantha
PowerShell:developmenthttps://github.com/PowerShell/PSScriptAnalyzer/tree/development
daviwil:UseScriptAnalyzerAsLibraryhttps://github.com/daviwil/PSScriptAnalyzer/tree/UseScriptAnalyzerAsLibrary
Conversation 24 https://github.com/PowerShell/PSScriptAnalyzer/pull/262
Commits 1 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/commits
Checks 0 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/checks
Files changed https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
Refactor Script Analyzer to be used as a .NET library https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#top
Show all changes 1 commit https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
7fa7034 Refactor Script Analyzer to work as .NET library daviwil Jun 30, 2015 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/commits/7fa703482a1d9ce6117a63068b551091094fa32e
Clear filters https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
GetScriptAnalyzerRuleCommand.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dc90af740b04df714108af9179c47d97d45aecdd55c6dcfb2c71439cb4ad25a6
InvokeScriptAnalyzerCommand.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-6fd2b2fa8ce5b32efa5f2f564e6e914b6eba6189d88048b54202cdcd55ae1d5d
Helper.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-427edd792ddc5404af08d95e98ffdd68d3d282caa731e104ee2c1a1998c506b9
IOutputWriter.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-8cfbb404ddd71eeabea19a907448eba87078ee19c3cf4429ac11afd9c2dfc311
ScriptAnalyzer.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-111e1a18ba64b4ef55b1a611b6808a8671d79cbd45b9612229caa2a9cd2b27f3
ScriptAnalyzerEngine.csproj https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-111c4585a0f0c28ac729e8ccaa9b2b492613adc9ae01c39338989c870d7c1999
CustomizedRule.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-a904a3e40759e4f084d9dcf9656beead551fe585f8f7218a1e3c1d229e75e7fc
InvokeScriptAnalyzer.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dfc93f2c6f590bf681736728b9a79093ac4ab79ee06f5006c199876228200ccc
LibraryUsage.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-a5a46e29ff03f18a6b89841e909b8960937297f0765109deb56ba5be9b0547a0
RuleSuppression.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-04858cb85adcd9f5c1c3903ea98018bd6261340e59533add73145db039c784f0
Engine/Commands/GetScriptAnalyzerRuleCommand.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dc90af740b04df714108af9179c47d97d45aecdd55c6dcfb2c71439cb4ad25a6
View file https://github.com/daviwil/PSScriptAnalyzer/blob/7fa703482a1d9ce6117a63068b551091094fa32e/Engine/Commands/GetScriptAnalyzerRuleCommand.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/262/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dc90af740b04df714108af9179c47d97d45aecdd55c6dcfb2c71439cb4ad25a6
https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dc90af740b04df714108af9179c47d97d45aecdd55c6dcfb2c71439cb4ad25a6
https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dc90af740b04df714108af9179c47d97d45aecdd55c6dcfb2c71439cb4ad25a6
https://github.com/PowerShell/PSScriptAnalyzer/pull/262/files#diff-dc90af740b04df714108af9179c47d97d45aecdd55c6dcfb2c71439cb4ad25a6
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/262/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.