Skip to content

Commit 565116b

Browse files
Merge pull request #229 from tuist/master
Fix flat structure detection by checking against all the `subSections`
2 parents 96e3e00 + 38225d8 commit 565116b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/XCLogParser/parser/IDEActivityLogSection+Parsing.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ extension IDEActivityLogSection {
4242
func groupedByTarget() -> IDEActivityLogSection {
4343
// The only way to know if the structure is flatten is to check the first elements
4444
// for the `(in target 'ABC' from project Project)` string
45-
let firstElements = subSections.prefix(15) // we only analyze up to the first 15 subsections
46-
let isFlatten = firstElements.contains { $0.getTargetFromCommand() != nil }
45+
let isFlatten = subSections.contains { $0.getTargetFromCommand() != nil }
4746
if isFlatten {
4847
let mainTarget = "$MainTarget"
4948
let targetsDictionary = subSections.reduce(

0 commit comments

Comments
 (0)