Skip to content

Commit

Permalink
Improve IntelliSense handling of Test-SpfRecord.
Browse files Browse the repository at this point in the history
The two internal-use-only parameters of Test-SpfRecord (the ones of
type [ref]) have been marked as "DontShow" and will now not be auto-
completed by IntelliSense.

They were already excluded from `Get-Help` as I was removing them
from platyPS's Markdown help files manually.

(Yes, I just learned about `[Parameter(DontShow)]`.  I suppose I am
one of today's lucky ten thousand.)
  • Loading branch information
rhymeswithmogul committed Dec 7, 2023
1 parent c98775c commit 375a8e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- **NEW** The IP version checks are now displayed with an indentation when run as a part of `Test-MailPolicy`.
- **FIX** The DMARC `fo` token is now parsed correctly when multiple values are present.
- **FIX** The DMARC `rf` token is now parsed correctly.
- **FIX** IntelliSense's handling of `Test-SpfRecord` has been improved by hiding some internal-use-only parameters.

## Version 1.3.0 (Tuesday, November 7, 2023)
- **NEW** `Test-SpfRecord` can now recursively evaluate SPF records to count how many DNS lookups are performed when evaluating `redirect=` modifiers and `include:` tokens. Use either `Test-SpfRecord -CountDnsLookups`, `Test-SpfRecord -Recurse`, or `Test-MailPolicy -CountSpfDnsLookups` to use this new mode. Note that this overrides the new behavior introduced in version 1.2.0.
Expand Down
7 changes: 5 additions & 2 deletions MailPolicyExplainer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,13 @@ PrivateData = @{
IconUri = 'https://raw.githubusercontent.com/rhymeswithmogul/MailPolicyExplainer/main/icon/PSGallery.png'

# ReleaseNotes of this module
ReleaseNotes = 'This release fixes many bugs and offers minor enhancements:
ReleaseNotes = 'This release adds one new feature: IP version checks are now indented when run from `Test-MailPolicy`.
Many bugs were fixed, too:
- The DMARC `fo` token is now parsed correctly when multiple values are present.
- The DMARC `rf` token is now parsed correctly.
- IP version checks are now indented when run from `Test-MailPolicy`.'
- The IntelliSense handling of `Test-SpfRecord` has been improved by hiding some internal-use-only parameters.
'

} # End of PSData hashtable

Expand Down
2 changes: 2 additions & 0 deletions src/MailPolicyExplainer.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,10 @@ Function Test-SpfRecord
[Alias('Recurse', 'CountSpfDnsLookups')]
[Switch] $CountDnsLookups,

[Parameter(DontShow)]
[ref] $Recursions,

[Parameter(DontShow)]
[ref] $DnsLookups
)

Expand Down

0 comments on commit 375a8e7

Please sign in to comment.