File tree 4 files changed +11
-8
lines changed
reference/docs-conceptual/PSScriptAnalyzer/Rules 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
description : Avoid exclaim operator
3
3
ms.custom : PSSA v1.22.0
4
- ms.date : 06/14/2023
4
+ ms.date : 02/13/2024
5
5
ms.topic : reference
6
6
title : AvoidExclaimOperator
7
7
---
@@ -10,20 +10,23 @@ title: AvoidExclaimOperator
10
10
11
11
## Description
12
12
13
- The negation operator ` ! ` should not be used for readability purposes . Use ` -not ` instead .
13
+ Avoid using the negation operator ( ` ! ` ) . Use ` -not ` for improved readability .
14
14
15
- ** Note** : This rule is not enabled by default. The user needs to enable it through settings.
15
+ > [ !NOTE]
16
+ > This rule is not enabled by default. The user needs to enable it through settings.
16
17
17
18
## How to Fix
18
19
19
20
## Example
21
+
20
22
### Wrong:
21
- ``` PowerShell
23
+
24
+ ``` powershell
22
25
$MyVar = !$true
23
26
```
24
27
25
28
### Correct:
26
- ``` PowerShell
29
+ ``` powershell
27
30
$MyVar = -not $true
28
31
```
29
32
Original file line number Diff line number Diff line change 1
1
---
2
2
description : Avoid Using Positional Parameters
3
3
ms.custom : PSSA v1.22.0
4
- ms.date : 06/28/2023
4
+ ms.date : 02/13/2024
5
5
ms.topic : reference
6
6
title : AvoidUsingPositionalParameters
7
7
---
Original file line number Diff line number Diff line change 1
1
---
2
2
description : List of PSScriptAnalyzer rules
3
3
ms.custom : PSSA v1.22.0
4
- ms.date : 06/28/2023
4
+ ms.date : 02/13/2024
5
5
ms.topic : reference
6
6
title : List of PSScriptAnalyzer rules
7
7
---
Original file line number Diff line number Diff line change 1
1
---
2
2
description : Cmdlet Singular Noun
3
3
ms.custom : PSSA v1.22.0
4
- ms.date : 06/28/2023
4
+ ms.date : 02/13/2024
5
5
ms.topic : reference
6
6
title : UseSingularNouns
7
7
---
You can’t perform that action at this time.
0 commit comments