From 39a05f2c35a411d1ce74b03d18ed54a9f9afc147 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Wed, 26 Apr 2023 11:59:52 -0400 Subject: [PATCH] Re-export SwiftLintCore import in SwiftLintFramework Because the core functionality is always useful when building rules, I'm opting to import SwiftLintCore in SwiftLintFramework as `@_exported` so that it's implicitly available to all files in SwiftLintFramework without needing to import it directly. --- .swiftlint.yml | 4 +++- Source/SwiftLintFramework/Exports.swift | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Source/SwiftLintFramework/Exports.swift diff --git a/.swiftlint.yml b/.swiftlint.yml index 831a2ecd1..aeb9d9cfd 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -62,8 +62,9 @@ number_separator: minimum_length: 5 file_name: excluded: - - SwiftSyntax+SwiftLint.swift + - Exports.swift - GeneratedTests.swift + - SwiftSyntax+SwiftLint.swift - TestHelpers.swift balanced_xctest_lifecycle: &unit_test_configuration @@ -101,3 +102,4 @@ custom_rules: unused_import: always_keep_imports: - SwiftSyntaxBuilder # we can't detect uses of string interpolation of swift syntax nodes + - SwiftLintFramework # now that this is a wrapper around other modules, don't treat as unused diff --git a/Source/SwiftLintFramework/Exports.swift b/Source/SwiftLintFramework/Exports.swift new file mode 100644 index 000000000..f5b282f5f --- /dev/null +++ b/Source/SwiftLintFramework/Exports.swift @@ -0,0 +1 @@ +@_exported import SwiftLintCore