Skip to content

Commit 3d674ae

Browse files
authored
Apply suggestions from code review
1 parent a14b50c commit 3d674ae

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Avoid exclaim operator
33
ms.custom: PSSA v1.22.0
4-
ms.date: 06/14/2023
4+
ms.date: 02/13/2024
55
ms.topic: reference
66
title: AvoidExclaimOperator
77
---
@@ -10,20 +10,23 @@ title: AvoidExclaimOperator
1010

1111
## Description
1212

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

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.
1617
1718
## How to Fix
1819

1920
## Example
21+
2022
### Wrong:
21-
```PowerShell
23+
24+
```powershell
2225
$MyVar = !$true
2326
```
2427

2528
### Correct:
26-
```PowerShell
29+
```powershell
2730
$MyVar = -not $true
2831
```
2932

reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Avoid Using Positional Parameters
33
ms.custom: PSSA v1.22.0
4-
ms.date: 06/28/2023
4+
ms.date: 02/13/2024
55
ms.topic: reference
66
title: AvoidUsingPositionalParameters
77
---

reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: List of PSScriptAnalyzer rules
33
ms.custom: PSSA v1.22.0
4-
ms.date: 06/28/2023
4+
ms.date: 02/13/2024
55
ms.topic: reference
66
title: List of PSScriptAnalyzer rules
77
---

reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Cmdlet Singular Noun
33
ms.custom: PSSA v1.22.0
4-
ms.date: 06/28/2023
4+
ms.date: 02/13/2024
55
ms.topic: reference
66
title: UseSingularNouns
77
---

0 commit comments

Comments
 (0)