Repository navigation
Open
Labels
localNeeds a local agent: nested Bazel, consumer tests, devices or macOS/Windows evidence
Description
Where
- swift/rules/defs.bzl:20-83: wrappers add features only. No
-warnings-as-errors, no Swift 6 mode. - swift/toolchain/toolchain.bzl:104: upcoming features supported, none on.
- quality/tiers/swift_format/{standard,strict}.json: differ only in
NeverForceUnwrap,NeverUseForceTry,NeverUseImplicitlyUnwrappedOptionals. - quality/native_config.bzl:50:
swift_lintreuses the swift_format config. No SwiftLint tier. - quality/tools.bzl:2471, 2493, 1710: swift_format, swift_lint, periphery, no
severity(). - families/apple: no ObjC copts.
- docs/cli/commands/quality.md:210-211, 407-424: no Swift tier row.
Fix
Guard rules (do first):
- swift_format default tier:
NeverForceUnwrap,NeverUseForceTry,NeverUseImplicitlyUnwrappedOptionalson. - SwiftLint at error:
force_unwrapping,force_cast,force_try,implicitly_unwrapped_optional,fatal_error_message,unhandled_throwing_task,unavailable_function,todo,custom_rulesforprint(anddebugPrint(. - Swift 6 mode (
-swift-version 6) so@unchecked Sendablemisuse and data races fail.ExistentialAny.-strict-memory-safety. - ObjC:
-fobjc-arc,-Wnullability-completeness,-Wnullable-to-nonnull-conversion,-Wimplicit-retain-self.
Then:
- Default swift copts:
-warnings-as-errors,-swift-version 6,-enable-upcoming-featureforExistentialAny,InternalImportsByDefault,MemberImportVisibility,NonisolatedNonsendingByDefault,InferIsolatedConformances,ImmutableWeakCaptures;-require-explicit-sendable;-Xfrontend -warn-implicit-overrides. Opt out withtreat_warnings_as_errors = False. - objc_library copts:
-Werror -Weverything -fobjc-arc-exceptions -Wobjc-messaging-id -Wdeprecated-implementationswith-Wno-objc-missing-property-synthesis -Wno-direct-ivar-access -Wno-padded -Wno-poison-system-directories -Wno-cast-align -Wno-unused-macros -Wno-declaration-after-statement -Wno-pre-c11-compat -Wno-gnu-zero-variadic-macro-arguments -Wno-covered-switch-default. - New quality/tiers/swift_lint/{standard,strict}.yml with
unowned_variable_capture,discarded_notification_center_observer,weak_delegate,legacy_objc_type,discouraged_optional_boolean,explicit_acl,redundant_nil_coalescing,class_delegate_protocol. Drop the swift_format alias in native_config.bzl:50; addswift_lint_config. severity()maps for swift_lint, swift_format, periphery. Add the Swift tier row to quality.md.
Excluded
-enable-experimental-feature, Embedded, Lifetimes, -strict-concurrency=complete. SwiftLint trailing_whitespace, line_length, vertical_whitespace, opening_brace, sorted_imports, explicit_self, no_magic_numbers, strict_fileprivate, missing_docs, file_header, type_contents_order, prefer_self_in_static_references, explicit_type_interface, file_name, required_deinit, analyzer rules. -warn-long-expression-type-checking.
Test
- Analysis tests: the copts appear on swift_library and objc_library.
- tiers_test.rs covers the swift_lint tiers.
- Negative fixture per guard (
try!,as!,!,print,TODO,any-less existential,@unchecked Sendablerace) fails. - Clean fixture passes.
tier = "standard"still passes.
Verify every rule ID and flag against the pinned tool version before landing; some come from memory.
Part of #14647
Metadata
Metadata
Assignees
Labels
localNeeds a local agent: nested Bazel, consumer tests, devices or macOS/Windows evidence
Activity
TrapsterDK commentedon Nov 22, 2026
Paths in this issue are from an old layout. Branch from origin/main; quality code is in core/quality/, wrappers in /private/. Rebase on #14647 (strict default) and #14685 (severity floor).
Related: #14689 covers cc_objc_library werror, strict concurrency and swift_lint as a default linter.
🤖 Generated with Claude Code