CHORE: Replace parser.ParseDir, which is deprecated#4154
Open
tlimoncelli wants to merge 1 commit intomainfrom
Open
CHORE: Replace parser.ParseDir, which is deprecated#4154tlimoncelli wants to merge 1 commit intomainfrom
tlimoncelli wants to merge 1 commit intomainfrom
Conversation
philpennock
suggested changes
Mar 21, 2026
Contributor
philpennock
left a comment
There was a problem hiding this comment.
Basic smoke test: invoke go test -v -run TestCapabilitiesAreFiltered ./pkg/normalize
The reported details with this patch are very bogus. "is checked for with ..."
Before:
=== RUN TestCapabilitiesAreFiltered
capabilities_test.go:74: ok: providers.CanUseAKAMAICDN (4) is checked for with "AKAMAICDN"
capabilities_test.go:74: ok: providers.CanUseAKAMAITLC (29) is checked for with "AKAMAITLC"
capabilities_test.go:74: ok: providers.CanUseAlias (5) is checked for with "ALIAS"
capabilities_test.go:74: ok: providers.CanUseAzureAlias (6) is checked for with "AZURE_ALIAS"
capabilities_test.go:74: ok: providers.CanUseCAA (7) is checked for with "CAA"
capabilities_test.go:74: ok: providers.CanUseDHCID (8) is checked for with "DHCID"
capabilities_test.go:74: ok: providers.CanUseDNAME (9) is checked for with "DNAME"
capabilities_test.go:74: ok: providers.CanUseDNSKEY (24) is checked for with "DNSKEY"
capabilities_test.go:74: ok: providers.CanUseDS (10) is checked for with "DS"
capabilities_test.go:74: ok: providers.CanUseDSForChildren (11) is checked for with "DS"
capabilities_test.go:74: ok: providers.CanUseHTTPS (12) is checked for with "HTTPS"
capabilities_test.go:74: ok: providers.CanUseLOC (13) is checked for with "LOC"
capabilities_test.go:74: ok: providers.CanUseNAPTR (14) is checked for with "NAPTR"
capabilities_test.go:74: ok: providers.CanUseOPENPGPKEY (25) is checked for with "OPENPGPKEY"
capabilities_test.go:74: ok: providers.CanUsePTR (15) is checked for with "PTR"
capabilities_test.go:74: ok: providers.CanUseRP (17) is checked for with "RP"
capabilities_test.go:74: ok: providers.CanUseRoute53Alias (16) is checked for with "R53_ALIAS"
capabilities_test.go:74: ok: providers.CanUseSMIMEA (18) is checked for with "SMIMEA"
capabilities_test.go:74: ok: providers.CanUseSOA (19) is checked for with "SOA"
capabilities_test.go:74: ok: providers.CanUseSRV (20) is checked for with "SRV"
capabilities_test.go:74: ok: providers.CanUseSSHFP (21) is checked for with "SSHFP"
capabilities_test.go:74: ok: providers.CanUseSVCB (22) is checked for with "SVCB"
capabilities_test.go:74: ok: providers.CanUseTLSA (23) is checked for with "TLSA"
--- PASS: TestCapabilitiesAreFiltered (0.00s)
On this branch:
=== RUN TestCapabilitiesAreFiltered
capabilities_test.go:86: ok: providers.CanUseAKAMAICDN (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseAKAMAITLC (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseAlias (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseAzureAlias (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseCAA (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseDHCID (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseDNAME (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseDNSKEY (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseDS (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseDSForChildren (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseHTTPS (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseLOC (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseNAPTR (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseOPENPGPKEY (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUsePTR (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseRP (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseRoute53Alias (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseSMIMEA (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseSOA (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseSRV (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseSSHFP (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseSVCB (0) is checked for with "AUTODNSSEC"
capabilities_test.go:86: ok: providers.CanUseTLSA (0) is checked for with "AUTODNSSEC"
--- PASS: TestCapabilitiesAreFiltered (1.69s)
PASS
Contributor
|
The second check is to edit If I apply this test of the test on main, then the test correctly fails when I comment out DNAME. If I do the same on this branch, then the test passes, which means it has been made ineffective. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed #4089
FYI: I used Claude to fix this. I actually don't understand the original code so please give this extra scrutiny.
CC @philpennock
Issue
lint is reporting that parser.ParseDir is deprecated:
Resolution
Use
golang.org/x/tools/go/packagesinstead.