Repository navigation
Give the relay test a longer hang guard and catch the qualified and wrapped never leeway (851-4477) - #1491
Merged
Conversation
… and catch every spelling of a never leeway (851-4477) The relay test waited 2 s for its packet, which only bounds a hang but can run out on a loaded machine with the relay delivering correctly: 30 s now. The lint rule also catches the module-qualified spelling and a DispatchTimeInterval constant set to .never, and the README says what the rule can't see. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…nd ternaries (851-4477) Review fixes: the widened rule flagged repeating: DispatchTimeInterval.never and comparisons, and missed optionals, ternaries and parentheses. The relay test's wait keeps one deadline across interrupted polls. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Review: a regex can't follow a value into a leeway, and the wider patterns missed the wrapped form and rejected a guard that removes .never. The rule matches only the literal argument again, across whitespace and newlines and with an optional type or module name; the README names the relay test as the real guard. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Member
Author
|
Review applied at |
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.
Part of 851-4477 (benchmark only; follow-up to #1489 from its review. The ticket stays open for the product PR.)
What changes
timer_leeway_never: stays a tripwire for the literal spelling only. It matches aleeway:argument that is.never, with or without a type or module name in front, across whitespace and newlines (so the wrapped form is caught).What the rule does not do, on purpose
.never, so it is gone.Tests
scripts/swift-lint.test.mjs: 4 spellings that must fail (plain, type-qualified, module-qualified, wrapped onto the next line) and 3 that must pass (.nanoseconds(0),repeating: .never, a comparison with.neverinside a leeway argument).LoopbackRelayTestspasses locally (7 ms). The longer wait has no test of its own; it only matters when the relay is broken or the machine is stalled.🤖 Generated with Claude Code