We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
I've added a minimal reproducing example to the nonTriggeringExamples of the rule (see below). This is the output when running the test:
nonTriggeringExamples
Test Suite 'Selected tests' started at 2018-08-23 15:23:28.686 Test Suite 'SwiftLintFrameworkTests.xctest' started at 2018-08-23 15:23:28.687 Test Suite 'MultilineFunctionChainsRuleTests' started at 2018-08-23 15:23:28.688 Test Case '-[SwiftLintFrameworkTests.MultilineFunctionChainsRuleTests testWithDefaultConfiguration]' started. 2018-08-23 15:24:35.109845+0200 xctest[65789:5144897] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]: Range or index out of bounds' *** First throw call stack: ( 0 CoreFoundation 0x00007fff4c1a732b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fff7382fc76 objc_exception_throw + 48 2 CoreFoundation 0x00007fff4c238dcd +[NSException raise:format:] + 205 3 Foundation 0x00007fff4e215e1b -[NSRegularExpression(NSMatching) enumerateMatchesInString:options:range:usingBlock:] + 347 4 Foundation 0x00007fff4e215cae -[NSRegularExpression(NSMatching) matchesInString:options:range:] + 151 5 SwiftLintFramework 0x0000000106fd3343 _T018SwiftLintFramework27MultilineFunctionChainsRuleV13callDotOffset012_2760C9B5A88L19D2933E33093D7025950LLSiSg012SourceKittenC04FileC4file_SC8_NSRangeV0H5RangetF + 483 6 SwiftLintFramework 0x0000000106fd2ee2 _T018SwiftLintFramework27MultilineFunctionChainsRuleV16violatingOffsets012_2760C9B5A88K19D2933E33093D7025950LLSaySiG012SourceKittenC04FileC4file_AA0A14ExpressionKindO4kinds10DictionaryVySSAG0P16KitRepresentable_pG10dictionarytFSi7dotLine_Si9dotOffsetSC8_NSRangeV5rangetSgAVcfU_ + 130 7 SwiftLintFramework 0x0000000106fd3152 _T018SwiftLintFramework27MultilineFunctionChainsRuleV16violatingOffsets012_2760C9B5A88K19D2933E33093D7025950LLSaySiG012SourceKittenC04FileC4file_AA0A14ExpressionKindO4kinds10DictionaryVySSAG0P16KitRepresentable_pG10dictionarytFSi7dotLine_Si9dotOffsetSC8_NSRangeV5rangetSgAVcfU_TA + 18 8 SwiftLintFramework 0x0000000106fd364e _T0SC8_NSRangeVSi7dotLine_Si0B6OffsetAB5rangetSgs5Error_pIgydzo_AbFsAG_pIgirzo_TR + 62 9 SwiftLintFramework 0x0000000106fd370b _T0SC8_NSRangeVSi7dotLine_Si0B6OffsetAB5rangetSgs5Error_pIgydzo_AbFsAG_pIgirzo_TRTA + 27 10 libswiftCore.dylib 0x0000000107f696f8 _T0s8SequencePsE10compactMapSayqd__Gqd__Sg7ElementQzKcKlF + 600 11 SwiftLintFramework 0x0000000106fd1ce5 _T018SwiftLintFramework27MultilineFunctionChainsRuleV16violatingOffsets012_2760C9B5A88K19D2933E33093D7025950LLSaySiG012SourceKittenC04FileC4file_AA0A14ExpressionKindO4kinds10DictionaryVySSAG0P16KitRepresentable_pG10dictionarytF + 485 12 SwiftLintFramework 0x0000000106fd19d6 _T018SwiftLintFramework27MultilineFunctionChainsRuleV8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_AA0A14ExpressionKindO4kinds10DictionaryVySSAH0K16KitRepresentable_pG10dictionarytF + 134 13 SwiftLintFramework 0x0000000106fd5411 _T018SwiftLintFramework27MultilineFunctionChainsRuleVAA7ASTRuleA2aDP8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_8KindTypeQz4kinds10DictionaryVySSAJ0L16KitRepresentable_pG10dictionarytFTW + 17 14 SwiftLintFramework 0x000000010724796e _T018SwiftLintFramework7ASTRulePAASS8KindType_8RawValueRTzrlE8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_s10DictionaryVySSAK0L16KitRepresentable_pG10dictionarytFAjRcfU_ + 878 15 SwiftLintFramework 0x0000000107247aa4 _T018SwiftLintFramework7ASTRulePAASS8KindType_8RawValueRTzrlE8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_s10DictionaryVySSAK0L16KitRepresentable_pG10dictionarytFAjRcfU_TA + 36 16 SwiftLintFramework 0x000000010702162d _T0s10DictionaryVySS21SourceKittenFramework0B16KitRepresentable_pGSay09SwiftLintD014StyleViolationVGs5Error_pIgxozo_AeIsAJ_pIgirzo_TR + 29 17 SwiftLintFramework 0x0000000107247b0b _T0s10DictionaryVySS21SourceKittenFramework0B16KitRepresentable_pGSay09SwiftLintD014StyleViolationVGs5Error_pIgxozo_AeIsAJ_pIgirzo_TRTA + 27 18 libswiftCore.dylib 0x0000000107f693b6 _T0s8SequencePsE7flatMapSay7ElementQyd__Gqd__ADQzKcKsAARd__lF + 502 19 SwiftLintFramework 0x000000010724759d _T018SwiftLintFramework7ASTRulePAASS8KindType_8RawValueRTzrlE8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_s10DictionaryVySSAK0L16KitRepresentable_pG10dictionarytF + 365 20 SwiftLintFramework 0x000000010724740e _T018SwiftLintFramework7ASTRulePAASS8KindType_8RawValueRTzrlE8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_tF + 110 21 SwiftLintFramework 0x0000000106fd5587 _T018SwiftLintFramework27MultilineFunctionChainsRuleVAA0G0A2aDP8validateSayAA14StyleViolationVG012SourceKittenC04FileC4file_tFTW + 23 22 SwiftLintFramework 0x000000010704078d _T018SwiftLintFramework4RulePAAE4lint33_5A5F37FCDEE0B4D78BAE05A90BA8A062LLAA0B6ResultAELLVSg012SourceKittenC04FileC4file_SayAA6RegionVG7regionsSb9benchmarkAA025SuperfluousDisableCommandD0VSg011superfluousxyD0tF + 1133 23 SwiftLintFramework 0x0000000107048be0 _T018SwiftLintFramework6LinterV18getStyleViolations33_5A5F37FCDEE0B4D78BAE05A90BA8A062LLSayAA0F9ViolationVG_SaySS2id_Sd4timetGtSb9benchmark_tFAA0B6ResultAELLVSgAA4Rule_pcfU0_ + 272 24 SwiftLintFramework 0x0000000107049073 _T018SwiftLintFramework6LinterV18getStyleViolations33_5A5F37FCDEE0B4D78BAE05A90BA8A062LLSayAA0F9ViolationVG_SaySS2id_Sd4timetGtSb9benchmark_tFAA0B6ResultAELLVSgAA4Rule_pcfU0_TA + 51 25 SwiftLintFramework 0x000000010704909e _T018SwiftLintFramework4Rule_pAA0B6Result33_5A5F37FCDEE0B4D78BAE05A90BA8A062LLVSgIegio_AaB_pAFIegir_TR + 30 26 SwiftLintFramework 0x0000000107049111 _T018SwiftLintFramework4Rule_pAA0B6Result33_5A5F37FCDEE0B4D78BAE05A90BA8A062LLVSgIegio_AaB_pAFIegir_TRTA + 17 27 SwiftLintFramework 0x00000001072886d1 _T0Sa18SwiftLintFrameworkE11parallelMapSayqd__Gqd__xc9transform_tlFACSryqd__SgGzcfU_ySicfU_ + 241 28 SwiftLintFramework 0x0000000107288bbe _T0Sa18SwiftLintFrameworkE11parallelMapSayqd__Gqd__xc9transform_tlFACSryqd__SgGzcfU_ySicfU_TA + 62 29 libswiftDispatch.dylib 0x00000001084812e7 _T0SiIgy_SiIyBy_TR + 39 30 libdispatch.dylib 0x00007fff7441a221 _dispatch_client_callout2 + 8 31 libdispatch.dylib 0x00007fff7441a15d _dispatch_apply_invoke + 159 32 libdispatch.dylib 0x00007fff7440fe08 _dispatch_client_callout + 8 33 libdispatch.dylib 0x00007fff74411b7c _dispatch_root_queue_drain + 902 34 libdispatch.dylib 0x00007fff744117a5 _dispatch_worker_thread3 + 101 35 libsystem_pthread.dylib 0x00007fff74761169 _pthread_wqthread + 1387 36 libsystem_pthread.dylib 0x00007fff74760be9 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
xcode-select -p
// This triggers a violation: a.b { // ““ }.e()
(see https://github.com/Thomvis/SwiftLint/blob/issue/MultilineFunctionChainsRule-nsrangeexception/Source/SwiftLintFramework/Rules/Style/MultilineFunctionChainsRule.swift#L67)
I think it has to do with the fancy quotes breaking the range calculations.
The text was updated successfully, but these errors were encountered:
Thanks @marcelofabri!
Sorry, something went wrong.
Fix crash on multiline_function_chains rule
8705610
Fixes realm#2360
No branches or pull requests
New Issue Checklist
Bug Report
Complete output when running SwiftLint, including the stack trace and command used
I've added a minimal reproducing example to the
nonTriggeringExamples
of the rule (see below). This is the output when running the test:Environment
xcode-select -p
)? 9.4(see https://github.com/Thomvis/SwiftLint/blob/issue/MultilineFunctionChainsRule-nsrangeexception/Source/SwiftLintFramework/Rules/Style/MultilineFunctionChainsRule.swift#L67)
I think it has to do with the fancy quotes breaking the range calculations.
The text was updated successfully, but these errors were encountered: