Skip to content

Commit 694fc57

Browse files
iRon7sdwheeler
andauthored
Update docs/Rules/InvalidMultiDotValue.md
Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
1 parent a9edf5d commit 694fc57

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

docs/Rules/InvalidMultiDotValue.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ title: InvalidMultiDotValue
1010

1111
## Description
1212

13-
PowerShell does not support an implicit value with multiple dots.
14-
Any *unquoted* value with 2 or more dots will not be treated as any special type (like a `version` or `IPAddress`)
15-
but result in `$null`. These objects need to be constructed from either a quoted string (e.g. `[Version]'1.2.3'`)
16-
or their individual components (e.g. `[Version]::new(1, 2, 3)`).
13+
PowerShell doesn't support unquoted literal values with multiple dots (`.`). Any value with two or
14+
more dots results in `$null`. This rule identifies instances where such values are used, which can
15+
lead to unexpected behavior or errors in the code.
16+
17+
To create values of the intended type, enclose the value in quotes and use type-casting or use type
18+
constructor methods to create the appropriate object.
1719

1820

1921
## Example

0 commit comments

Comments
 (0)