GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ValidateRange boundary type vs parameter type check · Issue #2199 · PowerShell/PSScriptAnalyzer

ValidateRange boundary type vs parameter type check #2199

New issue
Copy link
New issue
Copy link
Open
#2267
Open
ValidateRange boundary type vs parameter type check#2199
#2267
Copy link
Assignees
bergmeistercopilot-swe-agent
Labels
Issue - New Rule

Description

@tidy-developer
tidy-developer
opened on Aug 2, 2026
Issue body actions

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 and concise description of what the problem is that the new feature would solve.
Try formulating it in user story style (if applicable):
I wrote it up in this article
https://www.reddit.com/r/PowerShell/comments/1vbsyfc/til_validaterange_with_integer_literals_silently/

Proposed technical implementation details (optional)

A clear and concise description of what you want to happen.
I'd like to see the PSScriptAnalyzer highlight an inconsistency in types in the same way that it does for other errors.
This would be shown in the output list when you run it against a script.

What is the latest version of PSScriptAnalyzer at the point of writing
1.25

Reacted by h-ild and iRon7
Reacted by Copilot

Activity

  1. Christoph Bergmeister (bergmeister)
    assigned
    Copilot
    and
    Christoph Bergmeister (bergmeister)
    on Oct 27, 2026
  2. Copilot
    linked a pull request that will close this issueWarn on integer ValidateRange bounds for floating-point parameters #2267on Oct 27, 2026
  3. Christoph Bergmeister (bergmeister)
    added
    Issue - New Rule
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @bergmeister
    Christoph Bergmeister (bergmeister)
  • Copilot

Labels

Issue - New Rule

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.