Repository navigation
Add ilverify --list-errors to list the names --ignore-error matches - #136112
Merged
Merged
Conversation
--ignore-error and --ignore-error-file match regular expressions against error names, but ILVerify does not list those names anywhere. The new --list-errors option prints every VerifierError name except None, with each name's message from Strings.resx. It then prints every ExceptionStringID name. A final line explains that an error with neither kind of name matches None. Like --help, it works without input files and does not verify any that are given. Fixes dotnet#136056
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
This was referenced Oct 20, 2026
Member
|
/ba-g System.Runtime.Tests failure is known issue that just got fixed |
Contributor
Author
|
Thank you for the review and merge! |
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.
--ignore-errorand--ignore-error-filematch regular expressions against error names, but ILVerify does not list those names anywhere. This PR adds a--list-errorsoption that prints them:VerifierErrorname exceptNone, with its message fromStrings.resx;ExceptionStringIDname;None.The issue proposed
--help --verbosefor this. I used a separate option instead, which the issue offered as the alternative. Plain--helpnow shows the option with its own description, and--verbosekeeps its one meaning, verbose verification output.Like
--help,--list-errorsworks without input files. If input files are given, it prints the list and does not verify them. Plain--helpgains one line:The output looks like this:
Five messages contain placeholders such as
'{0}', which ILVerify fills in when it reports the error. The list shows them unfilled.Testing
ILVerify has no command-line tests, so I checked a build of this branch against a build of
main:--list-errorswith no input files exits with 0. It prints 124 verification error names (all ofVerifierErrorexceptNone) and 25 type system names (all ofExceptionStringID). Both lists follow declaration order. Each verification error name is printed with itsStrings.resxmessage.--helpdiffers frommainonly by the new line.--ignore-erroraccepts a name from each list. On theReturnTestsassembly fromILVerification.Tests,--ignore-error "^ReturnPtrToStack$"removed bothReturnPtrToStackerrors and nothing else. OnInvalidMetadataReferenceTests,--ignore-error "^ClassLoadGeneral$"removed the fiveClassLoadGeneralerrors.ILVerification.Testspasses: 513 of 513.Fixes #136056
Note
This PR was prepared with AI assistance (Anthropic Claude and OpenAI Codex), under my direction. I reviewed it before posting.