Upgrade Meziantou.Analyzer to 3.0.141 - #2933
Merged
Merged
Conversation
3.0.140 generalized MA0060's do-not-ignore-return-value detection, which now reaches the one deliberately ignored ParseUtils.TryParseInt32 call in the RFC 822 date parser. That call site already carried a CA1806 suppression for exactly the same reason, so replace both with an explicit discard, which satisfies either rule and states the intent in the code rather than in a pragma. The comment records why the result carries no information here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Supersedes #2930, which fails to build on every leg.
3.0.140 generalized MA0060's do-not-ignore-return-value detection, and it now reaches the one deliberately ignored
ParseUtils.TryParseInt32call in the RFC 822 date parser:That call site already carried a
#pragma warning disable CA1806for exactly the same reason, so rather than add a second rule id to the pragma, both are replaced with an explicit discard — which satisfies either rule and puts the intent in the code instead of in a suppression. The accompanying comment records why the result carries no information there: the token is numeric (IsNumericmeans every byte is'0'–'9') and one or two bytes long, so the parse can neither run out of digits nor overflow, and a failure would leavevalueat0, which falls through all three range checks that follow.The remaining 3.0.139/141 changes are a dropped obsolete Roslyn version and a transitive Meziantou.Polyfill bump; neither produces a diagnostic here.
While in the file: nothing else in the repository is behind. Every other entry in
Directory.Packages.propsis already at its latest stable version (dotnet list package --outdatedis clean apart from the two deliberately pinned prereleases, ICU4N and Okojo), and the workflows are oncheckout@v7/setup-dotnet@v6/cache@v6.Verification
dotnet build -c Release— clean, 0 warnings across all five target frameworks.dotnet test -c Release Jint.Tests— 4839 passed (net10.0), 4758 passed (net472).JINT_HOST_CONTRACT_VERIFICATION=1 dotnet test -c Release Jint.Tests— same, 0 failures.dotnet test -c Release Jint.Tests.PublicInterface— 1334 passed (net10.0), 1333 passed (net472).The discard compiles to the same IL as the ignored call, so there is no behavioural change to measure.
🤖 Generated with Claude Code