From 280ffa56946a850387562bbc569810f2acac39a8 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Thu, 15 Aug 2024 13:48:58 +0100 Subject: [PATCH] Loosen the file_header SwiftLint rule Sometimes you want to write a comment at the start of a file! --- .swiftlint.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 967c45bf..36105ece 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -83,8 +83,15 @@ opt_in_rules: - private_swiftui_state file_header: - # Comments, except for the required and standard ones at the top of a Package.swift file. The aim of this rule is to make sure that we delete the Xcode-generated boilerplate comment. - forbidden_pattern: //(?! (swift-tools-version:|The swift-tools-version declares the minimum version of Swift required to build this package\.)) + # The aim of this rule is to make sure that we delete the Xcode-generated boilerplate comment, which looks like + # + # // + # // File.swift + # // AblyChat + # // + # // Created by Lawrence Forooghian on 15/08/2024. + # // + forbidden_pattern: // Created by identifier_name: &no_length_checks # We disable the length checks, for the same reason we disable the rules of type "metrics".