René's URL Explorer Experiment


Title: Distinguish script-defined functions from DSC resources by Copilot · Pull Request #2297 · PowerShell/PSScriptAnalyzer · GitHub

Open Graph Title: Distinguish script-defined functions from DSC resources by Copilot · Pull Request #2297 · PowerShell/PSScriptAnalyzer

X Title: Distinguish script-defined functions from DSC resources by Copilot · Pull Request #2297 · PowerShell/PSScriptAnalyzer

Description: PR Summary Follow-up to #2270, targeting its branch rather than main. The review finding is reproducible: a resource-shaped call to a script-defined function is treated as a DSC declaration because command discovery uses a separate runspace. Commands inside its script block arguments are then incorrectly suppressed. Both new regression cases returned zero diagnostics before the fix instead of the two expected diagnostics. Recognize function declarations in enclosing script-block scopes, case-insensitively, without searching unrelated nested scopes. Use that information consistently for resource declarations and their same-line/following-line bodies. Do not apply implicit Get- prefix corrections to script-defined function calls; preserve explicit alias handling. Cover script-level and configuration-level functions, both brace layouts, unrelated scopes, and formatter behavior. Document the distinction. Validation: .NET 8 and .NET Framework 4.6.2 builds succeeded. Alias tests: 23 passed, 2 Windows-only tests skipped on Linux. Formatter integration tests: 10 passed. Executed using PowerShell 7.4.13 and Pester 5.7.1; the configured Pester 6.0.1 package was unavailable from the accessible mirror. PR Checklist PR has a meaningful title Summarized changes Change is not breaking All changed source files have the correct copyright header Added regression tests and updated documentation This PR is ready to merge and is not Work in Progress (opened as a draft)

Open Graph Description: PR Summary Follow-up to #2270, targeting its branch rather than main. The review finding is reproducible: a resource-shaped call to a script-defined function is treated as a DSC declaration because...

