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
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