{"$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":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"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":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"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":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"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":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"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":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"]}},{"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":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"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":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R11","name":"Import Boundaries","shortDescription":{"text":"Import Boundaries"},"helpUri":"https://codehealth.canine.dev/dimensions/R11"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"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":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"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":"json.checkSchema (cyclomatic 64): json.checkSchema has cyclomatic complexity 64 (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: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1568}}}],"partialFingerprints":{"codehealthFindingId/v1":"c22da6a6c001046496d8a5ac8877122d5a0cff1d167d81cf6128a9ad4b47ce21"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperTokenizer._decode_asr (cyclomatic 52): WhisperTokenizer._decode_asr has cyclomatic complexity 52 (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":"packages/transformers/src/models/whisper/tokenization_whisper.js"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"96cf77a930482273bb454c1b6d3f9573519d2c741dde51a1618e6b3b083bb09b"}},{"ruleId":"D1","level":"warning","message":{"text":"spectrogram (cyclomatic 48): spectrogram has cyclomatic complexity 48 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/audio.js"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"7645ac4f3b805e859f0a9e6607bd8cc66822d67c62cf9596355c335e76a779eb"}},{"ruleId":"D1","level":"warning","message":{"text":"json.validateObjectNode (cyclomatic 43): json.validateObjectNode has cyclomatic complexity 43 (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: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa07116c0af45992d4bc1c1c7b6d5dbfa8818f97e4777a6844b4b36b460cbfa"}},{"ruleId":"D1","level":"warning","message":{"text":"hub.loadResourceFile (cyclomatic 43): hub.loadResourceFile has cyclomatic complexity 43 (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":"packages/transformers/src/utils/hub.js"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"14cfd373756238c869b481b7bdcfcd19c28eb7735485c2a147ba6a9cdcb0f56c"}},{"ruleId":"D1","level":"warning","message":{"text":"json.validateNode (cyclomatic 37): json.validateNode has cyclomatic complexity 37 (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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"fda9028ff23f1e100b78e0c10e8d59a2e87e463863657ec948475d38636093af"}},{"ruleId":"D1","level":"warning","message":{"text":"getCacheNames (cyclomatic 37): getCacheNames has cyclomatic complexity 37 (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: getNormalizedConfig (cyclomatic 120) 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/configs.js"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ced979e76339bd9d0af952792c2dfef1a6271c3a21b08af91a34515e3799f11"}},{"ruleId":"D1","level":"warning","message":{"text":"_call (cyclomatic 35): _call has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body\u0027s own statements and 3 belong to 7 function literals inside it that branch. 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":"packages/transformers/src/tokenization_utils.js"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"b53a288e351d389b8fe5cbad3385fe8bb8832b8197055e361911f78e2fcc93d3"}},{"ruleId":"D1","level":"warning","message":{"text":"json.transition (cyclomatic 29): json.transition has cyclomatic complexity 29 (threshold 15). 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. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"456009d3f05697d1fdfb95888b9244fadef67f4cedbb437f17b06573b2a8007e"}},{"ruleId":"D1","level":"warning","message":{"text":"get_file_metadata._get_file_metadata (cyclomatic 29): get_file_metadata._get_file_metadata has cyclomatic complexity 29 (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":"packages/transformers/src/utils/model_registry/get_file_metadata.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f7f4980c6b31bca02119b86681648e2f26d30d8095418eb09eb07e23c6d6fd"}},{"ruleId":"D1","level":"warning","message":{"text":"constraint.createTokenConstraint (cyclomatic 28): constraint.createTokenConstraint has cyclomatic complexity 28 (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":"packages/transformers-structured-output/src/engine/constraint.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd939665a588be41b6ecba3835e0f62e6ab994e6b439b739f73818a135999b28"}},{"ruleId":"D1","level":"warning","message":{"text":"tokenizer.extractTokenizer (cyclomatic 26): tokenizer.extractTokenizer 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/tokenizer.ts"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fb1a9487cc5ca5a359a32b08abc069811527ef68860dcc13d6d88ee4b73b23b"}},{"ruleId":"D1","level":"warning","message":{"text":"PreTrainedModel._get_logits_processor (cyclomatic 26): PreTrainedModel._get_logits_processor 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":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"e107b8f2cfd739eb8197b88108e5f0ca840caf0e8cfd8a18f9b75acb17d828a2"}},{"ruleId":"D1","level":"warning","message":{"text":"preprocess (cyclomatic 26): preprocess 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6d0a21c49b8abca1f807925363e49acaaa90e614b5fa1003b78145e20ef8b0"}},{"ruleId":"D1","level":"warning","message":{"text":"json.formatMatches (cyclomatic 25): json.formatMatches has cyclomatic complexity 25 (threshold 15). 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. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"17816b351fe6d3f4869ca5315752a4bcaf7649e8a54c20c84954511efcc38238"}},{"ruleId":"D1","level":"warning","message":{"text":"_call (cyclomatic 25): _call has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 1 belongs to 2 function literals inside it that branch. 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":"packages/transformers/src/pipelines/image-segmentation.js"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"b211b95476e339bf8b10c9fc2fee283b446d6efdaa5054265aae05addab44c28"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperForConditionalGeneration._generate_with_seek (cyclomatic 24): WhisperForConditionalGeneration._generate_with_seek 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/whisper/modeling_whisper.js"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ed37c65c7764f7e8bac309c903ba8296e3ba56ec4b0deb1bd4c0d8a42c936b"}},{"ruleId":"D1","level":"warning","message":{"text":"PreTrainedModel.generate (cyclomatic 23): PreTrainedModel.generate 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":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"d530705af0d452520a59501934488ded4cb716272505bff544f637668b68ffe8"}},{"ruleId":"D1","level":"warning","message":{"text":"getSession (cyclomatic 23): getSession has cyclomatic complexity 23 (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":"packages/transformers/src/models/session.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a4fc00af16fa2f905bdb0e77f6d4518169fc12f872083759baed10e6e732da"}},{"ruleId":"D1","level":"warning","message":{"text":"json.validateArrayNode (cyclomatic 22): json.validateArrayNode 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"038a21ac1a288c0975f6e7d7e604beaa1a6965dd282f57fd2a358e42a91a9fef"}},{"ruleId":"D1","level":"warning","message":{"text":"json.compareDecimal (cyclomatic 19): json.compareDecimal 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: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1205}}}],"partialFingerprints":{"codehealthFindingId/v1":"7587308d977413038bdc38e9f253bc0a8a177a60f50267d63732c5ad07898bff"}},{"ruleId":"D1","level":"warning","message":{"text":"json.validUriText (cyclomatic 19): json.validUriText 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1509}}}],"partialFingerprints":{"codehealthFindingId/v1":"db4d3c4d93a78c1f88ae6568b5f60365fd00a850f9e3afa4905b0408291850c2"}},{"ruleId":"D1","level":"warning","message":{"text":"render-api.renderType (cyclomatic 19): render-api.renderType 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":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d35e82520e4ff34ce5e71d6731b4af2a78fa82f5a0c51004cd60f61d659fce5"}},{"ruleId":"D1","level":"warning","message":{"text":"structure.extractEntities (cyclomatic 19): structure.extractEntities has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 24). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/structure.mjs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf724e8dd733afec4f665bdf4946ea9dfd3460508a39ae6bda1470bdb882d32"}},{"ruleId":"D1","level":"warning","message":{"text":"validate.collectDocWarnings (cyclomatic 19): validate.collectDocWarnings has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. 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":"packages/transformers/docs/scripts/lib/validate.mjs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a5654a6dd57870d55515cdac2439858199e25750bf253958b57df45f8dad79f"}},{"ruleId":"D1","level":"warning","message":{"text":"Tensor.slice (cyclomatic 19): Tensor.slice 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c2517298ce887e0fb9dfbc2a7454f1fd4c0536fca9f445c855d62479eab3f8"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageProcessor.pad_image (cyclomatic 19): ImageProcessor.pad_image has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d73157c36c9d78392889924796de59c06b27414fe8702a25e37509febb19ca1"}},{"ruleId":"D1","level":"warning","message":{"text":"_call (cyclomatic 19): _call 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":"packages/transformers/src/pipelines/text-generation.js"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"0abf51497609db1df6dddeb528cad61ada6abb05882075870497276f0916b2a0"}},{"ruleId":"D1","level":"warning","message":{"text":"json.stringByte (cyclomatic 18): json.stringByte has cyclomatic complexity 18 (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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"5621a19e3518569ba2f4322e05f5ca911892deefd6c7c0f72231074f13e69f69"}},{"ruleId":"D1","level":"warning","message":{"text":"json.unicodeByte (cyclomatic 18): json.unicodeByte has cyclomatic complexity 18 (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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"009f1feda66e14649e463f71d8cc5419ea4a2595e73b7e146f874f7209af27c1"}},{"ruleId":"D1","level":"warning","message":{"text":"json.constrainedPropertyKeys (cyclomatic 18): json.constrainedPropertyKeys 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a644f532adabf33229554879fefbd260727046414f3cb3e7337177ea690d467"}},{"ruleId":"D1","level":"warning","message":{"text":"scan.splitConditional (cyclomatic 18): scan.splitConditional 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":"packages/transformers/docs/scripts/lib/scan.mjs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"1876f4ae64ccf1bade1c612bb0a463fd5f9b65126795da4e484bd73d38a36793"}},{"ruleId":"D1","level":"warning","message":{"text":"exports.visitTopLevel (cyclomatic 18): exports.visitTopLevel 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":"packages/transformers/docs/scripts/lib/exports.mjs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e5c3e789c98e6c294bb67706e211fbf066b4109cda989e5a7fee42063f3749"}},{"ruleId":"D1","level":"warning","message":{"text":"_call_whisper (cyclomatic 18): _call_whisper 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":"packages/transformers/src/pipelines/automatic-speech-recognition.js"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"8120a1d782e63b99daf11e39993a39f8b7af5de21fc6d52e9bb9a72efbd106da"}},{"ruleId":"D1","level":"warning","message":{"text":"pipeline (cyclomatic 18): pipeline has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 2 belong to 3 function literals inside it that branch. 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":"packages/transformers/src/pipelines.js"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"46409cac48f972b787c866c138d58b85afaffa6d67e02a6523e7276fba4d42b0"}},{"ruleId":"D1","level":"warning","message":{"text":"tokenizer.tokenBytesConverter (cyclomatic 17): tokenizer.tokenBytesConverter has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. 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":"packages/transformers-structured-output/src/engine/tokenizer.ts"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b2d680157ae834f7bb8cc99fc503b47e6801b78caeb0a901da31f24481f647"}},{"ruleId":"D1","level":"warning","message":{"text":"render-api.renderFunction (cyclomatic 17): render-api.renderFunction 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":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a0693580a35d445d19eaf996e3f4b366b0877eaee0ee0161f5a7e5fff645039"}},{"ruleId":"D1","level":"warning","message":{"text":"render-api.rewriteConditionals (cyclomatic 17): render-api.rewriteConditionals 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":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"48dfeb1b79d9ff20c910a56c2c5cdb4468fd3f991bb2ed9d89eae86b908ae1bf"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperTokenizer.findLongestCommonSequence (cyclomatic 17): WhisperTokenizer.findLongestCommonSequence 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":"packages/transformers/src/models/whisper/tokenization_whisper.js"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ea68a1ab09ecf1b7290e879a182fbf3ce0affd3b7855f179d9e300da8d1ab42"}},{"ruleId":"D1","level":"warning","message":{"text":"constructor (cyclomatic 17): constructor has cyclomatic complexity 17 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0fb8368c6d34db80bc8fd422448789c23156d819b7948aa1856f22674aba5a2"}},{"ruleId":"D1","level":"warning","message":{"text":"get_resize_output_image_size (cyclomatic 17): get_resize_output_image_size 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":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae45d0ac77eac92d5297c9d08aa48de13c2a03fb7224fa8885e7da9d94f3d1e9"}},{"ruleId":"D1","level":"warning","message":{"text":"resize (cyclomatic 17): resize 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":"packages/transformers/src/utils/image.js"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"21fea6b7e48e8d265befd2c357a554356a3ef1793b0ee78a0ce4395fdc4a8c59"}},{"ruleId":"D1","level":"warning","message":{"text":"json.integerScaleReachable (cyclomatic 16): json.integerScaleReachable 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 file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e997c24763a268da24105a7b0036eff3a364e2f0ec0e36f2a766f98af7ce790"}},{"ruleId":"D1","level":"warning","message":{"text":"json.propertySchema (cyclomatic 16): json.propertySchema 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 file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"59eae05d4267310fe5b51a8f45aac6c5045ad5b88083488bcb647940dc84ac08"}},{"ruleId":"D1","level":"warning","message":{"text":"json.schemaMayAcceptKind (cyclomatic 16): json.schemaMayAcceptKind 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/transformers-structured-output/src/engine/json.ts holds 14 of the 51 methods over the threshold \u2014 including the worst \u2014 and 150 of the 441 points over it (34%), 3.8\u00D7 the next-largest file (packages/transformers/src/models/whisper/tokenization_whisper.js at 39). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b0a318fec1966984c29d96212363e0579f48b46751de9f095a57c9cacc7c7a"}},{"ruleId":"D1","level":"warning","message":{"text":"streamers.is_chinese_char (cyclomatic 16): streamers.is_chinese_char has cyclomatic complexity 16 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/generation/streamers.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec9a4f3df3b60ff142f70a76bde34227decb6b298045325329cdb76fbb573812"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatterboxModel.forward (cyclomatic 16): ChatterboxModel.forward 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":"packages/transformers/src/models/chatterbox/modeling_chatterbox.js"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"98bd1fddc72180fc1ad7b1682c8efb8267ad96855e2298c85229b8bde06d4f9d"}},{"ruleId":"D1","level":"warning","message":{"text":"ensureWasmLoaded (cyclomatic 16): ensureWasmLoaded has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 223, 235, 250). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/backends/onnx.js"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1c56e6be84481b05493506f3940cc4c7c36401af6e894fadffeca4f8a812d7b"}},{"ruleId":"D1","level":"warning","message":{"text":"_call (cyclomatic 16): _call has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"5643e9e9dcd0c226f254c6cfd17d78af5ae860d0c4f69ce3e830278080565f78"}},{"ruleId":"D1","level":"warning","message":{"text":"selectDtype (cyclomatic 16): selectDtype 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":"packages/transformers/src/utils/dtypes.js"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"4796878b3ad8063c85af2a8629c435a5c56f14e9ce42c603540b9755f7c06191"}},{"ruleId":"D1","level":"warning","message":{"text":"getCache (cyclomatic 16): getCache 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":"packages/transformers/src/utils/cache.js"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52c5647bf6ad287f2a61ddabb352616ba5dfed43b214e7b89848c7bb3af5371"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperTokenizer._decode_asr (cognitive 151): WhisperTokenizer._decode_asr has cognitive complexity 151 (threshold 15). Drivers by points: if/else 38 (115 pts), loops 7 (24 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 95). 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":"packages/transformers/src/models/whisper/tokenization_whisper.js"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"493080b0b4895f448fdc8fa43ee6bc82a4c579e224631c03715e08b9de244156"}},{"ruleId":"D2","level":"warning","message":{"text":"spectrogram (cognitive 75): spectrogram has cognitive complexity 75 (threshold 15). Drivers by points: loops 14 (34 pts), if/else 23 (31 pts), boolean chains 4, match/switch 2 (4 pts), other 1, ternaries 1 (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/audio.js"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a409cc967bbb45a696acc173762244e9f4b67aae1250b93939a2b7405fe1be"}},{"ruleId":"D2","level":"warning","message":{"text":"loadResourceFile (cognitive 75): loadResourceFile has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 13, error handling 2 (9 pts) (nesting depth added 31). 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":"packages/transformers/src/utils/hub.js"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb2de43a00901884d1697896ef8d3c064b751c93e841cf7fe3b02bb2537f675a"}},{"ruleId":"D2","level":"warning","message":{"text":"_call (cognitive 73): _call has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (49 pts), loops 5 (13 pts), ternaries 1 (5 pts), boolean chains 3, other 3 (nesting depth added 35). Of this number, 59 points are the body\u0027s own statements and 14 belong to 7 function literals inside it that branch. 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":"packages/transformers/src/tokenization_utils.js"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"453e8c7c37470d826f5802435e111be4d73dd2fadc5801d80a6129a233eb8208"}},{"ruleId":"D2","level":"warning","message":{"text":"json.checkSchema (cognitive 72): json.checkSchema has cognitive complexity 72 (threshold 15). Drivers by points: if/else 23 (32 pts), boolean chains 24, loops 8 (10 pts), ternaries 3 (6 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1568}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6829cef57d23ee5beb79cd3547e39493a50ea737839fba54cfe06369885c8de"}},{"ruleId":"D2","level":"warning","message":{"text":"json.validateObjectNode (cognitive 62): json.validateObjectNode has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 12, loops 5 (6 pts), ternaries 6 (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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eda19857e40803202d0a694ec8a052c99522a7599b6456319e5ff4642eb7b34"}},{"ruleId":"D2","level":"warning","message":{"text":"getCacheNames (cognitive 61): getCacheNames has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (37 pts), loops 6 (12 pts), other 5, boolean chains 4, ternaries 2 (3 pts) (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":"packages/transformers/src/configs.js"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49d7104a9c6cbb64550f58878863776a95e730129df4b08a0bab8b3fcebee88"}},{"ruleId":"D2","level":"warning","message":{"text":"_get_file_metadata (cognitive 53): _get_file_metadata has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 3 (10 pts), boolean chains 8, error handling 2 (7 pts) (nesting depth added 28). 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":"packages/transformers/src/utils/model_registry/get_file_metadata.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"349484d33576809cf07c5fc9a30935b7f6a778c1af9827a9eaead78b55ffd569"}},{"ruleId":"D2","level":"warning","message":{"text":"validate.collectDocWarnings (cognitive 48): validate.collectDocWarnings has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 7 (17 pts), boolean chains 3 (nesting depth added 30). Of this number, 47 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. 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":"packages/transformers/docs/scripts/lib/validate.mjs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e25337282c5a113bcde4c71319df60c8d6042dbd18d289cf674a707e9aeac87"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperForConditionalGeneration._generate_with_seek (cognitive 48): WhisperForConditionalGeneration._generate_with_seek has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (11 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 23). 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":"packages/transformers/src/models/whisper/modeling_whisper.js"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c1593d29e58b8372b3e25be664c420fc1bffbbcecd880b0acc4664e2bab0a9"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageProcessor.pad_image (cognitive 45): ImageProcessor.pad_image has cognitive complexity 45 (threshold 15). Drivers by points: loops 7 (24 pts), if/else 9 (17 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"9961148f1e31e53e985e5f4cb8add348da4ad504b0384e4c4668aaaef4b75c8a"}},{"ruleId":"D2","level":"warning","message":{"text":"_call (cognitive 45): _call has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 6 (14 pts), boolean chains 3, other 2 (nesting depth added 20). Of this number, 44 points are the body\u0027s own statements and 1 belongs to 2 function literals inside it that branch. 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":"packages/transformers/src/pipelines/image-segmentation.js"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3b771f633fc68af6894a46e46598115e1d446b3d3d7ca3f3a00e1138838e90"}},{"ruleId":"D2","level":"warning","message":{"text":"json.validateNode (cognitive 40): json.validateNode has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 15, ternaries 2 (4 pts) (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba8b65dc421969660e1c3198f602f5e3616379be5eb7124fcf5ea77f04443a3"}},{"ruleId":"D2","level":"warning","message":{"text":"tokenizer.extractTokenizer (cognitive 40): tokenizer.extractTokenizer has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 8 (14 pts), boolean chains 3 (nesting depth added 17). 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":"packages/transformers-structured-output/src/engine/tokenizer.ts"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e144b6c62e6a905c6206cfbc229973957ee27e9e149a13654d98318ffcf8cae"}},{"ruleId":"D2","level":"warning","message":{"text":"PreTrainedModel.generate (cognitive 39): PreTrainedModel.generate has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 16). 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":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"c94c859b342e02d494f4728746169e393fe4f1c46388ae488b3aca0472b9c4c3"}},{"ruleId":"D2","level":"warning","message":{"text":"preprocess (cognitive 36): preprocess has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (24 pts), loops 3 (7 pts), other 4, 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":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"584e874bb71075900bdfe2078a164141dec728b85dcc15ff861b826eab94a4d9"}},{"ruleId":"D2","level":"warning","message":{"text":"_call_whisper (cognitive 36): _call_whisper has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (10 pts), loops 3 (6 pts), other 4 (nesting depth added 17). 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":"packages/transformers/src/pipelines/automatic-speech-recognition.js"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d492e3ed58a9b9f8afd457243f1a0b3f5a88e34da895d00fa8f11f0cd632a63"}},{"ruleId":"D2","level":"warning","message":{"text":"image_processors_utils.post_process_object_detection (cognitive 35): image_processors_utils.post_process_object_detection has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (10 pts), ternaries 1 (2 pts), boolean chains 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":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"e88afebba8824093174a9f8ac2760f363577602c2ca8f9eac38db5e8aa49388b"}},{"ruleId":"D2","level":"warning","message":{"text":"slice (cognitive 35): slice has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 5 (10 pts), ternaries 2 (6 pts), boolean chains 3 (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":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7be56839f76416a194a4a61ea1ecbf965c7f3328c7e609ae48daf4ca7687eba"}},{"ruleId":"D2","level":"warning","message":{"text":"constraint.createTokenConstraint (cognitive 33): constraint.createTokenConstraint has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 4 (7 pts), boolean chains 4, ternaries 2 (nesting depth added 8). 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":"packages/transformers-structured-output/src/engine/constraint.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"960f6415e66c1c0aab505c212cf76f52b369bbf417be18078e3c40d9ffc442ac"}},{"ruleId":"D2","level":"warning","message":{"text":"_call (cognitive 32): _call has cognitive complexity 32 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 7 (12 pts), boolean chains 4, other 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f7fe59e967ded2ec18f19e42666465086eb93a5be98356211631085a45b490"}},{"ruleId":"D2","level":"warning","message":{"text":"json.validateArrayNode (cognitive 29): json.validateArrayNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 3 (5 pts), ternaries 3 (4 pts) (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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f2e11c9306715f10fbda8bc961640cb0b25726d7af7894f02000a5182abaca"}},{"ruleId":"D2","level":"warning","message":{"text":"findLongestCommonSequence (cognitive 28): findLongestCommonSequence has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). Of this number, 27 points are the body\u0027s own statements and 1 belongs to 3 function literals inside it that branch. 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":"packages/transformers/src/models/whisper/tokenization_whisper.js"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"458b2331b55ddedb9fc434ec7b0b9554cc036c2444db51419c617b9d0399ef05"}},{"ruleId":"D2","level":"warning","message":{"text":"json.constrainedPropertyKeys (cognitive 27): json.constrainedPropertyKeys has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (8 pts), boolean chains 3, ternaries 2 (nesting depth added 11). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"81faa7b03b6508c28a357bfb36edd65be67f2eb4696f8be7f94a7efee9541d4e"}},{"ruleId":"D2","level":"warning","message":{"text":"structure.extractEntities (cognitive 27): structure.extractEntities has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 24). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/structure.mjs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae24e8a74243f2e98f786221f6c05ac10b79ca69d65751c243ca94f459974ff"}},{"ruleId":"D2","level":"warning","message":{"text":"_get_logits_processor (cognitive 27): _get_logits_processor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 10, ternaries 1 (2 pts) (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":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ad5b63bb5f10aeb75913c86ffef1a66ef3be775f1945334c98f3b0ad6a6e9ea"}},{"ruleId":"D2","level":"warning","message":{"text":"tasks.parseSupportedTasks (cognitive 26): tasks.parseSupportedTasks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), boolean chains 2 (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":"packages/transformers/docs/scripts/lib/tasks.mjs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"454c64f076c3abffda392d66799ba4d95f53b6b22bf256c584572f93fd94a01f"}},{"ruleId":"D2","level":"warning","message":{"text":"validate.formatValidationResult (cognitive 26): validate.formatValidationResult has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 6 (9 pts), ternaries 2 (6 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":"packages/transformers/docs/scripts/lib/validate.mjs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"e26e88aa5bea4f43193aebfcf16489a1e771696201c3a5741d3b1c1eff3af02b"}},{"ruleId":"D2","level":"warning","message":{"text":"SeamlessM4TFeatureExtractor._call (cognitive 26): SeamlessM4TFeatureExtractor._call has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 8 (12 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40ea74d90d558440ffc214f97f6ff8dc3b9b52cff697acdbca1cf51e5bd5285"}},{"ruleId":"D2","level":"warning","message":{"text":"Phi3VImageProcessor._call (cognitive 26): Phi3VImageProcessor._call has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (8 pts), boolean chains 1 (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":"packages/transformers/src/models/phi3_v/image_processing_phi3_v.js"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"604b9c3562c11a7d942d435cd3c5302601a8cfefbec04e2000a46376470e5dec"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatterboxModel.forward (cognitive 26): ChatterboxModel.forward has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3 (nesting depth added 11). 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":"packages/transformers/src/models/chatterbox/modeling_chatterbox.js"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"179594cbf17eaf9c967934adf72b07aca8603f6142402a2d860a5bb31f639392"}},{"ruleId":"D2","level":"warning","message":{"text":"mask.applyMask (cognitive 25): mask.applyMask has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (9 pts) (nesting depth added 15). 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":"packages/transformers-structured-output/src/utils/mask.ts"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c272cb270dea86f3dd5e826891b302d361fc9db9d6e0c17fa666eec4f1221e"}},{"ruleId":"D2","level":"warning","message":{"text":"render-api.renderFunction (cognitive 25): render-api.renderFunction has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 5, loops 2 (3 pts), boolean chains 2 (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":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05fd8a0647a1967b3913bdd71373c1ca9e068dc3db212f9765449d7ab017d29"}},{"ruleId":"D2","level":"warning","message":{"text":"render-api.rewriteConditionals (cognitive 24): render-api.rewriteConditionals has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), ternaries 2 (4 pts), boolean chains 3 (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":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee5c41f8c5f6d328e5a1bf05cc81ecc566433f090b3668aab08f5ebf4514218"}},{"ruleId":"D2","level":"warning","message":{"text":"RawImage.center_crop (cognitive 24): RawImage.center_crop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 3 (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":"packages/transformers/src/utils/image.js"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"306cc79d3023fac8ea37f8a1cc224595ee30310b57f8ca1da4ebb0d0637bf187"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperForConditionalGeneration._extract_token_timestamps (cognitive 24): WhisperForConditionalGeneration._extract_token_timestamps has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 6 (9 pts), ternaries 2 (nesting depth added 10). Of this number, 22 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/whisper/modeling_whisper.js"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"25eeab1076c87f04ab749d7d019e0e075a04a45c26767679b46ebe8abd52359e"}},{"ruleId":"D2","level":"warning","message":{"text":"json.integerDigitsReachable (cognitive 23): json.integerDigitsReachable has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 11). 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74d6731f15fddbc419c93613a9d4d3f9c2bb970a13296789551acc27062f4db"}},{"ruleId":"D2","level":"warning","message":{"text":"json.compareDecimal (cognitive 23): json.compareDecimal has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 6, boolean chains 3 (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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1205}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb3133e1631ef0d4d80dcc4beeb5922ea7b8c416c1c25122c77d253cb5344d5"}},{"ruleId":"D2","level":"warning","message":{"text":"exports.visitTopLevel (cognitive 23): exports.visitTopLevel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts), boolean chains 3, ternaries 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":"packages/transformers/docs/scripts/lib/exports.mjs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ef5f294452394e27f802cdb002979b46b3c402cc2f2fca379b0d3a7b679858"}},{"ruleId":"D2","level":"warning","message":{"text":"get_resize_output_image_size (cognitive 23): get_resize_output_image_size has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 3, other 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":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c572875c8f4bae2d5a6f997e57d4ea601945006967aefdffab8a4e91af2449f"}},{"ruleId":"D2","level":"warning","message":{"text":"getSession (cognitive 23): getSession has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, other 5, loops 1 (3 pts) (nesting depth added 3). 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":"packages/transformers/src/models/session.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"15eb13e476076ab965f12cd5e7b5f601051f3ca6c396ae98090dfe3e7dfbb39e"}},{"ruleId":"D2","level":"warning","message":{"text":"_call (cognitive 23): _call has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 3 (4 pts), other 3, loops 1 (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":"packages/transformers/src/pipelines/text-generation.js"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab86e2d8484bb42319b7c77afbfca8f957c2df48ffc6ca5d7f57c3394c3c43f2"}},{"ruleId":"D2","level":"warning","message":{"text":"selectDtype (cognitive 23): selectDtype has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (3 pts), other 2 (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":"packages/transformers/src/utils/dtypes.js"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"30d06c3b7c7f3cc1ddaebf6c447f88ddd1c011df377daa8d7d390cb5f0861db2"}},{"ruleId":"D2","level":"warning","message":{"text":"json.unicodeByte (cognitive 22): json.unicodeByte has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, ternaries 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"19850f9e0f0cd19c38495b9786779747f6b1b39417e443edf1616da0572114c7"}},{"ruleId":"D2","level":"warning","message":{"text":"constraint.cachedTokenizer (cognitive 22): constraint.cachedTokenizer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts) (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":"packages/transformers-structured-output/src/engine/constraint.ts"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc0617d348e39fa77cc19ec310f2ac800caac39db393d61604ced8066586f1cf"}},{"ruleId":"D2","level":"warning","message":{"text":"pipeline (cognitive 22): pipeline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), other 3, ternaries 3, error handling 1 (2 pts), boolean chains 1 (nesting depth added 4). Of this number, 19 points are the body\u0027s own statements and 3 belong to 3 function literals inside it that branch. 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":"packages/transformers/src/pipelines.js"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d44b38f3dccdb711ca9907f916dd7678c016ac3f83eed722b23cd7b0f0204ae"}},{"ruleId":"D2","level":"warning","message":{"text":"_call (cognitive 22): _call has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (7 pts), other 4, boolean chains 1, ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch ((anonymous)::(anonymous), ds, (anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/lfm2_vl/processing_lfm2_vl.js"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c939ddc2e85fea2fed8527bc9eaa8465f0d04fcf07dd02bf1c139c3dc6fb64"}},{"ruleId":"D2","level":"warning","message":{"text":"json.propertySchema (cognitive 21): json.propertySchema has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (3 pts), boolean chains 2, loops 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4e62486e07a459f9f630058806d44c3b6d47df1fdd1dc451d5a13225d76862"}},{"ruleId":"D2","level":"warning","message":{"text":"json.validUriText (cognitive 21): json.validUriText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 3 (5 pts), boolean chains 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1509}}}],"partialFingerprints":{"codehealthFindingId/v1":"1daed2f268382543651db6f3727d7dcf3f8bad4399359aefe973b71ea35aa563"}},{"ruleId":"D2","level":"warning","message":{"text":"scan.splitConditional (cognitive 21): scan.splitConditional has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, 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":"packages/transformers/docs/scripts/lib/scan.mjs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83fa1bffc50f028b9d5527251e2e7224787513d826ad5affd46856ae4b6c484"}},{"ruleId":"D2","level":"warning","message":{"text":"render-api.renderType (cognitive 21): render-api.renderType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17a94ba24f7e3e0d41a302df438f11729b6b5f3279e9402122393f2dd243078"}},{"ruleId":"D2","level":"warning","message":{"text":"P2FFT._realTransform4 (cognitive 21): P2FFT._realTransform4 has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (10 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/maths.js"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d9ca107857ba4926ef1f97722a22edf6bab68a58bb5ece784869df6ebb35a0"}},{"ruleId":"D2","level":"warning","message":{"text":"tokenization_utils._build_translation_inputs (cognitive 21): tokenization_utils._build_translation_inputs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 1 (3 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":"packages/transformers/src/tokenization_utils.js"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea782c6d8b440b6db54d8faf5814962a799431c43a3c4f02a78a24658520fda0"}},{"ruleId":"D2","level":"warning","message":{"text":"ClapFeatureExtractor._get_input_mel (cognitive 21): ClapFeatureExtractor._get_input_mel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (8 pts) (nesting depth added 11). 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":"packages/transformers/src/models/clap/feature_extraction_clap.js"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"301029980cc2c756de0d024bbda135364671777b28c91029b182fb5a43f4bb46"}},{"ruleId":"D2","level":"warning","message":{"text":"image_processing_lfm2_vl.convert_image_to_patches (cognitive 21): image_processing_lfm2_vl.convert_image_to_patches has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (21 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b467e5c7af4a3dfba3f6f145c12d30bdb36bc79acb25c7f3c07ddfec4b3070"}},{"ruleId":"D2","level":"warning","message":{"text":"_call (cognitive 21): _call has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), boolean chains 1, other 1, ternaries 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":"packages/transformers/src/models/idefics3/image_processing_idefics3.js"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de0dfa6be7a2c9ea44bae1314f14b314d95bb439f099d27fde0943bd2e2e4fc"}},{"ruleId":"D2","level":"warning","message":{"text":"api-links.buildApiSymbolLinks (cognitive 20): api-links.buildApiSymbolLinks has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 3 (9 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/api-links.mjs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"982e420dfd3fab77a8a8042dbd65b95587513b1d71c0f2e62c1d855dfd5c636d"}},{"ruleId":"D2","level":"warning","message":{"text":"ir.buildTypedefIndex (cognitive 20): ir.buildTypedefIndex has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 2 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/ir.mjs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"f62dc6009e7350bde772d5a9f9a0240febc1c17ec657f54cfeb4f2321d11f897"}},{"ruleId":"D2","level":"warning","message":{"text":"validate.validateInternalLinks (cognitive 20): validate.validateInternalLinks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (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":"packages/transformers/docs/scripts/lib/validate.mjs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e87b00d992416b56ecebf13732fb073a11bc8b1f8ad3c560d4fda97e8805ca"}},{"ruleId":"D2","level":"warning","message":{"text":"Idefics3ImageProcessor.split_image (cognitive 20): Idefics3ImageProcessor.split_image has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts), boolean chains 2 (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":"packages/transformers/src/models/idefics3/image_processing_idefics3.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7b3110064a8681adf4e19c5644904e64b0c8c5856f499566c87778adcdf58d"}},{"ruleId":"D2","level":"warning","message":{"text":"VitPoseImageProcessor.post_process_pose_estimation (cognitive 20): VitPoseImageProcessor.post_process_pose_estimation has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/vitpose/image_processing_vitpose.js"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"7076a12548758f52fa565e268ef0ee60b5e0f4cb1bed5799f531ff8aec530dbf"}},{"ruleId":"D2","level":"warning","message":{"text":"json.stringByte (cognitive 19): json.stringByte has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, ternaries 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"224df1f39e8733415f921c3e6fb1e4145afe13c5f0517fab527829a2e9114e60"}},{"ruleId":"D2","level":"warning","message":{"text":"resolve_model_type.resolve_model_type (cognitive 19): resolve_model_type.resolve_model_type has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 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":"packages/transformers/src/utils/model_registry/resolve_model_type.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea50f731e327f5cf915f466c78ba26d4249705e203d53110bd4533300400308c"}},{"ruleId":"D2","level":"warning","message":{"text":"post_process_semantic_segmentation (cognitive 19): post_process_semantic_segmentation has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (7 pts), ternaries 1 (2 pts), boolean chains 1, other 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":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b0366b12e3cc7c1d213ed25b2e31fed89cd19dcd2d7f89b34650af00c287594"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 19): (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (8 pts) (nesting depth added 10). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1053). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/maths.js"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"05eeed8606c4884a71dbcaf1027672e3d7863e6150d0d173ec3fb9c06025ffdc"}},{"ruleId":"D2","level":"warning","message":{"text":"getCache (cognitive 19): getCache has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, error handling 1 (2 pts), other 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":"packages/transformers/src/utils/cache.js"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"77103e2ba6701820f2afee41136447f1532744eae58fb8d90d5337c402fa11c0"}},{"ruleId":"D2","level":"warning","message":{"text":"json.integerScaleReachable (cognitive 18): json.integerScaleReachable has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (6 pts), ternaries 2 (4 pts), loops 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"030b51c74bb4aab9ce3ebd995f22c43f2261f7908c2463cfd261c9012587951a"}},{"ruleId":"D2","level":"warning","message":{"text":"tokenizer.tokenBytesConverter (cognitive 18): tokenizer.tokenBytesConverter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 140, 119). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/tokenizer.ts"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"314c1dd62c89cc1bd3b8cb8f5883f641cf25df4f22abfbfb2c57263ddc56324a"}},{"ruleId":"D2","level":"warning","message":{"text":"tensor.cat (cognitive 18): tensor.cat has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 3 (7 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae83250f17ee3b4b450b47ee56717adbbf5da4fae37bf5bbcc7eab0be154d8fd"}},{"ruleId":"D2","level":"warning","message":{"text":"image_processing_gemma4.patchify (cognitive 18): image_processing_gemma4.patchify has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (18 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/gemma4/image_processing_gemma4.js"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cdd09068dda8ce0e1087f18c712053cba09574ff4f2cecaae2ac688ed57c1ee"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2VLForConditionalGeneration._get_multimodal_rope_positions (cognitive 18): Qwen2VLForConditionalGeneration._get_multimodal_rope_positions has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 5). Of this number, 15 points are the body\u0027s own statements and 3 belong to 3 function literals inside it that branch. 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":"packages/transformers/src/models/qwen2_vl/modeling_qwen2_vl.js"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2ebc50435c7c424906fc13083f68ebf69a44203de0a8ee1b13f9ba5e8fe955"}},{"ruleId":"D2","level":"warning","message":{"text":"PretrainedMixin.from_pretrained (cognitive 18): PretrainedMixin.from_pretrained has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts) (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":"packages/transformers/src/models/auto/modeling_auto.js"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"260a51feb886880dc95352c7c4f55561fd85c61c1193a72dc2cdb3d6a67c1e8d"}},{"ruleId":"D2","level":"warning","message":{"text":"TokenClassificationPipeline._call (cognitive 18): TokenClassificationPipeline._call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 4 (7 pts), loops 2 (3 pts), boolean chains 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":"packages/transformers/src/pipelines/token-classification.js"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b8f8d66c3b74cd00bb026ef97d157e07bd10f778c8dccbc118548b4fb1128f"}},{"ruleId":"D2","level":"warning","message":{"text":"from_pretrained (cognitive 18): from_pretrained has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), other 3, ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 6). Of this number, 11 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. 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":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"4361d892d8e8d5d56d75c97070a9ecb965c96dc6434ad73304944dccd32ab96a"}},{"ruleId":"D2","level":"warning","message":{"text":"scan.splitTopLevel (cognitive 17): scan.splitTopLevel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1, ternaries 1 (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":"packages/transformers/docs/scripts/lib/scan.mjs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"999b6957d75ca7e1ee9401e7d15b613efd13603e945ae8d7b7492cdb9bb33639"}},{"ruleId":"D2","level":"warning","message":{"text":"render-api.renderModule (cognitive 17): render-api.renderModule has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 7 (8 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/render-api.mjs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ed7f29c0c388e3d58164c13d677bafa857e17d6780f57c67f09c5b72f3f2978"}},{"ruleId":"D2","level":"warning","message":{"text":"Random.seed (cognitive 17): Random.seed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, boolean chains 2 (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":"packages/transformers/src/utils/random.js"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeb5759e560ce459247c99a03fca604cca253d585f620796e8dfc2ca2e3a1ebd"}},{"ruleId":"D2","level":"warning","message":{"text":"json.transition (cognitive 16): json.transition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"42113a305331a9f931b39c0f17cde473f1753cc8bbf0a83f560711eca9f04920"}},{"ruleId":"D2","level":"warning","message":{"text":"RegexParser.characterClass (cognitive 16): RegexParser.characterClass has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 2 (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":"packages/transformers-structured-output/src/engine/regex.ts"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb09de3927e0d9c3f294f74f695259a4da0c1498dd0b2db326f7003821c617b"}},{"ruleId":"D2","level":"warning","message":{"text":"maths.dynamic_time_warping (cognitive 16): maths.dynamic_time_warping has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (6 pts), if/else 3 (5 pts), boolean chains 3, 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":"packages/transformers/src/utils/maths.js"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e98733bbcaee280cde9a83af6c4f8eca3d115d2ea9286f195c8c3ddc41d27b7"}},{"ruleId":"D2","level":"warning","message":{"text":"PreTrainedTokenizer.get_chat_template (cognitive 16): PreTrainedTokenizer.get_chat_template has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (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":"packages/transformers/src/tokenization_utils.js"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9eba5116314c8d93a30ccd7359b1b32cd51892e345b1572022f4cde04c2208"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperTimeStampLogitsProcessor._call (cognitive 16): WhisperTimeStampLogitsProcessor._call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 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":"packages/transformers/src/generation/logits_process.js"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3ff737d53f7a6ac98b8f0cd69e62a8d00a948826b835ec065c612b91373a01"}},{"ruleId":"D2","level":"warning","message":{"text":"NoBadWordsLogitsProcessor._call (cognitive 16): NoBadWordsLogitsProcessor._call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts) (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":"packages/transformers/src/generation/logits_process.js"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae022449f50c87c1ce4ecda93f47af1992265c697ea40cc79a1f6ac1fe468b6"}},{"ruleId":"D2","level":"warning","message":{"text":"image_processing_lfm2_vl.get_target_ratios (cognitive 16): image_processing_lfm2_vl.get_target_ratios has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (9 pts), loops 3 (6 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":"packages/transformers/src/models/lfm2_vl/image_processing_lfm2_vl.js"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"aca58d1ac792ccc73e95e92994c9259b799bcf417fe6cec38c85a7141f639cfe"}},{"ruleId":"D2","level":"warning","message":{"text":"constructor (cognitive 16): constructor has cognitive complexity 16 (threshold 15). Drivers by points: other 10, boolean chains 5, if/else 1. 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":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f81a273ec5f1013c6db22970758a9220b2ded937a615419ceaeb694fdad05f6"}},{"ruleId":"D2","level":"warning","message":{"text":"load_video (cognitive 16): load_video has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 2 (4 pts), loops 2, 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":"packages/transformers/src/utils/video.js"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a72cff72f5aeaaf3b989356202f84faadec22f212f916fae1ee331c8ef924b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: engine/json.ts: FileTooLong \u2014 1365 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 865 over it, 2.73\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":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8246e714fea8cbfd05c311cf8f0e70b382f3d35a80039077ca5a3909cc12c26a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: configs.getNormalizedConfig: FunctionTooLong \u2014 getNormalizedConfig runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55\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":"packages/transformers/src/configs.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea3c7b431bc9d5febb0bac6d9ed1cc39724ae65c4f0e6e067c3d70fa14a07a0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Tensor: TooManyMethods \u2014 53 methods. The bar is 30 methods; this is 23 over it, 1.77\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":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcc3777469858f7ab4ad62fddbb80bc5b53e2322bfad601488e9dbcd69146d69"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/modeling_utils.js: FileTooLong \u2014 804 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 304 over it, 1.61\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":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"289a5b0580b108243835f12ae12cacb1d2c3ae2cf716512a66c07bdd5bb76073"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/tensor.js: FileTooLong \u2014 681 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 181 over it, 1.36\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":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3578998dd03b9f4ad492f97ea151ce7b68ca4c66c932a6b2bcf0915cdabf281"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/maths.js: FileTooLong \u2014 541 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 41 over it, 1.08\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":"packages/transformers/src/utils/maths.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0c1da041956dae049036f2502c066d3001b3aac53b5b19c2d3f85c68c33178"}},{"ruleId":"D8","level":"warning","message":{"text":"Coverage not measured \u2014 JavaScript/TypeScript suite: Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured \u2014 the jest suite in packages/transformers/ ran and not one test passed (FAIL tests/utils/maths.test.js), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository\u0027s maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"62e63e619c28f057e129f2997c965d32a457366a9ce18ca019ffb6bdfba85c99"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: compiles ${file} without errors: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/tests/types.test.js"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3e778ccf905e23ce378657ab05db8b0b26b72a267b46822b2c7a9a5dabe150"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: no progress_total without progress_callback: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/tests/progress_callbacks.test.js"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9018f198f1f943b6325d51cf78371ca43e38cfe8509cb30689d107f93c08616e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: packages/transformers/src/utils/hub.js: packages/transformers/src/utils/hub.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in hub.loadResourceFile at line 265. 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-06-25..2026-09-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-25 14:31:55 \u002B02:00\u0027 --until=\u00272026-09-23 14:31:55 \u002B02:00\u0027 --full-history --no-merges -- packages/transformers/src/utils/hub.js\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":"packages/transformers/src/utils/hub.js"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc8d573838a0900558ab31e6898530be38b8bc641d5d439e8893a412321b0827"}},{"ruleId":"D26","level":"note","message":{"text":"Split packages/transformers: A generic catch-all name that is huge (34k LoC) and sprawls across 232 namespaces. Suggested: "},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b0af785576e5135178483e1742fe2d21c8f0865cbaf694813bbd42882a858b90"}},{"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":"7cf8a78c4a993aecafcb4fe2b18ecb6ff3aced137586a07de2812771fcf18756"},"taxa":[{"id":"CWE-829","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":"1498825690ee691422757d83c6c8726aaf69040fa62a3b6b71a03075f0880320"},"taxa":[{"id":"CWE-829","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":"85f99189d964cdde824a816d83f2290af0a3f7efe42feb1d6495743a90e33e22"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"903d6fbec42d09b435e1a2ab6bc41fdb5071c4428dc650717820905a257fc015"},"taxa":[{"id":"CWE-457","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"bbd82f4f103d8cf2f47273fe40739328392d2b7d76e58eea9399bad5a813b3c9"},"taxa":[{"id":"CWE-457","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"0e16de37bc9704fc6cfbed3d509535d52418fbe2923ef5807d7c7f5d00ceecff"},"taxa":[{"id":"CWE-457","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"172e8f4aee916bc9eae4615edf3fbc88c46fa4e4eb273bc0dbb3657967b1b5db"},"taxa":[{"id":"CWE-457","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"b0ae176d54abc0d1dc4ed061ca6bed8124683d772133c4debb67ca6f1f004a3f"},"taxa":[{"id":"CWE-457","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D30","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":"635cde9860b68e56898d582225d882b3dab2d1ebe75d111465bf8a323e0e396b"},"properties":{"dependency":{"package":"minimatch","version":"3.1.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"12edae6eae138c641b09b6214fb78a79a01e61d27b3814cf04454f7f613df914"},"properties":{"dependency":{"package":"minimatch","version":"9.0.5","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"685cba4514570b53bf9bc85812fa54c07fec7b3f62fc67d4712c038e9ec2e605"},"properties":{"dependency":{"package":"js-yaml","version":"3.14.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"df21b8127d24aeed9579f3ce44f2f84d2d4f9ae41d6b03d4309b75c4781747cc"},"properties":{"dependency":{"package":"brace-expansion","version":"1.1.12","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"6fde06abe7dac0b6bc6951df4e58a3dd77b634a2402a8ce8ec6bcc39669c05de"},"properties":{"dependency":{"package":"brace-expansion","version":"2.0.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"ce9bbfea95fe015374ae86e03b9373fd15c82feee84c4ee070b765207d8d9476"},"properties":{"dependency":{"package":"browserslist","version":"4.28.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"98f5b7f1cc7ab72c7ef988be1ab835626c9ba93796c264fb44a05726fc7d8dd6"},"properties":{"dependency":{"package":"picomatch","version":"2.3.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"b10420175f791c4b7e1106592d4e51c7b6ddced3c15d8dccd4db298f5f89f93c"},"properties":{"dependency":{"package":"picomatch","version":"4.0.3","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"16bc49aac72eafef4ac9a880a9755121d0367a6bdf3e48689c49c4d9d8c09a58"},"properties":{"dependency":{"package":"baseline-browser-mapping","version":"2.9.18","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","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":"f392b1419f96aa208ac2115d3c34c2f00540ad0c5381e81423f8727e54319f35"},"properties":{"dependency":{"package":"@babel/core","version":"7.28.6","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"not-imported"}}}},{"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":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}},{"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":"329f0ef4132322722fbf83ac33f5bb7ad638ed99d037a66c3aa244b1e2ee654e"}},{"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":"d068c977b62d9a977df1bb6f53e8b00b586c3abee955f91d715f92b8e019d624"}},{"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":"M4","level":"note","message":{"text":"README/code drift: README advertises Salesforce integration, but no Salesforce code/dependency exists \u2014 searched for: \u0060salesforce\u0060, \u0060sfdx\u0060, \u0060apex\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 javascript-typescript pack, \u0060semgrep --config=p/typescript\u0060, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4989 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":"P4","level":"warning","message":{"text":"No deployment automation: No release automation was found in CI \u2014 neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7a7f38718309412c2d2c2c0663260a3d160de9a5a60f3915755be16386d3f1e8"}},{"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"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060collect_tests\u0060 is async and calls readdirSync, existsSync, statSync \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/tests/test_utils.js"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a98f7b74cabb48152d2c6989f909a57770e93a841c5d80ffc9a849d1045eef5"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060collect_and_execute_pipeline_tests\u0060 is async and calls readdirSync \u2014 a blocking call inside async code stalls the event loop \u2014 every other request waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/tests/test_utils.js"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a7de81f52f75a3886cc83aa140719e6401fb2ef47be34c47a00ac7f95bd0fd3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplication concentrated across 66 sibling directories (63 clone groups): 63 duplicated blocks under packages/transformers/src/models/ have copies in at least two of the sibling directories albert, audio_spectrogram_transformer, bart, bert, camembert, chatterbox (\u002B60 more sibling(s) not listed) \u2014 26 of them are reported below, and 37 are counted here but not reported individually: those copies match on shape but no longer clear R10\u0027s bar for an individually reported row \u2014 either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 63 and which does not depend on how exactly each block\u0027s copies still match. That concentration is one structural fact, not 63 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module \u2014 a common library every sibling imports \u2014 rather than 63 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/dac/modeling_dac.js"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"db43a6cf13a9c2493dd76b181f4dd76616ce9725295700b454542e6912c9a4d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2 locations): packages/transformers/src/models/dac/modeling_dac.js:6 \u00B7 packages/transformers/src/models/mimi/modeling_mimi.js:6 \u2014 the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/dac/modeling_dac.js"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c9c76980eff006fa341bff771e3127e19ef0fb3a0deab049189697c78e33986"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2 locations): packages/transformers/src/models/auto/modeling_auto.js:75 \u00B7 packages/transformers/src/models/modeling_utils.js:256 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/auto/modeling_auto.js"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd33cd9e2d81caf87faf8202cd5a5d1621d8f6732dd28e166cc1b6edc59442d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (26 matched lines \u00D7 2 locations): packages/transformers/src/utils/model_registry/clear_cache.js:48 \u00B7 packages/transformers/src/utils/model_registry/is_cached.js:32 \u2014 the two spans are one implementation copied and then locally edited \u2014 170 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/model_registry/clear_cache.js"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd849c9f8de93f4576dd5211517d98a05806095e36cbe530c79898cdc372ea1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2 locations): packages/transformers/src/utils/maths.js:460 \u00B7 packages/transformers/src/utils/maths.js:634 \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":"packages/transformers/src/utils/maths.js"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e312a5dcdb369a78715f37a3565536a56428350cb1455d1b3d0e0dbf0e1ba28"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2 locations): packages/transformers/src/models/idefics3/image_processing_idefics3.js:178 \u00B7 packages/transformers/src/models/phi3_v/image_processing_phi3_v.js:109 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/idefics3/image_processing_idefics3.js"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"38cc8b4b121b9f3c650e1c42062886f27ba5cd3762dc2e6b1c8aecc79d88460c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (20 matched lines \u00D7 2 locations): packages/transformers/src/pipelines/audio-classification.js:71 \u00B7 packages/transformers/src/pipelines/image-classification.js:84 \u2014 the two spans are one implementation copied and then locally edited \u2014 161 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/pipelines/audio-classification.js"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88e4699640279ba7ceab1ec8617b763e4d3d69f6ef7fe14368bd981143453a5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (19 matched lines \u00D7 2 locations): packages/transformers/src/generation/logits_process.js:516 \u00B7 packages/transformers/src/generation/logits_process.js:555 \u2014 the two spans are one implementation copied and then locally edited \u2014 108 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/generation/logits_process.js"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"06145f5e3d25487449369a21f4e218d0653180fcaccb09a0512ef30e588d8dbb"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3 locations): packages/transformers/src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js:5 \u00B7 packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:5 \u00B7 packages/transformers/src/models/wespeaker/feature_extraction_wespeaker.js:5 \u2014 the 3 copies are spread across 3 files, and each CITED SPAN is a SPECIALISATION DECLARATION \u2014 a type whose \u0060extends\u0060 clause names a base and whose body hands that base its own values through \u0060super(\u2026)\u0060. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the \u0060super(\u2026)\u0060 call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row \u2014 there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base \u2014 a type argument, a service, an alias, a cache \u2014 the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.js"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07508f9d71b4e2ba2dbac6ded2c25387234a6bf9f8db7e960f5c9fa129a8a24"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2 locations): packages/transformers/src/utils/image.js:248 \u00B7 packages/transformers/src/utils/image.js:280 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/image.js"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bf0da2fccb604eecc4653d542e9402923610c48f83725ad155552069fd05fba"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2 locations): packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js:33 \u00B7 packages/transformers/src/models/wespeaker/feature_extraction_wespeaker.js:33 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/seamless_m4t/feature_extraction_seamless_m4t.js"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b942f0c1dc1a9baaae8f2f576a30928453806c1a6b735d8b4407acc60766bd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 8 locations): packages/transformers/src/models/clap/modeling_clap.js:5 \u00B7 packages/transformers/src/models/clip/modeling_clip.js:48 \u00B7 packages/transformers/src/models/clip/modeling_clip.js:99 \u00B7 packages/transformers/src/models/dac/modeling_dac.js:55 \u00B7 \u002B4 more site(s) not listed \u2014 the 8 copies are spread across 7 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/clap/modeling_clap.js"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a016a671c108a27678d2ade405d2af5aff1a85902a11e474797d9c811bd86f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): packages/transformers/src/models/gemma3/processing_gemma3.js:15 \u00B7 packages/transformers/src/models/gemma3n/processing_gemma3n.js:32 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/gemma3/processing_gemma3.js"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d002210c458402b6ab062846880a0268186bbe5af868b426e41424ab92909b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): packages/transformers/src/models/gemma3n/modeling_gemma3n.js:19 \u00B7 packages/transformers/src/models/phi3_v/modeling_phi3_v.js:12 \u2014 the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/gemma3n/modeling_gemma3n.js"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc810fd0c126254a6cbe00c206f9650bd20f13bdb3213432905ccce60ba8e65"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): packages/transformers/src/models/granite_speech/processing_granite_speech.js:45 \u00B7 packages/transformers/src/models/ultravox/processing_ultravox.js:37 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/granite_speech/processing_granite_speech.js"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"298b7b5c365f3ae37ca893d112ee13822a0393c8eab3bf2ee7074cfc349dede0"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (15 matched lines \u00D7 2 locations): packages/transformers/src/image_processors_utils.js:1051 \u00B7 packages/transformers/src/models/vitmatte/image_processing_vitmatte.js:13 \u2014 the two spans are one implementation copied and then locally edited \u2014 99 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"6870b096869020a02df1084107dcd157b7b1dbb385e2dbf8e5b8b50b2a7fd654"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): packages/transformers/src/models/voxtral_realtime/feature_extraction_voxtral_realtime.js:4 \u00B7 packages/transformers/src/models/whisper/feature_extraction_whisper.js:6 \u2014 the 2 copies are spread across 2 files, and each CITED SPAN is a SPECIALISATION DECLARATION \u2014 a type whose \u0060extends\u0060 clause names a base and whose body hands that base its own values through \u0060super(\u2026)\u0060. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the \u0060super(\u2026)\u0060 call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row \u2014 there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base \u2014 a type argument, a service, an alias, a cache \u2014 the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/voxtral_realtime/feature_extraction_voxtral_realtime.js"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"d686290205c55302e5cd104e5978b259c171cce8e129f7ba303deff40c3ecb9b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2 locations): packages/transformers/src/utils/tensor.js:846 \u00B7 packages/transformers/src/utils/tensor.js:868 \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":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a8825abd946f7a14561a259a8bbdf1a8411b5df631eda8dd48084f24d4e3881"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): packages/transformers/src/generation/logits_process.js:201 \u00B7 packages/transformers/src/generation/logits_process.js:441 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/generation/logits_process.js"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9935da7733a0e5f130210aa8b8b1b976eec9e3cf4966cf2858e4c5449307b07"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3 locations): packages/transformers/src/models/dac/modeling_dac.js:6 \u00B7 packages/transformers/src/models/mimi/modeling_mimi.js:6 \u00B7 packages/transformers/src/models/modeling_outputs.js:49 \u2014 the 3 copies are spread across 3 files, and each CITED SPAN is a SPECIALISATION DECLARATION \u2014 a type whose \u0060extends\u0060 clause names a base and whose body hands that base its own values through \u0060super(\u2026)\u0060. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the \u0060super(\u2026)\u0060 call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row \u2014 there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base \u2014 a type argument, a service, an alias, a cache \u2014 the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/dac/modeling_dac.js"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"298d4fd67db678b42471755d282032186ff5e53c8b1969dc9a671a4e40c619ab"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (14 matched lines \u00D7 2 locations): packages/transformers/src/models/encodec/feature_extraction_encodec.js:10 \u00B7 packages/transformers/src/models/wav2vec2/feature_extraction_wav2vec2.js:22 \u2014 the two spans are one implementation copied and then locally edited \u2014 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/encodec/feature_extraction_encodec.js"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"07685320d3c6156346de08663cb6d68c458d67e180f49aa7fc82418314f9064f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): packages/transformers/src/utils/maths.js:399 \u00B7 packages/transformers/src/utils/maths.js:572 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/maths.js"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7efb09950327525bcb651fb9b6cab6a1c691b507f575bc8300f63b53dca5c97"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (13 matched lines \u00D7 2 locations): packages/transformers/src/configs.js:520 \u00B7 packages/transformers/src/tokenization_utils.js:310 \u2014 the two spans are one implementation copied and then locally edited \u2014 52 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/configs.js"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"a690f807393fd32cb3cb83f85668d11b1d1674cd704f9bdfd2c4a06f155fef8c"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3 locations): packages/transformers/src/generation/logits_process.js:166 \u00B7 packages/transformers/src/generation/logits_process.js:486 \u00B7 packages/transformers/src/generation/logits_process.js:561 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/generation/logits_process.js"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"48810b1550bed9b19b6af84f2f04163026ed3fa185b74ac81cdc1edb83a334fc"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 6 locations): packages/transformers/src/ops/registry.js:49 \u00B7 packages/transformers/src/ops/registry.js:66 \u00B7 packages/transformers/src/ops/registry.js:84 \u00B7 packages/transformers/src/ops/registry.js:99 \u00B7 \u002B2 more site(s) not listed \u2014 all 6 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/ops/registry.js"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f3a05dcc64a569cb4e9818ac6bd0ec326ba99a3d85f5739d01ecddebcb7417"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): packages/transformers/src/generation/logits_sampler.js:120 \u00B7 packages/transformers/src/generation/logits_sampler.js:151 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/generation/logits_sampler.js"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18fb93fc6126fc6be2a5001b35c0dbb5be39239643c03319cc89e068e9106dd"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): packages/transformers/src/models/chatterbox/feature_extraction_chatterbox.js:10 \u00B7 packages/transformers/src/models/moonshine/feature_extraction_moonshine.js:10 \u2014 the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/chatterbox/feature_extraction_chatterbox.js"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"673c8d638919b3d8aa56a6cc95f55d8723298bca8f721814a2bdd2cfc8f7cbc4"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4 locations): packages/transformers/src/models/detr/modeling_detr.js:1 \u00B7 packages/transformers/src/models/hubert/modeling_hubert.js:2 \u00B7 packages/transformers/src/models/rt_detr/modeling_rt_detr.js:1 \u00B7 packages/transformers/src/models/yolos/modeling_yolos.js:1 \u2014 the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/detr/modeling_detr.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f04aa0b240f1157cbe8e416985e232f4a40d9cd6a64e7e4339f9e4b843cbb9a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (12 matched lines \u00D7 2 locations): packages/transformers/src/models/modeling_utils.js:335 \u00B7 packages/transformers/src/pipelines.js:147 \u2014 the two spans are one implementation copied and then locally edited \u2014 75 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"8937f67e223e6355eb5aee4dac9c6e465d383e4e95ee1c9912d8b2e03c19c316"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4 locations): packages/transformers/src/models/unispeech/modeling_unispeech.js:2 \u00B7 packages/transformers/src/models/unispeech_sat/modeling_unispeech_sat.js:2 \u00B7 packages/transformers/src/models/wav2vec2/modeling_wav2vec2.js:2 \u00B7 packages/transformers/src/models/wav2vec2_bert/modeling_wav2vec2_bert.js:2 \u2014 the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/unispeech/modeling_unispeech.js"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"beef566962500170ac7915d985f4a3eda8cd08d653dafadd5dc921fe9db4fffa"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): packages/transformers/src/models/encodec/feature_extraction_encodec.js:4 \u00B7 packages/transformers/src/models/pyannote/feature_extraction_pyannote.js:5 \u2014 the two spans are one implementation copied and then locally edited \u2014 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/encodec/feature_extraction_encodec.js"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"db4935edad1d850b62996356aa7266e616ced768ee42ebd3beb757f6dabcd65d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13 \u00B7 packages/transformers/src/models/mbart/tokenization_mbart.js:3 \u2014 the two spans are one implementation copied and then locally edited \u2014 88 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/m2m_100/tokenization_m2m_100.js"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f4e2734914634c00259bc53c054e4367c1fd9ae284a1c50a37c27dad41e0d7"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): packages/transformers/src/models/m2m_100/tokenization_m2m_100.js:13 \u00B7 packages/transformers/src/models/nllb/tokenization_nllb.js:16 \u2014 the two spans are one implementation copied and then locally edited \u2014 79 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/m2m_100/tokenization_m2m_100.js"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ef964b754ce992787473332e9e663f5b4e1574d338ffedb84e8daa97e6ca36b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (11 matched lines \u00D7 2 locations): packages/transformers/src/models/mbart/tokenization_mbart.js:3 \u00B7 packages/transformers/src/models/nllb/tokenization_nllb.js:16 \u2014 the two spans are one implementation copied and then locally edited \u2014 80 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/mbart/tokenization_mbart.js"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"165b0bbbbe4f104a01beff9b5d722e45750e179b2a1d4b1d96e7712a43d3a9d5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3 locations): packages/transformers/src/models/sam/modeling_sam.js:4 \u00B7 packages/transformers/src/models/vits/modeling_vits.js:1 \u00B7 packages/transformers/src/models/wavlm/modeling_wavlm.js:2 \u2014 the 3 copies are spread across 3 files, and each CITED SPAN is a SPECIALISATION DECLARATION \u2014 a type whose \u0060extends\u0060 clause names a base and whose body hands that base its own values through \u0060super(\u2026)\u0060. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the \u0060super(\u2026)\u0060 call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row \u2014 there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base \u2014 a type argument, a service, an alias, a cache \u2014 the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/sam/modeling_sam.js"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb92380f8ae4cd8df55fb562e3cb4124b21a3f4b7d4ae4ca034474f947e46532"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 27 locations): packages/transformers/src/models/albert/modeling_albert.js:2 \u00B7 packages/transformers/src/models/bert/modeling_bert.js:7 \u00B7 packages/transformers/src/models/camembert/modeling_camembert.js:7 \u00B7 packages/transformers/src/models/convbert/modeling_convbert.js:7 \u00B7 \u002B23 more site(s) not listed \u2014 the 27 copies are spread across 27 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/albert/modeling_albert.js"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0fcdf8379f11d4cf55f183030f96d554762200b8ee2df183d770b531a948bf"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (10 matched lines \u00D7 2 locations): packages/transformers/src/models/ultravox/processing_ultravox.js:8 \u00B7 packages/transformers/src/models/voxtral/processing_voxtral.js:27 \u2014 the two spans are one implementation copied and then locally edited \u2014 60 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/ultravox/processing_ultravox.js"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"09fd41be72255b16bb777ef2a89993de336260c5bb1cd2280af848923ca86184"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): packages/transformers/src/models/whisper/tokenization_whisper.js:193 \u00B7 packages/transformers/src/models/whisper/tokenization_whisper.js:291 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/whisper/tokenization_whisper.js"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e6f9eca7bf599214a177b6af0207b8257cc92f3a1f7211aafca1b572cdacbf4"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5 locations): packages/transformers/src/utils/tensor.js:223 \u00B7 packages/transformers/src/utils/tensor.js:247 \u00B7 packages/transformers/src/utils/tensor.js:269 \u00B7 packages/transformers/src/utils/tensor.js:291 \u00B7 \u002B1 more site(s) not listed \u2014 all 5 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/tensor.js"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4bcfa20f8d2658e36caf58cd80c7504c8e94b95b315a30b0130485452bb2536"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (9 matched lines \u00D7 2 locations): packages/transformers-structured-output/scripts/dev.mjs:9 \u00B7 scripts/rebuildPlugin.mjs:14 \u2014 the two spans are one implementation copied and then locally edited \u2014 60 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/scripts/dev.mjs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13c86837d6190235ef8fceb56528d8328116a1de22cfeb8e2d28d0471f86435"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:relative-cross-package]: packages/transformers/scripts/build.mjs:2 reaches into another package with a relative path (../../../scripts/prepareOutDir.mjs) \u2014 import the package by name instead."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/scripts/build.mjs"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd49585264836d22035ce6680483fb7afabf10ba68692905e556b97f0b9422e0"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:relative-cross-package]: packages/transformers/scripts/build.mjs:3 reaches into another package with a relative path (../../../scripts/logger.mjs) \u2014 import the package by name instead."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/scripts/build.mjs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"1758b1df0b631fba5308d3c9e85f6c7d1cc723cef20a0013d598959ee9dd1103"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:relative-cross-package]: packages/transformers/scripts/dev.mjs:6 reaches into another package with a relative path (../../../scripts/prepareOutDir.mjs) \u2014 import the package by name instead."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/scripts/dev.mjs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b2c91aa7aafa5e10e6a2ba74b5fe2a404727066e7eb29db136a3ae26080a1a"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:relative-cross-package]: packages/transformers/scripts/dev.mjs:7 reaches into another package with a relative path (../../../scripts/logger.mjs) \u2014 import the package by name instead."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/scripts/dev.mjs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"8955f319e6b4bfc0e1fc2430cc398b1e755d752ba9fa5c5a5695c25dd6f6532a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function getNormalizedConfig (cyclomatic 120, cognitive 7): getNormalizedConfig has cyclomatic complexity 120 and cognitive complexity 7; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/configs.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ec7b541a1343fa7159ebefa469e2a23569b084402a74332c15bbe2f3eb1872"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function checkSchema (cyclomatic 64, cognitive 71): checkSchema has cyclomatic complexity 64 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1568}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e082351a3ae059fd8ae3651731b652f378fbe583049d861396741b09059bdf0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _decode_asr (cyclomatic 52, cognitive 151): _decode_asr has cyclomatic complexity 52 and cognitive complexity 151; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/whisper/tokenization_whisper.js"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"a482f3c90463a29e28a799d978c13006b76b7fbbef3b00857d65b63b47f8c7f6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function spectrogram (cyclomatic 48, cognitive 75): spectrogram has cyclomatic complexity 48 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/audio.js"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcfd136e7a55c9f5f73b47e264249891aff04e7d902ab644d5cef93bee3a9791"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function loadResourceFile (cyclomatic 43, cognitive 75): loadResourceFile has cyclomatic complexity 43 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/hub.js"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"af10591230409d9eaa4060aeb961289d1a55272976d39e13e1826c298c94935e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function validateObjectNode (cyclomatic 40, cognitive 59): validateObjectNode has cyclomatic complexity 40 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"e378c26b8071b672d9fdd1bed7ba98387cd4759fbd2f84b2612245efd9708ba7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function getCacheNames (cyclomatic 37, cognitive 61): getCacheNames has cyclomatic complexity 37 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/configs.js"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"99482673e58446fe288d810dd974737ef7df4dbcdf263bd5c74027fdcf526aba"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function validateNode (cyclomatic 36, cognitive 42): validateNode has cyclomatic complexity 36 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab8d6f05df6b2d565361efba205099e1abc072352d0dd974e427d015eb7577db"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _call (cyclomatic 32, cognitive 59): _call has cyclomatic complexity 32 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/tokenization_utils.js"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fccf524709a094ea8ccfe12355e81a9a96d2989dc23f5d81cb2b5847e3a40f9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _get_file_metadata (cyclomatic 29, cognitive 53): _get_file_metadata has cyclomatic complexity 29 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/model_registry/get_file_metadata.js"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"c96d1183cd29b618a36737a522f17687bc62f10720cb981b807659087e9d20c5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function transition (cyclomatic 29, cognitive 16): transition has cyclomatic complexity 29 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c654e8bedfcb4db53c3a8c2c23962c682fa14b8e38dcdf6af241c9e8c6df252"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractTokenizer (cyclomatic 26, cognitive 44): extractTokenizer has cyclomatic complexity 26 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/tokenizer.ts"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9c6f8a875eab7f09efba231cb3d185b5565d2af03c4526c99c30a8671f8ca9"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function preprocess (cyclomatic 26, cognitive 36): preprocess has cyclomatic complexity 26 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/image_processors_utils.js"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ebf69cc2d2d28683668ef6c431a5be3392e1616e878e49228169967bd27692"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _get_logits_processor (cyclomatic 26, cognitive 27): _get_logits_processor has cyclomatic complexity 26 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c3c7fe262a0c24f427e2140b9249bc2cd16ee51bba71785eef2dd901c8db09"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function formatMatches (cyclomatic 25, cognitive 13): formatMatches has cyclomatic complexity 25 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"62eb47ed3613aca19ac4b0e347187df495261a917d23243978c7c94c9959a66a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _generate_with_seek (cyclomatic 24, cognitive 48): _generate_with_seek has cyclomatic complexity 24 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/whisper/modeling_whisper.js"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"a969190b823f63bde9eb80cf9c2dff2202032bb5ef75e227e748bf0cb45ce886"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _call (cyclomatic 24, cognitive 44): _call has cyclomatic complexity 24 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/pipelines/image-segmentation.js"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ee6c329040baea3c059e6e8aa5497166f7e1ca74364ab1968f1c39661dfba0"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function generate (cyclomatic 23, cognitive 39): generate has cyclomatic complexity 23 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"58a2a65f41fbc63600e6cfcd3f9c98aaa06bb67d0f85da3f5624b308fcc5c092"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function validateArrayNode (cyclomatic 23, cognitive 31): validateArrayNode has cyclomatic complexity 23 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbf242b5a115d14313b0d9706936637bcf46f4810c6b219d6f6373ff575a5162"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function getSession (cyclomatic 23, cognitive 23): getSession has cyclomatic complexity 23 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/session.js"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"49288ee17f363c470c9641f75b29e427e10e34f9a1bcfd31041092eb4bb0c493"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/scripts/dev.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b3cb4a5286da28ed51f794f5fbf1f3218692bac0c9a182777978bad33e7d095"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/dev.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a55c63a2e1dbbc15c7b347a2780c393a6c0b569cabffb18f74f3ed92c8c2ff"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/scripts/dev.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec46ed643028f3c1c2b925463e5fa3d618769f88206661addfc76557a9770ec"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/logger.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a9a2317ecb84a171e60b30dd5adac346f4106c18beea0b80238e4072aa203c"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/rebuildPlugin.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b480dde81e78fc1f36589268fce1a4fe7c58e5e1932c65286c3590d362dbae"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/generation/parameters.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"692f8c1dfa4dee6d107948339d9da14fddd0104801147f640465e0291afcf0a7"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/scripts/build.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca66e85e7ad39471b69057f6d09a5b72385ff56963828698ad413a1f0c0d591c"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/scripts/build.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8dffa2b6a79dd5a9a46cc0780a319b74972598c59cba558d617e0059a04e48"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/reportSize.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ae7d69ea690db0bbce12292aca67fcd67a4df7bb1fc286078223eb8914004f"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/prepareOutDir.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b697c0a855f961193e3c932d7f875a448cf91b655cc3403d41003927d4bacf"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~42 LoC): no import path from any entry point (51 application, 4 tooling, 188 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/rebuildPlugin.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db9ecd3eed14bc34d755e61d8b537d0967b77de003b9df12fd91ea0cfa4a8b5b"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~21 LoC): no import path from any entry point (51 application, 4 tooling, 188 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/reportSize.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b101c3a06808b60931c01647cfe5430e03ae829b1974d26a03343cd68d01402"}},{"ruleId":"R8","level":"error","message":{"text":"Unlisted import \u0027@jest/globals\u0027: Imported but not declared in any reachable package.json \u2014 installs work only by hoisting accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/tests/models/chatterbox/test_modeling_chatterbox.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"370aa8f819e4a64a8023e52218e2bf7576d5e70ea07b123c075e45b6fbd038cc"}},{"ruleId":"R8","level":"error","message":{"text":"Unlisted import \u0027onnxruntime-common\u0027: Imported but not declared in any reachable package.json \u2014 installs work only by hoisting accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/backends/onnx.js"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9e2db6731c7c2ec7c79a24878651112195a6c38d8c0153ee6391cd0abea1946"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (2 files): packages/transformers/src/models/auto/tokenization_auto.js \u2192 packages/transformers/src/models/tokenizers.js \u2192 packages/transformers/src/models/auto/tokenization_auto.js"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/auto/tokenization_auto.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe69a807e621ffc474eae175f5e36baea21d79c0f9a4e01840c8b824246f5b08"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (3 files): packages/transformers/src/models/modeling_utils.js \u2192 packages/transformers/src/utils/model_registry/get_model_files.js \u2192 packages/transformers/src/utils/model_registry/resolve_model_type.js \u2192 packages/transformers/src/models/modeling_utils.js"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/models/modeling_utils.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8210056f433c0af189d13fc892423b7eeddee8070a13cf447035a10b815d0cdc"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (2 files): packages/transformers/src/ops/registry.js \u2192 packages/transformers/src/utils/tensor.js \u2192 packages/transformers/src/ops/registry.js"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/ops/registry.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"300823ca365057ab154fa74f397560dadfa09a9696ece4e3fa08ad8b04693743"}},{"ruleId":"R9","level":"error","message":{"text":"Import cycle (2 files): packages/transformers/src/utils/hub.js \u2192 packages/transformers/src/utils/model_registry/get_file_metadata.js \u2192 packages/transformers/src/utils/hub.js"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/src/utils/hub.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c7ccd3252b9bacd8d5adbfb5d6fb4dc0a5840c912a99962961fcc4180a8f06"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value !== null \u0026\u0026 typeof value === \u0027object\u0027 \u0026\u0026 !Array.isArray(value)\u0060 appears character-identically in 2 files \u2014 packages/transformers-structured-output/src/engine/json.ts, packages/transformers-structured-output/src/engine/tokenizer.ts. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers-structured-output/src/engine/json.ts"},"region":{"startLine":1852}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3e45735a9c738ebcbbf6a5ecc272111a848fa5d24229fd40e9cdf4a0dda53a4"}},{"ruleId":"X6","level":"note","message":{"text":"Hand-rolled JSON/XML parsing via regex: A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand \u2014 malformed or differently-typed content (e.g. \u0060\u0022amount\u0022: \u00225\u0022\u0060 as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/transformers/docs/scripts/lib/validate.mjs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed8513799cb336d49cfe2c546111a7930cd636ba05e110ba3fd2b93b21cab9b"}}],"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-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.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-457","guid":"b62874fe-6222-8b5b-8ade-9527ad1cbb4a","name":"CWE-457","shortDescription":{"text":"CWE-457"},"helpUri":"https://cwe.mitre.org/data/definitions/457.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-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"CWE-506","shortDescription":{"text":"CWE-506"},"helpUri":"https://cwe.mitre.org/data/definitions/506.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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.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-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.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":24,"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."]}]}