Title: New Rule Suggestion: AvoidReuseOfAutomaticVariables · Issue #712 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: New Rule Suggestion: AvoidReuseOfAutomaticVariables · Issue #712 · PowerShell/PSScriptAnalyzer
X Title: New Rule Suggestion: AvoidReuseOfAutomaticVariables · Issue #712 · PowerShell/PSScriptAnalyzer
Description: I think it would be really helpful, if there was a rule that would point out when there's attempt to reuse (assign something to) an automatic variable, as sometimes, those may get reused by mistake, like $Host, $Home, $Args, $Input, etc....
Open Graph Description: I think it would be really helpful, if there was a rule that would point out when there's attempt to reuse (assign something to) an automatic variable, as sometimes, those may get reused by mistake...
X Description: I think it would be really helpful, if there was a rule that would point out when there's attempt to reuse (assign something to) an automatic variable, as sometimes, those may get reused by mis...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/712
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New Rule Suggestion: AvoidReuseOfAutomaticVariables","articleBody":"I think it would be really helpful, if there was a rule that would point out when there's attempt to reuse (assign something to) an automatic variable, as sometimes, those may get reused by mistake, like `$Host`, `$Home`, `$Args`, `$Input`, etc. While in some cases the engine will throw out an error during the execution (i.e. `$Host = 'Hello!'`), there are occasions when no errors will show up, like `$Args = 'Hello!'`. The inability to retrieve the assigned value back from the `$Args` may be confusing to those people who don't yet know that $Args is actually an automatic variable.","author":{"url":"https://github.com/Glober777","@type":"Person","name":"Glober777"},"datePublished":"2017-02-16T08:47:30Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/712"}
| 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:ff342b36-3e34-da29-d22a-9842e2056338 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7C2:FF19:2D58D8:3EBD2A:6AFDA2A4 |
| html-safe-nonce | 1b7dcfca8f09ac824ccdf8ad35024af768ef41daefbef96fa48639b933bc8735 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0MyOkZGMTk6MkQ1OEQ4OjNFQkQyQTo2QUZEQTJBNCIsInZpc2l0b3JfaWQiOiI3NTIyNjc0NTg0MTE0Mjc0OTgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 352c29bb0d825de797cf90caab261ed37f8f70c1eef66876559882c6a01bc89e |
| hovercard-subject-tag | issue:208056530 |
| 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/712/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c09288fcfbdd2041da1d11b0ba6dbbbb9f9a74c8e673f88626050f750d28c98/PowerShell/PSScriptAnalyzer/issues/712 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c09288fcfbdd2041da1d11b0ba6dbbbb9f9a74c8e673f88626050f750d28c98/PowerShell/PSScriptAnalyzer/issues/712 |
| og:image:alt | I think it would be really helpful, if there was a rule that would point out when there's attempt to reuse (assign something to) an automatic variable, as sometimes, those may get reused by mistake... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Glober777 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| 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 | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width