realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.61k stars 2.22k forks source link

Updated blanket_disable_command reasons #5518

Closed mildm8nnered closed 6 months ago

mildm8nnered commented 6 months ago

Updates the rule description and a reason for the blanket_disable_rule, avoiding language about the end of the file.

Partly addresses #5450

New top level rule description (I think this will only appear in the documentation perhaps).

old: "swiftlint:disable commands should be re-enabled before the end of the file"

new: "swiftlint:disable commands should use next, this or previous to disable rules for a single line, or swiftlint:enable to re-enable the rules immediately after the violations to be ignored, instead of disabling the rule for the rest of the file"

and the reason:

old: "The disabled 'XXXX' rule should be re-enabled before the end of the file"

new: "Use 'next', 'this' or 'previous' instead to disable the 'XXXX' rule once or re-enable it as soon as possible"

The OSS violations and fixes should match exactly - they've just been triggered by the reason change.

SwiftLintBot commented 6 months ago
48 Warnings
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:81:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'cyclomatic_complexity' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Cache.swift:440:42: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'for_where' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Cache.swift:600:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'line_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:112:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'for_where' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Views/Sources/CheckboxCellView.swift:10:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'class_delegate_protocol' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Views/Sources/CheckboxCellView.swift:10:46: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'weak_delegate' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/SourcesViewController.swift:222:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'cyclomatic_complexity' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/TimeViewController.swift:55:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'cyclomatic_complexity' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Brave: /Sources/BraveStrings/BraveStrings.swift:19:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'line_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in DuckDuckGo: /PacketTunnelProvider/ProxyServer/Socket/ProxySocket/HTTPProxySocket.swift:116:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in DuckDuckGo: /PacketTunnelProvider/ProxyServer/Socket/ProxySocket/HTTPProxySocket.swift:117:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'cyclomatic_complexity' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in DuckDuckGo: /PacketTunnelProvider/ProxyServer/Utils/BinaryDataScanner.swift:67:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'variable_name' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Kickstarter: /Library/Strings.swift:7:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'valid_docs' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Kickstarter: /Library/Strings.swift:8:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'line_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Kickstarter: /bin/StringsScript/Tests/StringsScriptTests/StringsScriptTests.swift:5:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'line_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Moya: /Examples/_shared/GitHubAPI.swift:1:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'force_unwrapping' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Moya: /Tests/MoyaTests/MoyaProviderSpec.swift:1:34: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in NetNewsWire: /Widget/Resources/Localized.swift:1:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in PocketCasts: /podcasts/Strings+Generated.swift:1:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in PocketCasts: /podcasts/Strings+L10n.swift:164:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'convenience_type' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Realm: /Realm/ObjectServerTests/CombineSyncTests.swift:48:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'multiple_closures_with_trailing_closure' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Realm: /RealmSwift/Tests/PrimitiveMapTests.swift:23:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'cyclomatic_complexity' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Realm: /RealmSwift/Tests/QueryTests.swift:23:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'large_tuple' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Realm: /RealmSwift/Tests/QueryTests.swift:23:34: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'vertical_parameter_alignment' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Realm: /RealmSwift/Tests/RealmCollectionTypeTests.swift:19:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'type_name' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/Generated/AutoHashable.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/Generated/Coding.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'vertical_whitespace' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/Generated/Coding.generated.swift:3:42: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'trailing_newline' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/Generated/JSExport.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'vertical_whitespace' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/Generated/JSExport.generated.swift:3:42: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'trailing_newline' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/Generated/Typed.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'vertical_whitespace' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/Generating/SwiftTemplateSpecs.swift:23:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/GeneratorSpec.swift:14:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/Models/TypedSpec.generated.swift:13:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/Parsing/ComposerSpec.swift:19:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/Parsing/ComposerSpec.swift:21:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/Parsing/FileParserSpec.swift:14:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/Parsing/FileParser_MethodsSpec.swift:15:26: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'function_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /SourceryTests/SourcerySpec.swift:18:34: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /Templates/Tests/Context/AutoLenses.swift:28:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'identifier_name' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /Templates/Tests/Context_Linux/AutoLenses.swift:28:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'identifier_name' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /Templates/Tests/Generated/AutoHashable.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /Templates/Tests/Generated/AutoLenses.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'variable_name' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /Templates/Tests/Generated/AutoMockable.generated.swift:3:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'line_length' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Sourcery: /Templates/Tests/Generated/AutoMockable.generated.swift:4:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'variable_name' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Wire: /wire-ios/Wire-iOS Share Extension/Generated/Strings+Generated.swift:1:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Wire: /wire-ios/Wire-iOS/Generated/Assets+Generated.swift:1:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
:warning: This PR introduced a violation in Wire: /wire-ios/Wire-iOS/Generated/Strings+Generated.swift:1:22: warning: Blanket Disable Command Violation: Use 'next', 'this' or 'previous' instead to disable the 'all' rule once, or re-enable it as soon as possible` (blanket_disable_command)
65 Messages
:book: Linting Aerial with this PR took 0.17s vs 0.18s on main (5% faster)
:book: Linting Alamofire with this PR took 0.13s vs 0.13s on main (0% slower)
:book: Linting Brave with this PR took 0.56s vs 0.54s on main (3% slower)
:book: Linting DuckDuckGo with this PR took 0.48s vs 0.47s on main (2% slower)
:book: Linting Firefox with this PR took 1.01s vs 1.02s on main (0% faster)
:book: Linting Kickstarter with this PR took 0.56s vs 0.6s on main (6% faster)
:book: Linting Moya with this PR took 0.11s vs 0.11s on main (0% slower)
:book: Linting NetNewsWire with this PR took 0.22s vs 0.22s on main (0% slower)
:book: Linting Nimble with this PR took 0.13s vs 0.13s on main (0% slower)
:book: Linting PocketCasts with this PR took 0.5s vs 0.47s on main (6% slower)
:book: Linting Quick with this PR took 0.11s vs 0.09s on main (22% slower)
:book: Linting Realm with this PR took 0.48s vs 0.48s on main (0% slower)
:book: Linting Sourcery with this PR took 0.29s vs 0.31s on main (6% faster)
:book: Linting Swift with this PR took 0.33s vs 0.32s on main (3% slower)
:book: Linting VLC with this PR took 0.15s vs 0.15s on main (0% slower)
:book: Linting Wire with this PR took 1.44s vs 1.45s on main (0% faster)
:book: Linting WordPress with this PR took 0.84s vs 0.85s on main (1% faster)
:book: This PR fixed a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:81:26: warning: Blanket Disable Command Violation: The disabled 'cyclomatic_complexity' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Aerial/Source/Models/Cache/Cache.swift:440:42: warning: Blanket Disable Command Violation: The disabled 'for_where' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Aerial/Source/Models/Cache/Cache.swift:600:26: warning: Blanket Disable Command Violation: The disabled 'line_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:112:26: warning: Blanket Disable Command Violation: The disabled 'for_where' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Aerial/Source/Views/Sources/CheckboxCellView.swift:10:22: warning: Blanket Disable Command Violation: The disabled 'class_delegate_protocol' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Aerial/Source/Views/Sources/CheckboxCellView.swift:10:46: warning: Blanket Disable Command Violation: The disabled 'weak_delegate' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Resources/MainUI/Settings panels/SourcesViewController.swift:222:26: warning: Blanket Disable Command Violation: The disabled 'cyclomatic_complexity' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Aerial: /Resources/MainUI/Settings panels/TimeViewController.swift:55:26: warning: Blanket Disable Command Violation: The disabled 'cyclomatic_complexity' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Brave: /Sources/BraveStrings/BraveStrings.swift:19:22: warning: Blanket Disable Command Violation: The disabled 'line_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in DuckDuckGo: /PacketTunnelProvider/ProxyServer/Socket/ProxySocket/HTTPProxySocket.swift:116:26: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in DuckDuckGo: /PacketTunnelProvider/ProxyServer/Socket/ProxySocket/HTTPProxySocket.swift:117:26: warning: Blanket Disable Command Violation: The disabled 'cyclomatic_complexity' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in DuckDuckGo: /PacketTunnelProvider/ProxyServer/Utils/BinaryDataScanner.swift:67:26: warning: Blanket Disable Command Violation: The disabled 'variable_name' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Kickstarter: /Library/Strings.swift:7:22: warning: Blanket Disable Command Violation: The disabled 'valid_docs' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Kickstarter: /Library/Strings.swift:8:22: warning: Blanket Disable Command Violation: The disabled 'line_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Kickstarter: /bin/StringsScript/Tests/StringsScriptTests/StringsScriptTests.swift:5:22: warning: Blanket Disable Command Violation: The disabled 'line_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Moya: /Examples/_shared/GitHubAPI.swift:1:22: warning: Blanket Disable Command Violation: The disabled 'force_unwrapping' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Moya: /Tests/MoyaTests/MoyaProviderSpec.swift:1:34: warning: Blanket Disable Command Violation: The disabled 'type_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in NetNewsWire: /Widget/Resources/Localized.swift:1:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in PocketCasts: /podcasts/Strings+Generated.swift:1:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in PocketCasts: /podcasts/Strings+L10n.swift:164:22: warning: Blanket Disable Command Violation: The disabled 'convenience_type' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Realm: /Realm/ObjectServerTests/CombineSyncTests.swift:48:26: warning: Blanket Disable Command Violation: The disabled 'multiple_closures_with_trailing_closure' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Realm: /RealmSwift/Tests/PrimitiveMapTests.swift:23:22: warning: Blanket Disable Command Violation: The disabled 'cyclomatic_complexity' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Realm: /RealmSwift/Tests/QueryTests.swift:23:22: warning: Blanket Disable Command Violation: The disabled 'large_tuple' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Realm: /RealmSwift/Tests/QueryTests.swift:23:34: warning: Blanket Disable Command Violation: The disabled 'vertical_parameter_alignment' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Realm: /RealmSwift/Tests/RealmCollectionTypeTests.swift:19:22: warning: Blanket Disable Command Violation: The disabled 'type_name' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryRuntime/Sources/Generated/AutoHashable.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryRuntime/Sources/Generated/Coding.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'vertical_whitespace' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryRuntime/Sources/Generated/Coding.generated.swift:3:42: warning: Blanket Disable Command Violation: The disabled 'trailing_newline' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryRuntime/Sources/Generated/JSExport.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'vertical_whitespace' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryRuntime/Sources/Generated/JSExport.generated.swift:3:42: warning: Blanket Disable Command Violation: The disabled 'trailing_newline' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryRuntime/Sources/Generated/Typed.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'vertical_whitespace' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/Generating/SwiftTemplateSpecs.swift:23:26: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/GeneratorSpec.swift:14:26: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/Models/TypedSpec.generated.swift:13:22: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/Parsing/ComposerSpec.swift:19:22: warning: Blanket Disable Command Violation: The disabled 'type_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/Parsing/ComposerSpec.swift:21:26: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/Parsing/FileParserSpec.swift:14:26: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/Parsing/FileParser_MethodsSpec.swift:15:26: warning: Blanket Disable Command Violation: The disabled 'function_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /SourceryTests/SourcerySpec.swift:18:34: warning: Blanket Disable Command Violation: The disabled 'type_body_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /Templates/Tests/Context/AutoLenses.swift:28:22: warning: Blanket Disable Command Violation: The disabled 'identifier_name' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /Templates/Tests/Context_Linux/AutoLenses.swift:28:22: warning: Blanket Disable Command Violation: The disabled 'identifier_name' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /Templates/Tests/Generated/AutoHashable.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /Templates/Tests/Generated/AutoLenses.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'variable_name' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /Templates/Tests/Generated/AutoMockable.generated.swift:3:22: warning: Blanket Disable Command Violation: The disabled 'line_length' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Sourcery: /Templates/Tests/Generated/AutoMockable.generated.swift:4:22: warning: Blanket Disable Command Violation: The disabled 'variable_name' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Wire: /wire-ios/Wire-iOS Share Extension/Generated/Strings+Generated.swift:1:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Wire: /wire-ios/Wire-iOS/Generated/Assets+Generated.swift:1:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)
:book: This PR fixed a violation in Wire: /wire-ios/Wire-iOS/Generated/Strings+Generated.swift:1:22: warning: Blanket Disable Command Violation: The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)

Generated by :no_entry_sign: Danger

mildm8nnered commented 6 months ago

Adopted your suggestions pretty much whole-sale - definitely looks much better now

mildm8nnered commented 6 months ago

Ah - I think maybe that period should not be on the end of the reason https://github.com/realm/SwiftLint/pull/5518/commits/7039fba188cff7cdab5c24f7b036dd39e82e5263

https://github.com/realm/SwiftLint/pull/5475 is now failing CI with

Test Suite 'BaselineTests' started at 2024-04-04 17:49:36.549.
Test Case '-[SwiftLintFrameworkTests.BaselineTests testNewViolation]' started.
Reasons shall not end with a period. Got "`swiftlint:disable` commands should use `next`, `this` or `previous` to disable rules for a single line, or `swiftlint:enable` to re-enable the rules immediately after the violations to be ignored, instead of disabling the rule for the rest of the file.". Either rewrite the rule's description or set a custom reason in the StyleViolation's constructor.: file StyleViolation.swift, line 46
mildm8nnered commented 6 months ago

Hmm. Looks like some rule descriptions do have a period, and some don't. I think that test is failing because I'm creating a BlanketDisableCommand violation without a specific reason in the test, and it's picking up the description - I can probably work around that.

SimplyDanny commented 6 months ago

Ups ... 😬 There are a few things to explain here.

One is that without a specific reason for a violation, the description is used. At the same time, the description appears in the documentation for every rule.

It is reasonable to prefer complete sentences in descriptions and explanations, but we also once agreed on violation messages to be as short as possible and without a full stop to mimic what other tools usually do.

Combining both, there is an unfortunate conflict that can only be resolved by using explicit reasons everywhere or enhance every rule description with a default reason distinct from the description.

That said, sorry for breaking tests.

mildm8nnered commented 6 months ago

Ups ... 😬 There are a few things to explain here.

One is that without a specific reason for a violation, the description is used. At the same time, the description appears in the documentation for every rule.

It is reasonable to prefer complete sentences in descriptions and explanations, but we also once agreed on violation messages to be as short as possible and without a full stop to mimic what other tools usually do.

Combining both, there is an unfortunate conflict that can only be resolved by using explicit reasons everywhere or enhance every rule description with a default reason distinct from the description.

That said, sorry for breaking tests.

no worries - I just switched to a different rule for my tests for now.

I think this particular failure is just because of the way I was using the rule in my tests - users would never see the description as a reason in this case.