excluded: - internal - samples - testing - Package.swift cyclomatic_complexity: 11 file_header: required_string: "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */" identifier_name: max_length: 56 # default 40 excluded: [ui, EU, id, to] large_tuple: 3 line_length: warning: 120 ignores_comments: true ignores_urls: true ignores_interpolated_strings: true nesting: type_level: 2 private_outlet: allow_private_set: true file_name: excluded: [ Enums+Extensions.swift, BridgeAPI+ApplicationOpenUrlTests.swift, BridgeAPI+SessionCompletionHandlerTests.swift, ShareAppEventNames.swift, ShareAppEventParameters.swift, ShareDialogMode.swift, LoginAppEventNames.swift, FBSDKAppEventConversionsAPITransformer.swift, AppLinkNavigationTestDependencies.swift, ValueClamping.swift, ] trailing_comma: mandatory_comma: true type_name: excluded: [RawAppEventsConfigurationResponseFixtures, GraphRequestPiggybackManagerProviderTests] allowed_symbols: "_" # Use 10x the defaults for these to essentially disable these rules type_body_length: warning: 2000 # default 200 error: 3500 # default 350 file_length: warning: 4000 # default 400 error: 10000 # default 1000 function_body_length: warning: 400 # default 40 error: 1000 # default 100 # Xcode fixits insert these as "public override" vs "override public" so overriding Swiftlint's defaullt of "override, acl, ..." to "acl, override, ..." modifier_order: preferred_modifier_order: [acl, override, setterACL, dynamic, mutators, lazy, final, required, convenience, typeMethods, owned] custom_rules: blank_line_after_single_line_guard: regex: "guard [^\n]*? else \\{ return (:?\\w+ )?\\}\n[^\n]" message: "Prefer a blank line after a guard with a return." objc_members_above_objc: regex: "@objc[^\n]*?\n@objcMembers" message: "Place @objcMembers above @objc" objc_used_without_importing_foundation: regex: "LICENSE file in the root directory of this source tree.\n \\*/\n+@objc" message: "@objc attribute used without importing module 'Foundation'" swiftlint_disable_without_this_or_next: regex: "// swiftlint:disable (?!implicitly_unwrapped_optional|force_unwrapping)" message: "Prefer using swiftlint:disable:this or swiftlint:disable:next over swiftlint:disable" one_let_per_line: regex: " let [^\n]*?, let " message: "Place each let statement and condition on its own line" test_classes_should_be_final: regex: "(?