diff --git a/.sourcery/LinuxMain.stencil b/.sourcery/LinuxMain.stencil index 68f3fde2c5..fb4505b8dd 100644 --- a/.sourcery/LinuxMain.stencil +++ b/.sourcery/LinuxMain.stencil @@ -14,7 +14,7 @@ import XCTest {% for type in types.classes|based:"XCTestCase" %} extension {{ type.name }} { static var allTests: [(String, ({{ type.name }}) -> () throws -> Void)] = [ - {% for method in type.methods where method.parameters.count == 0 and method.shortName|hasPrefix:"test" %} ("{{ method.shortName }}", {{ method.shortName }}){% if not forloop.last %},{% endif %} + {% for method in type.methods where method.parameters.count == 0 and method.shortName|hasPrefix:"test" and method|!annotated:"skipTestOnLinux" %} ("{{ method.shortName }}", {{ method.shortName }}){% if not forloop.last %},{% endif %} {% endfor %}] } diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index efccacfccc..1fb71de3b4 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -83,7 +83,6 @@ extension CustomRulesTests { static var allTests: [(String, (CustomRulesTests) -> () throws -> Void)] = [ ("testCustomRuleConfigurationSetsCorrectly", testCustomRuleConfigurationSetsCorrectly), ("testCustomRuleConfigurationThrows", testCustomRuleConfigurationThrows), - ("testCustomRuleConfigurationIgnoreInvalidRules", testCustomRuleConfigurationIgnoreInvalidRules), ("testCustomRules", testCustomRules), ("testLocalDisableCustomRule", testLocalDisableCustomRule), ("testLocalDisableCustomRuleWithMultipleRules", testLocalDisableCustomRuleWithMultipleRules), diff --git a/Tests/SwiftLintFrameworkTests/CustomRulesTests.swift b/Tests/SwiftLintFrameworkTests/CustomRulesTests.swift index 0600e934f8..4991d5cc88 100644 --- a/Tests/SwiftLintFrameworkTests/CustomRulesTests.swift +++ b/Tests/SwiftLintFrameworkTests/CustomRulesTests.swift @@ -44,6 +44,8 @@ class CustomRulesTests: XCTestCase { } } + // sourcery: skipTestOnLinux + // (check https://bugs.swift.org/browse/SR-5477) func testCustomRuleConfigurationIgnoreInvalidRules() throws { let configDict = ["my_custom_rule": ["name": "MyCustomRule", "message": "Message",