{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"DM6","name":"Domain \u2194 infrastructure boundary","shortDescription":{"text":"Domain \u2194 infrastructure boundary"},"helpUri":"https://codehealth.canine.dev/dimensions/DM6"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF2","name":"Allocation hygiene","shortDescription":{"text":"Allocation hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF2"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.updateAdditionalMetadata (cyclomatic 38): DatabaseManager.updateAdditionalMetadata has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4ba70e2850bb7a9e92a2238ed533c7b78cf7bd3f0ff383733a6158c3564b15"}},{"ruleId":"D1","level":"warning","message":{"text":"FullTrack.qualityScore (cyclomatic 32): FullTrack.qualityScore has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a6a62a9e78980dfe424c7994fb8bb2d3ac02bf7dd4f0a76ae481711a96d8ae"}},{"ruleId":"D1","level":"warning","message":{"text":"ArtistBioManager.fetchMissingArtistImages (cyclomatic 31): ArtistBioManager.fetchMissingArtistImages has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a00eafe9d57c733d3dc96ef8374a2bea7ff23d107d679caf6750a452da0db56"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.resolveDiscoverEntities (cyclomatic 26): DatabaseManager.resolveDiscoverEntities has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"5474ca1a10ae181f194d8f772b133cb35f2c40989a4d440aec4dc472564cd219"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.updateCoreMetadata (cyclomatic 26): DatabaseManager.updateCoreMetadata has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f37292d39248e950eb602f0e195e0ea1ee2f77329d2db7a5f72d1c90b447497"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentView.body (cyclomatic 26): ContentView.body has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/ContentView.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f182a19aef0ff1c33fdf8cdcaf138e60a31db386599a3288a233a938f1e320"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.processBatch (cyclomatic 24): DatabaseManager.processBatch has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"993cbfa2022e94c0bd873dc542913aefed55a40edd88dc9256dd81fc2e691248"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.mergeArtists (cyclomatic 23): DatabaseManager.mergeArtists has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"15aafa3c053682bdd1193a645444cb15417dd4427f8cfd016a6b90267d8b33d1"}},{"ruleId":"D1","level":"warning","message":{"text":"LibraryManager.loadMusicLibrary (cyclomatic 23): LibraryManager.loadMusicLibrary has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fd34af56fdc2fcecb3bfa020a345dd2e34a8fd3c555dac37c510df82412cbc6"}},{"ruleId":"D1","level":"warning","message":{"text":"PlaybackManager.audioPlayerStateChanged (cyclomatic 22): PlaybackManager.audioPlayerStateChanged has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"8612904d94ee797897b36be5a3d36fcd86f67ae44b8c2f40465fd35cb55a475e"}},{"ruleId":"D1","level":"warning","message":{"text":"LibraryManager.warmDiscoverPlaylistArtwork (cyclomatic 22): LibraryManager.warmDiscoverPlaylistArtwork has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9a68b02306cb741991d0faa747580a7da6b7cf2159df18e279e253bccbbfaae"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.findOrCreateAlbum (cyclomatic 20): DatabaseManager.findOrCreateAlbum has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"e92044f656cc5050cead4bb1322d885ebdf323f0b256140f5bb083a62bf5fd7b"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.processFile (cyclomatic 20): DatabaseManager.processFile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e8e4468eb62d7036c8542e81e164074da297fa005b06ba923c73897b3b6e59"}},{"ruleId":"D1","level":"warning","message":{"text":"LibraryManager.refreshLibrary (cyclomatic 20): LibraryManager.refreshLibrary has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"417e6472c1161510c9c5ee999f826c68a19a849388753f0b7167bd1078ab981f"}},{"ruleId":"D1","level":"warning","message":{"text":"InternetRadioManager.downloadTopStations (cyclomatic 19): InternetRadioManager.downloadTopStations has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/InternetRadioManager.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06e99badd0766c4e476cd4540b1d638af0ba3b84fdaf1f04568d0437a75d864"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.getTracksForPinnedItem (cyclomatic 19): DatabaseManager.getTracksForPinnedItem has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a163e98ad6c2e79e45441b10e32fe450580ccfd39a68e620d8c5017c0f68360"}},{"ruleId":"D1","level":"warning","message":{"text":"TrackDetailView.appendBasicTrackInfo (cyclomatic 19): TrackDetailView.appendBasicTrackInfo has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/TrackDetailView.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64a72e06f484f392bab964e81b7fd8f97f5782bae36d92d64dc7a549f77d53f"}},{"ruleId":"D1","level":"warning","message":{"text":"InternetRadioManager.backfillArtwork (cyclomatic 18): InternetRadioManager.backfillArtwork has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/InternetRadioManager.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ecd854b544bc5265e324d9892012d5a6a84b0cf370a2e712b4c4f89a0a0b40b"}},{"ruleId":"D1","level":"warning","message":{"text":"ArtistBioManager.searchTMDBImages (cyclomatic 17): ArtistBioManager.searchTMDBImages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0c16146c03efbca9b7a10c979bc0d0f3999ca8400e367774ad749d3b5da087"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.convertArtworkToHEIC (cyclomatic 17): DatabaseManager.convertArtworkToHEIC has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: DatabaseManager.buildExpression (cyclomatic 18) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ad12b7b0c7c392230383fd526cb16cb11a269275fecbbc3eccad03e972c6466"}},{"ruleId":"D1","level":"warning","message":{"text":"TrackTableView.body (cyclomatic 17): TrackTableView.body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"71639bb83738ba250214cfa65bdda0311dac5c265a04561880882409dfb23574"}},{"ruleId":"D1","level":"warning","message":{"text":"AppCoordinator.restore (cyclomatic 16): AppCoordinator.restore has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Application/AppCoordinator.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"7511d865c2530ada123f8e18a594f1eddc92bb5dffe7670e3c99dd8987de1503"}},{"ruleId":"D1","level":"warning","message":{"text":"DatabaseManager.getTrackCountForPinnedPlaylists (cyclomatic 16): DatabaseManager.getTrackCountForPinnedPlaylists has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: DatabaseManager.buildExpression (cyclomatic 18) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold \u2014 including the worst \u2014 and 117 of the 207 points over it (57%), 5.6\u00D7 the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6591293dcfe2d8b7de75d0cbb438050620a317a0f9aedfd0106afa6128813dd"}},{"ruleId":"D1","level":"warning","message":{"text":"LibraryManager.performDiscoverLoad (cyclomatic 16): LibraryManager.performDiscoverLoad has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf860d4a3d1e153d4b6c3784fd6862c27b754f01bba5bdbf1cc6f71912bc54c"}},{"ruleId":"D1","level":"warning","message":{"text":"TrackSortField.getComparator (cyclomatic 16): TrackSortField.getComparator has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableOptionsDropdown.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"2041300d252a881aa48b3990bd049167929b56df35e14ca21eeb22a914c3f18c"}},{"ruleId":"D1","level":"warning","message":{"text":"TrackTableView.tableView (cyclomatic 16): TrackTableView.tableView has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c5158a2bc6ebef8006dd095e72c9ac3df6726da181161b3576d15b17cfad2c"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.loadMusicLibrary (cognitive 60): LibraryManager.loadMusicLibrary has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (31 pts), error handling 5 (22 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b554ca4311e6dcf68b1677fa55e400cd879b78b28262a6f3f0103c640536e5c"}},{"ruleId":"D2","level":"warning","message":{"text":"ArtistBioManager.fetchMissingArtistImages (cognitive 52): ArtistBioManager.fetchMissingArtistImages has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 3 (7 pts), boolean chains 6, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a69c0ad5d5bba4bb5d2349ef95e307ee58c252c93b38d11101ee103fc677257"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.processBatch (cognitive 52): DatabaseManager.processBatch has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 6 (11 pts), error handling 2 (6 pts), ternaries 2 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4f5474eed1bcb82d750c88d833a0e5a91a939b5a1808280eca5861d1aa716fb"}},{"ruleId":"D2","level":"warning","message":{"text":"FullTrack.qualityScore (cognitive 49): FullTrack.qualityScore has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 8 (24 pts), if/else 16 (18 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"f651b9be76898b6129330b14527816ac8a238c8a221c1dfaa51ef6065fce30e6"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.resolveDiscoverEntities (cognitive 46): DatabaseManager.resolveDiscoverEntities has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 5 (10 pts), loops 5 (10 pts), boolean chains 6, match/switch 1 (4 pts), error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"512699d69bd8b262a60b1e89d69cc27d68335bae1637d410333159a53278dcc5"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.updateAdditionalMetadata (cognitive 37): DatabaseManager.updateAdditionalMetadata has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 22, if/else 15. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"15214e7ba23680da10315a84fcb80b05a90f599652522ef5e511b90edfb7d5a3"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.convertArtworkToHEIC (cognitive 35): DatabaseManager.convertArtworkToHEIC has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (8 pts), ternaries 2 (6 pts), boolean chains 4, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca0c1822d272e7cad6f65e10318e30344f8fa60d78a2c47a11ab7957bfa79bfd"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.processFile (cognitive 34): DatabaseManager.processFile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 11, error handling 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1104bdb6965b2c70a35fc0cd09a621bc5129be1f9d2339773170a2d65bff29f0"}},{"ruleId":"D2","level":"warning","message":{"text":"InternetRadioManager.backfillArtwork (cognitive 31): InternetRadioManager.backfillArtwork has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/InternetRadioManager.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"92220208f5b25c227282232b204b24045c4e11c8c12a4d3c575abca9c53ae215"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.refreshLibrary (cognitive 29): LibraryManager.refreshLibrary has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 3 (6 pts), loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d8df532904ffcbd68f8167ac0e7b69ab1e2fb4e4ae9a6b42a19935646b38aae"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.getTrackCountForPinnedPlaylists (cognitive 28): DatabaseManager.getTrackCountForPinnedPlaylists has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, loops 2 (5 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"317945d2bd30e98527c434fa40175a592a29c297c8495458349c004ccf0f6dc7"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.warmDiscoverPlaylistArtwork (cognitive 28): LibraryManager.warmDiscoverPlaylistArtwork has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, loops 3, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"879f2e6779574dc00264c6aef65c24268c49dae6401adbd8d48391f5d4050578"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.getTracksForPinnedItem (cognitive 27): DatabaseManager.getTracksForPinnedItem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd5228d371c9817fc361404b2ae18cbe3e305628f1ea1bf813def4f2c752bcd2"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.body (cognitive 27): ContentView.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, boolean chains 9, ternaries 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/ContentView.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3243ef3a32ad536fd81f9555df818ae1a4b203136ef118a9413363ddf09d23e"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.mergeArtists (cognitive 25): DatabaseManager.mergeArtists has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed944b84c3de2163e835fc4fe0c31599aa680e62359c59bd5f5cae86854a1fbe"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.updateCoreMetadata (cognitive 25): DatabaseManager.updateCoreMetadata has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73b902aeecc994ee62b477db8716a6528a8766319ebc138525a31c2a01906a7"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.findOrCreateAlbum (cognitive 25): DatabaseManager.findOrCreateAlbum has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 10, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"438a399f29deb4d4e3e5d169f9dd70ac827cd7f05be05807b1d6d73579a8eda0"}},{"ruleId":"D2","level":"warning","message":{"text":"LibrarySidebarView.body (cognitive 25): LibrarySidebarView.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Library/LibrarySidebarView.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69eeca4415d6524ed112a660190ce497f62db5a2ad60214f5815b0e9769a295"}},{"ruleId":"D2","level":"warning","message":{"text":"PlaybackManager.audioPlayerStateChanged (cognitive 24): PlaybackManager.audioPlayerStateChanged has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0fbfac7f92f67967d42e725cd6acf1aa1041c9b172e9921df15082b62fcae5a"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryView.updateFilteredTracks (cognitive 24): LibraryView.updateFilteredTracks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Library/LibraryView.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ed101c6fa71eac71b2ed72db5d01491b30cdf502295a1119764a04e6595033a"}},{"ruleId":"D2","level":"warning","message":{"text":"Playlist.renderCollageArtwork (cognitive 23): Playlist.renderCollageArtwork has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Playlist.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"460fd71ffd36f78459488a3aab71e1fce3b5ae3e317071d681e5ffcb9b941795"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryFilterType.getFilterItems (cognitive 22): LibraryFilterType.getFilterItems has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Enums/LibraryFilterType.swift"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca64ab59bd220b32f486e4c284e795b932e9cf6269d82cd004e29be8fc86db15"}},{"ruleId":"D2","level":"warning","message":{"text":"ArtistBioManager.searchTMDBImages (cognitive 21): ArtistBioManager.searchTMDBImages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6dd673e10dd906e5e401af0282a369795d40bd871d358406a783f40a95047d"}},{"ruleId":"D2","level":"warning","message":{"text":"InternetRadioManager.downloadTopStations (cognitive 21): InternetRadioManager.downloadTopStations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/InternetRadioManager.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf340dbd2fd0c7d49833988f0c9ff8dc598f952743da76fc63d9c3d038016f5"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageUtils.drawGeometry (cognitive 21): ImageUtils.drawGeometry has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), ternaries 3 (7 pts), match/switch 2 (4 pts), boolean chains 1, if/else 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/ImageUtils.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b4bc45bf96ee165489834c0da4e0887614d6ba9c7cbb10e01c1694f77e5a75"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryFilterType.trackMatches (cognitive 21): LibraryFilterType.trackMatches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Enums/LibraryFilterType.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3c66881f0f3f171a1340eae454a69e1c6addce81724c679f31b2418f59c5c7"}},{"ruleId":"D2","level":"warning","message":{"text":"TrackTableView.body (cognitive 21): TrackTableView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb8ecb8b4477b2dc739424e32022c8d1b442ddac91114030b52e6a8054aabd8"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.selectRoundRobin (cognitive 20): LibraryManager.selectRoundRobin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f921f90ff2a2e8637738b546dcf88c0243fb406d002a2faf713ac5987f7595e"}},{"ruleId":"D2","level":"warning","message":{"text":"EntityDetailView.pinEntity (cognitive 20): EntityDetailView.pinEntity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Home/EntityDetailView.swift"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e536773b4f4e2e6a15b6a113cd5bdd9ca2409bda9247ee1cc8f57a2761a78e"}},{"ruleId":"D2","level":"warning","message":{"text":"TrackDetailView.appendBasicTrackInfo (cognitive 20): TrackDetailView.appendBasicTrackInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/TrackDetailView.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8f93a3a1408b50a2547dfddcc02f69986bc87fc14030725384a71f1b248628"}},{"ruleId":"D2","level":"warning","message":{"text":"AppCoordinator.restore (cognitive 19): AppCoordinator.restore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Application/AppCoordinator.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"677b9429aba677b94d989760288ef40c3bdf473ddec1f75cf6d85fb216ed2885"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.getDistinctValues (cognitive 19): DatabaseManager.getDistinctValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (3 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c0d074d97602db42f1f85a8d41b20fb2795b3e8a73cce9439cbe098e7e2285e"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.getTrackCountForPinnedItems (cognitive 19): LibraryManager.getTrackCountForPinnedItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f838f76f924018b4ca38bc7f5d273a0e8ba52f1b46f06d54a36357457e6f2c7"}},{"ruleId":"D2","level":"warning","message":{"text":"PinnedItem.matches (cognitive 19): PinnedItem.matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/PinnedItem.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa7e705ebf3ce244edb681173412a513c9315fc10b8ceb173f495840184fb226"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.applicationDockMenu (cognitive 18): AppDelegate.applicationDockMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Application/AppDelegate.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"f592571fd8d7d705236b5e6e8a2cb7b4c321ebc2b56e0bc1813f5a97ccc79f8d"}},{"ruleId":"D2","level":"warning","message":{"text":"PlaybackManager.restoreAudioEffectsSettings (cognitive 18): PlaybackManager.restoreAudioEffectsSettings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"972b5e784c0a6f4fea87a82ca2622450c877b5664ddba97f5af851012e2bcd9c"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.loadEntitiesAsync (cognitive 18): LibraryManager.loadEntitiesAsync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e09332020915bc027d25f6edd7af44a6eebd3f74a237251f01bf2b96713a97"}},{"ruleId":"D2","level":"warning","message":{"text":"TrackTableView.tableView (cognitive 18): TrackTableView.tableView has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, if/else 5 (7 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"d768d0bcf8c21d663447e9a7baed18fbe0c414bfb74924d2fc274422a6ab6b5e"}},{"ruleId":"D2","level":"warning","message":{"text":"ArtistBioManager.fetchArtistBio (cognitive 17): ArtistBioManager.fetchArtistBio has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa3012931ec22e47a1a89377039415d620f075714d56a9013e6b31c295c1114"}},{"ruleId":"D2","level":"warning","message":{"text":"LyricsManager.requestLRCLIB (cognitive 17): LyricsManager.requestLRCLIB has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/LyricsManager.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a94ba52953eee3639f74933b13916cbe894ac7f025b8356ddddeb2c5ebc540"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseManager.mergeAlbums (cognitive 17): DatabaseManager.mergeAlbums has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14bd98043e5fbff29b118cc79305ed6fbc792e44ed5d17d88a5c3baaecb1e04"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.performDiscoverLoad (cognitive 17): LibraryManager.performDiscoverLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b394a2e805c77184214fc9a14331fb9eab16aa897cb7c55986ecbc5ccda5556"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.prepareFolderForScanning (cognitive 17): LibraryManager.prepareFolderForScanning has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0aaa99d0e2f8862662e719990fe8834deec06341bd1d8dbaa8c77a712985482"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryManager.determineFoldersToRefresh (cognitive 17): LibraryManager.determineFoldersToRefresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a49728eb4dfd811318e59ca3108bea8a96a423e374ab3ebc4012eed8349ec6"}},{"ruleId":"D2","level":"warning","message":{"text":"FolderHierarchyBuilder.buildSubtree (cognitive 16): FolderHierarchyBuilder.buildSubtree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/FolderHierarchyBuilder.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"17625298b01f65daeacc0f43d19201c5017951d9149a932a534a2261208e01d0"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageUtils.extractDominantColors (cognitive 16): ImageUtils.extractDominantColors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/ImageUtils.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"9705643bd1f01f58c1a5cfae02379f48bccd86a73415f4985478f5e64681a091"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseMigrator.setupMigrator (cognitive 16): DatabaseMigrator.setupMigrator has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseMigration.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ca6d8ac8005ce4165124bbbbc5843afb416cce907f7d8a9454d0f88981be2c5"}},{"ruleId":"D2","level":"warning","message":{"text":"PlaylistManager.matchTracksToLibrary (cognitive 16): PlaylistManager.matchTracksToLibrary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Playlist/PlaylistManager.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ee82e0c512d7410360afe11fda34490342ffe15523ee2ca5e7485141c10164"}},{"ruleId":"D2","level":"warning","message":{"text":"EntityDetailView.entityArtwork (cognitive 16): EntityDetailView.entityArtwork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Home/EntityDetailView.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e6e4a5f6b75b0555e5be14ee3bb4699e76724d6a3ed15abaf5dd36d8ecd907f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DatabaseManager: TooManyMethods \u2014 286 methods. The bar is 30 methods; this is 256 over it, 9.53\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"595f034e1f502f7c4122ed7bc1bf84abebef37c5d064ed9018e940effd0ea557"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: LibraryManager: TooManyMethods \u2014 117 methods. The bar is 30 methods; this is 87 over it, 3.90\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"5766ed0c7bd870abdf6c107bc678639ae4b4061a31ed44b1b9d9de6f66f19aa4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PlaybackManager.releasePlaybackForIdleIfHidden: MethodTooLong \u2014 releasePlaybackForIdleIfHidden runs 375 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 275 over it, 3.75\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b6d7ab5cc1c5a8c27824c945468fc81ad17c7fb90e8906538d00a3be2484441"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PlaylistManager: TooManyMethods \u2014 105 methods. The bar is 30 methods; this is 75 over it, 3.50\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Playlist/PlaylistManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb8fb41ac22078aeb220998ae713a894df5c5b1c64a45805dde48d167ff7430"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PlaybackManager: TooManyMethods \u2014 88 methods. The bar is 30 methods; this is 58 over it, 2.93\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5d19ad3e7844a1f0d64dad307cd6f2800cc87eaf363fb35f610b7da4d4929a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CrescendoPlaybackBackend: TooManyMethods \u2014 56 methods. The bar is 30 methods; this is 26 over it, 1.87\u00D7 the bar. Most of these members implement repository.PlaybackBackend (37 of 54 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Playback/CrescendoPlaybackBackend.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0856c0236e37b0636b85f8079f9182c29163ad17a6cac5757f219ffffe579c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DatabaseMigrator.setupMigrator: MethodTooLong \u2014 setupMigrator runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseMigration.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"506e40ccd297b265fe836160af7d46ef208995a995ae99cce03f5a249bf1043f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TrackTableView.tableView: MethodTooLong \u2014 tableView runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"46766cdb6ba7d8a3e2d8170de142c663e6797087941bc317b5e32b1fa73ef88c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PlaybackEngine: TooManyMethods \u2014 46 methods. The bar is 30 methods; this is 16 over it, 1.53\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Playback/PlaybackEngine.swift"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"f21e4ca4076037cfe81841361c43ea396e6da72a2a0c3e4b827eef584fb86ba5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PlaylistManager.installRestoredQueue: MethodTooLong \u2014 installRestoredQueue runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Playlist/PlaylistManager.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1f3eddf6e39c9fe65599ad700d7847fa0d605b54e1a4999d67c13203701afe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentView.body: MethodTooLong \u2014 body runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/ContentView.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb01ec74afc0d8de534296d79966c31e9053b960e965469b0810a2b3d95a4db"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PetrichorApp: TooManyMethods \u2014 39 methods. The bar is 30 methods; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PetrichorApp.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"014f5cf77f2910907acb9c39e781bf5f0878a59653ac2866daffacdebe5d965f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Database/DMFolders.swift: FileTooLong \u2014 637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 137 over it, 1.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMFolders.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa2521243945822321c3f62a35137d8d1b8a2579be648af1e34590130e837c1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: TrackViews/TrackTableView.swift: FileTooLong \u2014 604 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: TrackTableView (3-587). The bar is 500 significant lines; this is 104 over it, 1.21\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"40bf8f00452f30e88757b8410d830a9cdd7546768b6aedd4904b03b91ec000e1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EqualizerPreset.config: MethodTooLong \u2014 config runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/EqualizerPreset.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"286918a74240fc0f6a64a4395bd4170af882c9c2db1196c655dbd828232f94d8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Managers/PlaybackManager.swift: FileTooLong \u2014 547 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: PlaybackManager (13-703). The bar is 500 significant lines; this is 47 over it, 1.09\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"621925fcb08fb2e60562064d6eaf5926de9659390b1a0dfc4fa04ac25f57ac27"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Main/ContentView.swift: FileTooLong \u2014 542 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: ContentView (41-550). The bar is 500 significant lines; this is 42 over it, 1.08\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b83429f2323cfd4cb99fe5b4ee4df351dde79707bf29a44c98e4d926ae6bf3b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Main/PlayerView.swift: FileTooLong \u2014 535 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: PlayerView (47-549). The bar is 500 significant lines; this is 35 over it, 1.07\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/PlayerView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a520247bfd03470d9113413a95c0261a4522425a557a3e42548e0607ab6aacaf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./PetrichorApp.swift: FileTooLong \u2014 517 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 17 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PetrichorApp.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ccc46f18ec5ba2fc3fbdb021444d3d600c0dbda0cfe8a9506bc89e776fcabf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Managers/Database/DMSetup.swift:140-149 | Managers/Database/DMSetup.swift:251-260 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"871eae326acfa77e3c93e804df8c6b0d41013bce42852d8c710e6c1942b41e65"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Views/Immersive/ImmersiveView.swift:382-429 | Views/MiniPlayer/MiniPlayerView.swift:292-328 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Immersive/ImmersiveView.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"a275598cac312ce56e94bf5834310f332a23354e6568f53aac23ad2fbc455b20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Managers/Database/DMSetup.swift:239-248 | Managers/Database/DMSetup.swift:345-354 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d6d4b7fcd10574d81da00f9df1466c6f4f90cbc4b24010e8646fd39dab59ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Models/Core/FullTrack.swift:288-299 | Models/Core/Track.swift:284-295 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2839a5ff51175995a8c19f8bc7f762c38a4a22bcb0e500c54211ffeabde1187"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Models/Enums/LibraryFilterType.swift:50-60 | Models/Enums/LibraryFilterType.swift:65-75 | Models/Enums/LibraryFilterType.swift:80-90 | Models/Enums/LibraryFilterType.swift:101-111 | Models/Enums/LibraryFilterType.swift:126-136 | Models/Enums/LibraryFilterType.swift:162-172 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Enums/LibraryFilterType.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fe9e8e2a0f274257f031ab14f0df1495f51573e79458c095e9ff952a659609"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Managers/ArtistBioManager.swift:301-341 | Managers/ArtistBioManager.swift:344-375 | Managers/ArtistBioManager.swift:378-413 | Managers/ArtistBioManager.swift:433-470 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"f62ecdf41d352fd6fc2f803523034fb7213e55663995840c41917223105afab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Managers/Database/DMSetup.swift:58-96 | Managers/Database/DMSetup.swift:99-137 | Managers/Database/DMSetup.swift:273-289 | Managers/Database/DMSetup.swift:318-342 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0d30b15a777e7542afd79ef3ce8fcb3f7218c9a65d48891468d4c1e820418d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 3): Managers/Database/DMCategoryQueries.swift:182-212 | Managers/Database/DMCategoryQueries.swift:284-314 | Managers/Database/DMCategoryQueries.swift:325-355 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMCategoryQueries.swift:182\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMCategoryQueries.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd976055441410c0aa133be9a009eaf57ae7dd1db1abc1c50052b0afd65baaca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Views/Components/Sidebar/SidebarListView.swift:29-55 | Views/Components/SidebarView.swift:25-51 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/Sidebar/SidebarListView.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b24a5cd38e57dfcfb2b26684dc081fbddab59049f2a323c1074c25c9153cd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Views/Immersive/ImmersiveView.swift:383-407 | Views/MiniPlayer/MiniPlayerView.swift:296-320 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Immersive/ImmersiveView.swift:383\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Views/MiniPlayer/MiniPlayerView.swift:295\u0060 calls \u0060Spacer\u0060 and \u0060Views/Immersive/ImmersiveView.swift:382\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Immersive/ImmersiveView.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"4604e4325bf98ad92cb56bfd82a1eb934ada58cccf79b6f00eed2f2033028dc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201321 lines \u00D7 2): Managers/Database/DMSetup.swift:492-503 | Managers/Database/DatabaseMigration.swift:56-76 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:492\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d4a231fc7b0faea6290e4d08d682402be67ad4730f2cabb53051cbedda7bb1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): Managers/ScrobbleManager.swift:256-275 | Managers/ScrobbleManager.swift:301-321 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/ScrobbleManager.swift:256\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ScrobbleManager.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ae6cce5caa93f6a7d3e1f699202854509f95d9a9e1930683de27c5baa21ab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): Views/Components/TrackViews/TrackListView.swift:467-487 | Views/Components/TrackViews/TrackTableView.swift:777-796 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/TrackListView.swift:467\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackListView.swift"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d36d22df5b53540fc087a8c9c02af23e8b0e550df67f7cd6528e51f54ed8ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Views/Main/TrackDetailView.swift:241-259 | Views/Main/TrackDetailView.swift:445-463 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Main/TrackDetailView.swift:241\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Views/Main/TrackDetailView.swift:464\u0060 calls \u0060transition\u0060, \u0060combined\u0060, \u0060move\u0060 and \u0060Views/Main/TrackDetailView.swift:260\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/TrackDetailView.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c12bc34403b5aa17a6f85d803e5188572f861b4f4806d08495dc2370649e3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Models/Core/FullTrack.swift:145-161 | Models/Core/Track.swift:124-140 \u2014 before extracting anything, compare \u0060Models/Core/FullTrack.swift\u0060 and \u0060Models/Core/Track.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Models/Core/FullTrack.swift:145\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"6defff329dbdb43730bf6fd7787778e9bfcfef23765bfa7bf45e3d77467603e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Views/Components/TrackContextMenu.swift:19-34 | Views/Components/TrackContextMenu.swift:84-99 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackContextMenu.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fd324e43ce94b7b96991f061564c5076cc0e3ccb6b3be1e60c038e675ec3c15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Views/Components/TrackViews/TrackTableOptionsDropdown.swift:266-281 | Views/Radio/InternetRadioView.swift:175-190 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/TrackTableOptionsDropdown.swift:266\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableOptionsDropdown.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a68739e59a97f708eb9f875c5c641162c106383e05727a551bf58bf4a0836e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Managers/Database/DMTrackProcessing.swift:329-343 | Managers/Database/DMTrackProcessing.swift:378-392 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMTrackProcessing.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8bc3b72c72fe78cdcd684b137607a3d70205ddf8286fc0f306a18f76f936f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Views/Components/EntityGridView.swift:257-271 | Views/Components/EntityListView.swift:541-555 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/EntityGridView.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bab3bcd442301c55f18639a7f3dbf638d81d05fc215a18eb32e819d94d67c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): Managers/Database/DMDiscoverQueries.swift:617-630 | Managers/Database/DMDiscoverResolution.swift:14-24 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMDiscoverQueries.swift:617\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMDiscoverQueries.swift"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa17414f16c54b9b00f31269b1ae77dc6b4ab8ebcd1767ebab4289263cfdb565"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Utilities/Constants.swift:265-278 | Utilities/Constants.swift:281-294 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/Constants.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c43c839accf995aeed4fc054075d54359d1502c2c6a17a353282024bf88ff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Views/Components/ArtistImageSheet.swift:227-240 | Views/Playlists/Sheets/PlaylistArtworkSheet.swift:143-156 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/ArtistImageSheet.swift"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"50180df1b117f1a5c11b1acede81a5bb989f85ffe4cb595d31b4d3a6e54bcc48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Views/Components/NowPlaying/NowPlayingControlsView.swift:96-109 | Views/Main/PlayerView.swift:262-275 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/NowPlaying/NowPlayingControlsView.swift:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/NowPlaying/NowPlayingControlsView.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"102e7072f17cfd568d230bb6a4384a17fae955d1fa7b38546c067801e22aef91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Views/Components/TrackViews/StationTableView.swift:259-272 | Views/Components/TrackViews/TrackListView.swift:485-498 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/StationTableView.swift:259\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/StationTableView.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aa8c984e5b63d95c0017acd2fc28aa46bb2a52f5964a79086ab5f0ecd4d0245"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Views/Folders/FoldersView.swift:63-76 | Views/Playlists/PlaylistsView.swift:41-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Folders/FoldersView.swift:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Folders/FoldersView.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d07c73fe940a1c5412d48cb13ab5610c91371fab09a0c0c391cb3aaee1f47f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Views/Main/PlayerView.swift:406-419 | Views/Main/PlayerView.swift:426-439 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Main/PlayerView.swift:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/PlayerView.swift"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"99c2b2d7f3c47e3097b9c6446e83cd181876a4647ca43cac7f7d87c3d6aea796"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Managers/Database/DMTrackProcessing.swift:224-236 | Managers/Database/DMTrackProcessing.swift:287-299 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMTrackProcessing.swift:224\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMTrackProcessing.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"5102e4b2c61bb43839c715b37702a33381248f48cc3635b8a8eb1df4484e74a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Views/Folders/FoldersView.swift:67-79 | Views/Folders/FoldersView.swift:122-134 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Folders/FoldersView.swift:67\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Folders/FoldersView.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4116c3d3ca46903a1da3de65af98cf447be82396ccc23613e60340cfdbb4e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): Views/Folders/FoldersView.swift:66-77 | Views/Folders/FoldersView.swift:121-132 | Views/Playlists/PlaylistsView.swift:44-55 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Folders/FoldersView.swift:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Folders/FoldersView.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4c7f45db89c53b4f35f0833d1e31c7359c30b8d8f1c465a7f89c6566859667c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Managers/ArtistBioManager.swift:317-328 | Managers/ArtistBioManager.swift:450-460 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/ArtistBioManager.swift:317\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"754047b94138ddc50289969eef4b69409904c0050f85ae537f2a58cd73672009"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Managers/Database/DMMetadata.swift:287-298 | Managers/Database/DMMetadata.swift:339-349 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMMetadata.swift:287\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060artistId\u0060 to \u0060Int64) async throws -\u003E (data: Data?\u0060 in one and \u0060Int64\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMMetadata.swift"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"6760e80236db29d1b4eaa985effcd6ebb67264e2b85f295a066d19f7d5d1dbb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Managers/Database/DMSetup.swift:572-583 | Managers/Database/DatabaseMigration.swift:249-267 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:572\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b70b1dc9c0ae69af88831f097faf9908e81013973a124cfe12a6c96acdbb976"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Models/Core/FullTrack.swift:76-87 | Models/Core/Track.swift:75-86 \u2014 before extracting anything, compare \u0060Models/Core/FullTrack.swift\u0060 and \u0060Models/Core/Track.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Models/Core/FullTrack.swift:76\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Models/Core/FullTrack.swift:88\u0060 calls \u0060ExtendedMetadata\u0060 and \u0060Models/Core/Track.swift:87\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"39284140f49f4c42daf198d432c56d3ca1ae3660650f76aee67efd86545f83d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift:231-242 | Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift:311-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"f41c69d944a32c69660451bb9006e76d46c1d84a9583555df66db9c54a8146be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 6): Models/Enums/LibraryFilterType.swift:50-60 | Models/Enums/LibraryFilterType.swift:65-75 | Models/Enums/LibraryFilterType.swift:80-90 | Models/Enums/LibraryFilterType.swift:101-111 | Models/Enums/LibraryFilterType.swift:126-136 | Models/Enums/LibraryFilterType.swift:162-172 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Models/Enums/LibraryFilterType.swift:95\u0060 calls \u0060localizedDisplay\u0060 and \u0060Models/Enums/LibraryFilterType.swift:65\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Enums/LibraryFilterType.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"b949cc7ec4120653ffb494ef9be175731bdda3162a6eb151a542d829a4f95c54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Models/Enums/LibraryFilterType.swift:14-24 | Models/Enums/LibraryFilterType.swift:38-48 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Enums/LibraryFilterType.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fad35cbbb48fcd7e601ad4acff72ff01b88175c356f98fc9dc17a1991aae15b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Managers/MenuBarManager.swift:155-164 | Managers/MenuBarManager.swift:173-182 | Managers/MenuBarManager.swift:205-214 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/MenuBarManager.swift:155\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/MenuBarManager.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"35cfbc54acca5db4978f61249c9939c1475c4b779196c8a71e7329c9583f6946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Managers/Database/DMPlaylists.swift:25-34 | Managers/Database/DMPlaylists.swift:135-144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMPlaylists.swift:25\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Managers/Database/DMPlaylists.swift:37\u0060 calls \u0060Date\u0060 and \u0060Managers/Database/DMPlaylists.swift:147\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMPlaylists.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"73b743ff14a9f222f5fae38c8f960cdb82aa8b364f8316e13f7d169cd449e2ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Managers/MenuBarManager.swift:184-193 | Managers/MenuBarManager.swift:216-225 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/MenuBarManager.swift:184\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/MenuBarManager.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b6be7895d96502f05f2d9711a80919f23cd290f0497d546fe64097bb3d9cc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Models/Core/FullTrack.swift:290-299 | Models/Core/Track.swift:286-295 \u2014 before extracting anything, compare \u0060Models/Core/FullTrack.swift\u0060 and \u0060Models/Core/Track.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Models/Core/FullTrack.swift:290\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"00516b18376182689d7f885ed17cfca84417e36d2c038e26b80db4c0983ed941"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Models/Core/SmartPlaylistField.swift:149-158 | Models/Core/SmartPlaylistField.swift:160-169 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/SmartPlaylistField.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"60cce81ac3d3aacff8d99666c2e3e50d0636245985bbf506242f80d467da94f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Utilities/ImageUtils.swift:43-53 | Utilities/ImageUtils.swift:385-394 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Utilities/ImageUtils.swift:43\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/ImageUtils.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e73fec3dc752cbac75856354a9adf7b19ec4d03cdeb7deb8ec2dc04b2bb4f7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Views/Components/NowPlaying/NowPlayingControlsView.swift:75-84 | Views/Components/NowPlaying/NowPlayingControlsView.swift:120-129 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/NowPlaying/NowPlayingControlsView.swift:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/NowPlaying/NowPlayingControlsView.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"771ba81a90e915b2f65c0f8a4c9497a0e9d2a664690d7eb959f1916995ffa294"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Views/Home/EntityDetailView.swift:201-210 | Views/Playlists/PlaylistDetailView.swift:174-183 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Home/EntityDetailView.swift:201\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Home/EntityDetailView.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a60e8e096625aff7f409ab0e89fd7cfeed6efb1132fec83265a996b33ad22a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Views/Components/TrackViews/StationTableView.swift:265-273 | Views/Components/TrackViews/TrackListView.swift:491-499 | Views/Components/TrackViews/TrackTableView.swift:800-808 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/StationTableView.swift:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Views/Components/TrackViews/TrackListView.swift:502\u0060 calls \u0060task\u0060, \u0060artworkIdentity\u0060, \u0060loadArtwork\u0060 and \u0060Views/Components/TrackViews/StationTableView.swift:274\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/StationTableView.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ed3d091f2e4dbfef3b674c10d0e2032703e4c9c24b659aa988c579a9cd83a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Managers/Database/DMDiscoverQueries.swift:479-487 | Managers/Database/DMDiscoverQueries.swift:690-698 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMDiscoverQueries.swift:479\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMDiscoverQueries.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa1a6bc54251764315f041747546cd9920d6a3cff3ab717e4bfc9a619f27424"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Managers/Database/DMFolders.swift:701-709 | Managers/Database/DMFolders.swift:794-802 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMFolders.swift"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1d743077e80a4329504232a54a8fd10bfa74486ee985f8c9701cdb50dbdaa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Managers/Playlist/PMSmartPlaylists.swift:212-220 | Managers/Playlist/PlaylistManager.swift:145-153 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Playlist/PMSmartPlaylists.swift:212\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Playlist/PMSmartPlaylists.swift"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"80a3d76bd2cd7937a5e49ea1ece2b2e434aca1ab5c952b5f7b6a0369ccaf4c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Utilities/ImageUtils.swift:27-35 | Utilities/ImageUtils.swift:375-383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Utilities/ImageUtils.swift:27\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/ImageUtils.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"db363b6625b0a83553c457d173084727d7b75e9eb9fc21f5a43eaf6e7f468052"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Views/Components/ArtistImageSheet.swift:273-282 | Views/Components/ArtistImageSheet.swift:323-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/ArtistImageSheet.swift:273\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/ArtistImageSheet.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4137f6c64ac083cae6595016b8aef8b22fa8efeb24bb24fd0688b5c63762256"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Views/Components/ListHeader.swift:163-170 | Views/Components/ListHeader.swift:187-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/ListHeader.swift:163\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/ListHeader.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"312aa58d505675bc98014973e5febc20c3d63c396b91b90d5e22d1a1ce9c4df0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): Managers/Database/DMSetup.swift:60-67 | Managers/Database/DMSetup.swift:101-108 | Managers/Database/DMSetup.swift:320-326 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c77985b75dd7072efadabd2d1f1a3319353d23ef08d5fb1c9e04b6fd62a6d3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): Managers/Database/DMSetup.swift:76-83 | Managers/Database/DMSetup.swift:330-335 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60d40826150c8ae7eda8d5878547fba16dbd7e47745ac2d31c13c643a847c87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Managers/Playlist/PMRegularPlaylists.swift:228-235 | Managers/Playlist/PMRegularPlaylists.swift:272-279 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Playlist/PMRegularPlaylists.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0713545af2c7ed6bb0e19baf9dc78b34c2edd345a9efe1fcde39a67be35203"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Managers/ScrobbleManager.swift:278-285 | Managers/ScrobbleManager.swift:327-334 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/ScrobbleManager.swift:278\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ScrobbleManager.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"04291998932e219673583999d4d048efe9b66948ff8aec85e5dd965d06ccf6c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Models/Core/FullTrack.swift:215-222 | Models/Core/Track.swift:172-179 \u2014 before extracting anything, compare \u0060Models/Core/FullTrack.swift\u0060 and \u0060Models/Core/Track.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"5095b13a4af1c2f3687a03d2adebc4c34ec28a0d384de1ea9c2b1ea51153e727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Views/Components/TrackViews/StationTableView.swift:110-117 | Views/Components/TrackViews/StationTableView.swift:121-128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/StationTableView.swift:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/StationTableView.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7984dc41ff0e0121e0f297cbd59b1cb18b094475738bc712e555d8e68d15abee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Views/Components/TrackViews/TrackTableView.swift:192-199 | Views/Components/TrackViews/TrackTableView.swift:216-223 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/TrackTableView.swift:192\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d6399d12e75656a00289b981472cfc90d8a8f723377f3ebe8992c7b2f95998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Views/Components/TrackViews/TrackTableView.swift:303-310 | Views/Components/TrackViews/TrackTableView.swift:315-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/TrackTableView.swift:303\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab7edc2e89576e6fc5b365e39e339627ee578bea70927d63e387f56c2732431"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Views/Components/TrackViews/TrackTableView.swift:246-252 | Views/Components/TrackViews/TrackTableView.swift:257-263 | Views/Components/TrackViews/TrackTableView.swift:267-274 | Views/Components/TrackViews/TrackTableView.swift:279-285 | Views/Components/TrackViews/TrackTableView.swift:289-296 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/TrackTableView.swift:246\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Views/Components/TrackViews/TrackTableView.swift:246\u0060 calls \u0060font\u0060, \u0060isCurrentTrack\u0060 and \u0060Views/Components/TrackViews/TrackTableView.swift:267\u0060 does not \u2014 after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fff7601de78947aa1ac946e50ebb3a6fb593f22890a08162bb509518a4fd5af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Views/Home/EntityDetailView.swift:199-205 | Views/Main/TrackDetailView.swift:175-181 | Views/Playlists/PlaylistDetailView.swift:172-178 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Home/EntityDetailView.swift:199\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Views/Main/TrackDetailView.swift:182\u0060 calls \u0060id\u0060 and \u0060Views/Home/EntityDetailView.swift:206\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Home/EntityDetailView.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ef3d0aa427b8135650f95629606e068b805f8dc2c075681df80842650be37ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Managers/Database/DMDiscoverQueries.swift:515-520 | Managers/Database/DMDiscoverQueries.swift:727-733 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMDiscoverQueries.swift:515\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMDiscoverQueries.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"97c9cd802ba73253d82bb30f79665144fa6db347e2b4d248f3b3286d5a84ccba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Managers/Database/DMQueries.swift:838-844 | Managers/Database/DMQueries.swift:865-871 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMQueries.swift:838\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Managers/Database/DMQueries.swift:864\u0060 calls \u0060filter\u0060 and \u0060Managers/Database/DMQueries.swift:837\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMQueries.swift"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"be622497cbda86281e9cfe7f2d90881f3cba40d8a65b553bd9384e649c89baa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Managers/Database/DMSetup.swift:75-81 | Managers/Database/DMSetup.swift:116-122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6969cc5a4632445bcc313ba4fa67f2df39899dc45d1be2bae3e09124dcde387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Models/Core/RadioStation.swift:30-36 | Views/Components/TrackViews/TrackTableView.swift:741-747 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Models/Core/RadioStation.swift:30\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/RadioStation.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"12b0fa52dc2d41f0585eaf7c9ba93a979b2769b774f07eba87ae0a00d1c4cf39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Utilities/ImageUtils.swift:144-150 | Views/Components/TrackViews/TrackTableView.swift:741-747 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Utilities/ImageUtils.swift:144\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/ImageUtils.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"14757ff530b40f7406b2f605ca9bcbd75ca551c436e214ed0a4e2d997afa7d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Views/Components/TrackContextMenu.swift:276-286 | Views/Components/TrackContextMenu.swift:329-335 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackContextMenu.swift:276\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackContextMenu.swift"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"17f04ca00c31e7e72d165c0826ae37965c0cf8c6d1f4645979e0c3848da67429"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Views/Components/TrackViews/TrackListView.swift:257-263 | Views/Components/TrackViews/TrackTableView.swift:564-570 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Components/TrackViews/TrackListView.swift:257\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackListView.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"d32209b016018c20f832984b7e3caf2cc49830f48f45a2e8bea56491664170d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Views/Home/EntityDetailView.swift:239-245 | Views/Playlists/PlaylistDetailView.swift:197-203 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Home/EntityDetailView.swift:239\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Home/EntityDetailView.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"0921de611ef74f0de13ab1349ed1629c6f168952be21ddebcda1bfd1207227d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Views/Main/PlayerView.swift:237-243 | Views/Main/PlayerView.swift:286-292 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Views/Main/PlayerView.swift:237\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Views/Main/PlayerView.swift:293\u0060 calls \u0060help\u0060 and \u0060Views/Main/PlayerView.swift:244\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/PlayerView.swift"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e65cdcce7aa46a2072828dcb47f90a089b13dd576cd89fab3273896a9b78fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Views/Main/TrackDetailView.swift:286-292 | Views/Main/TrackDetailView.swift:294-300 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Views/Main/TrackDetailView.swift:284\u0060 calls \u0060String\u0060, \u0060formattedShortDuration\u0060 and \u0060Views/Main/TrackDetailView.swift:292\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/TrackDetailView.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67734c177fb4d3cbc7519c0496e55cbef3403ec1f5380799e5525e114254890"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Managers/ArtistBioManager.swift:312-317 | Managers/ArtistBioManager.swift:393-398 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"1860aa18759fa98441d6eaaefe3cb87ac030501bf4bb940592d08c2c9a93bb2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Managers/Database/DMSetup.swift:243-248 | Managers/Database/DMSetup.swift:349-354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:243\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad226ab871701308ab0108226464cdae0409d45336dad9515f299ecf787eb1e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Managers/Database/DMSetup.swift:521-526 | Managers/Database/DMSetup.swift:537-542 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:521\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f727c22e793bac9c9a6b5fe5f6fa4c12ed793c14f6275457b3512cbfd482c45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20136 lines \u00D7 5): Managers/Database/DMSetup.swift:451-452 | Managers/Database/DMSetup.swift:467-468 | Managers/Database/DMSetup.swift:516-517 | Managers/Database/DMSetup.swift:528-533 | Managers/Database/DMSetup.swift:544-549 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:528\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Managers/Database/DMSetup.swift:552\u0060 calls \u0060createInternetRadioIndices\u0060 and \u0060Managers/Database/DMSetup.swift:454\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f747d6a5a1a3ebd939940bfe8b4d0865038937e997e3ea3cbc180878a3e9d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20135 lines \u00D7 6): Managers/Database/DMSetup.swift:472-477 | Managers/Database/DMSetup.swift:479-479 | Managers/Database/DMSetup.swift:483-492 | Managers/Database/DMSetup.swift:511-515 | Managers/Database/DatabaseMigration.swift:49-53 | Managers/Database/DatabaseMigration.swift:244-257 \u2014 there are 6 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:511\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Managers/Database/DMSetup.swift:478\u0060 calls \u0060createIndexIfNotExists\u0060 and \u0060Managers/Database/DMSetup.swift:479\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7563cc3381a417d1c4fa6e0d1b97a21ae38bebb4bef460ddb6767095e5a112e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Managers/ArtistBioManager.swift:313-317 | Managers/ArtistBioManager.swift:351-355 | Managers/ArtistBioManager.swift:394-398 | Managers/ArtistBioManager.swift:446-450 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Managers/ArtistBioManager.swift:445\u0060 calls \u0060setValue\u0060 and \u0060Managers/ArtistBioManager.swift:312\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ArtistBioManager.swift"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc994e2b3f6b5414108d13d9bc63f4b09f44c5a65bab1d5fc0b1fd7fd5e1c583"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 6): Managers/Database/DMSetup.swift:452-453 | Managers/Database/DMSetup.swift:469-473 | Managers/Database/DMSetup.swift:482-488 | Managers/Database/DMSetup.swift:517-520 | Managers/Database/DMSetup.swift:568-578 | Managers/Database/DatabaseMigration.swift:240-253 \u2014 there are 6 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:469\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Managers/Database/DMSetup.swift:520\u0060 calls \u0060createIndexIfNotExists\u0060 and \u0060Managers/Database/DMSetup.swift:473\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"549fcd3ff6bf1a8d8a9256d5934ad939afc7580ec6f6578ace64885efb4c4358"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Managers/Database/DMSetup.swift:494-501 | Managers/Database/DMSetup.swift:524-528 | Managers/Database/DatabaseMigration.swift:59-63 | Managers/Database/DatabaseMigration.swift:67-74 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:494\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6fb44ac713277758be2ff6092380c570f31be25591289a9a889166458d99ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Managers/Database/DMSetup.swift:77-83 | Managers/Database/DMSetup.swift:277-281 | Managers/Database/DMSetup.swift:331-335 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Managers/Database/DMSetup.swift:336\u0060 calls \u0060column\u0060, \u0060notNull\u0060, \u0060defaults\u0060 and \u0060Managers/Database/DMSetup.swift:282\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf818981c6c66bda9a038362d1c2ed2f9abc6d320de8e31667f20b561e0d228c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Managers/Database/DMSetup.swift:145-149 | Managers/Database/DMSetup.swift:256-260 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:145\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"c734e91505290427394255dfa7d504997b702ec456ff7ec95622767c3a553780"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Managers/Database/DMSetup.swift:298-302 | Managers/Database/DMSetup.swift:311-315 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMSetup.swift:298\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMSetup.swift"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a8ba7477fb30f4b358c164f0875afa8265df4a231a04acb41b69c8804bd8bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Managers/Database/DMTrackProcessing.swift:308-312 | Managers/Database/DMTrackProcessing.swift:353-357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMTrackProcessing.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de5817a3b57f070b72c27c40a50de6b87c577b5d8a7bd4ba0881caf08aebf70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Managers/ScrobbleManager.swift:177-181 | Managers/ScrobbleManager.swift:220-224 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/ScrobbleManager.swift:177\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ScrobbleManager.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"32cac08e484c23d300159a336ea56c3a73960d253dabbad67b4d49f106ebb26d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Models/Core/AlbumAlias.swift:22-27 | Models/Core/ArtistAlias.swift:22-27 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/AlbumAlias.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b0ceb358b1f94cc619e2595b8f5287c9a6f66bd5a108435aa117ffe0a815071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Models/Core/AlbumArtist.swift:12-17 | Models/Core/TrackArtist.swift:12-17 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060role\u0060 to \u0060String = \u0022primary\u0022\u0060 in one and \u0060String = \u0022artist\u0022\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/AlbumArtist.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"815dfd310c9ca5643778f0e2d1b41b1f97fc80c7029b2db5eee3d9616d43c59f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Views/Components/NoMusicEmptyStateView.swift:96-109 | Views/Settings/LibraryTabView.swift:394-404 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/NoMusicEmptyStateView.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7bd101bc3f49138a4e3e2f2e9f08429d35792f16b56a000b0eca193bad0697"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Views/Immersive/ImmersiveView.swift:461-467 | Views/MiniPlayer/MiniPlayerView.swift:501-507 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Immersive/ImmersiveView.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fbfb825a91d9ef5b56630792dc7a37b0dea7baaf78afd4e5eb188c69cf9a41f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Models/Core/AlbumAlias.swift:36-41 | Models/Core/ArtistAlias.swift:36-41 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/AlbumAlias.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f3290a39c8fa4702d74e8a214b6083e2c7d67fa6ad7dbb40b3cb38b140d963"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Models/Core/AlbumArtist.swift:41-46 | Models/Core/TrackArtist.swift:41-46 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/AlbumArtist.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"212a1ed51a48f38d120cf4e838996e0649d0af4a7faf60698a8e35f1cd31bac5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Views/Playlists/StationCollectionContentView.swift:44-49 | Views/Radio/InternetRadioView.swift:133-138 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Playlists/StationCollectionContentView.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"361a963121e536af685bc97fb67f1708e7aed41bb3f4f8de0e8731ca901d7931"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Managers/Database/DMDiscoverQueries.swift:434-438 | Managers/Database/DMDiscoverQueries.swift:646-650 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMDiscoverQueries.swift:434\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMDiscoverQueries.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b84e8ac27b4a0f566774a3cd11a16080bf8ba47b06c367ce724cc2e2e58f586"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Managers/Database/DMDiscoverQueries.swift:749-754 | Managers/Database/DMDiscoverQueries.swift:775-780 | Managers/Database/DMDiscoverQueries.swift:801-806 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Managers/Database/DMDiscoverQueries.swift:749\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMDiscoverQueries.swift"},"region":{"startLine":749}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3fb616daf6715162b04795a5ac98169b7370717f7573e8f09fb764bb44f9e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Models/Core/Lyrics.swift:131-135 | Models/Core/Lyrics.swift:138-142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Lyrics.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1d801076f71bf17047611543a5d0a57efa1babc8a27a2eab7f64cbaf41d217"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 21): AppDelegate\u0027s methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Application/AppDelegate.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"06cc76ca7f92b711dae820f97720f2567aa578fd3daf63f46c450a62b3be6c9c"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AutomationManager (LCOM4 7): AutomationManager\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Automation/AutomationManager.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5983c085644fbe96d471d4425443d0513cc95ec59acf4b688d7dde71e12b815"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PlaylistManager (LCOM4 5): PlaylistManager\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Playlist/PlaylistManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"8919372d5688f3a18bc5cb99ce27e6afa3c067c0aaeff8e085adfd0deac12c91"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MenuBarManager (LCOM4 4): MenuBarManager\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/MenuBarManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad53638cfe203c5327bc825fa871f1c07df3be2ebd319e2ab17813d33eb202f"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (XCTest or Swift Testing), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D9","level":"note","message":{"text":"No tests found: No test suite could be collected \u2014 no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (XCTest or Swift Testing) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9bf64cbb5a4ae13d6bcd01fa3bc8d2879d860c73bc67f176ee3c2cecb8adce3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Managers/PlaybackManager.swift: Managers/PlaybackManager.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in PlaybackManager.audioPlayerStateChanged at line 826. 3 of those changes were fix/bug commits, and the other 8 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Managers/PlaybackManager.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/PlaybackManager.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"53ae6fe6ab5f72a5acfb8005ad3d2a5c975b739d64d01111199ebbbf96bbcc87"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Views/Main/ContentView.swift: Views/Main/ContentView.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ContentView.body at line 90. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Views/Main/ContentView.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Main/ContentView.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"997be8e48a2993bd3768abf31fc0a8fd2299bddd7a33567366a6d8504b055fc6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Views/Components/TrackViews/TrackTableView.swift: Views/Components/TrackViews/TrackTableView.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in TrackTableView.body at line 57. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Views/Components/TrackViews/TrackTableView.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackViews/TrackTableView.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c1c04cb39d7710e8e7b847f60011b8dd1d4aaed57f666101f6a13fbfdfc588c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Managers/Library/LibraryManager.swift: Managers/Library/LibraryManager.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in LibraryManager.loadMusicLibrary at line 11. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Managers/Library/LibraryManager.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Library/LibraryManager.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b35e48392de5e5e1e711a2a0e4ef5bde20a021e257eb2931061c5850306e36"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Application/AppCoordinator.swift: Application/AppCoordinator.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AppCoordinator.restore at line 219. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Application/AppCoordinator.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Application/AppCoordinator.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c838f3bd3113e530a6278470d71f9e3ad88db06b313888a21d89b74c13ef45"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Managers/Database/DatabaseManager.swift: Managers/Database/DatabaseManager.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in DatabaseManager.processBatch at line 47. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Managers/Database/DatabaseManager.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DatabaseManager.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c2675ce035ca9864e3261e7ea6ae97439b489077ba315785581f4719360373"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Utilities/ImageUtils.swift: Utilities/ImageUtils.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ImageUtils.drawGeometry at line 275. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Utilities/ImageUtils.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Utilities/ImageUtils.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1bdf9860d432d23b283fc4666787c722e7d1121c4fe5481cf86c166c54c7c4"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Managers/Database/DMNormalization.swift: Managers/Database/DMNormalization.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 1 (its worst body is ScanLookupCache.albumKey at line 19), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201CFix identity handling for albums with the same name (#380)\u201D; \u201CFix tracks occasionally showing incorrect artwork (#368)\u201D; \u201CFix track Go-to menu to show artists\u0027 names correctly (#338)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 19:04:22 -04:00\u0027 --until=\u00272026-09-30 19:04:22 -04:00\u0027 --full-history --no-merges -- Managers/Database/DMNormalization.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/Database/DMNormalization.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0be92c88cedfadc0b3236955b8fc01ea726ab9ca541d178008f566097e8f0f3"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e9b79a42c1353f66f0a4d39600ecafc51a05b89031e98896312f2acc981a4331"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"703b990f6d9a60db46de372b4bc3713bc769740b61be7dfed2b23b523664ac12"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bc26593caf509b487cb3dff9d1a587737a02c72fc5e13e59c1a151f7d6412ad4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6bc3b539f953f180f304780b633bbb65e6d2911ce57503f2f0e4a05dfd504060"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"774e84eaf65696bacc627959839c1af1927b88e5fcbe02a78f7a8b8671c240ba"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"311f2b1dd969a2ef73985fc36dd91e65e3d6a6cb49a0706cd68e381199f12c7c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bc17439367157c6f6ff8590f4dfe29bc3a0ce4e328d99df310f8a49a2877af10"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"28fb95c74cf7e51a3f6e58d6d5d9aaba698bdc10ef21fbd45c72dc90736c26c6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6e22fa714af38036b109f9493501c28af262c3a9a1a2d30d80f7ec23c8ecb75e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4a04264eaf0a90ed63886610c9e2251cf5431cabd6d952016a10ea99155c6aad"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cfd63c4ff2fdf682b767fca6359499a0b632d44ddded7a159dd9b05373f680ef"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4ab899e48249148253e04101be21b3eba0a91836eea6567cd1b8b6318e636fd3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: PlaylistsView.swift \u2192 FoldersView.swift, HomeView.swift, LibraryView.swift: \u0060Views/Playlists/PlaylistsView.swift\u0060 changes together with 3 other files \u2014 \u0060Views/Folders/FoldersView.swift\u0060, \u0060Views/Home/HomeView.swift\u0060, \u0060Views/Library/LibraryView.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Playlists/PlaylistsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca405ae7c45c9cd1afbb8382860d6b1dd06d0fccf804530340545a101e4d51fe"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: FoldersView.swift \u2194 LibraryView.swift: \u0060Views/Folders/FoldersView.swift\u0060 and \u0060Views/Library/LibraryView.swift\u0060 change together 92% of the time (23 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are \u0060566dc90d\u0060 Group tracks by album when viewed under artist types (#371); \u006027ef8b87\u0060 Improve tracks list scroll performance (#228); \u006089a18309\u0060 Update views stack to cleanup unnecessary nesting (#223) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Folders/FoldersView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d6c8720818907b5a2d2480bd722cecc9f943c9222902b641ea42f2cf8c9b33"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: TrackContextMenu.swift \u2194 ContentView.swift: \u0060Views/Components/TrackContextMenu.swift\u0060 and \u0060Views/Main/ContentView.swift\u0060 change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u00606183d0af\u0060 Fix identity handling for albums with the same name (#380); \u0060ace0eea0\u0060 Add support for multi-select tracks for various actions (#141); \u006040ca6849\u0060 Unify playlist creation to handle different flows efficiently \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Components/TrackContextMenu.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f9911cb5be0e07bda1bed34464da8c2d4e5e7c15f1effaac45a0c8fcf12537"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: EntityDetailView.swift \u2194 PlaylistDetailView.swift: \u0060Views/Home/EntityDetailView.swift\u0060 and \u0060Views/Playlists/PlaylistDetailView.swift\u0060 change together 52% of the time (14 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are \u0060ece98b59\u0060 Update Pin/Unpin button icon for usability (#387); \u0060566dc90d\u0060 Group tracks by album when viewed under artist types (#371); \u006065769b32\u0060 Use \u0060scaledToFill\u0060 instead of \u0060aspectRatio\u0060 modifier (#362) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Views/Home/EntityDetailView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2be62002988931aad859b1f607b8bba0f120b2cb6dabe5aa63dc0c36c1935b7"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"DM4","level":"error","message":{"text":"Anemic domain model: String: \u0060String\u0060 is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) \u2014 the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/ArtistParser.swift"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae84eb2bace90e0664d1480f40e3e9e376305a9f43027062e366e8a73283623"}},{"ruleId":"DM4","level":"error","message":{"text":"Anemic domain model: Data: \u0060Data\u0060 is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) \u2014 the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Managers/ProblemReportManager.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a43d2346d3246571ec3ad04996f381e2b7499e510437b048fc1e255ec9f527"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: Album: \u0060Album\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Album.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5452af1117b69300c8bba8a3c89d0e5fa478d5da6cd331fd11856f14d93f5bc"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: AlbumAlias: \u0060AlbumAlias\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/AlbumAlias.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"16172e6fdadba53fad3ddd7b5f182106950266741199322c0da5f893c2858f6f"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: AlbumArtist: \u0060AlbumArtist\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/AlbumArtist.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc6ba2b409912751f677bc46cc61744a2e8ac6099125fd4d4bbdcc55ee7800cd"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: Artist: \u0060Artist\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Artist.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e32b94094d6f9a7a8c45b832e3912d7808d8f348b4c3f01547b8aa5440b7c43"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: ArtistAlias: \u0060ArtistAlias\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/ArtistAlias.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"038b56ad79a8ee5260bc5cafd48761577c68fa7d05beb3a4e472b6a6c221f7d5"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: Folder: \u0060Folder\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Folder.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"b29b0da115273a0e5880d2cf14dba5d5a12bf966a5c4439b55fa39a2dff3f739"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: FullTrack: \u0060FullTrack\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/FullTrack.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"72304678db0e2552e82bdd3306dd07210e15397ab759a16e93517e93b14e3321"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: Genre: \u0060Genre\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Genre.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7832d7fed1339ea89a04d646a6bb65e279cb4335e21402ed497b7f20a2b1ecc"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: PinnedItem: \u0060PinnedItem\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/PinnedItem.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"53ace36504fd88583949d90ac90b696ce8d9cfb391e65c8464bfb1c5ac4e26f0"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: Playlist: \u0060Playlist\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Playlist.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"e366fd9f90a6233e7162cbb3e88acdad04ae9c88a643640a4fbbc8d3896ee420"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: PlaylistTrack: \u0060PlaylistTrack\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/PlaylistTrack.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"668cb77536f36f37dc6a1d4535e9b123820db65a39b810e81db22a5da684326d"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: RadioStation: \u0060RadioStation\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/RadioStation.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1a1c633e98f08e836ccecb76c3747643ed9359f321fdffd8052c1af43f12a2"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: PlaylistStation: \u0060PlaylistStation\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/RadioStation.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a9949910226da696fe97a4d15598fb989b20c75d0b72cb4c24e4e062af61dd"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: Track: \u0060Track\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/Track.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"64aa6cf11b85e5435a9665698c6dc915f38fe74129ad61da27921f98a0b67c8c"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: TrackArtist: \u0060TrackArtist\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/TrackArtist.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1759cde89f9e6f02a7c113ecd1831d41e6dd5cb66f8b2e78f6e6cba5b894e12"}},{"ruleId":"DM6","level":"error","message":{"text":"Domain fused to persistence infrastructure: TrackGenre: \u0060TrackGenre\u0060 is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB \u0060PersistableRecord\u0060/\u0060FetchableRecord\u0060 conformance), with no separate pure-domain layer \u2014 the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row\u2194domain through a repository)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Models/Core/TrackGenre.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"2133e1c5e1a4f815bcfe7a5b7ceee4906d72df5f101086e256dff2f014a19554"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M3","level":"note","message":{"text":"No src/ separation: Production code isn\u0027t grouped under a src/ folder \u2014 it\u0027s spread across several top-level directories, so there\u0027s no one place that says \u0027this is the product\u0027."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: README advertises Docker containerisation, but no Dockerfile/compose file exists \u2014 searched for: \u0060dockerfile\u0060, \u0060docker-compose\u0060, \u0060compose.yaml\u0060, \u0060compose.yml\u0060. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README\u0027s own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read \u2014 a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"343bbbd51ceb8de7a9ff88d79f7c797abf9b5921f8727b67b4d0f4f8a22c5e49"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 8917 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":16,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}