linter: split require-timeout-settings into require-lock-timeout and require-statement-timeout#1
Merged
Merged
Conversation
Split require-timeout-settings into require-lock-timeout and require-statement-timeout so each timeout check can be enabled or disabled individually. require-timeout-settings remains as a deprecated alias that expands to both rules in config includes/excludes and squawk-ignore comments. Refs sbdchd#1231 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XRd5kooj79N8aLiQSzLqjG
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.
Fixes sbdchd#1231
What
Splits the
require-timeout-settingsrule into two independent rules so each timeout check can be enabled/disabled on its own:require-lock-timeout— warns whenset lock_timeoutis missing before potentially slow operationsrequire-statement-timeout— warns whenset statement_timeoutis missing before potentially slow operationsBoth are enabled by default (same effective default behavior as before, only the violation codes change).
Backwards compatibility
require-timeout-settingsis kept as a deprecated alias that expands to both granular rules:excluded_rules = ["require-timeout-settings"]still disables both checksincluded_rules = ["require-timeout-settings"]enables both-- squawk-ignore require-timeout-settingscomments still suppress both violationsrequire-statement-timeoutwhile including the alias leaves only the lock check enabledExample
Changes
squawk_linter: newRule::RequireLockTimeout/Rule::RequireStatementTimeoutvariants; the shared check inrequire_timeout_settings.rsnow gates each report on its own rule and reports under the granular codes; alias expansion inLinter::from,Linter::with_rules, andsquawk-ignoreparsingrequire-lock-timeout/require-statement-timeoutpages, deprecation note onrequire-timeout-settings, sidebar + homepage rule list updates