René's URL Explorer Experiment


Title: WIP Warn when using += on array objects by bergmeister · Pull Request #933 · PowerShell/PSScriptAnalyzer · GitHub

Open Graph Title: WIP Warn when using += on array objects by bergmeister · Pull Request #933 · PowerShell/PSScriptAnalyzer

X Title: WIP Warn when using += on array objects by bergmeister · Pull Request #933 · PowerShell/PSScriptAnalyzer

Description: PR Summary Fixes #806 and #904 It is well know that PowerShell's += operator always creates a new array under the hood even if the array type is not of fixed size. Because SSA (single statement analysis) is not fully implemented at the moment, the detection for the object type can not catch all cases. For example it does not work inside function definitions or cannot determine if the object is of type string at the moment or cases like $a=@(); $a+=$foo. The rule documentation includes all possible info even if strings cannot be caught at the moment. PR Checklist Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets. Please mark anything not applicable to this PR NA. PR has a meaningful title Use the present tense and imperative mood when describing your changes Summarized changes User facing documentation needed Change is not breaking Make sure you've added a new test if existing tests do not effectively test the code changed This PR is ready to merge and is not work in progress If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

Open Graph Description: PR Summary Fixes #806 and #904 It is well know that PowerShell's += operator always creates a new array under the hood even if the array type is not of fixed size. Because SSA (single statemen...

