Title: ValidateRange boundary type vs parameter type check · Issue #2199 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: ValidateRange boundary type vs parameter type check · Issue #2199 · PowerShell/PSScriptAnalyzer
X Title: ValidateRange boundary type vs parameter type check · Issue #2199 · PowerShell/PSScriptAnalyzer
Description: Summary of the new feature For ValidateRange, check that the boundary type match the parameter types. The reason is that integer literals silently accepts values outside the declared range on [double], [float], [decimal] types A clear an...
Open Graph Description: Summary of the new feature For ValidateRange, check that the boundary type match the parameter types. The reason is that integer literals silently accepts values outside the declared range on [doub...
X Description: Summary of the new feature For ValidateRange, check that the boundary type match the parameter types. The reason is that integer literals silently accepts values outside the declared range on [doub...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2199
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ValidateRange boundary type vs parameter type check","articleBody":"**Summary of the new feature**\nFor ValidateRange, check that the boundary type match the parameter types. The reason is that integer literals silently accepts values outside the declared range on [double], [float], [decimal] types\n\nA clear and concise description of what the problem is that the new feature would solve.\nTry formulating it in user story style (if applicable):\nI wrote it up in this article\nhttps://www.reddit.com/r/PowerShell/comments/1vbsyfc/til_validaterange_with_integer_literals_silently/\n\n**Proposed technical implementation details (optional)**\n\nA clear and concise description of what you want to happen.\nI'd like to see the PSScriptAnalyzer highlight an inconsistency in types in the same way that it does for other errors.\nThis would be shown in the output list when you run it against a script.\n\n**What is the latest version of PSScriptAnalyzer at the point of writing**\n1.25\n","author":{"url":"https://github.com/tidy-developer","@type":"Person","name":"tidy-developer"},"datePublished":"2026-08-02T20:46:00Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/2199"}
| 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:6ef021c8-bc73-54c0-090a-4b198e65ce70 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B51A:24338B:2BCA8E:3D5B10:6AFCD450 |
| html-safe-nonce | 0be3c5bd0a62068c763197e0b76df36f493747636a0c42fb5f4b82a5703f21a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTFBOjI0MzM4QjoyQkNBOEU6M0Q1QjEwOjZBRkNENDUwIiwidmlzaXRvcl9pZCI6IjIwMDg5NTYzMDg2NjA0NzQ5NjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e79e931ee68fe4266d9e019fbc47876f5a914588186cc80763648d2e0f197e8b |
| hovercard-subject-tag | issue:5044394983 |
| 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/2199/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b84eae0f665fe9370481c5e5d6019316dbb8b54bedc0cbab7296c24d452f1114/PowerShell/PSScriptAnalyzer/issues/2199 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b84eae0f665fe9370481c5e5d6019316dbb8b54bedc0cbab7296c24d452f1114/PowerShell/PSScriptAnalyzer/issues/2199 |
| og:image:alt | Summary of the new feature For ValidateRange, check that the boundary type match the parameter types. The reason is that integer literals silently accepts values outside the declared range on [doub... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tidy-developer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5b7bc7e41e0a604bbdb5035c7ed9620c2d28b9c8a18747182e2262a75abfd91 |
| 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 | ff5022cc3aa767e6115451d9c322dd975506d40e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width