X Description: PR Summary Follow-up to #2270, targeting its branch rather than main. The review finding is reproducible: a resource-shaped call to a script-defined function is treated as a DSC declaration because...

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

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:1e77d870-c7fb-a43a-d23c-fdf79a71912d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id97DA:E0024:66165:8800D:6AFD29DA
html-safe-nonce7994ffebc5ab81c66a484e01c2aaebe5bd417f63cff36f2e2d53b99d1d7ed071
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0RBOkUwMDI0OjY2MTY1Ojg4MDBEOjZBRkQyOURBIiwidmlzaXRvcl9pZCI6IjUzMDEyNzg3NDA4MzgxNjQ5NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac34fb45f9717853518b6fb5a5e11519805a9fba91a9ed4b73f6aae1fdeba5776e
hovercard-subject-tagpull_request:5072599481
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/2297/files
twitter:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
og:image:altPR Summary Follow-up to #2270, targeting its branch rather than main. The review finding is reproducible: a resource-shaped call to a script-defined function is treated as a DSC declaration because...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19
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
release941021edf0c2ec58298f4a2c8f27ae507d129c92
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2297%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%2F2297%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/2297/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/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
Copilothttps://github.com/apps/copilot-swe-agent
copilot/fix-auto-correct-aliaseshttps://github.com/PowerShell/PSScriptAnalyzer/tree/copilot/fix-auto-correct-aliases
fix/dsc-script-local-commandhttps://github.com/PowerShell/PSScriptAnalyzer/tree/fix/dsc-script-local-command
Conversation 264 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297
Commits 40 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits
Checks 7 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/checks
Files changed https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
Distinguish script-defined functions from DSC resources https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files#top
Show all changes 40 commits https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
784620a Distinguish script-defined functions from DSC resources bergmeister Oct 29, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/784620ad1bebf8e19e8e1df5eb24834d2b48b93d
8f6c37e Index scoped functions in alias analysis Copilot Oct 29, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/8f6c37e63f3a297632256d17ccafbd10ae434999
a6b0cd1 Fix scoped function visibility analysis Copilot Oct 29, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/a6b0cd18d6881ce3f316da85b3c951337908db3e
d558096 Fix dot-sourced function scope indexing Copilot Oct 29, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/d5580963a2c55cadfbdc48054d7a55bf8faf5fc2
82b986e Fix parameterized dot-source scope handling Copilot Oct 29, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/82b986e18a0ec2f4cf49979573b8fa6ccff34e4f
a06a9a2 Handle callback and unreachable function scopes Copilot Oct 29, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/a06a9a2a19071188611c6a424e98b29ae5a0bff5
502b2a3 Fix callback scope classification Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/502b2a344f8f6457b315ec7e0b5e51ae0f142f25
ca34be9 Fix callback scope binding Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/ca34be9211104c13f21ef5313e8068a1f9c61841
f9af9d5 Fix alias scope callback analysis Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/f9af9d5dbe2221972fbca8b44b1fa07b83fb4a72
642cf6c Handle unsupported command parameter metadata Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/642cf6c7177fe37a6edac60d9450d2fc8b890392
8318291 Address AvoidAlias review findings Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/83182911e9dad092c5f4b8533b5429a84e0dd122
00f6322 Fix AvoidAlias scope classification review findings Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/00f63225825afa67258a824c8fe28d84521ed408
c550c39 Fix AvoidAlias execution-order and positional handling Copilot Oct 30, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/c550c39a38e55bad919c31722757f56dfe961ae8
d2f2467 Fix AvoidAlias review findings Copilot Oct 31, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/d2f2467e4e85f528d1a1903513e1258545f8c950
5370964 Fix AvoidAlias scope resolution review findings Copilot Oct 31, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/53709647c83c9a9986c5d3a65f3b200c56b44210
e472dde Address AvoidAlias review findings Copilot Nov 2, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/e472dde1c565f3bd03c2b2f7cdeb4eb84f670aac
a444001 Fix job initializer function scope analysis Copilot Nov 2, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/a44400142d590f2fa9796ad4c1332bf1314c4480
29e1756 Handle nested initialized job calls Copilot Nov 2, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/29e17563e16a87b1cbbff64368d17ecfceb1215a
69b6987 Fix AvoidAlias review findings Copilot Nov 2, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/69b69878625abc63d78807a15bcdde01a9c733e9
4a96313 Recognize DSC Script resource on macOS Copilot Nov 3, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/4a96313ebf7acdc103c5b5f9bc84f3f0bebe37ac
18fedd1 Fix AvoidAlias scope review findings Copilot Nov 3, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/18fedd1c33fad291b0645cf25f839d24f6cb1e69
aec74d7 Fix AvoidAlias review findings Copilot Nov 3, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/aec74d7067e04f94450ec069ee1ecec4ed007d4b
ba09c25 Fix AvoidAlias invocation phase ordering Copilot Nov 3, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/ba09c25cca323fc228290704de5f43292c9ec1a0
a51fb19 Fix AvoidAlias nested invocation ordering Copilot Nov 3, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/a51fb19891c6ec52281d18bcac59ad4ae468ae40
ab40eeb Fix AvoidAlias scope ordering review findings Copilot Nov 4, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/ab40eebc455960cd57aa58e6e23ff7386bd0ea8a
d830cbf Fix AvoidAlias module and callback ordering Copilot Nov 4, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/d830cbf7b9366a501942c0bedae6eeb40d5cc17a
679dd5a Fix AvoidAlias scope handling review findings Copilot Nov 4, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/679dd5a20dfa3c8a44bf14c17f8a289d1e44dcbc
fbdd540 Handle singleton subexpression scopes Copilot Nov 5, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/fbdd54052606276ad42fc871bf7507663436824c
5505906 Fix AvoidAlias scope review findings Copilot Nov 5, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/550590694dac2f91373689d3250473869da38903
c326216 Fix nested scope boundaries in AvoidAlias Copilot Nov 5, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/c326216c602012a385ad2224a11635c4c94e66c4
4cf0190 Add DSC nested callback regression Copilot Nov 5, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/4cf01909385a352c3d480d81fdb819b7a47bb507
1d4d680 Skip DSC AST regression on Windows PowerShell Copilot Nov 5, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/1d4d6804a57385bdfca3d2076bb2ee4a8d6830a0
ca1b8e4 Fix AvoidAlias scope and execution ordering Copilot Nov 6, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/ca1b8e410a62af2b52a3367d386da98a056fd944
ce29d24 Fix AvoidAlias nested pipeline execution ordering Copilot Nov 6, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/ce29d24684597c89ecfba1b49543feb5becb6f69
5d150c1 Unwrap ScriptBlock casts in caller scope analysis Copilot Nov 6, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/5d150c130bb7b20cf0558f6586da8f4706c97d53
03be28b Fix AvoidAlias callback scope edge cases Copilot Nov 6, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/03be28b8c9dcdded67ea78387e973ccd3a2ecc14
d16253b Fix AvoidAlias scope ordering review findings Copilot Nov 9, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/d16253bbca263517877f44bcc9c22e00cfffa5bf
b7583f9 Fix AvoidAlias pipeline callback ordering Copilot Nov 9, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/b7583f9dee6c413b7fa5f8a14259526148a4b577
36e9064 Fix pipeline callback visibility ordering Copilot Nov 10, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/36e9064e00c2fb006f5ea9c3d7d86b36fe06fe5e
7b766e1 Fix ForEach-Object callback phase inference Copilot Nov 11, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/commits/7b766e12773a2416eaa8cc6e7ea1b9fdf9712639
Clear filters https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
AvoidAlias.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files#diff-40becd86a71ebd960dac7e49cc6af101462b7a2a804af2c58753f24f4a50119f
AvoidUsingAlias.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files#diff-bfd4fadf17dab8fb78df7d07afccff779f8aa844dd3a767e61d73683e6c97ad8
AvoidUsingCmdletAliases.md https://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files#diff-bdcefce014bfa92ba7fc888060ee762d9455f1adaad3dc5eb1e6398066588e87
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2297/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.