X Description: PR Summary Fixes #806 and #904 It is well know that PowerShell's += operator always creates a new array under the hood even if the array type is not of fixed size. Because SSA (single stat...

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

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:7dda664e-12fe-fa81-1da8-5d0b7fb42ed6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB1BA:B4AA9:A5FB1:DAD15:6AFD0C5B
html-safe-nonce954b1fec785858e5909641b89af62cb1afd8755f346d0ca99024d7eb1fc662a6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUJBOkI0QUE5OkE1RkIxOkRBRDE1OjZBRkQwQzVCIiwidmlzaXRvcl9pZCI6IjY4OTI1MDIyNTA3MDcyOTEyMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac108f0da3e84368006d8d3d9569b665baf1b002316afe9c056ca6749337efe04b
hovercard-subject-tagpull_request:175093202
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/933/files
twitter:imagehttps://avatars.githubusercontent.com/u/9250262?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/9250262?s=400&v=4
og:image:altPR Summary Fixes #806 and #904 It is well know that PowerShell's += operator always creates a new array under the hood even if the array type is not of fixed size. Because SSA (single statemen...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb29de2abb97b6307b16270785efeb58b51a117d5a9b659acf00b77aa00e7043b
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
release8c9e619def6d670dc18a45d3b02cea938c1c7e47
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F933%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%2F933%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/933/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/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
Christoph Bergmeister (bergmeister)https://github.com/bergmeister
PowerShell:developmenthttps://github.com/PowerShell/PSScriptAnalyzer/tree/development
bergmeister:WarnPlusEqualshttps://github.com/bergmeister/PSScriptAnalyzer/tree/WarnPlusEquals
Conversation 3 https://github.com/PowerShell/PSScriptAnalyzer/pull/933
Commits 8 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits
Checks 0 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/checks
Files changed https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
WIP Warn when using += on array objects https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#top
Show all changes 8 commits https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
949dc3f add warning for += operator on arrays. This covers only some use case… bergmeister Mar 14, 2018 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/949dc3f8a39c5769dc7e60c2af222d5d41d7c9e5
8b88557 Add documentation and tweak message bergmeister Mar 14, 2018 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/8b885573b6440d9d53f5795a9d4155f1ea03fd90
6b4f061 tweak docs bergmeister Mar 14, 2018 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/6b4f0611c90ee3c7753908e5b881f8d09eac41d1
f3ad8fd Merge branch 'development' of https://github.com/PowerShell/PSScriptA… bergmeister Mar 30, 2018 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/f3ad8fdb4c4467ee40ad688570e8f8cc408d0ea7
bc7426b Merge branch 'development' of https://github.com/PowerShell/PSScriptA… bergmeister Apr 12, 2018 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/bc7426b4fcca6cd47cb2c0695d12001ef009a59a
112d1fa Merge branch 'development' into WarnPlusEquals bergmeister Oct 3, 2018 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/112d1fa8607f6b24427c5ab812d213499859a532
b630eaa Merge branch 'development' of https://github.com/PowerShell/PSScriptA… bergmeister Jan 16, 2019 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/b630eaae77378eae50694f8f172acf4bc96692ef
7304caf Merge branch 'development' of https://github.com/PowerShell/PSScriptA… bergmeister Mar 5, 2019 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/commits/7304caf9a964e596da99f3fa65bd5e57559097dd
Clear filters https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
Helper.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-427edd792ddc5404af08d95e98ffdd68d3d282caa731e104ee2c1a1998c506b9
VariableAnalysis.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-4322621239ee130b40eb956ef67bcf3bde6eaf84c7b72d30163c86dcd4f30d67
AvoidPlusEqualsOperatorOnArraysOrStrings.md https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-8ad80b515d813b9d06fc95b44f41de6d47499086fee01c1ccf50c397d55b1a56
AvoidPlusEqualsOperatorOnArraysOrStrings.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-910e9892c4065f5de575337253e6a1135b0319038b22070e3caade465c839aa3
Strings.Designer.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-96b2565d7dcc77ccb6e34f95390675d07fb9a9029461308461eb94721a6c6088
Strings.resx https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-dcff94e6a5c5ee1dc9226dea0752aba08f8f1f53020b4a0e67f1ac944036b8c3
AvoidUsingPlusEqualsOperatorForArraysOrStrings.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-87856ced7c86b319decdf465f635b37e18c98f629471bdaf644f7c36a563a4e8
Engine/Helper.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-427edd792ddc5404af08d95e98ffdd68d3d282caa731e104ee2c1a1998c506b9
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/Engine/Helper.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-427edd792ddc5404af08d95e98ffdd68d3d282caa731e104ee2c1a1998c506b9
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-427edd792ddc5404af08d95e98ffdd68d3d282caa731e104ee2c1a1998c506b9
Engine/VariableAnalysis.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-4322621239ee130b40eb956ef67bcf3bde6eaf84c7b72d30163c86dcd4f30d67
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/Engine/VariableAnalysis.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-4322621239ee130b40eb956ef67bcf3bde6eaf84c7b72d30163c86dcd4f30d67
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-4322621239ee130b40eb956ef67bcf3bde6eaf84c7b72d30163c86dcd4f30d67
RuleDocumentation/AvoidPlusEqualsOperatorOnArraysOrStrings.mdhttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-8ad80b515d813b9d06fc95b44f41de6d47499086fee01c1ccf50c397d55b1a56
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/RuleDocumentation/AvoidPlusEqualsOperatorOnArraysOrStrings.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/{{ revealButtonHref }}
Rules/AvoidPlusEqualsOperatorOnArraysOrStrings.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-910e9892c4065f5de575337253e6a1135b0319038b22070e3caade465c839aa3
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/Rules/AvoidPlusEqualsOperatorOnArraysOrStrings.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/{{ revealButtonHref }}
Rules/Strings.Designer.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-96b2565d7dcc77ccb6e34f95390675d07fb9a9029461308461eb94721a6c6088
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/Rules/Strings.Designer.cs
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files
Rules/Strings.resxhttps://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-dcff94e6a5c5ee1dc9226dea0752aba08f8f1f53020b4a0e67f1ac944036b8c3
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/Rules/Strings.resx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-dcff94e6a5c5ee1dc9226dea0752aba08f8f1f53020b4a0e67f1ac944036b8c3
Tests/Rules/AvoidUsingPlusEqualsOperatorForArraysOrStrings.tests.ps1https://github.com/PowerShell/PSScriptAnalyzer/pull/933/files#diff-87856ced7c86b319decdf465f635b37e18c98f629471bdaf644f7c36a563a4e8
View file https://github.com/bergmeister/PSScriptAnalyzer/blob/7304caf9a964e596da99f3fa65bd5e57559097dd/Tests/Rules/AvoidUsingPlusEqualsOperatorForArraysOrStrings.tests.ps1
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/933/{{ revealButtonHref }}
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.