diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 586e3dfa..b3ee3a99 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -21,12 +21,6 @@ jobs: steps: - name: Checkout source uses: actions/checkout@v6 - - name: Resolve package dependencies - run: swift package resolve - - name: Lint - run: > - swift package plugin --allow-writing-to-package-directory swiftlint -- - lint --strict --reporter github-actions-logging - name: Resolve package dependencies run: xcodebuild -resolvePackageDependencies - name: Build @@ -35,7 +29,6 @@ jobs: build-for-testing -scheme "Layout-Package" -destination "name=$SIMULATOR,OS=$SIMULATOR_OS" - -skipPackagePluginValidation - name: Test run: > xcodebuild diff --git a/.swiftlint-rules.yml b/.swiftlint-rules.yml deleted file mode 100644 index 2ab21c99..00000000 --- a/.swiftlint-rules.yml +++ /dev/null @@ -1,248 +0,0 @@ -analyzer_rules: -- capture_variable -# - explicit_self -- typesafe_array_init -# - unused_declaration -- unused_import - -only_rules: -- accessibility_label_for_image -- accessibility_trait_for_button -- anonymous_argument_in_multiline_closure -- array_init -- async_without_await -- attribute_name_spacing -# - attributes -- balanced_xctest_lifecycle -- blanket_disable_command -- block_based_kvo -- class_delegate_protocol -- closing_brace -- closure_body_length -- closure_end_indentation -- closure_parameter_position -- closure_spacing -- collection_alignment -- colon -- comma -- comma_inheritance -- comment_spacing -- compiler_protocol_init -- computed_accessors_order -- conditional_returns_on_newline -- contains_over_filter_count -- contains_over_filter_is_empty -- contains_over_first_not_nil -- contains_over_range_nil_comparison -# - contrasted_opening_brace -- control_statement -- convenience_type -- custom_rules -- cyclomatic_complexity -- deployment_target -- direct_return -- discarded_notification_center_observer -- discouraged_assert -- discouraged_direct_init -- discouraged_none_name -- discouraged_object_literal -- discouraged_optional_boolean -- discouraged_optional_collection -- duplicate_conditions -- duplicate_enum_cases -- duplicate_imports -- duplicated_key_in_dictionary_literal -- dynamic_inline -- empty_collection_literal -- empty_count -- empty_enum_arguments -- empty_parameters -- empty_parentheses_with_trailing_closure -- empty_string -- empty_xctest_method -- enum_case_associated_values_count -- expiring_todo -- explicit_acl -- explicit_enum_raw_value -- explicit_init -- explicit_top_level_acl -- explicit_type_interface -# - extension_access_modifier -- fallthrough -- fatal_error_message -- file_header -- file_length -- file_name -- file_name_no_space -- file_types_order -- final_test_case -- first_where -- flatmap_over_map_reduce -- for_where -- force_cast -- force_try -- force_unwrapping -- function_body_length -- function_default_parameter_at_end -- function_parameter_count -- generic_type_name -- given_when_then # custom_rule -- ibinspectable_in_extension -- identical_operands -- identifier_name -- implicit_getter -- implicit_return -- implicitly_unwrapped_optional -- inclusive_language -# - indentation_width -- invalid_swiftlint_command -- is_disjoint -- joined_default_parameter -- large_tuple -- last_where -- leading_whitespace -- legacy_cggeometry_functions -- legacy_constant -- legacy_constructor -- legacy_hashing -- legacy_multiple -- legacy_nsgeometry_functions -- legacy_objc_type -- legacy_random -- let_var_whitespace -- line_length -- literal_expression_end_indentation -- local_doc_comment -- lower_acl_than_parent -- mark -# - missing_docs -- modifier_order -- multiline_arguments -# - multiline_arguments_brackets -- multiline_function_chains -- multiline_literal_brackets -- multiline_parameters -- multiline_parameters_brackets -- multiple_closures_with_trailing_closure -- nesting -- nimble_operator -# - no_empty_block -- no_extension_access_modifier -- no_fallthrough_only -- no_grouping_extension -# - no_magic_numbers -- no_space_in_method_call -- non_optional_string_data_conversion -- non_overridable_class_declaration -- notification_center_detachment -- ns_number_init_as_function_reference -- nslocalizedstring_key -- nslocalizedstring_require_bundle -- nsobject_prefer_isequal -- number_separator -# - object_literal -# - one_declaration_per_file -- opening_brace -- operator_usage_whitespace -- operator_whitespace -- optional_data_string_conversion -- optional_enum_case_matching -- orphaned_doc_comment -- overridden_super_call -- override_in_extension -- pattern_matching_keywords -- period_spacing -- prefer_key_path -- prefer_nimble -- prefer_self_in_static_references -- prefer_self_type_over_type_of_self -- prefer_type_checking -- prefer_zero_over_explicit_init -# - prefixed_toplevel_constant -- private_action -- private_outlet -- private_over_fileprivate -- private_subject -- private_swiftui_state -- private_unit_test -- prohibited_interface_builder -- prohibited_super_call -- protocol_property_accessors_order -- quick_discouraged_call -- quick_discouraged_focused_test -- quick_discouraged_pending_test -- raw_value_for_camel_cased_codable_enum -- reduce_boolean -- reduce_into -- redundant_discardable_let -- redundant_nil_coalescing -- redundant_objc_attribute -- redundant_optional_initialization -- redundant_self_in_closure -- redundant_sendable -- redundant_set_access_control -# - redundant_string_enum_value -- redundant_type_annotation -- redundant_void_return -# - required_deinit -- required_enum_case -- return_arrow_whitespace -# - return_value_from_void_function -- self_binding -- self_in_property_initialization -# - shorthand_argument -- shorthand_operator -- shorthand_optional_binding -- single_test_class -# - sorted_enum_cases -- sorted_first_last -- sorted_imports -- statement_position -- static_operator -- static_over_final_class -- strict_fileprivate -- strong_iboutlet -- superfluous_disable_command -- superfluous_else -- switch_case_alignment -- switch_case_on_newline -- syntactic_sugar -- test_case_accessibility -- todo -- toggle_bool -- trailing_closure -- trailing_comma -- trailing_newline -- trailing_semicolon -- trailing_whitespace -- type_body_length -- type_contents_order -- type_name -- unavailable_condition -- unavailable_function -- unhandled_throwing_task -- unneeded_break_in_switch -# - unneeded_override -- unneeded_parentheses_in_closure_argument -- unneeded_synthesized_initializer -- unowned_variable_capture -- untyped_error_in_catch -- unused_closure_parameter -- unused_control_flow_label -- unused_enumerated -- unused_optional_binding -- unused_parameter -- unused_setter_value -- valid_ibinspectable -- vertical_parameter_alignment -- vertical_parameter_alignment_on_call -- vertical_whitespace -# - vertical_whitespace_between_cases -# - vertical_whitespace_closing_braces -# - vertical_whitespace_opening_braces -- void_function_in_ternary -- void_return -- weak_delegate -- xct_specific_matcher -- xctfail_message -- yoda_condition diff --git a/.swiftlint.yml b/.swiftlint.yml deleted file mode 100644 index 20ee4ce3..00000000 --- a/.swiftlint.yml +++ /dev/null @@ -1,33 +0,0 @@ -included: -- Sources -- Tests - -child_config: .swiftlint-rules.yml - -empty_count: - only_after_dot: true - -file_header: - required_pattern: | - \/\/ - \/\/ {2}All Contributions by Match Group - \/\/ - \/\/ {2}Copyright © \d{4}(-\d{4})? Tinder \(Match Group, LLC\) - \/\/ - \/\/ {2}Licensed under the Match Group Modified 3-Clause BSD License. - \/\/ {2}See https://github.com/Tinder/Layout/blob/main/LICENSE for license information. - \/\/ - -private_over_fileprivate: - validate_extensions: true - -trailing_whitespace: - ignores_comments: false - -custom_rules: - given_when_then: - name: GIVEN / WHEN / THEN - message: | - "GIVEN / WHEN / THEN" comments must be uppercase, without punctuation and both preceded and followed by an empty line. - regex: | - ((?<=\n) +\/\/ (Given|given|When|when|Then|then)(?= *\n))|((?<=\n) +[^ ]\/\/ (GIVEN|WHEN|THEN))|((?<=\n) +\/\/ +(GIVEN|WHEN|THEN))|((?<=[^\n]\n) +\/\/ (GIVEN|WHEN|THEN))|((?<=\n) +\/\/ (GIVEN|WHEN|THEN)(?!\n\n)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3fb039d1..29671dcf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,6 @@ # Contributing to Layout - [Open Package](#open-package) -- [Lint Package](#lint-package) - [Testing](#testing) - [Creating Releases](#creating-releases) @@ -13,22 +12,6 @@ make open ``` -## Lint Package - -> SwiftLint violations are visible in Xcode as well. - -To run SwiftLint from the command line: - -``` -make lint -``` - -To run analysis rules: - -``` -make analyze -``` - ## Testing To re-record all existing snapshot references, delete all using the following command and then run the tests. diff --git a/Makefile b/Makefile index 5bc46475..df1e62d3 100644 --- a/Makefile +++ b/Makefile @@ -15,30 +15,6 @@ fix: "Add :FILEHEADER string $$header" \ "$(XCSHAREDDATA)/IDETemplateMacros.plist" >/dev/null 2>&1 -.PHONY: lint -lint: format ?= emoji -lint: - @swift package plugin \ - swiftlint lint --strict --progress --reporter "$(format)" - -.PHONY: analyze -analyze: target ?= Layout -analyze: destination ?= generic/platform=iOS -analyze: format ?= emoji -analyze: - @DERIVED_DATA="$$(mktemp -d)"; \ - XCODEBUILD_LOG="$$DERIVED_DATA/xcodebuild.log"; \ - xcodebuild \ - -scheme "$(target)-Package" \ - -destination "$(destination)" \ - -derivedDataPath "$$DERIVED_DATA" \ - -configuration "Debug" \ - -skipPackagePluginValidation \ - CODE_SIGNING_ALLOWED="NO" \ - > "$$XCODEBUILD_LOG"; \ - swift package plugin \ - swiftlint analyze --strict --progress --reporter "$(format)" --compiler-log-path "$$XCODEBUILD_LOG" - .PHONY: delete-snapshots delete-snapshots: @for snapshots in $$(find Tests -type d -name "__Snapshots__"); \ @@ -59,7 +35,6 @@ docs: -scheme "$(target)" \ -destination "$(destination)" \ -derivedDataPath "$(DERIVED_DATA_PATH)" \ - -skipPackagePluginValidation \ $(if $(filter $(open),OPEN),OTHER_DOCC_FLAGS="--warnings-as-errors",) @find "$(DERIVED_DATA_PATH)" \ -type d \ diff --git a/Package.resolved b/Package.resolved index 24c14c3e..efaa2f4d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "e4ddefc032ee230495f1d14c0e8ceddbba8da8cb5d5e0b91491112b534bd8679", + "originHash" : "de6ce9bd02c8128fa21f3ca5c7dc1548acf43fef5454b36c44e930efa59c1c0a", "pins" : [ { "identity" : "cwlcatchexception", @@ -55,15 +55,6 @@ "version" : "602.0.0" } }, - { - "identity" : "swiftlintplugins", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SimplyDanny/SwiftLintPlugins.git", - "state" : { - "revision" : "8545ddf4de043e6f2051c5cf204f39ef778ebf6b", - "version" : "0.59.1" - } - }, { "identity" : "xctest-dynamic-overlay", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index fb519b74..42206b7c 100644 --- a/Package.swift +++ b/Package.swift @@ -6,7 +6,6 @@ import PackageDescription let environment = ProcessInfo.processInfo.environment let treatWarningsAsErrors = environment["CI"] == "true" -let enableSwiftLintBuildToolPlugin = environment["CODEQL_DIST"] == nil let package = Package( name: "Layout", @@ -23,9 +22,6 @@ let package = Package( targets: ["SnapshotTestingExtensions"]), ], dependencies: [ - .package( - url: "https://github.com/SimplyDanny/SwiftLintPlugins.git", - exact: "0.59.1"), .package( url: "https://github.com/Quick/Nimble.git", exact: "14.0.0"), @@ -76,10 +72,4 @@ package.targets.forEach { target in // .treatWarning("DeprecatedDeclaration", as: .warning), // ] // } - - if enableSwiftLintBuildToolPlugin { - target.plugins = (target.plugins ?? []) + [ - .plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"), - ] - } } diff --git a/Sources/Layout/Builders/ConstraintsBuilder.swift b/Sources/Layout/Builders/ConstraintsBuilder.swift index fe6fa9b3..e9a12ed2 100644 --- a/Sources/Layout/Builders/ConstraintsBuilder.swift +++ b/Sources/Layout/Builders/ConstraintsBuilder.swift @@ -59,7 +59,6 @@ public enum ConstraintsBuilder { #if swift(>=6.0) components.flatMap(\.self) #else - // swiftlint:disable:next prefer_key_path components.flatMap { $0 } #endif } @@ -92,7 +91,6 @@ public enum ConstraintsBuilder { #if swift(>=6.0) components.flatMap(\.self) #else - // swiftlint:disable:next prefer_key_path components.flatMap { $0 } #endif } diff --git a/Sources/Layout/Builders/LayoutBuilder.swift b/Sources/Layout/Builders/LayoutBuilder.swift index 87b2af30..67c004bf 100644 --- a/Sources/Layout/Builders/LayoutBuilder.swift +++ b/Sources/Layout/Builders/LayoutBuilder.swift @@ -57,7 +57,6 @@ public enum LayoutBuilder { #if swift(>=6.0) components.flatMap(\.self) #else - // swiftlint:disable:next prefer_key_path components.flatMap { $0 } #endif } @@ -90,7 +89,6 @@ public enum LayoutBuilder { #if swift(>=6.0) components.flatMap(\.self) #else - // swiftlint:disable:next prefer_key_path components.flatMap { $0 } #endif } diff --git a/Sources/Layout/Layout.swift b/Sources/Layout/Layout.swift index 00cc5535..6e01ad05 100644 --- a/Sources/Layout/Layout.swift +++ b/Sources/Layout/Layout.swift @@ -7,8 +7,6 @@ // See https://github.com/Tinder/Layout/blob/main/LICENSE for license information. // -// swiftlint:disable file_length - import UIKit /** @@ -45,7 +43,7 @@ import UIKit */ @preconcurrency @MainActor -public final class Layout { // swiftlint:disable:this type_body_length +public final class Layout { // MARK: - Properties @@ -74,8 +72,6 @@ public final class Layout { // swiftlint:disable:this type_body_length self.init(view, metrics: metrics, items: []) } - // swiftlint:disable function_default_parameter_at_end - /// To create a `Layout` with a ``LayoutItem`` instance, use ``UIKit/UIView/layout(metrics:_:)`` instead. public convenience init( _ view: UIView, @@ -85,8 +81,6 @@ public final class Layout { // swiftlint:disable:this type_body_length self.init(view, metrics: metrics, items: [item]) } - // swiftlint:enable function_default_parameter_at_end - /// To create a `Layout` with a ``LayoutBuilder``, use ``UIKit/UIView/layout(metrics:items:)`` instead. public convenience init( _ view: UIView, @@ -167,8 +161,6 @@ public final class Layout { // swiftlint:disable:this type_body_length return self } - // swiftlint:disable function_default_parameter_at_end - // MARK: - Constrain /// Adds a constraint defining the relationship between the given attribute of the view and target view. @@ -354,8 +346,6 @@ public final class Layout { // swiftlint:disable:this type_body_length .constrain(view.bottom, to: targetView.bottom, constant: -insets.bottom) } - // swiftlint:enable function_default_parameter_at_end - // MARK: - Equal /// Adds constraints equating the attribute of the given views. @@ -525,8 +515,6 @@ public final class Layout { // swiftlint:disable:this type_body_length ]) } - // swiftlint:disable function_default_parameter_at_end - // MARK: - Stack /// Adds constraints defining the relationship between each of the given views as a horizontal stack with desired @@ -614,10 +602,6 @@ public final class Layout { // swiftlint:disable:this type_body_length return self } - // swiftlint:enable function_default_parameter_at_end - - // swiftlint:disable discouraged_optional_collection - // MARK: - Visual Format Language /// Adds constraints to the layout described by a horizontal visual format string. @@ -668,8 +652,6 @@ public final class Layout { // swiftlint:disable:this type_body_length options: options)) } - // swiftlint:enable discouraged_optional_collection - // MARK: - Activation /// Activates the constraints of the layout. diff --git a/Sources/Layout/LayoutItem.swift b/Sources/Layout/LayoutItem.swift index d0fc2140..9ffa3406 100644 --- a/Sources/Layout/LayoutItem.swift +++ b/Sources/Layout/LayoutItem.swift @@ -7,8 +7,6 @@ // See https://github.com/Tinder/Layout/blob/main/LICENSE for license information. // -// swiftlint:disable file_length - import UIKit /** diff --git a/Sources/Layout/UIKit/NSLayoutConstraint-Attribute.swift b/Sources/Layout/UIKit/NSLayoutConstraint-Attribute.swift index 8b65e507..8e9a3955 100644 --- a/Sources/Layout/UIKit/NSLayoutConstraint-Attribute.swift +++ b/Sources/Layout/UIKit/NSLayoutConstraint-Attribute.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Sources/Layout/UIKit/NSLayoutConstraint-Axis.swift b/Sources/Layout/UIKit/NSLayoutConstraint-Axis.swift index dfbe1978..fd815c1f 100644 --- a/Sources/Layout/UIKit/NSLayoutConstraint-Axis.swift +++ b/Sources/Layout/UIKit/NSLayoutConstraint-Axis.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Sources/Layout/UIKit/NSLayoutDimension.swift b/Sources/Layout/UIKit/NSLayoutDimension.swift index 8197d6fa..93fc62be 100644 --- a/Sources/Layout/UIKit/NSLayoutDimension.swift +++ b/Sources/Layout/UIKit/NSLayoutDimension.swift @@ -11,8 +11,6 @@ import UIKit extension NSLayoutDimension { - // swiftlint:disable function_default_parameter_at_end - /// Creates a constraint from the receiver in relation to the given dimension anchor. /// /// - Parameters: @@ -73,6 +71,4 @@ extension NSLayoutDimension { ) -> NSLayoutConstraint { constraint(equalToConstant: constant) } - - // swiftlint:enable function_default_parameter_at_end } diff --git a/Sources/Layout/UIKit/NSLayoutXAxisAnchor.swift b/Sources/Layout/UIKit/NSLayoutXAxisAnchor.swift index 8c364eb7..83c052c2 100644 --- a/Sources/Layout/UIKit/NSLayoutXAxisAnchor.swift +++ b/Sources/Layout/UIKit/NSLayoutXAxisAnchor.swift @@ -11,8 +11,6 @@ import UIKit extension NSLayoutXAxisAnchor { - // swiftlint:disable function_default_parameter_at_end - /// Creates a constraint from the receiver in relation to the given x-axis anchor. /// /// - Parameters: @@ -37,6 +35,4 @@ extension NSLayoutXAxisAnchor { return constraint(equalTo: anchor, constant: constant) } } - - // swiftlint:enable function_default_parameter_at_end } diff --git a/Sources/Layout/UIKit/NSLayoutYAxisAnchor.swift b/Sources/Layout/UIKit/NSLayoutYAxisAnchor.swift index f5ee6e8c..a94cd240 100644 --- a/Sources/Layout/UIKit/NSLayoutYAxisAnchor.swift +++ b/Sources/Layout/UIKit/NSLayoutYAxisAnchor.swift @@ -11,8 +11,6 @@ import UIKit extension NSLayoutYAxisAnchor { - // swiftlint:disable function_default_parameter_at_end - /// Creates a constraint from the receiver in relation to the given y-axis anchor. /// /// - Parameters: @@ -37,6 +35,4 @@ extension NSLayoutYAxisAnchor { return constraint(equalTo: anchor, constant: constant) } } - - // swiftlint:enable function_default_parameter_at_end } diff --git a/Sources/Layout/UIKit/UIView+AutoLayout.swift b/Sources/Layout/UIKit/UIView+AutoLayout.swift index 9fe9f1ec..2a882ce1 100644 --- a/Sources/Layout/UIKit/UIView+AutoLayout.swift +++ b/Sources/Layout/UIKit/UIView+AutoLayout.swift @@ -7,8 +7,6 @@ // See https://github.com/Tinder/Layout/blob/main/LICENSE for license information. // -// swiftlint:disable file_length - import UIKit extension UIView { @@ -207,8 +205,6 @@ extension UIView { ] } - // swiftlint:disable function_default_parameter_at_end - // MARK: - Attributes /// Creates a constraint defining the relationship between the given attribute of the receiver and superview. @@ -308,8 +304,6 @@ extension UIView { attributes.map { constraint(is: relation, to: $0, of: targetView, multiplier: multiplier, constant: constant) } } - // swiftlint:enable function_default_parameter_at_end - // MARK: - Edges /// Creates constraints aligning the edges of the receiver to the edges of the superview with an inset. diff --git a/Sources/Layout/UIKit/UIView+Layout.swift b/Sources/Layout/UIKit/UIView+Layout.swift index cb20a369..5e369841 100644 --- a/Sources/Layout/UIKit/UIView+Layout.swift +++ b/Sources/Layout/UIKit/UIView+Layout.swift @@ -35,8 +35,6 @@ extension UIView { Layout(self, metrics: metrics, items: []) } - // swiftlint:disable function_default_parameter_at_end - /// Creates a ``Layout`` with the given ``LayoutItem`` instance. /// /// A ``Layout`` is used to add subviews and constraints to a view. The `Layout` stores each subview with its @@ -69,8 +67,6 @@ extension UIView { Layout(self, metrics: metrics, items: [item]) } - // swiftlint:enable function_default_parameter_at_end - /// Creates a ``Layout`` with the ``LayoutItem`` instances provided by the given ``LayoutBuilder``. /// /// A ``Layout`` is used to add subviews and constraints to a view. The `Layout` stores each subview with its diff --git a/Sources/Layout/UIKit/UIView-AutoresizingMask.swift b/Sources/Layout/UIKit/UIView-AutoresizingMask.swift index 63baf082..a2ec7c27 100644 --- a/Sources/Layout/UIKit/UIView-AutoresizingMask.swift +++ b/Sources/Layout/UIKit/UIView-AutoresizingMask.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/.swiftlint.yml b/Tests/.swiftlint.yml deleted file mode 100644 index e4687a2b..00000000 --- a/Tests/.swiftlint.yml +++ /dev/null @@ -1,11 +0,0 @@ -disabled_rules: -- explicit_acl -- explicit_top_level_acl -- file_length -- force_cast -- force_try -- force_unwrapping -- function_body_length -- implicitly_unwrapped_optional -- type_body_length -- weak_delegate diff --git a/Tests/LayoutTests/LayoutItemTests.swift b/Tests/LayoutTests/LayoutItemTests.swift index 271c49c7..cbbc14ac 100644 --- a/Tests/LayoutTests/LayoutItemTests.swift +++ b/Tests/LayoutTests/LayoutItemTests.swift @@ -113,10 +113,8 @@ final class LayoutItemTests: XCTestCase { @MainActor func testWidthIsRelationToConstantPriority() { - // swiftlint:disable:next closure_body_length assertLayout { view in - // swiftlint:disable:next closure_body_length view.layout { // Size Width with Relation and Default Priority @@ -205,10 +203,8 @@ final class LayoutItemTests: XCTestCase { @MainActor func testHeightIsRelationToConstantPriority() { - // swiftlint:disable:next closure_body_length assertLayout { view in - // swiftlint:disable:next closure_body_length view.layout { // Size Height with Relation and Default Priority diff --git a/Tests/LayoutTests/LayoutItemTests/UIView+LayoutItemTests.swift b/Tests/LayoutTests/LayoutItemTests/UIView+LayoutItemTests.swift index 2061bf38..94b691fe 100644 --- a/Tests/LayoutTests/LayoutItemTests/UIView+LayoutItemTests.swift +++ b/Tests/LayoutTests/LayoutItemTests/UIView+LayoutItemTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/LayoutTests.swift b/Tests/LayoutTests/LayoutTests.swift index 1202f2e9..7e5def2f 100644 --- a/Tests/LayoutTests/LayoutTests.swift +++ b/Tests/LayoutTests/LayoutTests.swift @@ -337,7 +337,6 @@ final class LayoutTests: XCTestCase { // THEN - // swiftlint:disable:next closure_body_length assertLayout { view in let layout: Layout = view.layout { @@ -441,7 +440,6 @@ final class LayoutTests: XCTestCase { // THEN - // swiftlint:disable:next closure_body_length assertLayout { view in let layout: Layout = view.layout { @@ -876,7 +874,6 @@ final class LayoutTests: XCTestCase { // THEN - // swiftlint:disable:next closure_body_length assertLayout { view in let layout: Layout = view.layout { diff --git a/Tests/LayoutTests/Support/NimbleMatchers.swift b/Tests/LayoutTests/Support/NimbleMatchers.swift index 18eed74e..e1173d14 100644 --- a/Tests/LayoutTests/Support/NimbleMatchers.swift +++ b/Tests/LayoutTests/Support/NimbleMatchers.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // @@ -25,14 +24,11 @@ extension XCTestCase { } } - // swiftlint:disable cyclomatic_complexity - @MainActor internal func match( _ expectedConstraint: NSLayoutConstraint, - isActive: Bool? = nil // swiftlint:disable:this discouraged_optional_boolean + isActive: Bool? = nil ) -> Matcher { - // swiftlint:disable:next closure_body_length Matcher { expression in guard let constraint: NSLayoutConstraint = try expression.evaluate() else { return MatcherResult(status: .fail, message: .expectedTo("not be nil, got ")) } @@ -145,13 +141,10 @@ extension XCTestCase { return MatcherResult(bool: true, message: .fail("")) } } - - // swiftlint:enable cyclomatic_complexity } extension Optional { - // swiftlint:disable:next strict_fileprivate fileprivate var stringValue: String { guard let self else { return "nil" } diff --git a/Tests/LayoutTests/Support/SnapshotTesting.swift b/Tests/LayoutTests/Support/SnapshotTesting.swift index 4abaa6a9..e0bd58f2 100644 --- a/Tests/LayoutTests/Support/SnapshotTesting.swift +++ b/Tests/LayoutTests/Support/SnapshotTesting.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // @@ -107,7 +106,6 @@ extension Device.Orientation { extension UIView { - // swiftlint:disable:next strict_fileprivate fileprivate var recursiveSubviews: [UIView] { subviews + subviews.flatMap(\.recursiveSubviews) } diff --git a/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AttributeTests.swift b/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AttributeTests.swift index 9d4e6f82..1b74e139 100644 --- a/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AttributeTests.swift +++ b/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AttributeTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AxisTests.swift b/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AxisTests.swift index 66265126..697672d0 100644 --- a/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AxisTests.swift +++ b/Tests/LayoutTests/UIKitTests/NSLayoutConstraint-AxisTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/UIKitTests/UIView+AutoLayoutTests.swift b/Tests/LayoutTests/UIKitTests/UIView+AutoLayoutTests.swift index dfa9f146..738320ea 100644 --- a/Tests/LayoutTests/UIKitTests/UIView+AutoLayoutTests.swift +++ b/Tests/LayoutTests/UIKitTests/UIView+AutoLayoutTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/UIKitTests/UIView+FramesTests.swift b/Tests/LayoutTests/UIKitTests/UIView+FramesTests.swift index d388416e..d83c0c6d 100644 --- a/Tests/LayoutTests/UIKitTests/UIView+FramesTests.swift +++ b/Tests/LayoutTests/UIKitTests/UIView+FramesTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/UIKitTests/UIView+LayoutTests.swift b/Tests/LayoutTests/UIKitTests/UIView+LayoutTests.swift index 6b5dad88..06be426d 100644 --- a/Tests/LayoutTests/UIKitTests/UIView+LayoutTests.swift +++ b/Tests/LayoutTests/UIKitTests/UIView+LayoutTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/UIKitTests/UIView+NSLayoutAnchorTests.swift b/Tests/LayoutTests/UIKitTests/UIView+NSLayoutAnchorTests.swift index 5ee549fd..c3abc3d4 100644 --- a/Tests/LayoutTests/UIKitTests/UIView+NSLayoutAnchorTests.swift +++ b/Tests/LayoutTests/UIKitTests/UIView+NSLayoutAnchorTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group // diff --git a/Tests/LayoutTests/UIKitTests/UIView-AutoresizingMaskTests.swift b/Tests/LayoutTests/UIKitTests/UIView-AutoresizingMaskTests.swift index ea1024a4..37e154dc 100644 --- a/Tests/LayoutTests/UIKitTests/UIView-AutoresizingMaskTests.swift +++ b/Tests/LayoutTests/UIKitTests/UIView-AutoresizingMaskTests.swift @@ -1,4 +1,3 @@ -// swiftlint:disable:this file_name // // All Contributions by Match Group //