Public report of facebook/relay, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 07:18 UTC · Survey ID cd_c5ac86bd066840a497e982f3ad4dbfc9
facebook/relay
Measured 14 November 2026, 07:16 UTC, at code version e6dcf0f
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureTestRunFailed).
CAI scoreAt riskUp 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 148,247 lines of product code in 7 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Code Health, 40
Findings by how serious they are
108 critical1363 serious188 minor
15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 07:16 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
59of 59 dimensions measured by tools.
1641of 1659 findings point to an exact file and line, so you can open each one in the code. The other 18 concern the repository as a whole, such as missing documentation.
59dimensions across 7 lenses, read from 148,247 lines of product code in 7 projects.
facebook/relay is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 52 out of 100, which the At risk rating leaves unchanged.
Code Health, at 40, is the weakest lens and counts most in the score. The best first step is making the three tests that check nothing check their results, worth about 5 points. Adding type checking would lift Code Health itself, also worth about 5. Raising Code Health to 70 would lift the score to about 60.
Forty-five known security holes in the packages the code depends on can be used by attackers. Forty-four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and five parts of the code are no longer understood by anyone working on it. Updating the vulnerable packages, pinning each tool to an exact version and having someone learn the forgotten files would close these risks. Limiting each secret to its own step would fix the two secrets exposed to more of the pipeline than needed, and the pipeline step that runs a download without checking it needs each download checked against a known checksum first. The eight uses of packages that aren't listed need adding to the project's list of dependencies.
The product code is 148,247 lines, about €150,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 40 to 70, the lowest score rated Strong, the score would rise from 52 to about 60.
Code composition: what the lines of code are
Product code 92%Tests 8%
New since the last survey: 447 findings
These 447 critical or serious findings weren't in the previous survey, on 26 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · ClassTooLong: RelayReaderOptimized REDACTED
God Classes · FunctionTooLong: schema_diff::diff_definitions compiler/crates/schema-diff/src/lib.rs
God Classes · MethodTooLong: RelayReaderOptimized._readClientEdge REDACTED
God Classes · MethodTooLong: RelayReaderOptimized._traverseSelections REDACTED
God Classes · FileTooLong: src/server_documents.rs compiler/crates/relay-transforms/src/server_documents.rs
God Classes · FileTooLong: relay_resolvers/spread_transform.rs compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs
God Classes · FileTooLong: src/client_implementor_cases.rs compiler/crates/relay-transforms/src/client_implementor_cases.rs
God Classes · FileTooLong: rsc/useRelayHandoff.js packages/react-relay/relay-hooks/rsc/useRelayHandoff.js
God Classes · FunctionTooLong: useRelayHandoff.executeHandoff packages/react-relay/relay-hooks/rsc/useRelayHandoff.js
God Classes · FileTooLong: store/RelayModernRecord.js packages/relay-runtime/store/RelayModernRecord.js
God Classes · MethodTooLong: RelayReferenceMarker._traverseSelections packages/relay-runtime/store/RelayReferenceMarker.js
God Classes · TooManyMethods: RelayReaderOptimized REDACTED
God Classes · MethodTooLong: ArtifactContent.as_bytes compiler/crates/relay-compiler/src/artifact_content.rs
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) compiler/crates/relay-compiler/src/artifact_content/content.rs
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) compiler/crates/relay-codegen/src/printer.rs
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) compiler/crates/relay-lsp/src/completion.rs
Code Duplication · Edited copy of a member (45 corresponding lines) compiler/crates/relay-typegen/src/flow.rs
Code Duplication · Edited copy of a member (91 corresponding lines) compiler/crates/relay-transforms/src/apply_transforms.rs
Code Duplication · Edited copy of a member (59 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs
Code Duplication · Edited copy of a member (58 corresponding lines) compiler/crates/schema-set/src/find_subset_violations.rs
Code Duplication · Edited copy of a member (47 corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs
Code Duplication · Edited copy of a member (50 corresponding lines) compiler/crates/relay-transforms/src/validations/deprecated_fields.rs
Code Duplication · Edited copy of a member (27 corresponding lines) compiler/crates/schema-diff/src/lib.rs
Code Duplication · Edited copy of a member (38 corresponding lines) compiler/crates/relay-codegen/src/build_ast.rs
Code Duplication · Edited copies of one member (3 members, 53+ corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs
Code Duplication · Edited copy of a member (33 corresponding lines) compiler/crates/relay-codegen/src/build_ast.rs
Code Duplication · Edited copy of a member (51 corresponding lines) compiler/crates/schema-set/src/ir_collector.rs
Code Duplication · Edited copy of a member (37 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs
Code Duplication · Edited copy of a member (24 corresponding lines) compiler/crates/schema/src/flatbuffer/serialize.rs
Code Duplication · Edited copy of a member (33 corresponding lines) compiler/crates/relay-transforms/src/client_extensions.rs
Code Duplication · Edited copy of a member (25 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs
Code Duplication · Edited copies of one member (3 members, 39+ corresponding lines) compiler/crates/graphql-ir/src/transform.rs
Code Duplication · Edited copy of a member (38 corresponding lines) compiler/crates/relay-typegen/src/write.rs
Code Duplication · Edited copy of a member (36 corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs
Code Duplication · Edited copy of a member (44 corresponding lines) compiler/crates/relay-lsp/src/completion.rs
Code Duplication · Edited copy of a member (28 corresponding lines) compiler/crates/relay-lsp/src/server/lsp_state.rs
Code Duplication · Edited copy of a member (29 corresponding lines) compiler/crates/relay-transforms/src/flatten.rs
Code Duplication · Edited copy of a member (28 corresponding lines) compiler/crates/relay-typegen/src/flow.rs
Code Duplication · Edited copy of a member (30 corresponding lines) compiler/crates/graphql-syntax/src/parser.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 202 findings
These 202 critical or serious findings were in the previous survey, on 26 October 2026, and are gone from this one. The first 100 are listed here.
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Rebuild cost: about €150,000 · Estimate
Cost to rebuild
€51,000 to €260,000, for 856 to 2,714 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 52. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 148,247 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with LiveResolverSuspenseDisplayName-test.js, useBlockingPaginationFragment-with-suspense-transition-test.js, useRefetchableFragmentNode-with-suspense-transition-test.js.
Raises the score by about 5 points · Low effort · Test Quality
2
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 5 points · Medium effort · Type Safety
3
Act on each finding's own remediation rather than one rule: the move depends on what recurs.
Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
Raises the score by about 4 points · Medium effort · Code Duplication
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €150,000 to build again, about 1.1 person-years of work. Its weakest lens is Code Health, at 40 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 3 No assertions (empty test) finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 3 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 68,683 lines over the last 90 days, which is about 278,548 lines a year. At that pace, the extra work comes to an estimated 16 to 95.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
521 modules, with 1728 dependencies between them. 9 loops run through 31 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 481 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
common.feature_flags uses intern.string_key, so a change to intern.string_key can break common.feature_flags, while a change to common.feature_flags can't break intern.string_key.
Position
Below the diagonal: common.feature_flags uses a module listed above it, which is the healthy direction.
packages.relay-runtime.store.RelayStoreTypes uses packages.relay-runtime.network.RelayNetworkTypes, so a change to packages.relay-runtime.network.RelayNetworkTypes can break packages.relay-runtime.store.RelayStoreTypes, while a change to packages.relay-runtime.store.RelayStoreTypes can't break packages.relay-runtime.network.RelayNetworkTypes.
Position
Below the diagonal: packages.relay-runtime.store.RelayStoreTypes uses a module listed above it, which is the healthy direction.
packages.relay-runtime.store.RelayStoreTypes uses packages.relay-runtime.util.RelayRuntimeTypes, so a change to packages.relay-runtime.util.RelayRuntimeTypes can break packages.relay-runtime.store.RelayStoreTypes, while a change to packages.relay-runtime.store.RelayStoreTypes can't break packages.relay-runtime.util.RelayRuntimeTypes.
Position
Below the diagonal: packages.relay-runtime.store.RelayStoreTypes uses a module listed above it, which is the healthy direction.
relay_config.project_name uses intern.string_key, so a change to intern.string_key can break relay_config.project_name, while a change to relay_config.project_name can't break intern.string_key.
Position
Below the diagonal: relay_config.project_name uses a module listed above it, which is the healthy direction.
common.diagnostic uses common.location, so a change to common.location can break common.diagnostic, while a change to common.diagnostic can't break common.location.
Position
Below the diagonal: common.diagnostic uses a module listed above it, which is the healthy direction.
graphql_syntax.node.primitive uses common.span, so a change to common.span can break graphql_syntax.node.primitive, while a change to graphql_syntax.node.primitive can't break common.span.
Position
Below the diagonal: graphql_syntax.node.primitive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.primitive uses intern.string_key, so a change to intern.string_key can break graphql_syntax.node.primitive, while a change to graphql_syntax.node.primitive can't break intern.string_key.
Position
Below the diagonal: graphql_syntax.node.primitive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.primitive uses common.location, so a change to common.location can break graphql_syntax.node.primitive, while a change to graphql_syntax.node.primitive can't break common.location.
Position
Below the diagonal: graphql_syntax.node.primitive uses a module listed above it, which is the healthy direction.
common.named_item uses intern.string_key, so a change to intern.string_key can break common.named_item, while a change to common.named_item can't break intern.string_key.
Position
Below the diagonal: common.named_item uses a module listed above it, which is the healthy direction.
common.named_item uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break common.named_item, while a change to common.named_item can't break graphql_syntax.node.primitive.
Position
Below the diagonal: common.named_item uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_annotation uses common.span, so a change to common.span can break graphql_syntax.node.type_annotation, while a change to graphql_syntax.node.type_annotation can't break common.span.
Position
Below the diagonal: graphql_syntax.node.type_annotation uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_annotation uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break graphql_syntax.node.type_annotation, while a change to graphql_syntax.node.type_annotation can't break graphql_syntax.node.primitive.
Position
Below the diagonal: graphql_syntax.node.type_annotation uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_value uses common.span, so a change to common.span can break graphql_syntax.node.constant_value, while a change to graphql_syntax.node.constant_value can't break common.span.
Position
Below the diagonal: graphql_syntax.node.constant_value uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_value uses intern.string_key, so a change to intern.string_key can break graphql_syntax.node.constant_value, while a change to graphql_syntax.node.constant_value can't break intern.string_key.
Position
Below the diagonal: graphql_syntax.node.constant_value uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_value uses common.location, so a change to common.location can break graphql_syntax.node.constant_value, while a change to graphql_syntax.node.constant_value can't break common.location.
Position
Below the diagonal: graphql_syntax.node.constant_value uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_value uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break graphql_syntax.node.constant_value, while a change to graphql_syntax.node.constant_value can't break graphql_syntax.node.primitive.
Position
Below the diagonal: graphql_syntax.node.constant_value uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_value uses common.named_item, so a change to common.named_item can break graphql_syntax.node.constant_value, while a change to graphql_syntax.node.constant_value can't break common.named_item.
Position
Below the diagonal: graphql_syntax.node.constant_value uses a module listed above it, which is the healthy direction.
relay_config.project_config uses intern.string_key, so a change to intern.string_key can break relay_config.project_config, while a change to relay_config.project_config can't break intern.string_key.
Position
Below the diagonal: relay_config.project_config uses a module listed above it, which is the healthy direction.
relay_config.project_config uses common.feature_flags, so a change to common.feature_flags can break relay_config.project_config, while a change to relay_config.project_config can't break common.feature_flags.
Position
Below the diagonal: relay_config.project_config uses a module listed above it, which is the healthy direction.
relay_config.project_config uses common.location, so a change to common.location can break relay_config.project_config, while a change to relay_config.project_config can't break common.location.
Position
Below the diagonal: relay_config.project_config uses a module listed above it, which is the healthy direction.
relay_config.project_config uses relay_config.project_name, so a change to relay_config.project_name can break relay_config.project_config, while a change to relay_config.project_config can't break relay_config.project_name.
Position
Below the diagonal: relay_config.project_config uses a module listed above it, which is the healthy direction.
relay_config.project_config uses common.named_item, so a change to common.named_item can break relay_config.project_config, while a change to relay_config.project_config can't break common.named_item.
Position
Below the diagonal: relay_config.project_config uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_directive uses common.span, so a change to common.span can break graphql_syntax.node.constant_directive, while a change to graphql_syntax.node.constant_directive can't break common.span.
Position
Below the diagonal: graphql_syntax.node.constant_directive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_directive uses intern.string_key, so a change to intern.string_key can break graphql_syntax.node.constant_directive, while a change to graphql_syntax.node.constant_directive can't break intern.string_key.
Position
Below the diagonal: graphql_syntax.node.constant_directive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_directive uses common.location, so a change to common.location can break graphql_syntax.node.constant_directive, while a change to graphql_syntax.node.constant_directive can't break common.location.
Position
Below the diagonal: graphql_syntax.node.constant_directive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_directive uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break graphql_syntax.node.constant_directive, while a change to graphql_syntax.node.constant_directive can't break graphql_syntax.node.primitive.
Position
Below the diagonal: graphql_syntax.node.constant_directive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_directive uses common.named_item, so a change to common.named_item can break graphql_syntax.node.constant_directive, while a change to graphql_syntax.node.constant_directive can't break common.named_item.
Position
Below the diagonal: graphql_syntax.node.constant_directive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.constant_directive uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break graphql_syntax.node.constant_directive, while a change to graphql_syntax.node.constant_directive can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: graphql_syntax.node.constant_directive uses a module listed above it, which is the healthy direction.
graphql_syntax.node.executable uses common.span, so a change to common.span can break graphql_syntax.node.executable, while a change to graphql_syntax.node.executable can't break common.span.
Position
Below the diagonal: graphql_syntax.node.executable uses a module listed above it, which is the healthy direction.
graphql_syntax.node.executable uses intern.string_key, so a change to intern.string_key can break graphql_syntax.node.executable, while a change to graphql_syntax.node.executable can't break intern.string_key.
Position
Below the diagonal: graphql_syntax.node.executable uses a module listed above it, which is the healthy direction.
graphql_syntax.node.executable uses common.location, so a change to common.location can break graphql_syntax.node.executable, while a change to graphql_syntax.node.executable can't break common.location.
Position
Below the diagonal: graphql_syntax.node.executable uses a module listed above it, which is the healthy direction.
graphql_syntax.node.executable uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break graphql_syntax.node.executable, while a change to graphql_syntax.node.executable can't break graphql_syntax.node.primitive.
Position
Below the diagonal: graphql_syntax.node.executable uses a module listed above it, which is the healthy direction.
graphql_syntax.node.executable uses graphql_syntax.node.type_annotation, so a change to graphql_syntax.node.type_annotation can break graphql_syntax.node.executable, while a change to graphql_syntax.node.executable can't break graphql_syntax.node.type_annotation.
Position
Below the diagonal: graphql_syntax.node.executable uses a module listed above it, which is the healthy direction.
graphql_syntax.node.executable uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break graphql_syntax.node.executable, while a change to graphql_syntax.node.executable can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: graphql_syntax.node.executable uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses common.span, so a change to common.span can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break common.span.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses intern.string_key, so a change to intern.string_key can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break intern.string_key.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses common.location, so a change to common.location can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break common.location.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
33 pairs of types, where a type in graphql_syntax.node.type_system uses a type in graphql_syntax.node.primitive. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
graphql_syntax.node.type_system uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break graphql_syntax.node.primitive.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses common.named_item, so a change to common.named_item can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break common.named_item.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses graphql_syntax.node.type_annotation, so a change to graphql_syntax.node.type_annotation can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break graphql_syntax.node.type_annotation.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses graphql_syntax.node.constant_directive, so a change to graphql_syntax.node.constant_directive can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break graphql_syntax.node.constant_directive.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.type_system uses graphql_syntax.node.executable, so a change to graphql_syntax.node.executable can break graphql_syntax.node.type_system, while a change to graphql_syntax.node.type_system can't break graphql_syntax.node.executable.
Position
Below the diagonal: graphql_syntax.node.type_system uses a module listed above it, which is the healthy direction.
graphql_syntax.node.document uses common.span, so a change to common.span can break graphql_syntax.node.document, while a change to graphql_syntax.node.document can't break common.span.
Position
Below the diagonal: graphql_syntax.node.document uses a module listed above it, which is the healthy direction.
graphql_syntax.node.document uses common.location, so a change to common.location can break graphql_syntax.node.document, while a change to graphql_syntax.node.document can't break common.location.
Position
Below the diagonal: graphql_syntax.node.document uses a module listed above it, which is the healthy direction.
graphql_syntax.node.document uses graphql_syntax.node.executable, so a change to graphql_syntax.node.executable can break graphql_syntax.node.document, while a change to graphql_syntax.node.document can't break graphql_syntax.node.executable.
Position
Below the diagonal: graphql_syntax.node.document uses a module listed above it, which is the healthy direction.
graphql_syntax.node.document uses graphql_syntax.node.type_system, so a change to graphql_syntax.node.type_system can break graphql_syntax.node.document, while a change to graphql_syntax.node.document can't break graphql_syntax.node.type_system.
Position
Below the diagonal: graphql_syntax.node.document uses a module listed above it, which is the healthy direction.
schema.definitions uses intern.string_key, so a change to intern.string_key can break schema.definitions, while a change to schema.definitions can't break intern.string_key.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.definitions uses common.location, so a change to common.location can break schema.definitions, while a change to schema.definitions can't break common.location.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.definitions uses common.named_item, so a change to common.named_item can break schema.definitions, while a change to schema.definitions can't break common.named_item.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.definitions uses graphql_syntax.node.type_annotation, so a change to graphql_syntax.node.type_annotation can break schema.definitions, while a change to schema.definitions can't break graphql_syntax.node.type_annotation.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.definitions uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break schema.definitions, while a change to schema.definitions can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.definitions uses graphql_syntax.node.constant_directive, so a change to graphql_syntax.node.constant_directive can break schema.definitions, while a change to schema.definitions can't break graphql_syntax.node.constant_directive.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.definitions uses graphql_syntax.node.type_system, so a change to graphql_syntax.node.type_system can break schema.definitions, while a change to schema.definitions can't break graphql_syntax.node.type_system.
Position
Below the diagonal: schema.definitions uses a module listed above it, which is the healthy direction.
schema.in_memory uses intern.string_key, so a change to intern.string_key can break schema.in_memory, while a change to schema.in_memory can't break intern.string_key.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses common.location, so a change to common.location can break schema.in_memory, while a change to schema.in_memory can't break common.location.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses common.diagnostic, so a change to common.diagnostic can break schema.in_memory, while a change to schema.in_memory can't break common.diagnostic.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break schema.in_memory, while a change to schema.in_memory can't break graphql_syntax.node.primitive.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses common.named_item, so a change to common.named_item can break schema.in_memory, while a change to schema.in_memory can't break common.named_item.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses graphql_syntax.node.type_annotation, so a change to graphql_syntax.node.type_annotation can break schema.in_memory, while a change to schema.in_memory can't break graphql_syntax.node.type_annotation.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses graphql_syntax.node.type_system, so a change to graphql_syntax.node.type_system can break schema.in_memory, while a change to schema.in_memory can't break graphql_syntax.node.type_system.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.in_memory uses schema.definitions, so a change to schema.definitions can break schema.in_memory, while a change to schema.in_memory can't break schema.definitions.
Position
Below the diagonal: schema.in_memory uses a module listed above it, which is the healthy direction.
schema.schema uses intern.string_key, so a change to intern.string_key can break schema.schema, while a change to schema.schema can't break intern.string_key.
Position
Below the diagonal: schema.schema uses a module listed above it, which is the healthy direction.
schema.schema uses common.location, so a change to common.location can break schema.schema, while a change to schema.schema can't break common.location.
Position
Below the diagonal: schema.schema uses a module listed above it, which is the healthy direction.
schema.schema uses common.named_item, so a change to common.named_item can break schema.schema, while a change to schema.schema can't break common.named_item.
Position
Below the diagonal: schema.schema uses a module listed above it, which is the healthy direction.
schema.schema uses graphql_syntax.node.type_system, so a change to graphql_syntax.node.type_system can break schema.schema, while a change to schema.schema can't break graphql_syntax.node.type_system.
Position
Below the diagonal: schema.schema uses a module listed above it, which is the healthy direction.
schema.schema uses schema.definitions, so a change to schema.definitions can break schema.schema, while a change to schema.schema can't break schema.definitions.
Position
Below the diagonal: schema.schema uses a module listed above it, which is the healthy direction.
schema.schema uses schema.in_memory, so a change to schema.in_memory can break schema.schema, while a change to schema.schema can't break schema.in_memory.
Position
Below the diagonal: schema.schema uses a module listed above it, which is the healthy direction.
graphql_ir.ir uses intern.string_key, so a change to intern.string_key can break graphql_ir.ir, while a change to graphql_ir.ir can't break intern.string_key.
Position
Below the diagonal: graphql_ir.ir uses a module listed above it, which is the healthy direction.
graphql_ir.ir uses common.location, so a change to common.location can break graphql_ir.ir, while a change to graphql_ir.ir can't break common.location.
Position
Below the diagonal: graphql_ir.ir uses a module listed above it, which is the healthy direction.
graphql_ir.ir uses common.named_item, so a change to common.named_item can break graphql_ir.ir, while a change to graphql_ir.ir can't break common.named_item.
Position
Below the diagonal: graphql_ir.ir uses a module listed above it, which is the healthy direction.
graphql_ir.ir uses graphql_syntax.node.executable, so a change to graphql_syntax.node.executable can break graphql_ir.ir, while a change to graphql_ir.ir can't break graphql_syntax.node.executable.
Position
Below the diagonal: graphql_ir.ir uses a module listed above it, which is the healthy direction.
graphql_ir.ir uses schema.definitions, so a change to schema.definitions can break graphql_ir.ir, while a change to graphql_ir.ir can't break schema.definitions.
Position
Below the diagonal: graphql_ir.ir uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in relay_docblock.ir uses a type in common.span.
The types involved
relay_docblock.ir.ir$module → common.span.Span
Direction
relay_docblock.ir uses common.span, so a change to common.span can break relay_docblock.ir, while a change to relay_docblock.ir can't break common.span.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses intern.string_key, so a change to intern.string_key can break relay_docblock.ir, while a change to relay_docblock.ir can't break intern.string_key.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses common.feature_flags, so a change to common.feature_flags can break relay_docblock.ir, while a change to relay_docblock.ir can't break common.feature_flags.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses common.location, so a change to common.location can break relay_docblock.ir, while a change to relay_docblock.ir can't break common.location.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses relay_config.project_name, so a change to relay_config.project_name can break relay_docblock.ir, while a change to relay_docblock.ir can't break relay_config.project_name.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break relay_docblock.ir, while a change to relay_docblock.ir can't break graphql_syntax.node.primitive.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses common.named_item, so a change to common.named_item can break relay_docblock.ir, while a change to relay_docblock.ir can't break common.named_item.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses graphql_syntax.node.type_annotation, so a change to graphql_syntax.node.type_annotation can break relay_docblock.ir, while a change to relay_docblock.ir can't break graphql_syntax.node.type_annotation.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break relay_docblock.ir, while a change to relay_docblock.ir can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses relay_config.project_config, so a change to relay_config.project_config can break relay_docblock.ir, while a change to relay_docblock.ir can't break relay_config.project_config.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses graphql_syntax.node.constant_directive, so a change to graphql_syntax.node.constant_directive can break relay_docblock.ir, while a change to relay_docblock.ir can't break graphql_syntax.node.constant_directive.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses graphql_syntax.node.type_system, so a change to graphql_syntax.node.type_system can break relay_docblock.ir, while a change to relay_docblock.ir can't break graphql_syntax.node.type_system.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses graphql_syntax.node.document, so a change to graphql_syntax.node.document can break relay_docblock.ir, while a change to relay_docblock.ir can't break graphql_syntax.node.document.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses schema.definitions, so a change to schema.definitions can break relay_docblock.ir, while a change to relay_docblock.ir can't break schema.definitions.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
relay_docblock.ir uses schema.schema, so a change to schema.schema can break relay_docblock.ir, while a change to relay_docblock.ir can't break schema.schema.
Position
Below the diagonal: relay_docblock.ir uses a module listed above it, which is the healthy direction.
graphql_ir.program uses schema.schema, so a change to schema.schema can break graphql_ir.program, while a change to graphql_ir.program can't break schema.schema.
Position
Below the diagonal: graphql_ir.program uses a module listed above it, which is the healthy direction.
graphql_ir.program uses graphql_ir.ir, so a change to graphql_ir.ir can break graphql_ir.program, while a change to graphql_ir.program can't break graphql_ir.ir.
Position
Below the diagonal: graphql_ir.program uses a module listed above it, which is the healthy direction.
relay_schema_generation uses common.span, so a change to common.span can break relay_schema_generation, while a change to relay_schema_generation can't break common.span.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
relay_schema_generation uses common.feature_flags, so a change to common.feature_flags can break relay_schema_generation, while a change to relay_schema_generation can't break common.feature_flags.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
relay_schema_generation uses common.location, so a change to common.location can break relay_schema_generation, while a change to relay_schema_generation can't break common.location.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
relay_schema_generation uses graphql_syntax.node.primitive, so a change to graphql_syntax.node.primitive can break relay_schema_generation, while a change to relay_schema_generation can't break graphql_syntax.node.primitive.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
relay_schema_generation uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break relay_schema_generation, while a change to relay_schema_generation can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
relay_schema_generation uses graphql_syntax.node.constant_directive, so a change to graphql_syntax.node.constant_directive can break relay_schema_generation, while a change to relay_schema_generation can't break graphql_syntax.node.constant_directive.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
relay_schema_generation uses relay_docblock.ir, so a change to relay_docblock.ir can break relay_schema_generation, while a change to relay_schema_generation can't break relay_docblock.ir.
Position
Below the diagonal: relay_schema_generation uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses intern.string_key, so a change to intern.string_key can break schema_set.schema_set, while a change to schema_set.schema_set can't break intern.string_key.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses common.location, so a change to common.location can break schema_set.schema_set, while a change to schema_set.schema_set can't break common.location.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses common.named_item, so a change to common.named_item can break schema_set.schema_set, while a change to schema_set.schema_set can't break common.named_item.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses graphql_syntax.node.constant_value, so a change to graphql_syntax.node.constant_value can break schema_set.schema_set, while a change to schema_set.schema_set can't break graphql_syntax.node.constant_value.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses graphql_syntax.node.executable, so a change to graphql_syntax.node.executable can break schema_set.schema_set, while a change to schema_set.schema_set can't break graphql_syntax.node.executable.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses graphql_syntax.node.type_system, so a change to graphql_syntax.node.type_system can break schema_set.schema_set, while a change to schema_set.schema_set can't break graphql_syntax.node.type_system.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses graphql_syntax.node.document, so a change to graphql_syntax.node.document can break schema_set.schema_set, while a change to schema_set.schema_set can't break graphql_syntax.node.document.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses schema.definitions, so a change to schema.definitions can break schema_set.schema_set, while a change to schema_set.schema_set can't break schema.definitions.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses schema.schema, so a change to schema.schema can break schema_set.schema_set, while a change to schema_set.schema_set can't break schema.schema.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
schema_set.schema_set uses graphql_ir.ir, so a change to graphql_ir.ir can break schema_set.schema_set, while a change to schema_set.schema_set can't break graphql_ir.ir.
Position
Below the diagonal: schema_set.schema_set uses a module listed above it, which is the healthy direction.
graphql_ir.transform uses graphql_ir.ir, so a change to graphql_ir.ir can break graphql_ir.transform, while a change to graphql_ir.transform can't break graphql_ir.ir.
Position
Below the diagonal: graphql_ir.transform uses a module listed above it, which is the healthy direction.
graphql_ir.transform uses graphql_ir.program, so a change to graphql_ir.program can break graphql_ir.transform, while a change to graphql_ir.transform can't break graphql_ir.program.
Position
Below the diagonal: graphql_ir.transform uses a module listed above it, which is the healthy direction.
graphql_ir.validator uses graphql_ir.ir, so a change to graphql_ir.ir can break graphql_ir.validator, while a change to graphql_ir.validator can't break graphql_ir.ir.
Position
Below the diagonal: graphql_ir.validator uses a module listed above it, which is the healthy direction.
graphql_ir.validator uses graphql_ir.program, so a change to graphql_ir.program can break graphql_ir.validator, while a change to graphql_ir.validator can't break graphql_ir.program.
Position
Below the diagonal: graphql_ir.validator uses a module listed above it, which is the healthy direction.
graphql_ir.visitor uses graphql_ir.ir, so a change to graphql_ir.ir can break graphql_ir.visitor, while a change to graphql_ir.visitor can't break graphql_ir.ir.
Position
Below the diagonal: graphql_ir.visitor uses a module listed above it, which is the healthy direction.
graphql_ir.visitor uses graphql_ir.program, so a change to graphql_ir.program can break graphql_ir.visitor, while a change to graphql_ir.visitor can't break graphql_ir.program.
Position
Below the diagonal: graphql_ir.visitor uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses graphql_ir.associated_data, so a change to graphql_ir.associated_data can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break graphql_ir.associated_data.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses intern.string_key, so a change to intern.string_key can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break intern.string_key.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses common.feature_flags, so a change to common.feature_flags can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break common.feature_flags.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses common.location, so a change to common.location can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break common.location.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses relay_config.project_name, so a change to relay_config.project_name can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break relay_config.project_name.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses common.named_item, so a change to common.named_item can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break common.named_item.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses schema.definitions, so a change to schema.definitions can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break schema.definitions.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses schema.schema, so a change to schema.schema can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break schema.schema.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break graphql_ir.ir.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.relay_resolvers uses graphql_ir.program, so a change to graphql_ir.program can break relay_transforms.relay_resolvers, while a change to relay_transforms.relay_resolvers can't break graphql_ir.program.
Position
Below the diagonal: relay_transforms.relay_resolvers uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses graphql_ir.associated_data, so a change to graphql_ir.associated_data can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break graphql_ir.associated_data.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses intern.string_key, so a change to intern.string_key can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break intern.string_key.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses common.location, so a change to common.location can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break common.location.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses common.diagnostic, so a change to common.diagnostic can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break common.diagnostic.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses common.named_item, so a change to common.named_item can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break common.named_item.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses relay_config.project_config, so a change to relay_config.project_config can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break relay_config.project_config.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses schema.definitions, so a change to schema.definitions can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break schema.definitions.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses schema.schema, so a change to schema.schema can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break schema.schema.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break graphql_ir.ir.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses graphql_ir.program, so a change to graphql_ir.program can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break graphql_ir.program.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.client_edges uses graphql_ir.transform, so a change to graphql_ir.transform can break relay_transforms.client_edges, while a change to relay_transforms.client_edges can't break graphql_ir.transform.
Position
Below the diagonal: relay_transforms.client_edges uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses graphql_ir.associated_data, so a change to graphql_ir.associated_data can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break graphql_ir.associated_data.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses intern.string_key, so a change to intern.string_key can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break intern.string_key.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses common.feature_flags, so a change to common.feature_flags can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break common.feature_flags.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses common.location, so a change to common.location can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break common.location.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses common.diagnostic, so a change to common.diagnostic can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break common.diagnostic.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses common.named_item, so a change to common.named_item can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break common.named_item.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses schema.definitions, so a change to schema.definitions can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break schema.definitions.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break graphql_ir.ir.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses graphql_ir.program, so a change to graphql_ir.program can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break graphql_ir.program.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.match_.match_transform uses graphql_ir.transform, so a change to graphql_ir.transform can break relay_transforms.match_.match_transform, while a change to relay_transforms.match_.match_transform can't break graphql_ir.transform.
Position
Below the diagonal: relay_transforms.match_.match_transform uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses graphql_ir.associated_data, so a change to graphql_ir.associated_data can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break graphql_ir.associated_data.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses intern.string_key, so a change to intern.string_key can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break intern.string_key.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses common.feature_flags, so a change to common.feature_flags can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break common.feature_flags.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses common.location, so a change to common.location can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break common.location.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses common.diagnostic, so a change to common.diagnostic can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break common.diagnostic.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses common.named_item, so a change to common.named_item can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break common.named_item.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break graphql_ir.ir.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses graphql_ir.program, so a change to graphql_ir.program can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break graphql_ir.program.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.required_directive uses graphql_ir.transform, so a change to graphql_ir.transform can break relay_transforms.required_directive, while a change to relay_transforms.required_directive can't break graphql_ir.transform.
Position
Below the diagonal: relay_transforms.required_directive uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses graphql_ir.associated_data, so a change to graphql_ir.associated_data can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break graphql_ir.associated_data.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses intern.string_key, so a change to intern.string_key can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break intern.string_key.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses common.location, so a change to common.location can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break common.location.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses common.diagnostic, so a change to common.diagnostic can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break common.diagnostic.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses common.named_item, so a change to common.named_item can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break common.named_item.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses schema.definitions, so a change to schema.definitions can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break schema.definitions.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses schema.schema, so a change to schema.schema can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break schema.schema.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break graphql_ir.ir.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses graphql_ir.program, so a change to graphql_ir.program can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break graphql_ir.program.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_transforms.rsc_resolver_fields uses graphql_ir.transform, so a change to graphql_ir.transform can break relay_transforms.rsc_resolver_fields, while a change to relay_transforms.rsc_resolver_fields can't break graphql_ir.transform.
Position
Below the diagonal: relay_transforms.rsc_resolver_fields uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses intern.string_key, so a change to intern.string_key can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break intern.string_key.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses common.location, so a change to common.location can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break common.location.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses relay_config.project_config, so a change to relay_config.project_config can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break relay_config.project_config.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses schema.definitions, so a change to schema.definitions can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break schema.definitions.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses schema.schema, so a change to schema.schema can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break schema.schema.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break graphql_ir.ir.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses relay_transforms.relay_resolvers, so a change to relay_transforms.relay_resolvers can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break relay_transforms.relay_resolvers.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses relay_transforms.client_edges, so a change to relay_transforms.client_edges can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break relay_transforms.client_edges.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses relay_transforms.match_.match_transform, so a change to relay_transforms.match_.match_transform can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break relay_transforms.match_.match_transform.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses relay_transforms.required_directive, so a change to relay_transforms.required_directive can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break relay_transforms.required_directive.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_codegen.build_ast uses relay_transforms.rsc_resolver_fields, so a change to relay_transforms.rsc_resolver_fields can break relay_codegen.build_ast, while a change to relay_codegen.build_ast can't break relay_transforms.rsc_resolver_fields.
Position
Below the diagonal: relay_codegen.build_ast uses a module listed above it, which is the healthy direction.
relay_compiler.config uses intern.string_key, so a change to intern.string_key can break relay_compiler.config, while a change to relay_compiler.config can't break intern.string_key.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.config uses common.feature_flags, so a change to common.feature_flags can break relay_compiler.config, while a change to relay_compiler.config can't break common.feature_flags.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.config uses relay_config.project_name, so a change to relay_config.project_name can break relay_compiler.config, while a change to relay_compiler.config can't break relay_config.project_name.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.config uses common.named_item, so a change to common.named_item can break relay_compiler.config, while a change to relay_compiler.config can't break common.named_item.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.config uses relay_config.project_config, so a change to relay_config.project_config can break relay_compiler.config, while a change to relay_compiler.config can't break relay_config.project_config.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.config uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_compiler.config, while a change to relay_compiler.config can't break graphql_ir.ir.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.config uses relay_transforms.match_.match_transform, so a change to relay_transforms.match_.match_transform can break relay_compiler.config, while a change to relay_compiler.config can't break relay_transforms.match_.match_transform.
Position
Below the diagonal: relay_compiler.config uses a module listed above it, which is the healthy direction.
relay_compiler.compiler_state uses relay_config.project_name, so a change to relay_config.project_name can break relay_compiler.compiler_state, while a change to relay_compiler.compiler_state can't break relay_config.project_name.
Position
Below the diagonal: relay_compiler.compiler_state uses a module listed above it, which is the healthy direction.
relay_compiler.compiler_state uses relay_config.project_config, so a change to relay_config.project_config can break relay_compiler.compiler_state, while a change to relay_compiler.compiler_state can't break relay_config.project_config.
Position
Below the diagonal: relay_compiler.compiler_state uses a module listed above it, which is the healthy direction.
relay_compiler.compiler_state uses graphql_syntax.node.document, so a change to graphql_syntax.node.document can break relay_compiler.compiler_state, while a change to relay_compiler.compiler_state can't break graphql_syntax.node.document.
Position
Below the diagonal: relay_compiler.compiler_state uses a module listed above it, which is the healthy direction.
relay_compiler.compiler_state uses schema.schema, so a change to schema.schema can break relay_compiler.compiler_state, while a change to relay_compiler.compiler_state can't break schema.schema.
Position
Below the diagonal: relay_compiler.compiler_state uses a module listed above it, which is the healthy direction.
relay_compiler.compiler_state uses relay_transforms.match_.match_transform, so a change to relay_transforms.match_.match_transform can break relay_compiler.compiler_state, while a change to relay_compiler.compiler_state can't break relay_transforms.match_.match_transform.
Position
Below the diagonal: relay_compiler.compiler_state uses a module listed above it, which is the healthy direction.
relay_compiler.compiler_state uses relay_compiler.config, so a change to relay_compiler.config can break relay_compiler.compiler_state, while a change to relay_compiler.compiler_state can't break relay_compiler.config.
Position
Below the diagonal: relay_compiler.compiler_state uses a module listed above it, which is the healthy direction.
relay_lsp.server.lsp_state uses intern.string_key, so a change to intern.string_key can break relay_lsp.server.lsp_state, while a change to relay_lsp.server.lsp_state can't break intern.string_key.
Position
Below the diagonal: relay_lsp.server.lsp_state uses a module listed above it, which is the healthy direction.
relay_lsp.server.lsp_state uses common.location, so a change to common.location can break relay_lsp.server.lsp_state, while a change to relay_lsp.server.lsp_state can't break common.location.
Position
Below the diagonal: relay_lsp.server.lsp_state uses a module listed above it, which is the healthy direction.
relay_lsp.server.lsp_state uses common.diagnostic, so a change to common.diagnostic can break relay_lsp.server.lsp_state, while a change to relay_lsp.server.lsp_state can't break common.diagnostic.
Position
Below the diagonal: relay_lsp.server.lsp_state uses a module listed above it, which is the healthy direction.
relay_lsp.server.lsp_state uses schema.schema, so a change to schema.schema can break relay_lsp.server.lsp_state, while a change to relay_lsp.server.lsp_state can't break schema.schema.
Position
Below the diagonal: relay_lsp.server.lsp_state uses a module listed above it, which is the healthy direction.
relay_lsp.server.lsp_state uses graphql_ir.ir, so a change to graphql_ir.ir can break relay_lsp.server.lsp_state, while a change to relay_lsp.server.lsp_state can't break graphql_ir.ir.
Position
Below the diagonal: relay_lsp.server.lsp_state uses a module listed above it, which is the healthy direction.
relay_lsp.server.lsp_state uses relay_compiler.config, so a change to relay_compiler.config can break relay_lsp.server.lsp_state, while a change to relay_lsp.server.lsp_state can't break relay_compiler.config.
Position
Below the diagonal: relay_lsp.server.lsp_state uses a module listed above it, which is the healthy direction.
relay_compiler.build_project uses common.named_item, so a change to common.named_item can break relay_compiler.build_project, while a change to relay_compiler.build_project can't break common.named_item.
Position
Below the diagonal: relay_compiler.build_project uses a module listed above it, which is the healthy direction.
relay_compiler.build_project uses relay_config.project_config, so a change to relay_config.project_config can break relay_compiler.build_project, while a change to relay_compiler.build_project can't break relay_config.project_config.
Position
Below the diagonal: relay_compiler.build_project uses a module listed above it, which is the healthy direction.
relay_compiler.build_project uses schema.schema, so a change to schema.schema can break relay_compiler.build_project, while a change to relay_compiler.build_project can't break schema.schema.
Position
Below the diagonal: relay_compiler.build_project uses a module listed above it, which is the healthy direction.
relay_compiler.build_project uses graphql_ir.program, so a change to graphql_ir.program can break relay_compiler.build_project, while a change to relay_compiler.build_project can't break graphql_ir.program.
Position
Below the diagonal: relay_compiler.build_project uses a module listed above it, which is the healthy direction.
relay_compiler.build_project uses relay_compiler.config, so a change to relay_compiler.config can break relay_compiler.build_project, while a change to relay_compiler.build_project can't break relay_compiler.config.
Position
Below the diagonal: relay_compiler.build_project uses a module listed above it, which is the healthy direction.
relay_compiler.build_project uses relay_compiler.compiler_state, so a change to relay_compiler.compiler_state can break relay_compiler.build_project, while a change to relay_compiler.build_project can't break relay_compiler.compiler_state.
Position
Below the diagonal: relay_compiler.build_project uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 40% · Weak · gated by R1, R10 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
142
High / Critical
A03:2025 — Software Supply Chain Failures
79
High / Critical
Roadmap
Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with LiveResolverSuspenseDisplayName-test.js, useBlockingPaginationFragment-with-suspense-transition-test.js, useRefetchableFragmentNode-with-suspense-transition-test.js; Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with LiveResolverSuspenseDisplayName-test.js, useBlockingPaginationFragment-with-suspense-transition-test.js, useRefetchableFragmentNode-with-suspense-transition-test.js.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 108
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1363
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 188
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 59 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 59 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1641 of 1659 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D5 Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 3,289 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 126 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not scored — the JavaScript/TypeScript suite (jest via `yarn install --frozen-lockfile --ignore-scripts` in the repository root (0 tests); jest via `yarn install --frozen-lockfile --ignore-scripts` in compiler/crates/relay-compiler-playground/ (0 tests); jest via `yarn install --frozen-lockfile --ignore-scripts` in packages/relay-e2e-test/) ran but surfaced no test cases to the runner, so flakiness couldn't be exercised.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in packages/relay-e2e-test/ was NOT MEASURED: the install for packages/relay-e2e-test/ left no `jest` binary under node_modules, so the suite could not be launched. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `flow-typed/npm/chalk_v4.x.x.js`, `flow-typed/npm/invariant_v2.x.x.js`, `flow-typed/npm/jest_v29.x.x.js`, `packages/babel-plugin-relay/BabelPluginRelay.js`, `packages/babel-plugin-relay/compileGraphQLTag.js`, … (+115 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 32 further occurrence(s) are not listed individually; the score already reflects all 72.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 50 further occurrence(s) are not listed individually; the score already reflects all 90.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 20 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
138 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was createContainerWithFragments at 69. A further 26 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being relay_lsp::hover::with_resolution_path::get_hover_behavior_from_resolution_path at 90 — they are counted neither in the figure above nor in this dimension's score. 15 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: compiler/crates/relay-lsp/src/hover/with_resolution_path.rs (relay_lsp::hover::with_resolution_path::get_hover_behavior_from_resolution_path at 90), compiler/crates/schema-extractor/src/lib.rs (schema_extractor::type_annotation_name at 38), compiler/crates/graphql-syntax/src/lexer.rs (TokenKind::fmt at 29), compiler/crates/relay-typegen/src/flow.rs (FlowPrinter::write at 25), compiler/crates/relay-typegen/src/typescript.rs (TypeScriptPrinter::write at 25), and 10 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 76 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with createContainerWithFragments (cyclomatic 69). — Refactoring it lifts Cyclomatic Complexity from 6.4 to about 6.5/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 135 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 9 bodies over 60 down to 60 or less in Cognitive Complexity — start with _readClientEdge (cognitive 96), _readClientEdge (cognitive 96), schema_diff::diff_definitions (cognitive 87). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 9 together lifts Cognitive Complexity from 5.1 to about 5.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes6.9 / 10Adequate✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 55 FileTooLong finding(s) in God Classes — start with lib.rs (5), visit.rs, build_ast.rs. — One of this dimension's main actionable groups (55 warning-level).
Resolve the 38 MethodTooLong finding(s) in God Classes — start with REDACTED (4), build_ast.rs (4), match_transform.rs (2). — One of this dimension's main actionable groups (38 warning-level).
Resolve the 32 FunctionTooLong finding(s) in God Classes — start with visit.rs (5), lib.rs (3), write.rs (3). — One of this dimension's main actionable groups (32 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
220 duplicated block group(s) detected. 7.8 % of the production lines (11,510 of 148,247) are in a reported copy. A further 182 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 3 of the 402 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 146 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 20 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with build_ast.rs (3), wrapper.rs (3), visit.rs (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 17 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with flow.rs (7), client_component_boundaries.rs (2), ast.rs. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 15 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with printer.rs (2), wrapper.rs (2), parser.rs. — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with schema_set.rs, validate_client_schema_extensions_use_catch.rs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.8 / 10Adequategated by 3 critical findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
17 skipped, 27 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3289 tests. Measured on the JavaScript/TypeScript suite only — at least 126 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions (empty test): still subscribes for resolution when it supplies a name · ×3packages/relay-runtime/store/__tests__/LiveResolverSuspenseDisplayName-test.js:91
No assertions: does not throw when expected warning is fired · ×24packages/relay-test-utils-internal/__tests__/warnings-test.js:42
Skipped test: suspends then updates when the query and component load · ×17packages/react-relay/relay-hooks/__tests__/EntryPointContainer-test.js:217
Mock-dominated test: applies payload on @defer fragments in a query with modules · ×29packages/relay-runtime/store/__tests__/RelayModernEnvironment-CommitPayload-test.js:295
What to do
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with LiveResolverSuspenseDisplayName-test.js, useBlockingPaginationFragment-with-suspense-transition-test.js, useRefetchableFragmentNode-with-suspense-transition-test.js. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 24 No assertions finding(s) in Test Quality — start with RelayResponseNormalizer-test.js (11), warnings-test.js (4), useFragmentNode-test.js (3). — One of this dimension's main actionable groups (24 warning-level).
Resolve the 17 Skipped test finding(s) in Test Quality — start with LazyLoadEntryPointContainer_DEEPRECATED-test.js (4), useLazyLoadQueryNode-test.js (3), EntryPointContainer-test.js (2). — One of this dimension's main actionable groups (17 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
1 outdated, 0 yanked direct Cargo dependencies. 64 of 65 direct crates were graded against crates.io (0 not published there, 1 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: zstd
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 287 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: REDACTED (13×26=338); REDACTED (9×35=315); compiler/crates/relay-compiler/src/artifact_content/content.rs (11×25=275)
Hotspot: REDACTED · ×18REDACTED:484
What to do
Resolve the 18 Hotspot finding(s) in Churn × Complexity Hotspots — start with lib.rs (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (18 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
23 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is compiler/crates/schema-set/src/build_schema_document.rs. Counted over 342 of the 445 production source files in this repository: 101 are under the ~2,400-byte size floor this dimension measures over, and the remaining 2 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
75 deducted task-comment markers across 148247 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 72 TodoComment finding(s) in Explicit Debt — start with lib.rs (5), visit.rs (4), transform_connections.rs (4). — One of this dimension's main actionable groups (72 warning-level).
Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with ir_to_schema.rs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with lib.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 2 documentation facets pass in full; short on: F2 example. 9 document(s) read across 9 unit(s).
Documentation: no build, run or usage example · ×3packages/relay-compiler/README.md:1
What to do
Resolve the 3 Documentation finding(s) in Documentation Quality — start with README.md (3). — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
0 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
2 of 7 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
142 finding(s): 0 critical, 47 high, 95 medium, 0 low. 44 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 186 file(s) — `compiler/crates/relay-config/src/project_config.rs` (line 344, line 345), `flow-typed/npm/chalk_v4.x.x.js` (line 22), `flow-typed/npm/invariant_v2.x.x.js` (line 16), `flow-typed/npm/jest_v29.x.x.js` (line 50, line 52, line 125, …), `packages/babel-plugin-relay/BabelPluginRelay.js` (line 54, line 60, line 74), … (+181 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 44 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (44 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 43 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (43). — One of this dimension's main actionable groups (43 issue-level).
Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
79 of 344 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is compiler/crates/resolution-path/src/test.rs. Counted over 344 of the 445 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 74 Orphaned file finding(s) in Knowledge Freshness — start with validation_message.rs (2), lib.rs (2), prettier_doc_builders.rs. — One of this dimension's main actionable groups (74 recommendation-level).
Resolve the 5 Orphaned knowledge finding(s) in Knowledge Freshness — start with test.rs, lib.rs, validate_connections.rs. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 7 Change coupling finding(s) in Change Coupling — start with docblocks.rs (2), useEntryPointLoader.js, flow.rs. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 59 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with package.json. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.5 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 6/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `compiler/crates/fixture-tests`, `compiler/crates/persist-query`, `compiler/crates/prettier-format`, `compiler/crates/schema-validate`, `packages/relay-compiler` and 1 more.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:26
What to do
Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 717 plain JS — the untyped files are flow-typed/dev.js, flow-typed/npm/chalk_v4.x.x.js, flow-typed/npm/invariant_v2.x.x.js, flow-typed/npm/jest_v29.x.x.js, packages/babel-plugin-relay/BabelPluginRelay.js, packages/babel-plugin-relay/BabelPluginRelay.macro.js (+711 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
REDACTED:128 · REDACTED:2050 — the two spans are one implementation copied and then locally edited — 6112 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's 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 — 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. — REDACTED:128
REDACTED:62 · REDACTED:74 — the two spans are one implementation copied and then locally edited — 2467 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's 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 — 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. — REDACTED:62
REDACTED:16 · REDACTED:15 — these 2 files are line-for-line copies of one another — 265 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — REDACTED:16
REDACTED:14 · REDACTED:14 — these 2 files are line-for-line copies of one another — 221 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — REDACTED:14
REDACTED:278 · packages/relay-runtime/store/RelayModernEnvironment.js:233 — the two spans are one implementation copied and then locally edited — 484 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's 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 — 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. — REDACTED:278
packages/react-relay/relay-hooks/useLoadMoreFunction.js:14 · packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js:14 — these 2 files are line-for-line copies of one another — 101 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/react-relay/relay-hooks/useLoadMoreFunction.js:14
packages/react-relay/ReactRelayFragmentContainer.js:80 · packages/react-relay/ReactRelayRefetchContainer.js:136 — the two spans are one implementation copied and then locally edited — 397 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's 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 — 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. — packages/react-relay/ReactRelayFragmentContainer.js:80
packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js:32 · packages/react-relay/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js:32 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js:32
packages/relay-runtime/store/RelayModernRecord.js:360 · packages/relay-runtime/store/RelayModernRecord.js:835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/relay-runtime/store/RelayModernRecord.js:360
REDACTED:423 · REDACTED:1591 — the two spans are one implementation copied and then locally edited — 320 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's 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 — 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. — REDACTED:423
packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:99 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:82 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:99
packages/react-relay/relay-hooks/useQueryLoader.js:49 · packages/react-relay/relay-hooks/useQueryLoader_EXPERIMENTAL.js:37 — the two spans are one implementation copied and then locally edited — 268 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's 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 — 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. — packages/react-relay/relay-hooks/useQueryLoader.js:49
packages/react-relay/relay-hooks/useEntryPointLoader.js:112 · packages/react-relay/relay-hooks/useQueryLoader.js:177 — the two spans are one implementation copied and then locally edited — 269 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's 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 — 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. — packages/react-relay/relay-hooks/useEntryPointLoader.js:112
packages/react-relay/relay-hooks/usePaginationFragment.js:34 · packages/react-relay/relay-hooks/useRefetchableFragment.js:27 — the two spans are one implementation copied and then locally edited — 259 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's 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 — 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. — packages/react-relay/relay-hooks/usePaginationFragment.js:34
packages/react-relay/relay-hooks/legacy/FragmentResource.js:639 · packages/react-relay/relay-hooks/legacy/FragmentResource.js:769 — the two spans are one implementation copied and then locally edited — 179 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's 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 — 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. — packages/react-relay/relay-hooks/legacy/FragmentResource.js:639
packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:77 · packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:99 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:82 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:77
packages/relay-runtime/handlers/connection/MutationHandlers.js:107 · packages/relay-runtime/handlers/connection/MutationHandlers.js:185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/relay-runtime/handlers/connection/MutationHandlers.js:107
REDACTED:320 · REDACTED:832 — the two spans are one implementation copied and then locally edited — 129 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's 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 — 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. — REDACTED:320
packages/relay-runtime/util/getPaginationVariables.js:34 · packages/relay-runtime/util/getPaginationVariables.js:70 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/relay-runtime/util/getPaginationVariables.js:34
packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:89 · packages/react-relay/relay-hooks/prepareEntryPoint_DEPRECATED.js:49 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:89
packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:64 · packages/react-relay/relay-hooks/loadEntryPoint.js:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:64
packages/relay-runtime/mutations/RelayRecordSourceProxy.js:176 · packages/relay-runtime/mutations/RelayRecordSourceSelectorProxy.js:132 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/relay-runtime/mutations/RelayRecordSourceProxy.js:176
packages/react-relay/ReactRelayFragmentContainer.js:168 · REDACTED:463 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/react-relay/ReactRelayFragmentContainer.js:168
packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:25 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:24 — 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 — 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's 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 — 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. — packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:25
packages/react-relay/relay-hooks/readFragmentInternal.js:183 · REDACTED:416 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/react-relay/relay-hooks/readFragmentInternal.js:183
REDACTED:154 · REDACTED:307 · REDACTED:819 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — REDACTED:154
packages/relay-runtime/store/cloneRelayHandleSourceField.js:33 · packages/relay-runtime/store/cloneRelayScalarHandleSourceField.js:32 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/relay-runtime/store/cloneRelayHandleSourceField.js:33
packages/react-relay/relay-hooks/readFragmentInternal.js:265 · REDACTED:711 · REDACTED:833 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/react-relay/relay-hooks/readFragmentInternal.js:265
REDACTED:1440 · REDACTED:1467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:1440
packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:576 · packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:621 — the two spans are one implementation copied and then locally edited — 72 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's 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 — 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. — packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:576
packages/react-relay/index.js:101 · packages/react-relay/legacy.js:62 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — packages/react-relay/index.js:101
packages/relay-runtime/util/recycleNodesInto.js:24 · packages/relay-runtime/util/recycleNodesInto.js:85 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/relay-runtime/util/recycleNodesInto.js:24
packages/relay-runtime/handlers/connection/ConnectionHandler.js:333 · packages/relay-runtime/handlers/connection/ConnectionHandler.js:437 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/relay-runtime/handlers/connection/ConnectionHandler.js:333
packages/react-relay/relay-hooks/readFragmentInternal.js:60 · REDACTED:77 · REDACTED:98 · REDACTED:89 · +1 more site(s) not listed — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/react-relay/relay-hooks/readFragmentInternal.js:60
packages/relay-runtime/store/RelayModernSelector.js:264 · packages/relay-runtime/store/RelayModernSelector.js:367 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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. — packages/relay-runtime/store/RelayModernSelector.js:264
packages/relay-runtime/store/RelayStoreSubscriptions.js:156 · packages/relay-runtime/store/RelayStoreSubscriptions.js:177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/relay-runtime/store/RelayStoreSubscriptions.js:156
packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:47 · packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:32 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:31 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:47
packages/react-relay/relay-hooks/EntryPointContainer.react.js:55 · packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:218 — 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 — 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's 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 — 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. — packages/react-relay/relay-hooks/EntryPointContainer.react.js:55
packages/relay-runtime/mutations/RelayRecordSourceProxy.js:108 · packages/relay-runtime/mutations/RelayRecordSourceProxyOptimized.js:61 — the two spans are one implementation copied and then locally edited — 86 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's 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 — 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. — packages/relay-runtime/mutations/RelayRecordSourceProxy.js:108
REDACTED:300 · REDACTED:351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:300
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
REDACTED:14 reaches into another package with a relative path (../relay-runtime/network/RelayObservable) — import the package by name instead. — REDACTED:14
packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:13 reaches into another package with a relative path (../../relay-runtime/util/RelayRuntimeTypes) — import the package by name instead. — packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:13
packages/react-relay/relay-hooks/loadQuery.js:14 reaches into another package with a relative path (../../relay-runtime/network/RelayNetworkTypes) — import the package by name instead. — packages/react-relay/relay-hooks/loadQuery.js:14
packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:14 reaches into another package with a relative path (../../relay-runtime/network/RelayNetworkTypes) — import the package by name instead. — packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:14
packages/react-relay/relay-hooks/prepareEntryPoint_DEPRECATED.js:13 reaches into another package with a relative path (../../relay-runtime/util/RelayRuntimeTypes) — import the package by name instead. — packages/react-relay/relay-hooks/prepareEntryPoint_DEPRECATED.js:13
packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:17 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/preloadQuery_DEPRECATED) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:17
packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:18 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/RelayEnvironmentProvider) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:18
packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:19 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/useFragment) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:19
packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:20 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/useLazyLoadQuery) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:20
packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:21 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/usePreloadedQuery) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:21
packages/relay-test-utils/__tests__/RelayResolverTestUtils-test.js:18 reaches past another workspace package's public entry into its internals with a relative path (../../relay-runtime/store/ResolverFragments) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — packages/relay-test-utils/__tests__/RelayResolverTestUtils-test.js:18
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
createContainerWithFragments has cyclomatic complexity 58 and cognitive complexity 66; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:319
(anonymous) has cyclomatic complexity 56 and cognitive complexity 69; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:268
update has cyclomatic complexity 44 and cognitive complexity 83; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/handlers/connection/ConnectionHandler.js:50
recycleNodesIntoImplOptimized has cyclomatic complexity 40 and cognitive complexity 55; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/util/recycleNodesInto.js:88
_traverseSelections has cyclomatic complexity 39 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2507
(anonymous) has cyclomatic complexity 39 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:269
readWithIdentifier has cyclomatic complexity 36 and cognitive complexity 47; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/relay-hooks/legacy/FragmentResource.js:240
_traverseSelections has cyclomatic complexity 36 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:577
(anonymous) has cyclomatic complexity 34 and cognitive complexity 26; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/ExecTimeS2CDataChecker.js:222
(anonymous) has cyclomatic complexity 33 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayReferenceMarker.js:286
_readClientEdge has cyclomatic complexity 30 and cognitive complexity 96; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — REDACTED:1049, REDACTED:3002
(anonymous) has cyclomatic complexity 30 and cognitive complexity 38; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-e2e-test/__tests__/fixtures-test.js:99
readFragmentInternal has cyclomatic complexity 29 and cognitive complexity 37; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/relay-hooks/readFragmentInternal.js:152
createContainerWithFragments has cyclomatic complexity 28 and cognitive complexity 34; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/ReactRelayRefetchContainer.js:70
_traverseSelections has cyclomatic complexity 28 and cognitive complexity 30; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:246
(anonymous) has cyclomatic complexity 28 and cognitive complexity 28; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/DataChecker.js:365
updateProxyFromSelections has cyclomatic complexity 27 and cognitive complexity 19; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:55
_handleNext 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:632
notify has cyclomatic complexity 26 and cognitive complexity 29; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:484
_normalizeField has cyclomatic complexity 25 and cognitive complexity 43; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:616
readFromCacheOrEvaluate has cyclomatic complexity 23 and cognitive complexity 43; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:111
_traverseSelections has cyclomatic complexity 23 and cognitive complexity 34; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js:257
recycleNodesIntoImpl has cyclomatic complexity 23 and cognitive complexity 20; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/util/recycleNodesInto.js:27
_project has cyclomatic complexity 22 and cognitive complexity 37; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js:510
_collect has cyclomatic complexity 21 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:948
update has cyclomatic complexity 21 and cognitive complexity 32; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayModernRecord.js:360
updatePerf has cyclomatic complexity 20 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayModernRecord.js:835
_propagateResolverMetadata has cyclomatic complexity 19 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2878
preloadQueryDeduped has cyclomatic complexity 19 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:147
updateTargetFromSource has cyclomatic complexity 18 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1108
_propagateResolverMetadata has cyclomatic complexity 18 and cognitive complexity 34; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:945
constructor has cyclomatic complexity 18 and cognitive complexity 19; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayModernEnvironment.js:110
parseStep has cyclomatic complexity 17 and cognitive complexity 24; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:84
read has cyclomatic complexity 17 and cognitive complexity 18; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2092
createContainerWithFragments has cyclomatic complexity 16 and cognitive complexity 24; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/react-relay/ReactRelayFragmentContainer.js:47
(anonymous) has cyclomatic complexity 16 and cognitive complexity 19; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js:253
_mockScalar has cyclomatic complexity 16 and cognitive complexity 18; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:654
areFieldValuesEqual has cyclomatic complexity 16 and cognitive complexity 17; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayModernRecord.js:747
getSingularSelector has cyclomatic complexity 16 and cognitive complexity 17; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/relay-runtime/store/RelayModernSelector.js:67
Do you agree with this assessment?
R3 · Large Files4.8 / 10Weak✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
REDACTED has 3664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 1818 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-runtime/store/RelayStoreTypes.js has 1526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayStoreTypes.js:1
flow-typed/npm/jest_v29.x.x.js has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — flow-typed/npm/jest_v29.x.x.js:1
REDACTED has 1177 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 1027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-runtime/store/live-resolvers/LiveResolverCache.js has 1016 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:1
REDACTED has 991 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-runtime/store/RelayModernRecord.js has 906 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayModernRecord.js:1
REDACTED has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/react-relay/relay-hooks/rsc/useRelayHandoff.js has 867 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:1
packages/react-relay/relay-hooks/legacy/FragmentResource.js has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/react-relay/relay-hooks/legacy/FragmentResource.js:1
REDACTED has 833 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 829 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js has 682 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js:1
packages/relay-runtime/store/DataChecker.js has 648 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/DataChecker.js:1
packages/relay-runtime/network/RelayObservable.js has 608 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/network/RelayObservable.js:1
packages/relay-runtime/handlers/connection/ConnectionHandler.js has 592 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/handlers/connection/ConnectionHandler.js:1
REDACTED has 591 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/react-relay/relay-hooks/QueryResource.js has 574 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/react-relay/relay-hooks/QueryResource.js:1
packages/relay-runtime/store/RelayReferenceMarker.js has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayReferenceMarker.js:1
packages/relay-runtime/store/RelayModernEnvironment.js has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayModernEnvironment.js:1
packages/relay-test-utils/RelayModernMockEnvironment.js has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-test-utils/RelayModernMockEnvironment.js:1
REDACTED has 530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-runtime/store/RelayModernSelector.js has 518 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayModernSelector.js:1
REDACTED has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-e2e-test/src/rsc/rscClient.js has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-e2e-test/src/rsc/rscClient.js:1
packages/react-relay/ReactRelayRefetchContainer.js has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/react-relay/ReactRelayRefetchContainer.js:1
REDACTED has 453 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js has 453 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js:1
REDACTED has 452 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
packages/relay-runtime/index.js has 448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/index.js:1
packages/react-relay/relay-hooks/loadQuery.js has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/react-relay/relay-hooks/loadQuery.js:1
packages/relay-runtime/store/RelayModernFragmentSpecResolver.js has 442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/relay-runtime/store/RelayModernFragmentSpecResolver.js:1
REDACTED has 440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 427 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage8.4 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
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 — if neither does, no test reaches this one. (×38) — packages/relay-runtime/store/RelayStoreTypes.js:1, flow-typed/npm/jest_v29.x.x.js:1, REDACTED:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.3 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
12 file(s) (~908 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/babel-plugin-relay
Unreachable from the 38 application, 105 tooling and 459 test entry point(s) detected in this repo. Gate removals on `yarn run build` — an undetected custom entry would make these reachable.
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×22) — flow-typed/npm/jest_v29.x.x.js, REDACTED, packages/react-relay/__flowtests__/RelayModern-flowtest.js, …
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 6 in-repo import(s) from 3 other file(s) do name it (packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js, packages/react-relay/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js, packages/react-relay/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/react-relay/relay-hooks/__flowtests__/utils.js
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/multi-actor/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/react-relay/multi-actor/ActorChange.js
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/multi-actor/ActorChange.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/react-relay/multi-actor/useRelayActorEnvironment.js
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/react-relay/relay-hooks/NestedRelayEntryPointBuilderUtils.js
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/__flowtests__/RelayModern-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×3) — packages/react-relay/__flowtests__/RelayModernFlowtest_badref.graphql.js, packages/react-relay/__flowtests__/RelayModernFlowtest_notref.graphql.js, packages/react-relay/__flowtests__/RelayModernFlowtest_users.graphql.js
no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (packages/react-relay/__flowtests__/RelayModern-flowtest.js, packages/react-relay/__flowtests__/RelayModernFlowtest_badref.graphql.js, packages/react-relay/__flowtests__/RelayModernFlowtest_notref.graphql.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/react-relay/__flowtests__/RelayModernFlowtest_user.graphql.js
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json. (×2) — packages/react-relay/relay-hooks/EntryPointTypes.flow.js:16, packages/relay-runtime/util/NormalizationNode.js:16
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×8) — packages/react-relay/ReactRelayFragmentContainer.js:24, packages/react-relay/__tests__/ReactRelayFragmentContainer-test.js:716, REDACTED:58, …
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
Only test files import it (first: packages/react-relay/relay-hooks/__tests__/loadQuery-test.js:41) — move it to devDependencies. (×2) — package.json:78, packages/react-relay/package.json:22
Only test files import it (first: packages/react-relay/__tests__/Catch-test.js:16) — move it to devDependencies. — package.json:84
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×15) — compiler/crates/common/src/rollout.rs:58, compiler/crates/common/src/rollout.rs:80, compiler/crates/docblock-shared/src/resolver_source_hash.rs:44, …
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 15 sites, not one: `compiler/crates/common/src/rollout.rs:58` (`Md5::digest`), `compiler/crates/common/src/rollout.rs:80` (`Md5::digest`), `compiler/crates/docblock-shared/src/resolver_source_hash.rs:44` (`Md5::new`), `compiler/crates/relay-codegen/src/build_ast.rs:3610` (`Md5::new`), `compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:167` (`Sha1::new_with_prefix`), `compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:314` (`Sha1::digest`), `compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:361` (`Sha1::digest`), `compiler/crates/relay-compiler/src/build_project/build_ir.rs:176` (`Md5::new`), and 7 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`count` is read from the bytes being parsed at line 834 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 836 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating. — compiler/crates/schema/src/compact.rs:836
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 67 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — No tests discovered
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 2 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed JavaScript, Rust, TypeScript surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 120 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — D5 reads a .NET project-reference graph only — this repository's production source is .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in the repository root ran and not one test passed (FAIL packages/react-relay/relay-hooks/__tests__/usePaginationFragment-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's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 53 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R5 Dependency Freshness — uses a yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
X12 Unreachable branch — X12 reached only 27% of this repository's production lines — rust (148,200 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — X13 reached only 27% of this repository's production lines — rust (148,200 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 27% of this repository's production lines — rust (148,200 lines), python (47 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — X17 reached only 27% of this repository's production lines — rust (148,200 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X18 Disposal-pattern correctness — X18 reached only 27% of this repository's production lines — rust (148,200 lines), python (47 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 27% of this repository's production lines — rust (148,200 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge compiler/crates/resolution-path/src/test.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge compiler/crates/graphql-ir-diff/src/lib.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge compiler/crates/relay-transforms/src/validations/validate_connections.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge compiler/crates/relay-lsp/src/rename.rs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D10 · Test Quality· No assertions (empty test) · ×3
No assertions (empty test): still subscribes for resolution when it supplies a name packages/relay-runtime/store/__tests__/LiveResolverSuspenseDisplayName-test.js:91— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): empty test to prevent Jest from failing packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js:41— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): empty test to prevent Jest from failing packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js:41— Test method has an empty body — it asserts nothing and exercises no code.
Unlisted import 'areEqual' packages/react-relay/ReactRelayFragmentContainer.js:24— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'areEqual' packages/relay-runtime/store/RelayModernFragmentSpecResolver.js:41— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'areEqual' packages/relay-test-utils/RelayModernMockEnvironment.js:29— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'warning' REDACTED:58— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'warning' packages/relay-runtime/handlers/connection/ConnectionHandler.js:27— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'warning' packages/relay-test-utils-internal/Matchers.js:59— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'scheduler' packages/react-relay/__tests__/ReactRelayFragmentContainer-test.js:716— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import '@babel/plugin-transform-react-jsx' packages/relay-e2e-test/jest-transform.js:73— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
TodoComment compiler/crates/schema-validate/src/lib.rs:531— // TODO: change to contravariant? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema-validate/src/lib.rs:551— // TODO: validate default values? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema-set/src/schema_set_collector.rs:492— // TODO: handle legacy style @connection fields with client-defined schema extensions. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema/src/errors.rs:46— // TODO: These should be replaced with error codes or by unifying the parsers. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema/src/in_memory.rs:231— /// TODO: we probably want to replace this with a proper `Unknown` type. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema/src/schema.rs:224— /// TODO: we probably want to replace this with a proper `Unknown` type. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema/src/in_memory.rs:1814— // TODO(T63941319) @skip and @include directives are duplicated in our schema — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/schema/src/flatbuffer/wrapper.rs:939— // TODO(inanc): Also check if the parent type is fetchable? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-typegen/tests/generate_flow.rs:123— // TODO: T195687167 This is currently duplicated in flow and TS - export this to a common place — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-typegen/tests/generate_typescript.rs:90— // TODO: T195687167 This is currently duplicated in flow and TS - export this to a common place — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-typegen/src/visit.rs:2110— // TODO check whether the field is `node` or `nodes` on `Query`. If so, it should not be — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-typegen/src/visit.rs:2524— // TODO: We could implement custom variables that are provided via the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-typegen/src/visit.rs:3067— // TODO: T85950736 Fix these clippy errors — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-typegen/src/visit.rs:3241— // TODO consider reading the id field from the config. This must be done — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/apply_fragment_arguments.rs:708— // TODO update globals — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/client_extensions.rs:301— // TODO(T63388023): Returns a typed directive — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/refetchable_fragment.rs:373— // TODO: path or connection field locations in the error messages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/relay_resolvers.rs:117— // TODO: Add Support for FullData — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/required_directive.rs:146— // TODO(T70172661): Also reference the location of the inline fragment, once they have a location. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/transform_connections.rs:487— // TODO(T63388023): Use typed directives/metadata instead — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/transform_connections.rs:550— // TODO(T63626938): This assumes that each document is processed serially (not in parallel or concurrently) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/transform_connections.rs:577— // TODO(T63626938): This assumes that each document is processed serially (not in parallel or concurrently) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/validations/validate_relay_directives.rs:46— // TODO(T63626938): This assumes that each document is processed serially (not in parallel or concurrently) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/transform_connections.rs:605— // TODO(T63626938): Shouldn't need to do this when transformer infra — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:145— // TODO: Deprecated enum values inside deeply nested constant objects/arrays — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FileTooLong: src/visit.rs compiler/crates/relay-typegen/src/visit.rs— FileTooLong — 2526 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 63 free functions. The bar is 500 significant lines; this is 2026 over it, 5.05× 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.
FileTooLong: src/build_ast.rs compiler/crates/relay-codegen/src/build_ast.rs— FileTooLong — 2515 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: CodegenBuilder (2 blocks, 372-3439). The bar is 500 significant lines; this is 2015 over it, 5.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2439 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 1939 over it, 4.88× 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.
FileTooLong: src/parser.rs compiler/crates/graphql-syntax/src/parser.rs— FileTooLong — 1994 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: Parser (2 blocks, 53-3150). The bar is 500 significant lines; this is 1494 over it, 3.99× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/in_memory.rs compiler/crates/schema/src/in_memory.rs— FileTooLong — 1940 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1440 over it, 3.88× 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 1297 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), about 89% of them inside a single declaration: Executor (137-1846). The bar is 500 significant lines; this is 797 over it, 2.59× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs compiler/crates/resolution-path/src/lib.rs— FileTooLong — 1278 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 778 over it, 2.56× 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.
FileTooLong: src/compiler_state.rs compiler/crates/relay-compiler/src/compiler_state.rs— FileTooLong — 1245 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 745 over it, 2.49× 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.
FileTooLong: src/client_edges.rs compiler/crates/relay-transforms/src/client_edges.rs— FileTooLong — 1221 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 62% of them inside a single declaration: ClientEdgesTransform (4 blocks, 372-1812). The bar is 500 significant lines; this is 721 over it, 2.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs compiler/crates/relay-schema-generation/src/lib.rs— FileTooLong — 1117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 617 over it, 2.23× 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.
FileTooLong: src/write.rs compiler/crates/relay-typegen/src/write.rs— FileTooLong — 1111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 611 over it, 2.22× 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.
FileTooLong: src/completion.rs compiler/crates/relay-lsp/src/completion.rs— FileTooLong — 1076 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 576 over it, 2.15× 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.
FileTooLong: src/config.rs compiler/crates/relay-compiler/src/config.rs— FileTooLong — 1002 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 502 over it, 2.00× 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.
FileTooLong: src/ir.rs compiler/crates/relay-docblock/src/ir.rs— FileTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 499 over it, 2.00× 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.
FileTooLong: hover/with_resolution_path.rs compiler/crates/relay-lsp/src/hover/with_resolution_path.rs— FileTooLong — 953 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 453 over it, 1.91× 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.
FileTooLong: artifact_content/content.rs compiler/crates/relay-compiler/src/artifact_content/content.rs— FileTooLong — 858 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 358 over it, 1.72× 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.
FileTooLong: src/lib.rs compiler/crates/schema-diff/src/lib.rs— FileTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 353 over it, 1.71× 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.
FileTooLong: match_/match_transform.rs compiler/crates/relay-transforms/src/match_/match_transform.rs— FileTooLong — 824 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 74% of them inside a single declaration: MatchTransform (3 blocks, 117-1024). The bar is 500 significant lines; this is 324 over it, 1.65× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/compact.rs compiler/crates/schema/src/compact.rs— FileTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 320 over it, 1.64× 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.
FileTooLong: flatbuffer/wrapper.rs compiler/crates/schema/src/flatbuffer/wrapper.rs— FileTooLong — 807 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 307 over it, 1.61× 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: RelayResponseNormalizer (117-1061). The bar is 500 significant lines; this is 269 over it, 1.54× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: store/RelayStoreTypes.js packages/relay-runtime/store/RelayStoreTypes.js— FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 269 over it, 1.54× 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.
FileTooLong: src/schema_set.rs compiler/crates/schema-set/src/schema_set.rs— FileTooLong — 759 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 259 over it, 1.52× 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: RelayModernStore (95-1086). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/schema_set_collector.rs compiler/crates/schema-set/src/schema_set_collector.rs— FileTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: SchemaSet (57-872). The bar is 500 significant lines; this is 250 over it, 1.50× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
MethodTooLong: ShardedSet.with_hasher compiler/crates/intern/src/sharded_set.rs:39— MethodTooLong — with_hasher runs 260 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConnectionTransform.transform_connection_selections compiler/crates/relay-transforms/src/transform_connections.rs:132— MethodTooLong — transform_connection_selections runs 235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FragmentResourceImpl.readWithIdentifier packages/react-relay/relay-hooks/legacy/FragmentResource.js:240— MethodTooLong — readWithIdentifier runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayReader._readClientEdge REDACTED:1049— MethodTooLong — _readClientEdge runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayReaderOptimized._readClientEdge REDACTED:3002— MethodTooLong — _readClientEdge runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Config.from_struct compiler/crates/relay-compiler/src/config.rs:654— MethodTooLong — from_struct runs 179 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RscResolverFieldTransform.open_rsc_field compiler/crates/relay-transforms/src/rsc_resolver_fields.rs:316— MethodTooLong — open_rsc_field runs 179 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MatchTransform.validate_transform_fragment_spread compiler/crates/relay-transforms/src/match_/match_transform.rs:332— MethodTooLong — validate_transform_fragment_spread runs 164 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SchemaChange.get_safety compiler/crates/schema-diff/src/check.rs:71— MethodTooLong — get_safety runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayResolverExtractor.parse_document compiler/crates/relay-schema-generation/src/lib.rs:246— MethodTooLong — parse_document runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DeclarativeConnectionMutationTransform.transform_linked_field compiler/crates/relay-transforms/src/declarative_connection.rs:181— MethodTooLong — transform_linked_field runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TypeSystemDefinition.fmt compiler/crates/graphql-syntax/src/node/type_system.rs:104— MethodTooLong — fmt runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayResolverSpreadTransform.rebind_selection compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:470— MethodTooLong — rebind_selection runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: QueryResourceImpl._fetchAndSaveQuery packages/react-relay/relay-hooks/QueryResource.js:397— MethodTooLong — _fetchAndSaveQuery runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayReaderOptimized._traverseSelections REDACTED:2507— MethodTooLong — _traverseSelections runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MatchTransform.validate_transform_linked_field_with_match_directive compiler/crates/relay-transforms/src/match_/match_transform.rs:659— MethodTooLong — validate_transform_linked_field_with_match_directive runs 135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayReader._traverseSelections REDACTED:577— MethodTooLong — _traverseSelections runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LSPStateResources.build_programs compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:423— MethodTooLong — build_programs runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LiveResolverCache.readFromCacheOrEvaluate packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:111— MethodTooLong — readFromCacheOrEvaluate runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Zero.new compiler/crates/intern/src/atomic_arena.rs:481— MethodTooLong — new runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CodegenBuilder.build_operation compiler/crates/relay-codegen/src/build_ast.rs:455— MethodTooLong — build_operation runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayResolverExtractor.resolve compiler/crates/relay-schema-generation/src/lib.rs:468— MethodTooLong — resolve runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RelayResolverFieldTransform.extract_resolver_field_directives compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:145— MethodTooLong — extract_resolver_field_directives runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Compiler.watch compiler/crates/relay-compiler/src/compiler.rs:174— MethodTooLong — watch runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DataChecker._traverseSelections packages/relay-runtime/store/DataChecker.js:361— MethodTooLong — _traverseSelections runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
+ 13 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×38
No test reaches this file packages/relay-runtime/store/RelayStoreTypes.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file flow-typed/npm/jest_v29.x.x.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/relay-runtime/util/ReaderNode.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/relay-runtime/util/NormalizationNode.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/EntryPointTypes.flow.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/relay-runtime/multi-actor-environment/MultiActorEnvironmentTypes.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/__flowtests__/RelayModern-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/relay-runtime/network/RelayNetworkTypes.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/relay-runtime/util/RelayRuntimeTypes.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file flow-typed/npm/chalk_v4.x.x.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/ReactRelayTypes.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/utils.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/ExtractQueryTypes-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/useFragment-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/multi-actor/ActorChange.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/EntryPointElementConfig-flowtest.js:1— 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 — if neither does, no test reaches this one.
No test reaches this file packages/react-relay/multi-actor/useRelayActorEnvironment.js:1— 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 — if neither does, no test reaches this one.
FunctionTooLong: relay_lsp::hover::with_resolution_path::get_hover_behavior_from_resolution_path compiler/crates/relay-lsp/src/hover/with_resolution_path.rs:138— FunctionTooLong — relay_lsp::hover::with_resolution_path::get_hover_behavior_from_resolution_path runs 363 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 263 over it, 3.63× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: loadQuery.loadQuery packages/react-relay/relay-hooks/loadQuery.js:90— FunctionTooLong — loadQuery runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: schema_diff::diff_definitions compiler/crates/schema-diff/src/lib.rs:418— FunctionTooLong — schema_diff::diff_definitions runs 196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: schema_set::build_in_memory_schema::build_in_memory_schema compiler/crates/schema-set/src/build_in_memory_schema.rs:86— FunctionTooLong — schema_set::build_in_memory_schema::build_in_memory_schema runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_compiler::artifact_content::content::generate_operation compiler/crates/relay-compiler/src/artifact_content/content.rs:282— FunctionTooLong — relay_compiler::artifact_content::content::generate_operation runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: schema_diff::detect_changes_from_schemas compiler/crates/schema-diff/src/lib.rs:963— FunctionTooLong — schema_diff::detect_changes_from_schemas runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_compiler::build_project::commit_project compiler/crates/relay-compiler/src/build_project.rs:600— FunctionTooLong — relay_compiler::build_project::commit_project runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::write::write_fragment_type_exports_section compiler/crates/relay-typegen/src/write.rs:714— FunctionTooLong — relay_typegen::write::write_fragment_type_exports_section runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_lsp::completion::completion_items_for_request compiler/crates/relay-lsp/src/completion.rs:669— FunctionTooLong — relay_lsp::completion::completion_items_for_request runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::write::write_operation_type_exports_section compiler/crates/relay-typegen/src/write.rs:353— FunctionTooLong — relay_typegen::write::write_operation_type_exports_section runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::visit::raw_response_selections_to_babel compiler/crates/relay-typegen/src/visit.rs:1771— FunctionTooLong — relay_typegen::visit::raw_response_selections_to_babel runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::visit::make_prop compiler/crates/relay-typegen/src/visit.rs:2087— FunctionTooLong — relay_typegen::visit::make_prop runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_schema_generation::return_type_to_type_annotation compiler/crates/relay-schema-generation/src/lib.rs:1120— FunctionTooLong — relay_schema_generation::return_type_to_type_annotation runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: graphql_ir::signatures::build_fragment_variable_definitions compiler/crates/graphql-ir/src/signatures.rs:279— FunctionTooLong — graphql_ir::signatures::build_fragment_variable_definitions runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_transforms::apply_transforms::apply_common_transforms compiler/crates/relay-transforms/src/apply_transforms.rs:159— FunctionTooLong — relay_transforms::apply_transforms::apply_common_transforms runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_compiler::compiler::build_projects compiler/crates/relay-compiler/src/compiler.rs:646— FunctionTooLong — relay_compiler::compiler::build_projects runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::write::write_rsc_resolver_signature_type_assertion compiler/crates/relay-typegen/src/write.rs:98— FunctionTooLong — relay_typegen::write::write_rsc_resolver_signature_type_assertion runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ConnectionHandler.update packages/relay-runtime/handlers/connection/ConnectionHandler.js:50— FunctionTooLong — update runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_transforms::apply_transforms::apply_typegen_transforms compiler/crates/relay-transforms/src/apply_transforms.rs:798— FunctionTooLong — relay_transforms::apply_transforms::apply_typegen_transforms runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_compiler::build_project::build_programs compiler/crates/relay-compiler/src/build_project.rs:319— FunctionTooLong — relay_compiler::build_project::build_programs runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_compiler::build_project::generate_artifacts::generate_artifacts compiler/crates/relay-compiler/src/build_project/generate_artifacts.rs:52— FunctionTooLong — relay_compiler::build_project::generate_artifacts::generate_artifacts runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::visit::raw_response_visit_selections compiler/crates/relay-typegen/src/visit.rs:2572— FunctionTooLong — relay_typegen::visit::raw_response_visit_selections runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_lsp::rename::create_rename_request compiler/crates/relay-lsp/src/rename.rs:129— FunctionTooLong — relay_lsp::rename::create_rename_request runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: relay_typegen::visit::visit_selections compiler/crates/relay-typegen/src/visit.rs:164— FunctionTooLong — relay_typegen::visit::visit_selections runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: createUpdatableProxy.updateProxyFromSelections REDACTED:55— FunctionTooLong — updateProxyFromSelections runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
No assertions: does not throw when expected warning is fired packages/relay-test-utils-internal/__tests__/warnings-test.js:42— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: matches contextual warning packages/relay-test-utils-internal/__tests__/warnings-test.js:47— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: matches contextual warning first packages/relay-test-utils-internal/__tests__/warnings-test.js:51— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: matches multiple contextual warnings first packages/relay-test-utils-internal/__tests__/warnings-test.js:71— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: loads where WeakMap is missing packages/relay-runtime/store/__tests__/DataChecker-ExecTimeS2C-test.js:486— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not error on non-cyclic structure packages/relay-runtime/store/__tests__/RelayModernOperationDescriptor-test.js:56— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not error on cyclic structures that are not part of the query's used variables packages/relay-runtime/store/__tests__/RelayModernOperationDescriptor-test.js:59— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should warn if run() is called during a run() packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2364— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns in __DEV__ if payload data is missing an expected field packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2640— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not warn in __DEV__ if payload data is missing for an abstract field packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2684— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns in __DEV__ if a single response contains conflicting fields with the same id packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2712— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not warn if a single response contains the same fields with the same id packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2776— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not warn if a single response contains the same scalar array value packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2832— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns in __DEV__ if a single response contains conflicting fields with multiple same ids packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2888— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns in __DEV__ if a single response contains conflicting linked fields packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:2968— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns in __DEV__ if a single response contains conflicting linked fields with null values packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:3066— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns in __DEV__ if payload contains inconsistent types for a record packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:3162— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not warn in __DEV__ on inconsistent types for a client record packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:3249— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: does not warn if a single response contains the same fields with the same id packages/relay-runtime/store/__tests__/RelayResponseNormalizer-test.js:3497— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should warn if fragment reference is non-null but read-out data is null packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js:1530— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should NOT warn if plural fragment reference is non-null and empty packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js:1542— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should warn if plural fragment reference is non-null but read-out data is null packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js:1554— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: warns when variable provider is an impure function packages/react-relay/relay-hooks/__tests__/usePreloadedQuery-provided-variables-test.js:246— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should compile a query with complex object type packages/react-relay/__tests__/ExampleWithOutputType-test.js:16— This method's 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Duplicated block (8 lines × 2) compiler/crates/graphql-ir/src/program.rs:45— compiler/crates/graphql-ir/src/program.rs:45-52 | compiler/crates/program-with-dependencies/src/program_with_dependencies.rs:115-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-ir/src/program.rs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:569— compiler/crates/relay-codegen/src/build_ast.rs:569-576 | compiler/crates/relay-codegen/src/build_ast.rs:605-612 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-codegen/src/build_ast.rs:569` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:2387— compiler/crates/relay-codegen/src/build_ast.rs:2387-2394 | compiler/crates/relay-codegen/src/build_ast.rs:2439-2446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-codegen/src/build_ast.rs:2387` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:2490— compiler/crates/relay-codegen/src/build_ast.rs:2490-2500 | compiler/crates/relay-codegen/src/build_ast.rs:2645-2652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-codegen/src/build_ast.rs:2490` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) compiler/crates/relay-compiler/src/build_project.rs:146— compiler/crates/relay-compiler/src/build_project.rs:146-153 | compiler/crates/relay-compiler/src/build_project.rs:174-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) compiler/crates/relay-schema-generation/src/lib.rs:717— compiler/crates/relay-schema-generation/src/lib.rs:717-724 | compiler/crates/relay-schema-generation/src/lib.rs:1021-1028 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-schema-generation/src/lib.rs:717` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:274— compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:274-281 | compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:312-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:68— compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:68-75 | compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:97-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&ScalarField` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) compiler/crates/relay-typegen/src/flow.rs:248— compiler/crates/relay-typegen/src/flow.rs:248-255 | compiler/crates/relay-typegen/src/typescript.rs:266-273 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) compiler/crates/relay-typegen/src/visit.rs:1495— compiler/crates/relay-typegen/src/visit.rs:1495-1502 | compiler/crates/relay-typegen/src/visit.rs:1782-1789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/visit.rs:1495` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/relay-typegen/src/visit.rs:3446— compiler/crates/relay-typegen/src/visit.rs:3446-3453 | compiler/crates/relay-typegen/src/visit.rs:3470-3477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/visit.rs:3446` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/schema-set/src/build_schema_document.rs:320— compiler/crates/schema-set/src/build_schema_document.rs:320-327 | compiler/crates/schema-set/src/build_schema_document.rs:350-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/build_schema_document.rs:320` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/schema-set/src/find_subset_violations.rs:400— compiler/crates/schema-set/src/find_subset_violations.rs:400-407 | compiler/crates/schema-set/src/find_subset_violations.rs:468-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/find_subset_violations.rs:400` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) compiler/crates/schema-set/src/set_merges.rs:240— compiler/crates/schema-set/src/set_merges.rs:240-247 | compiler/crates/schema-set/src/set_merges.rs:274-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:373— compiler/crates/schema/src/flatbuffer/wrapper.rs:373-380 | compiler/crates/schema/src/in_memory.rs:2564-2571 — before extracting anything, compare `compiler/crates/schema/src/flatbuffer/wrapper.rs` and `compiler/crates/schema/src/in_memory.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/wrapper.rs:373` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:402— compiler/crates/schema/src/flatbuffer/wrapper.rs:402-409 | compiler/crates/schema/src/in_memory.rs:2541-2548 — before extracting anything, compare `compiler/crates/schema/src/flatbuffer/wrapper.rs` and `compiler/crates/schema/src/in_memory.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/wrapper.rs:402` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/relay-transforms/src/client_normalization.rs:299— compiler/crates/relay-transforms/src/client_normalization.rs:299-306 | compiler/crates/relay-transforms/src/server_documents.rs:604-611 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) compiler/crates/relay-transforms/src/match_/match_transform.rs:638— compiler/crates/relay-transforms/src/match_/match_transform.rs:638-645 | compiler/crates/relay-transforms/src/match_/match_transform.rs:648-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/match_/match_transform.rs:638` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:202— compiler/crates/schema/src/flatbuffer/wrapper.rs:202-209 | compiler/crates/schema/src/flatbuffer/wrapper.rs:238-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/wrapper.rs:202` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/crates/graphql-syntax/src/parser.rs:968— compiler/crates/graphql-syntax/src/parser.rs:968-975 | compiler/crates/graphql-syntax/src/parser.rs:1259-1266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Hotspot: REDACTED REDACTED:484— REDACTED changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in RelayModernStore.notify at line 484. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:2507— REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in RelayReaderOptimized._traverseSelections at line 2507. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/relay-compiler/src/artifact_content/content.rs compiler/crates/relay-compiler/src/artifact_content/content.rs:282— compiler/crates/relay-compiler/src/artifact_content/content.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in relay_compiler::artifact_content::content::generate_operation at line 282. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/relay-compiler/src/artifact_content/content.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/schema/src/in_memory.rs compiler/crates/schema/src/in_memory.rs:832— compiler/crates/schema/src/in_memory.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in InMemorySchema::build_impl at line 832. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/schema/src/in_memory.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/schema-diff/src/lib.rs compiler/crates/schema-diff/src/lib.rs:418— compiler/crates/schema-diff/src/lib.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in schema_diff::diff_definitions at line 418. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/schema-diff/src/lib.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:246— REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in RelayResponseNormalizer._traverseSelections at line 246. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/relay-compiler/src/compiler_state.rs compiler/crates/relay-compiler/src/compiler_state.rs:830— compiler/crates/relay-compiler/src/compiler_state.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in CompilerState::schema_change_safety at line 830. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/relay-compiler/src/compiler_state.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/react-relay/relay-hooks/loadQuery.js packages/react-relay/relay-hooks/loadQuery.js:90— packages/react-relay/relay-hooks/loadQuery.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in loadQuery.loadQuery at line 90. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- packages/react-relay/relay-hooks/loadQuery.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/relay-compiler/src/build_project.rs compiler/crates/relay-compiler/src/build_project.rs:600— compiler/crates/relay-compiler/src/build_project.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in relay_compiler::build_project::commit_project at line 600. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/relay-compiler/src/build_project.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/relay-transforms/src/client_edges.rs compiler/crates/relay-transforms/src/client_edges.rs:1276— compiler/crates/relay-transforms/src/client_edges.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ClientEdgesTransform::transform_linked_field_impl at line 1276. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/relay-transforms/src/client_edges.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/relay-e2e-test/__tests__/fixtures-test.js packages/relay-e2e-test/__tests__/fixtures-test.js:99— packages/relay-e2e-test/__tests__/fixtures-test.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in (anonymous) at line 99. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- packages/relay-e2e-test/__tests__/fixtures-test.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/relay-lsp/src/server/lsp_state_resources.rs compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:423— compiler/crates/relay-lsp/src/server/lsp_state_resources.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in LSPStateResources::build_programs at line 423. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/relay-lsp/src/server/lsp_state_resources.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/schema-diff/src/check.rs compiler/crates/schema-diff/src/check.rs:71— compiler/crates/schema-diff/src/check.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in SchemaChange::get_safety at line 71. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/schema-diff/src/check.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/relay-runtime/store/RelayModernRecord.js packages/relay-runtime/store/RelayModernRecord.js:747— packages/relay-runtime/store/RelayModernRecord.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in RelayModernRecord.areFieldValuesEqual at line 747. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- packages/relay-runtime/store/RelayModernRecord.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/react-relay/relay-hooks/rsc/useServerFragment.js packages/react-relay/relay-hooks/rsc/useServerFragment.js:100— packages/react-relay/relay-hooks/rsc/useServerFragment.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in useServerFragment.readServerFragment at line 100. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- packages/react-relay/relay-hooks/rsc/useServerFragment.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: compiler/crates/relay-schema-generation/src/lib.rs compiler/crates/relay-schema-generation/src/lib.rs:246— compiler/crates/relay-schema-generation/src/lib.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in RelayResolverExtractor::parse_document at line 246. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- compiler/crates/relay-schema-generation/src/lib.rs`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/relay-test-utils/RelayModernMockEnvironment.js packages/relay-test-utils/RelayModernMockEnvironment.js:180— packages/relay-test-utils/RelayModernMockEnvironment.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in RelayModernMockEnvironment.createMockEnvironment at line 180. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- packages/relay-test-utils/RelayModernMockEnvironment.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/react-relay/relay-hooks/rsc/serverQuery.js packages/react-relay/relay-hooks/rsc/serverQuery.js:266— packages/react-relay/relay-hooks/rsc/serverQuery.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in serverQuery.execute at line 266. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:45:18 -08:00' --until='2026-11-13 16:45:18 -08:00' --full-history --no-merges -- packages/react-relay/relay-hooks/rsc/serverQuery.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
ClassTooLong: CodegenBuilder compiler/crates/relay-codegen/src/build_ast.rs:372— ClassTooLong — 2110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 72 methods, 2 blocks, lines 372-3439. The bar is 400 significant lines; this is 1710 over it, 5.28× 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.
ClassTooLong: Parser compiler/crates/graphql-syntax/src/parser.rs:53— ClassTooLong — 1931 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 150 methods, 2 blocks, lines 53-3150. The bar is 400 significant lines; this is 1531 over it, 4.83× 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.
ClassTooLong: Executor REDACTED:137— ClassTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 754 over it, 2.89× 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.
ClassTooLong: RelayReaderOptimized REDACTED:2033— ClassTooLong — 1147 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 747 over it, 2.87× 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.
ClassTooLong: ClientEdgesTransform compiler/crates/relay-transforms/src/client_edges.rs:372— ClassTooLong — 755 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 21 methods, 4 blocks, lines 372-1812. The bar is 400 significant lines; this is 355 over it, 1.89× 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.
ClassTooLong: RelayResolverExtractor compiler/crates/relay-schema-generation/src/lib.rs:137— ClassTooLong — 655 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 3 blocks, lines 137-1075. The bar is 400 significant lines; this is 255 over it, 1.64× 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.
ClassTooLong: MatchTransform compiler/crates/relay-transforms/src/match_/match_transform.rs:117— ClassTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 117-1024. The bar is 400 significant lines; this is 210 over it, 1.53× 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.
ClassTooLong: Config compiler/crates/relay-compiler/src/config.rs:313— ClassTooLong — 468 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 4 blocks, lines 313-1610. The bar is 400 significant lines; this is 68 over it, 1.17× 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.
ClassTooLong: RelayResolverSpreadTransform compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:107— ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 3 blocks, lines 107-1009. The bar is 400 significant lines; this is 66 over it, 1.17× 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.
ClassTooLong: FragmentResourceImpl packages/react-relay/relay-hooks/legacy/FragmentResource.js:202— ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 58 over it, 1.15× 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.
ClassTooLong: Serializer compiler/crates/schema/src/flatbuffer/serialize.rs:46— ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 30 methods, 2 blocks, lines 46-631. The bar is 400 significant lines; this is 54 over it, 1.14× 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.
ClassTooLong: ValidateSelectionConflict compiler/crates/graphql-ir-validations/src/validate_selection_conflict.rs:79— ClassTooLong — 445 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 2 blocks, lines 79-707. The bar is 400 significant lines; this is 45 over it, 1.11× 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.
ClassTooLong: LSPStateResources compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:57— ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 2 blocks, lines 57-669. The bar is 400 significant lines; this is 22 over it, 1.06× 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.
ClassTooLong: ConnectionValidation compiler/crates/relay-transforms/src/validations/validate_connections.rs:46— ClassTooLong — 421 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 3 blocks, lines 46-645. The bar is 400 significant lines; this is 21 over it, 1.05× 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.
ClassTooLong: ValidationContext compiler/crates/schema-validate/src/lib.rs:94— ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 2 blocks, lines 94-747. The bar is 400 significant lines; this is 16 over it, 1.04× 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.
ClassTooLong: ApplyFragmentArgumentsTransform compiler/crates/relay-transforms/src/apply_fragment_arguments.rs:160— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 3 blocks, lines 160-780. The bar is 400 significant lines; this is 8 over it, 1.02× 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.
ClassTooLong: Printer compiler/crates/graphql-text-printer/src/print_to_text.rs:197— ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 2 blocks, lines 197-750. The bar is 400 significant lines; this is 6 over it, 1.02× 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.
ClassTooLong: LSPState compiler/crates/relay-lsp/src/server/lsp_state.rs:175— ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 3 blocks, lines 175-759. The bar is 400 significant lines; this is 2 over it, 1.01× 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.
Skipped test: suspends then updates when the query and component load packages/react-relay/relay-hooks/__tests__/EntryPointContainer-test.js:217— Skipped — switched off by it.skip
Skipped test: warns if the entryPointReference has already been disposed packages/react-relay/relay-hooks/__tests__/EntryPointContainer-test.js:364— Skipped — switched off by it.skip
Skipped test: suspends while the query and component are pending packages/react-relay/relay-hooks/__tests__/LazyLoadEntryPointContainer_DEEPRECATED-test.js:157— Skipped — switched off by it.skip
Skipped test: suspends while the component is loading packages/react-relay/relay-hooks/__tests__/LazyLoadEntryPointContainer_DEEPRECATED-test.js:179— Skipped — switched off by it.skip
Skipped test: suspends then updates when the query and component load packages/react-relay/relay-hooks/__tests__/LazyLoadEntryPointContainer_DEEPRECATED-test.js:232— Skipped — switched off by it.skip
Skipped test: re-renders and reloads when prefetch params change packages/react-relay/relay-hooks/__tests__/LazyLoadEntryPointContainer_DEEPRECATED-test.js:364— Skipped — switched off by it.skip
Skipped test: does not suspend if pagination update is interruped before it commits (unsuspends) packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-test.js:1546— Skipped — switched off by it.skip
Skipped test: loads more items correctly after refetching packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js:1091— Skipped — switched off by xit
Skipped test: should handle errors packages/react-relay/relay-hooks/__tests__/useLazyLoadQueryNode-test.js:767— Skipped — switched off by it.skip
Skipped test: simple fetch packages/react-relay/relay-hooks/__tests__/useLazyLoadQueryNode-test.js:925— Skipped — switched off by test.skip
Skipped test: log when switching queries packages/react-relay/relay-hooks/__tests__/useLazyLoadQueryNode-test.js:1002— Skipped — switched off by test.skip
Skipped test: releases and cancels all queries if a the callback is called, the component suspends, another query is called and then the component unmounts packages/react-relay/relay-hooks/__tests__/useQueryLoader-live-query-test.js:647— Skipped — switched off by it.skip
Skipped test: releases and cancels all queries if the component suspends, another query is loaded and then the component unmounts packages/react-relay/relay-hooks/__tests__/useQueryLoader-live-query-test.js:705— Skipped — switched off by it.skip
Skipped test: releases all queries if a the callback is called, the component suspends, another query is called and then the component unmounts packages/react-relay/relay-hooks/__tests__/useQueryLoader-test.js:710— Skipped — switched off by it.skip
Skipped test: releases all queries if the component suspends, another query is loaded and then the component unmounts packages/react-relay/relay-hooks/__tests__/useQueryLoader-test.js:770— Skipped — switched off by it.skip
Skipped test: renders with the results of the new variables on success packages/react-relay/__tests__/ReactRelayPaginationContainer-WithFragmentOwnership-test.js:585— Skipped — switched off by it.skip
Skipped test: paginates with the results of new refetch/overridden variables packages/react-relay/__tests__/ReactRelayPaginationContainer-WithFragmentOwnership-test.js:847— Skipped — switched off by it.skip
Duplicated block (5 lines × 2) compiler/crates/dependency-analyzer/src/ast.rs:96— compiler/crates/dependency-analyzer/src/ast.rs:96-100 | compiler/crates/dependency-analyzer/src/ir.rs:403-407 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/dependency-analyzer/src/ast.rs:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/crates/graphql-ir/src/visitor.rs:69— compiler/crates/graphql-ir/src/visitor.rs:69-73 | compiler/crates/graphql-syntax/src/visitor.rs:109-113 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-ir/src/visitor.rs:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/graphql-ir/src/visitor.rs:74` calls `Condition`, `visit_condition` and `compiler/crates/graphql-syntax/src/visitor.rs:114` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) compiler/crates/relay-lsp/src/find_field_usages.rs:204— compiler/crates/relay-lsp/src/find_field_usages.rs:204-208 | compiler/crates/relay-lsp/src/find_field_usages.rs:219-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:292— compiler/crates/relay-typegen/src/flow.rs:292-296 | compiler/crates/relay-typegen/src/typescript.rs:335-339 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/crates/schema-set/src/find_subset_violations.rs:423— compiler/crates/schema-set/src/find_subset_violations.rs:423-427 | compiler/crates/schema-set/src/find_subset_violations.rs:487-493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/find_subset_violations.rs:423` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/crates/relay-transforms/src/client_component_boundaries.rs:243— compiler/crates/relay-transforms/src/client_component_boundaries.rs:243-247 | compiler/crates/relay-transforms/src/rsc_resolver_fields.rs:618-622 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/client_component_boundaries.rs:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/crates/relay-transforms/src/client_component_boundaries.rs:252— compiler/crates/relay-transforms/src/client_component_boundaries.rs:252-256 | compiler/crates/relay-transforms/src/rsc_resolver_fields.rs:627-631 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/client_component_boundaries.rs:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:89— compiler/crates/relay-typegen/src/flow.rs:89-93 | compiler/crates/relay-typegen/src/typescript.rs:98-102 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-typegen/src/flow.rs:85` calls `get_runtime_fragment_import` and `compiler/crates/relay-typegen/src/typescript.rs:95` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:95— compiler/crates/relay-typegen/src/flow.rs:95-99 | compiler/crates/relay-typegen/src/typescript.rs:104-108 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:101— compiler/crates/relay-typegen/src/flow.rs:101-105 | compiler/crates/relay-typegen/src/typescript.rs:110-114 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:207— compiler/crates/relay-typegen/src/flow.rs:207-211 | compiler/crates/relay-typegen/src/typescript.rs:212-216 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:213— compiler/crates/relay-typegen/src/flow.rs:213-217 | compiler/crates/relay-typegen/src/typescript.rs:218-222 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/crates/relay-typegen/src/flow.rs:326— compiler/crates/relay-typegen/src/flow.rs:326-330 | compiler/crates/relay-typegen/src/typescript.rs:380-384 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/flow.rs:326` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/crates/schema-print/src/printer.rs:274— compiler/crates/schema-print/src/printer.rs:274-278 | compiler/crates/schema-print/src/printer.rs:305-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/schema-print/src/printer.rs:310` calls `print_new_line` and `compiler/crates/schema-print/src/printer.rs:279` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) compiler/crates/graphql-ir/src/ir.rs:427— compiler/crates/graphql-ir/src/ir.rs:427-431 | compiler/crates/graphql-syntax/src/node/executable.rs:216-220 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-ir/src/ir.rs:427` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/graphql-ir/src/ir.rs:432` calls `Condition`, `write_fmt` and `compiler/crates/graphql-syntax/src/node/executable.rs:221` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) compiler/crates/schema/src/flatbuffer/serialize.rs:282— compiler/crates/schema/src/flatbuffer/serialize.rs:282-286 | compiler/crates/schema/src/flatbuffer/serialize.rs:329-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/schema/src/flatbuffer/serialize.rs:334` calls `Some`, `create_vector` and `compiler/crates/schema/src/flatbuffer/serialize.rs:287` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) compiler/crates/project-fixture/src/lib.rs:141— compiler/crates/project-fixture/src/lib.rs:141-145 | compiler/crates/project-fixture/src/lib.rs:171-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/project-fixture/src/lib.rs:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D30 · Dependency Vulnerabilities· Medium CVE · ×16
Duplicated block (6 lines × 2) compiler/crates/graphql-syntax/src/parser.rs:751— compiler/crates/graphql-syntax/src/parser.rs:751-756 | compiler/crates/graphql-syntax/src/parser.rs:786-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:183— compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:183-188 | compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:199-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:183` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&InlineFragment` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) compiler/crates/intern/src/atomic_arena.rs:233— compiler/crates/intern/src/atomic_arena.rs:233-238 | compiler/crates/intern/src/atomic_arena.rs:631-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/intern/src/atomic_arena.rs:233` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:363— compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:363-368 | compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:429-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) compiler/crates/schema-print/src/printer.rs:163— compiler/crates/schema-print/src/printer.rs:163-168 | compiler/crates/schema-print/src/printer.rs:173-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-print/src/printer.rs:163` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/crates/schema-print/src/printer.rs:260— compiler/crates/schema-print/src/printer.rs:260-265 | compiler/crates/schema-print/src/printer.rs:331-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:284— compiler/crates/schema/src/flatbuffer/wrapper.rs:284-289 | compiler/crates/schema/src/flatbuffer/wrapper.rs:332-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/schema/src/flatbuffer/wrapper.rs:338` calls `filter`, `contains` and `compiler/crates/schema/src/flatbuffer/wrapper.rs:290` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:649— compiler/crates/schema/src/flatbuffer/wrapper.rs:649-654 | compiler/crates/schema/src/flatbuffer/wrapper.rs:732-737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `ext` to `ObjectTypeExtension` in one and `InterfaceTypeExtension` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) compiler/crates/schema/src/in_memory.rs:1088— compiler/crates/schema/src/in_memory.rs:1088-1093 | compiler/crates/schema/src/in_memory.rs:1110-1115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/in_memory.rs:1088` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/crates/graphql-ir/src/visitor.rs:29— compiler/crates/graphql-ir/src/visitor.rs:29-34 | compiler/crates/graphql-syntax/src/visitor.rs:57-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) compiler/crates/relay-typegen/src/flow.rs:311— compiler/crates/relay-typegen/src/flow.rs:311-316 | compiler/crates/relay-typegen/src/typescript.rs:350-355 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) compiler/crates/schema/src/definitions.rs:444— compiler/crates/schema/src/definitions.rs:444-449 | compiler/crates/schema/src/definitions/interface.rs:42-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) compiler/crates/relay-transforms/src/skip_client_extensions.rs:30— compiler/crates/relay-transforms/src/skip_client_extensions.rs:30-35 | compiler/crates/relay-transforms/src/skip_updatable_queries.rs:15-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) compiler/crates/relay-transforms/src/server_documents.rs:355— compiler/crates/relay-transforms/src/server_documents.rs:355-360 | compiler/crates/relay-transforms/src/server_documents.rs:386-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/server_documents.rs:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/crates/schema-set/src/print_schema_set.rs:463— compiler/crates/schema-set/src/print_schema_set.rs:463-468 | compiler/crates/schema-set/src/print_schema_set.rs:472-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Weak hash algorithm compiler/crates/common/src/rollout.rs:58— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/common/src/rollout.rs:80— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/docblock-shared/src/resolver_source_hash.rs:44— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-codegen/src/build_ast.rs:3610— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:167— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:314— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:361— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/build_project/build_ir.rs:176— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/build_project/persist_operations.rs:181— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/config.rs:188— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/config.rs:268— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/config.rs:659— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/operation_persister/local_persister.rs:61— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/relay-compiler/src/operation_persister/local_persister.rs:66— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/crates/signedsource/src/lib.rs:22— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Duplicated block (12 lines × 2) compiler/crates/relay-bin/src/main.rs:712— compiler/crates/relay-bin/src/main.rs:712-723 | compiler/crates/relay-bin/src/main.rs:904-915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:2782— compiler/crates/relay-codegen/src/build_ast.rs:2782-2793 | compiler/crates/relay-codegen/src/build_ast.rs:2872-2883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) compiler/crates/relay-transforms/src/declarative_connection.rs:213— compiler/crates/relay-transforms/src/declarative_connection.rs:213-224 | compiler/crates/relay-transforms/src/declarative_connection.rs:278-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/declarative_connection.rs:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:77— compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:77-88 | compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:106-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:77` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&ScalarField` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) compiler/crates/relay-transforms/src/server_documents.rs:189— compiler/crates/relay-transforms/src/server_documents.rs:189-200 | compiler/crates/relay-transforms/src/server_documents.rs:236-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/server_documents.rs:189` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:238— compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:238-249 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:289-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) compiler/crates/relay-typegen/src/writer.rs:446— compiler/crates/relay-typegen/src/writer.rs:446-457 | compiler/crates/relay-typegen/src/writer.rs:546-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) compiler/crates/schema-set/src/set_exclude.rs:329— compiler/crates/schema-set/src/set_exclude.rs:329-340 | compiler/crates/schema-set/src/set_exclude.rs:354-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:670— compiler/crates/schema/src/flatbuffer/wrapper.rs:670-681 | compiler/crates/schema/src/flatbuffer/wrapper.rs:753-764 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/wrapper.rs:670` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `ext` to `ObjectTypeExtension` in one and `InterfaceTypeExtension` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) compiler/crates/relay-transforms/src/client_extensions.rs:274— compiler/crates/relay-transforms/src/client_extensions.rs:274-285 | compiler/crates/relay-transforms/src/skip_client_extensions.rs:128-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&'a LinkedField` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) compiler/crates/relay-typegen/src/flow.rs:181— compiler/crates/relay-typegen/src/flow.rs:181-192 | compiler/crates/relay-typegen/src/typescript.rs:199-210 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) compiler/crates/schema-set/src/set_merges.rs:362— compiler/crates/schema-set/src/set_merges.rs:362-373 | compiler/crates/schema-set/src/set_merges.rs:436-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/set_merges.rs:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) compiler/crates/relay-typegen/src/flow.rs:42— compiler/crates/relay-typegen/src/flow.rs:42-53 | compiler/crates/relay-typegen/src/typescript.rs:57-68 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) compiler/crates/graphql-ir/src/node_identifier.rs:79— compiler/crates/graphql-ir/src/node_identifier.rs:79-85 | compiler/crates/graphql-ir/src/node_identifier.rs:125-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) compiler/crates/graphql-ir/src/transform.rs:144— compiler/crates/graphql-ir/src/transform.rs:144-150 | compiler/crates/graphql-ir/src/transform.rs:185-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-ir/src/transform.rs:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/crates/graphql-syntax/src/parser.rs:1060— compiler/crates/graphql-syntax/src/parser.rs:1060-1066 | compiler/crates/graphql-syntax/src/parser.rs:1106-1112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-syntax/src/parser.rs:1060` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/crates/relay-compiler/src/compiler_state.rs:606— compiler/crates/relay-compiler/src/compiler_state.rs:606-612 | compiler/crates/relay-compiler/src/compiler_state.rs:993-999 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/compiler_state.rs:606` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) compiler/crates/relay-transforms/src/defer_stream/directives.rs:23— compiler/crates/relay-transforms/src/defer_stream/directives.rs:23-29 | compiler/crates/relay-transforms/src/defer_stream/directives.rs:53-59 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/defer_stream/directives.rs:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/crates/relay-transforms/src/generate_id_field.rs:71— compiler/crates/relay-transforms/src/generate_id_field.rs:71-77 | compiler/crates/relay-transforms/src/generate_id_field.rs:83-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/generate_id_field.rs:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:441— compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:441-447 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:450-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) compiler/crates/schema-set/src/set_exclude.rs:254— compiler/crates/schema-set/src/set_exclude.rs:254-260 | compiler/crates/schema-set/src/set_exclude.rs:397-403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/set_exclude.rs:254` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/schema-set/src/set_exclude.rs:404` calls `exclude_argument_definitions` and `compiler/crates/schema-set/src/set_exclude.rs:261` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) compiler/crates/schema-set/src/set_merges.rs:354— compiler/crates/schema-set/src/set_merges.rs:354-360 | compiler/crates/schema-set/src/set_merges.rs:428-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/set_merges.rs:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/crates/graphql-ir/src/transform.rs:452— compiler/crates/graphql-ir/src/transform.rs:452-458 | compiler/crates/relay-transforms/src/apply_fragment_arguments.rs:459-465 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-ir/src/transform.rs:452` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/crates/schema-set/src/set_type_reference.rs:38— compiler/crates/schema-set/src/set_type_reference.rs:38-44 | compiler/crates/schema/src/definitions.rs:242-248 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) compiler/crates/schema-set/src/set_type_reference.rs:113— compiler/crates/schema-set/src/set_type_reference.rs:113-119 | compiler/crates/schema/src/definitions.rs:308-314 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) compiler/crates/relay-typegen/src/flow.rs:276— compiler/crates/relay-typegen/src/flow.rs:276-282 | compiler/crates/relay-typegen/src/typescript.rs:318-324 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/flow.rs:276` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/relay-typegen/src/typescript.rs:327` calls `write_indentation` and `compiler/crates/relay-typegen/src/flow.rs:285` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
relay_compiler::graphql_asts::parse_pending_graphql_source_and_collect_removed_definitions (cognitive 60) compiler/crates/relay-compiler/src/graphql_asts.rs:303— relay_compiler::graphql_asts::parse_pending_graphql_source_and_collect_removed_definitions has cognitive complexity 60 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 5 (12 pts), match/switch 3 (12 pts), boolean chains 1 (nesting depth added 41). 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.
relay_compiler::subschema_extraction::hydrate_output_types (cognitive 59) compiler/crates/relay-compiler/src/subschema_extraction.rs:279— relay_compiler::subschema_extraction::hydrate_output_types has cognitive complexity 59 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 8 (22 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 39). 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.
relay_compiler::build_project::commit_project (cognitive 45) compiler/crates/relay-compiler/src/build_project.rs:600— relay_compiler::build_project::commit_project has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 6 (14 pts), match/switch 3 (4 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.
relay_compiler::artifact_content::content::generate_operation (cognitive 33) compiler/crates/relay-compiler/src/artifact_content/content.rs:282— relay_compiler::artifact_content::content::generate_operation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (25 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (2 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.
relay_compiler::server_daemon::socket::start_server (cognitive 26) compiler/crates/relay-compiler/src/server_daemon/socket.rs:69— relay_compiler::server_daemon::socket::start_server has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (8 pts), loops 2 (3 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.
relay_compiler::build_project::build_programs (cognitive 25) compiler/crates/relay-compiler/src/build_project.rs:319— relay_compiler::build_project::build_programs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 4 (7 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.
relay_compiler::build_project::build_raw_program_chunks (cognitive 23) compiler/crates/relay-compiler/src/build_project.rs:166— relay_compiler::build_project::build_raw_program_chunks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (9 pts), match/switch 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.
relay_compiler::build_project::generate_artifacts::generate_artifacts (cognitive 23) compiler/crates/relay-compiler/src/build_project/generate_artifacts.rs:52— relay_compiler::build_project::generate_artifacts::generate_artifacts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (22 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
relay_compiler::compiler::build_projects (cognitive 20) compiler/crates/relay-compiler/src/compiler.rs:646— relay_compiler::compiler::build_projects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 3 (7 pts), loops 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — 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.
relay_compiler::compiler::get_removed_docblock_artifact_source_keys (cognitive 18) compiler/crates/relay-compiler/src/compiler.rs:897— relay_compiler::compiler::get_removed_docblock_artifact_source_keys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (9 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.
relay_compiler::build_project::persist_operations::persist_operations (cognitive 17) compiler/crates/relay-compiler/src/build_project/persist_operations.rs:42— relay_compiler::build_project::persist_operations::persist_operations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
relay_compiler::build_project::project_asts::find_changed_names (cognitive 16) compiler/crates/relay-compiler/src/build_project/project_asts.rs:154— relay_compiler::build_project::project_asts::find_changed_names has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 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.
Duplicated block (9 lines × 2) compiler/crates/graphql-ir/src/transform.rs:492— compiler/crates/graphql-ir/src/transform.rs:492-500 | compiler/crates/graphql-ir/src/transform.rs:541-549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:191— compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:191-199 | compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:207-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `&LinkedField` in one and `&ScalarField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:201` calls `print_selections` and `compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:217` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:1051— compiler/crates/relay-codegen/src/build_ast.rs:1051-1059 | compiler/crates/relay-codegen/src/build_ast.rs:1630-1642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-codegen/src/build_ast.rs:1051` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) compiler/crates/relay-lsp/src/completion.rs:1038— compiler/crates/relay-lsp/src/completion.rs:1038-1046 | compiler/crates/relay-lsp/src/completion.rs:1052-1060 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/completion.rs:1038` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-lsp/src/completion.rs:1037` calls `chain`, `iter` and `compiler/crates/relay-lsp/src/completion.rs:1051` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) compiler/crates/relay-transforms/src/generate_relay_resolvers_model_fragments.rs:81— compiler/crates/relay-transforms/src/generate_relay_resolvers_model_fragments.rs:81-89 | compiler/crates/relay-transforms/src/generate_relay_resolvers_model_fragments.rs:113-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/generate_relay_resolvers_model_fragments.rs:81` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:57— compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:57-65 | compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:101-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:263— compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:263-271 | compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:301-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) compiler/crates/relay-transforms/src/inline_fragments.rs:342— compiler/crates/relay-transforms/src/inline_fragments.rs:342-350 | compiler/crates/relay-transforms/src/inline_fragments.rs:410-418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/inline_fragments.rs:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) compiler/crates/relay-typegen/src/flow.rs:373— compiler/crates/relay-typegen/src/flow.rs:373-381 | compiler/crates/relay-typegen/src/typescript.rs:392-400 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) compiler/crates/schema-print/src/printer.rs:225— compiler/crates/schema-print/src/printer.rs:225-233 | compiler/crates/schema-print/src/printer.rs:246-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-print/src/printer.rs:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/schema-print/src/printer.rs:224` calls `update_writer_index_for_field_start` and `compiler/crates/schema-print/src/printer.rs:245` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) compiler/crates/graphql-syntax/src/parser.rs:1184— compiler/crates/graphql-syntax/src/parser.rs:1184-1192 | compiler/crates/graphql-syntax/src/parser.rs:1378-1386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) compiler/crates/schema-set/src/find_subset_violations.rs:778— compiler/crates/schema-set/src/find_subset_violations.rs:778-786 | compiler/crates/schema-set/src/set_merges.rs:752-760 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
TooManyMethods: Parser compiler/crates/graphql-syntax/src/parser.rs:53— TooManyMethods — 150 methods. The bar is 30 methods; this is 120 over it, 5.00× 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.
TooManyMethods: InMemorySchema compiler/crates/schema/src/in_memory.rs:47— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× 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.
TooManyMethods: CodegenBuilder compiler/crates/relay-codegen/src/build_ast.rs:372— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× 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.
TooManyMethods: SDLSchema compiler/crates/schema/src/schema.rs:61— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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.
TooManyMethods: SchemaSet compiler/crates/schema-set/src/schema_set.rs:76— TooManyMethods — 41 methods, declared across 4 files: src/schema_set_collector.rs (19), src/schema_set.rs (18), src/print_schema_set.rs (3), src/set_remove_defined_references.rs (1). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
TooManyMethods: FlatBufferSchema compiler/crates/schema/src/flatbuffer.rs:50— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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.
TooManyMethods: Executor REDACTED:137— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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.
TooManyMethods: RelayModernStore REDACTED:95— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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.
TooManyMethods: Printer compiler/crates/schema-print/src/printer.rs:23— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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.
TooManyMethods: Printer compiler/crates/graphql-text-printer/src/print_to_text.rs:197— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
TooManyMethods: RelayReaderOptimized REDACTED:2033— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
Boundary violation [package:relative-cross-package] REDACTED:14— REDACTED:14 reaches into another package with a relative path (../relay-runtime/network/RelayObservable) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:13— packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:13 reaches into another package with a relative path (../../relay-runtime/util/RelayRuntimeTypes) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/react-relay/relay-hooks/loadQuery.js:14— packages/react-relay/relay-hooks/loadQuery.js:14 reaches into another package with a relative path (../../relay-runtime/network/RelayNetworkTypes) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:14— packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:14 reaches into another package with a relative path (../../relay-runtime/network/RelayNetworkTypes) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/react-relay/relay-hooks/prepareEntryPoint_DEPRECATED.js:13— packages/react-relay/relay-hooks/prepareEntryPoint_DEPRECATED.js:13 reaches into another package with a relative path (../../relay-runtime/util/RelayRuntimeTypes) — import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:17— packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:17 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/preloadQuery_DEPRECATED) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:18— packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:18 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/RelayEnvironmentProvider) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:19— packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:19 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/useFragment) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:20— packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:20 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/useLazyLoadQuery) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:21— packages/relay-test-utils/__tests__/RelayMockEnvironment-test.js:21 reaches past another workspace package's public entry into its internals with a relative path (../../react-relay/relay-hooks/usePreloadedQuery) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/relay-test-utils/__tests__/RelayResolverTestUtils-test.js:18— packages/relay-test-utils/__tests__/RelayResolverTestUtils-test.js:18 reaches past another workspace package's public entry into its internals with a relative path (../../relay-runtime/store/ResolverFragments) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Duplicated block (11 lines × 2) compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:210— compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:210-220 | compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:226-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&ScalarField` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) compiler/crates/relay-docblock/src/ir.rs:408— compiler/crates/relay-docblock/src/ir.rs:408-418 | compiler/crates/relay-docblock/src/ir.rs:1208-1218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-docblock/src/ir.rs:408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) compiler/crates/relay-lsp/src/docblock_resolution_info.rs:78— compiler/crates/relay-lsp/src/docblock_resolution_info.rs:78-88 | compiler/crates/relay-lsp/src/docblock_resolution_info.rs:90-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) compiler/crates/relay-transforms/src/apply_transforms.rs:252— compiler/crates/relay-transforms/src/apply_transforms.rs:252-262 | compiler/crates/relay-transforms/src/apply_transforms.rs:839-849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:295— compiler/crates/schema/src/flatbuffer/wrapper.rs:295-305 | compiler/crates/schema/src/flatbuffer/wrapper.rs:313-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) compiler/crates/relay-typegen/src/writer.rs:150— compiler/crates/relay-typegen/src/writer.rs:150-160 | compiler/crates/relay-typegen/src/writer.rs:208-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:389— compiler/crates/schema/src/flatbuffer/wrapper.rs:389-399 | compiler/crates/schema/src/in_memory.rs:2527-2537 — before extracting anything, compare `compiler/crates/schema/src/flatbuffer/wrapper.rs` and `compiler/crates/schema/src/in_memory.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/wrapper.rs:389` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) compiler/crates/relay-lsp/src/goto_definition.rs:247— compiler/crates/relay-lsp/src/goto_definition.rs:247-257 | compiler/crates/relay-lsp/src/goto_definition.rs:274-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) compiler/crates/relay-transforms/src/skip_unreachable_node.rs:117— compiler/crates/relay-transforms/src/skip_unreachable_node.rs:117-127 | compiler/crates/relay-transforms/src/skip_unreachable_node.rs:152-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) compiler/crates/relay-lsp/src/server/lsp_state.rs:251— compiler/crates/relay-lsp/src/server/lsp_state.rs:251-261 | compiler/crates/relay-lsp/src/server/lsp_state.rs:355-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/server/lsp_state.rs:251` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) compiler/crates/graphql-syntax/src/node/type_system.rs:827— compiler/crates/graphql-syntax/src/node/type_system.rs:827-836 | compiler/crates/graphql-syntax/src/node/type_system.rs:851-860 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-syntax/src/node/type_system.rs:827` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:171— compiler/crates/relay-compiler/src/artifact_content/content.rs:171-180 | compiler/crates/relay-compiler/src/artifact_content/content.rs:313-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:425— compiler/crates/relay-compiler/src/artifact_content/content.rs:425-436 | compiler/crates/relay-compiler/src/artifact_content/content.rs:1168-1177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:425` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:105— compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:105-114 | compiler/crates/relay-compiler/src/build_project/artifact_writer.rs:208-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) compiler/crates/relay-transforms/src/flatten.rs:346— compiler/crates/relay-transforms/src/flatten.rs:346-355 | compiler/crates/relay-transforms/src/flatten.rs:512-521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/flatten.rs:346` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:340— compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:340-349 | compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:406-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:344— compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:344-353 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:368-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:344` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:545— compiler/crates/schema/src/flatbuffer/wrapper.rs:545-554 | compiler/crates/schema/src/flatbuffer/wrapper.rs:579-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) compiler/crates/relay-compiler/src/config.rs:714— compiler/crates/relay-compiler/src/config.rs:714-723 | compiler/crates/relay-compiler/src/config.rs:727-736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/config.rs:714` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/crates/fixture-tests-macros/src/lib.rs:245— compiler/crates/fixture-tests-macros/src/lib.rs:245-254 | compiler/crates/fixture-tests/src/main.rs:236-245 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
relay_typegen::visit::make_prop (cognitive 48) compiler/crates/relay-typegen/src/visit.rs:2087— relay_typegen::visit::make_prop has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (31 pts), match/switch 5 (15 pts), boolean chains 2 (nesting depth added 26). 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.
relay_typegen::visit::raw_response_selections_to_babel (cognitive 42) compiler/crates/relay-typegen/src/visit.rs:1771— relay_typegen::visit::raw_response_selections_to_babel has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 5 (12 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
relay_typegen::write::write_fragment_type_exports_section (cognitive 38) compiler/crates/relay-typegen/src/write.rs:714— relay_typegen::write::write_fragment_type_exports_section has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (26 pts), match/switch 3 (7 pts), loops 1 (3 pts), boolean chains 2 (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.
relay_typegen::visit::relay_resolver_field_type (cognitive 24) compiler/crates/relay-typegen/src/visit.rs:821— relay_typegen::visit::relay_resolver_field_type has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
relay_typegen::visit::visit_inline_fragment (cognitive 23) compiler/crates/relay-typegen/src/visit.rs:1028— relay_typegen::visit::visit_inline_fragment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
relay_typegen::visit::raw_response_visit_inline_fragment (cognitive 20) compiler/crates/relay-typegen/src/visit.rs:1161— relay_typegen::visit::raw_response_visit_inline_fragment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (8 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.
relay_typegen::visit::group_refs (cognitive 17) compiler/crates/relay-typegen/src/visit.rs:3069— relay_typegen::visit::group_refs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, 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.
relay_typegen::visit::raw_response_visit_selections (cognitive 16) compiler/crates/relay-typegen/src/visit.rs:2572— relay_typegen::visit::raw_response_visit_selections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (4 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.
relay_typegen::visit::merge_selection (cognitive 16) compiler/crates/relay-typegen/src/visit.rs:3017— relay_typegen::visit::merge_selection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (17 lines × 2) compiler/crates/docblock-shared/src/lib.rs:47— compiler/crates/docblock-shared/src/lib.rs:47-63 | compiler/crates/extract-graphql/src/lib.rs:101-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 2) compiler/crates/graphql-ir/src/transform.rs:353— compiler/crates/graphql-ir/src/transform.rs:353-369 | compiler/crates/relay-transforms/src/fragment_alias_directive.rs:300-316 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-ir/src/transform.rs:353` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `condition` to `&'a Condition` in one and `&Condition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:145— compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:145-161 | compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:277-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:145` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) compiler/crates/relay-compiler/src/build_project.rs:404— compiler/crates/relay-compiler/src/build_project.rs:404-420 | compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:496-512 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (17 lines × 2) compiler/crates/relay-lsp/src/completion.rs:910— compiler/crates/relay-lsp/src/completion.rs:910-926 | compiler/crates/relay-lsp/src/completion.rs:950-966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) compiler/crates/relay-typegen/src/write.rs:1298— compiler/crates/relay-typegen/src/write.rs:1298-1314 | compiler/crates/relay-typegen/src/write.rs:1397-1413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/write.rs:1298` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) compiler/crates/relay-typegen/src/write.rs:1335— compiler/crates/relay-typegen/src/write.rs:1335-1351 | compiler/crates/relay-typegen/src/write.rs:1435-1451 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/write.rs:1335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-typegen/src/write.rs:1434` calls `lookup` and `compiler/crates/relay-typegen/src/write.rs:1334` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 2) compiler/crates/schema-set/src/schema_set.rs:376— compiler/crates/schema-set/src/schema_set.rs:376-392 | compiler/crates/schema-set/src/schema_set.rs:410-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/schema_set.rs:376` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) compiler/crates/relay-lsp/src/code_action.rs:202— compiler/crates/relay-lsp/src/code_action.rs:202-220 | compiler/crates/relay-lsp/src/code_action.rs:245-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/code_action.rs:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×8
Edited copy of a member (16 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:471— compiler/crates/schema/src/flatbuffer/wrapper.rs:471-486 | compiler/crates/schema/src/in_memory.rs:2374-2395 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/schema-set/src/merge_sdl_document.rs:367— compiler/crates/schema-set/src/merge_sdl_document.rs:367-382 | compiler/crates/schema-set/src/merge_sdl_document.rs:428-446 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/schema-diff/src/lib.rs:301— compiler/crates/schema-diff/src/lib.rs:301-318 | compiler/crates/schema-diff/src/lib.rs:321-336 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/errors/src/error_combinators.rs:117— compiler/crates/errors/src/error_combinators.rs:117-132 | compiler/crates/errors/src/error_combinators.rs:144-159 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/graphql-syntax/src/node/type_system.rs:821— compiler/crates/graphql-syntax/src/node/type_system.rs:821-836 | compiler/crates/graphql-syntax/src/node/type_system.rs:845-860 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/relay-transforms/src/relay_resolvers/resolver_utils.rs:81— compiler/crates/relay-transforms/src/relay_resolvers/resolver_utils.rs:81-96 | compiler/crates/relay-transforms/src/validations/validate_module_names/extract_module_name.rs:44-64 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/relay-transforms/src/defer_stream.rs:322— compiler/crates/relay-transforms/src/defer_stream.rs:322-337 | compiler/crates/relay-transforms/src/defer_stream.rs:356-371 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:385— compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:385-400 | compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:402-417 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
relay_compiler::artifact_content::content::generate_operation (cyclomatic 25) compiler/crates/relay-compiler/src/artifact_content/content.rs:282— relay_compiler::artifact_content::content::generate_operation has cyclomatic complexity 25 (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.
relay_compiler::build_project::commit_project (cyclomatic 23) compiler/crates/relay-compiler/src/build_project.rs:600— relay_compiler::build_project::commit_project 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.
relay_compiler::subschema_extraction::hydrate_output_types (cyclomatic 23) compiler/crates/relay-compiler/src/subschema_extraction.rs:279— relay_compiler::subschema_extraction::hydrate_output_types 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.
relay_compiler::build_project::build_programs (cyclomatic 18) compiler/crates/relay-compiler/src/build_project.rs:319— relay_compiler::build_project::build_programs 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.
relay_compiler::server_daemon::socket::start_server (cyclomatic 18) compiler/crates/relay-compiler/src/server_daemon/socket.rs:69— relay_compiler::server_daemon::socket::start_server 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.
relay_compiler::graphql_asts::parse_pending_graphql_source_and_collect_removed_definitions (cyclomatic 17) compiler/crates/relay-compiler/src/graphql_asts.rs:303— relay_compiler::graphql_asts::parse_pending_graphql_source_and_collect_removed_definitions 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.
relay_compiler::compiler::build_projects (cyclomatic 16) compiler/crates/relay-compiler/src/compiler.rs:646— relay_compiler::compiler::build_projects 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.
CodegenBuilder::build_inline_fragment (cognitive 49) compiler/crates/relay-codegen/src/build_ast.rs:2725— CodegenBuilder::build_inline_fragment has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (43 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CodegenBuilder::build_reader_client_edge (cognitive 34) compiler/crates/relay-codegen/src/build_ast.rs:2580— CodegenBuilder::build_reader_client_edge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 3 (5 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.
CodegenBuilder::build_operation (cognitive 28) compiler/crates/relay-codegen/src/build_ast.rs:455— CodegenBuilder::build_operation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodegenBuilder::build_reader_relay_resolver (cognitive 24) compiler/crates/relay-codegen/src/build_ast.rs:2119— CodegenBuilder::build_reader_relay_resolver has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
CodegenBuilder::build_fragment_metadata (cognitive 19) compiler/crates/relay-codegen/src/build_ast.rs:716— CodegenBuilder::build_fragment_metadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
CodegenBuilder::build_selections_from_selection (cognitive 17) compiler/crates/relay-codegen/src/build_ast.rs:935— CodegenBuilder::build_selections_from_selection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CodegenBuilder::build_module_import_selections (cognitive 16) compiler/crates/relay-codegen/src/build_ast.rs:3172— CodegenBuilder::build_module_import_selections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, match/switch 3 (5 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.
Change coupling: useEntryPointLoader.js ↔ useQueryLoader.js packages/react-relay/relay-hooks/useEntryPointLoader.js:1— `packages/react-relay/relay-hooks/useEntryPointLoader.js` and `packages/react-relay/relay-hooks/useQueryLoader.js` change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `8c30f80f` A couple grammar fixes (#5008); `1fb4eee8` Add type Annotations to the source of sync'ed relay code [4/n]; `bc2aa934` Revert D70524672 — run `git show` on any of them.
Change coupling: flow.rs ↔ typescript.rs compiler/crates/relay-typegen/src/flow.rs:1— `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` change together 71% of the time (25 of the 35 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `0b4433d0` Make GenericType accept more than one type argument; `00eeeb48` Resolvers that return @weak objects; `5892beae` Make everything sorted by default — run `git show` on any of them.
Change coupling: docblocks.rs ↔ utils.rs compiler/crates/relay-compiler/src/docblocks.rs:1— `compiler/crates/relay-compiler/src/docblocks.rs` and `compiler/crates/relay-lsp/src/utils.rs` change together 70% of the time (16 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `b645a05d` Small ownership change; `e8f5e8fe` remove project config legacy resolver syntax feature flag; `b26f3bef` Remove @outputType feature flag — run `git show` on any of them.
Change coupling: docblocks.rs ↔ lsp_state.rs compiler/crates/relay-compiler/src/docblocks.rs:1— `compiler/crates/relay-compiler/src/docblocks.rs` and `compiler/crates/relay-lsp/src/server/lsp_state.rs` change together 70% of the time (16 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `b645a05d` Small ownership change; `e8f5e8fe` remove project config legacy resolver syntax feature flag; `b26f3bef` Remove @outputType feature flag — run `git show` on any of them.
Change coupling: RelayRecordSourceProxy.js ↔ RelayRecordSourceSelectorProxy.js packages/relay-runtime/mutations/RelayRecordSourceProxy.js:1— `packages/relay-runtime/mutations/RelayRecordSourceProxy.js` and `packages/relay-runtime/mutations/RelayRecordSourceSelectorProxy.js` change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `b5387f72` xplat/js/RKJSModules/Libraries/Relay/oss/relay-runtime/mutations/read…; `0c57cd2f` Rename readUpdatableQuery_EXPERIMENTAL to readUpdatableQuery; `8b9470c5` add readUpdatableQuery method without removing readUpdatableQuery_EXP… — run `git show` on any of them.
Change coupling: validate.rs ↔ validations.rs compiler/crates/relay-compiler/src/build_project/validate.rs:1— `compiler/crates/relay-compiler/src/build_project/validate.rs` and `compiler/crates/relay-transforms/src/validations.rs` change together 50% of the time (14 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `207b6d0f` Emit disallow_required_on_non_null_field as compiler warnings; `572a90f6` Validate that client schema extensions within @throwOnFieldError have…; `ad262841` Make required-on-non-null-within-throwOnFieldError an LSP warning — run `git show` on any of them.
Change coupling: build_schema.rs ↔ lib.rs compiler/crates/relay-compiler/src/build_project/build_schema.rs:1— `compiler/crates/relay-compiler/src/build_project/build_schema.rs` and `compiler/crates/relay-test-schema/src/lib.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `30321ada` Rename build_schema_with_extensions to build_schema_with_extensions_p…; `d2718289` Transform semanticNonNull into regular non-nullable at schema build time; `d80203a8` Add locations to server sdls in build_schema_with_extensions (#3860) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×7
Edited copy of a member (18 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:363— compiler/crates/schema/src/flatbuffer/wrapper.rs:363-380 | compiler/crates/schema/src/in_memory.rs:2554-2571 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:293— compiler/crates/schema/src/flatbuffer/wrapper.rs:293-310 | compiler/crates/schema/src/flatbuffer/wrapper.rs:312-329 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs:169— compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs:169-186 | compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:341-367 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:748— compiler/crates/graphql-syntax/src/parser.rs:748-765 | compiler/crates/graphql-syntax/src/parser.rs:783-800 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/crates/relay-lsp/src/goto_definition.rs:242— compiler/crates/relay-lsp/src/goto_definition.rs:242-259 | compiler/crates/relay-lsp/src/goto_definition.rs:266-286 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:700— compiler/crates/graphql-syntax/src/parser.rs:700-717 | compiler/crates/graphql-syntax/src/parser.rs:722-739 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/crates/relay-codegen/src/printer.rs:157— compiler/crates/relay-codegen/src/printer.rs:157-178 | compiler/crates/relay-codegen/src/printer.rs:249-266 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×7
Edited copy of a member (11 corresponding lines) compiler/crates/relay-transforms/src/apply_fragment_arguments.rs:731— compiler/crates/relay-transforms/src/apply_fragment_arguments.rs:731-743 | compiler/crates/relay-transforms/src/skip_unreachable_node.rs:293-303 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:69— compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:69-81 | compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:178-188 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) compiler/crates/relay-transforms/src/exec_time_variable.rs:220— compiler/crates/relay-transforms/src/exec_time_variable.rs:220-237 | compiler/crates/relay-transforms/src/exec_time_variable.rs:241-251 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) compiler/crates/schema/src/flatbuffer/serialize.rs:548— compiler/crates/schema/src/flatbuffer/serialize.rs:548-558 | compiler/crates/schema/src/flatbuffer/serialize.rs:563-573 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:893— compiler/crates/graphql-syntax/src/parser.rs:893-903 | compiler/crates/graphql-syntax/src/parser.rs:1706-1717 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) compiler/crates/schema-set/src/set_merges.rs:680— compiler/crates/schema-set/src/set_merges.rs:680-690 | compiler/crates/schema-set/src/set_merges.rs:739-749 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) compiler/crates/relay-transforms/src/catch_directive.rs:267— compiler/crates/relay-transforms/src/catch_directive.rs:267-277 | compiler/crates/relay-transforms/src/required_directive.rs:574-585 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (16 lines × 2) compiler/crates/graphql-syntax/src/parser.rs:1506— compiler/crates/graphql-syntax/src/parser.rs:1506-1521 | compiler/crates/graphql-syntax/src/parser.rs:1538-1553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (16 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:264— compiler/crates/relay-compiler/src/artifact_content/content.rs:264-279 | compiler/crates/relay-compiler/src/artifact_content/content.rs:533-548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:264` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:290— compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:290-305 | compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:308-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) compiler/crates/relay-transforms/src/transform_connections.rs:556— compiler/crates/relay-transforms/src/transform_connections.rs:556-571 | compiler/crates/relay-transforms/src/transform_connections.rs:584-599 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/transform_connections.rs:556` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) compiler/crates/schema-set/src/find_subset_violations.rs:333— compiler/crates/schema-set/src/find_subset_violations.rs:333-348 | compiler/crates/schema-set/src/find_subset_violations.rs:493-508 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/find_subset_violations.rs:333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) compiler/crates/schema/src/flatbuffer/serialize.rs:265— compiler/crates/schema/src/flatbuffer/serialize.rs:265-280 | compiler/crates/schema/src/flatbuffer/serialize.rs:299-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/serialize.rs:265` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) compiler/crates/schema-set/src/ir_collector.rs:143— compiler/crates/schema-set/src/ir_collector.rs:143-158 | compiler/crates/schema-set/src/ir_collector.rs:171-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/ir_collector.rs:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:377— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:377-391 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:398-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:377` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:454— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:454-468 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:475-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:454` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) compiler/crates/relay-lsp/src/completion.rs:958— compiler/crates/relay-lsp/src/completion.rs:958-972 | compiler/crates/relay-lsp/src/completion.rs:1009-1023 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/completion.rs:958` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) compiler/crates/relay-typegen/src/flow.rs:260— compiler/crates/relay-typegen/src/flow.rs:260-274 | compiler/crates/relay-typegen/src/typescript.rs:293-307 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) compiler/crates/relay-typegen/src/flow.rs:356— compiler/crates/relay-typegen/src/flow.rs:356-370 | compiler/crates/relay-typegen/src/typescript.rs:420-434 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/flow.rs:356` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) compiler/crates/schema/src/in_memory.rs:1872— compiler/crates/schema/src/in_memory.rs:1872-1886 | compiler/crates/schema/src/in_memory.rs:1908-1922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) compiler/crates/project-fixture/src/lib.rs:151— compiler/crates/project-fixture/src/lib.rs:151-165 | compiler/crates/project-fixture/src/lib.rs:175-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/project-fixture/src/lib.rs:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) compiler/crates/relay-lsp/src/completion.rs:918— compiler/crates/relay-lsp/src/completion.rs:918-931 | compiler/crates/relay-lsp/src/completion.rs:1207-1220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/completion.rs:918` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:336— compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:336-349 | compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:357-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) compiler/crates/relay-typegen/src/writer.rs:113— compiler/crates/relay-typegen/src/writer.rs:113-126 | compiler/crates/relay-typegen/src/writer.rs:183-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) compiler/crates/schema-set/src/from_schema.rs:273— compiler/crates/schema-set/src/from_schema.rs:273-286 | compiler/crates/schema-set/src/from_schema.rs:305-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/from_schema.rs:273` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) compiler/crates/schema-set/src/from_schema.rs:512— compiler/crates/schema-set/src/from_schema.rs:512-525 | compiler/crates/schema-set/src/schema_set_collector.rs:954-967 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/from_schema.rs:512` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) compiler/crates/schema/src/graphql_schema.rs:140— compiler/crates/schema/src/graphql_schema.rs:140-153 | compiler/crates/schema/src/graphql_schema.rs:161-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/graphql_schema.rs:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) compiler/crates/relay-compiler/src/status_reporter.rs:620— compiler/crates/relay-compiler/src/status_reporter.rs:620-633 | compiler/crates/relay-compiler/src/status_reporter.rs:647-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/status_reporter.rs:620` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×6
Edited copy of a member (21 corresponding lines) compiler/crates/schema/src/graphql_schema.rs:84— compiler/crates/schema/src/graphql_schema.rs:84-107 | compiler/crates/schema/src/graphql_schema.rs:113-133 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) compiler/crates/relay-transforms/src/client_implementor_cases.rs:874— compiler/crates/relay-transforms/src/client_implementor_cases.rs:874-894 | compiler/crates/relay-transforms/src/client_implementor_cases.rs:896-922 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:142— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:142-162 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:737-757 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) compiler/crates/relay-transforms/src/assignable_fragment_spread/annotate_updatable_fragment_spreads.rs:48— compiler/crates/relay-transforms/src/assignable_fragment_spread/annotate_updatable_fragment_spreads.rs:48-68 | compiler/crates/relay-transforms/src/server_documents.rs:130-150 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) compiler/crates/relay-transforms/src/validations/validate_connections.rs:390— compiler/crates/relay-transforms/src/validations/validate_connections.rs:390-410 | compiler/crates/relay-transforms/src/validations/validate_connections.rs:536-556 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) compiler/crates/relay-typegen/src/visit.rs:2811— compiler/crates/relay-typegen/src/visit.rs:2811-2838 | compiler/crates/relay-typegen/src/visit.rs:2942-2962 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×6
Edited copy of a member (19 corresponding lines) compiler/crates/schema/src/flatbuffer.rs:163— compiler/crates/schema/src/flatbuffer.rs:163-181 | compiler/crates/schema/src/flatbuffer.rs:206-224 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) compiler/crates/schema-set/src/find_subset_violations.rs:607— compiler/crates/schema-set/src/find_subset_violations.rs:607-625 | compiler/crates/schema-set/src/find_subset_violations.rs:635-655 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) compiler/crates/relay-transforms/src/catch_directive.rs:150— compiler/crates/relay-transforms/src/catch_directive.rs:150-168 | compiler/crates/relay-transforms/src/catch_directive.rs:172-190 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) compiler/crates/relay-typegen/src/visit.rs:3305— compiler/crates/relay-typegen/src/visit.rs:3305-3325 | compiler/crates/relay-typegen/src/visit.rs:3335-3353 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) compiler/crates/schema-set/src/partition_base_extensions.rs:215— compiler/crates/schema-set/src/partition_base_extensions.rs:215-238 | compiler/crates/schema-set/src/partition_base_extensions.rs:300-318 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) compiler/crates/relay-typegen/src/visit.rs:1382— compiler/crates/relay-typegen/src/visit.rs:1382-1400 | compiler/crates/relay-typegen/src/visit.rs:1417-1436 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×6
Edited copy of a member (12 corresponding lines) compiler/crates/resolution-path/src/lib.rs:637— compiler/crates/resolution-path/src/lib.rs:637-648 | compiler/crates/resolution-path/src/lib.rs:920-931 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/crates/schema-set/src/build_in_memory_schema.rs:575— compiler/crates/schema-set/src/build_in_memory_schema.rs:575-586 | compiler/crates/schema-set/src/build_in_memory_schema.rs:592-609 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/crates/relay-typegen/src/visit.rs:3445— compiler/crates/relay-typegen/src/visit.rs:3445-3458 | compiler/crates/relay-typegen/src/visit.rs:3469-3480 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:295— compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:295-306 | compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:308-319 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/crates/graphql-ir/src/ir.rs:61— compiler/crates/graphql-ir/src/ir.rs:61-72 | compiler/crates/graphql-syntax/src/node/executable.rs:50-61 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/crates/relay-transforms/src/client_extensions.rs:287— compiler/crates/relay-transforms/src/client_extensions.rs:287-298 | compiler/crates/relay-transforms/src/skip_client_extensions.rs:141-152 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
relay_transforms::generate_relay_resolvers_operations_for_nested_objects::generate_relay_resolvers_operations_for_nested_objects (cognitive 38) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:465— relay_transforms::generate_relay_resolvers_operations_for_nested_objects::generate_relay_resolvers_operations_for_nested_objects has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (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.
relay_transforms::client_edges::validate_s2c_selections (cognitive 29) compiler/crates/relay-transforms/src/client_edges.rs:1925— relay_transforms::client_edges::validate_s2c_selections has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (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.
relay_transforms::server_documents::validate_server_documents (cognitive 28) compiler/crates/relay-transforms/src/server_documents.rs:153— relay_transforms::server_documents::validate_server_documents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 4 (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.
relay_transforms::connections::connection_util::assert_connection_selections (cognitive 19) compiler/crates/relay-transforms/src/connections/connection_util.rs:34— relay_transforms::connections::connection_util::assert_connection_selections has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 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.
relay_transforms::handle_fields::handle_field_util::extract_handle_field_directive_args_helper (cognitive 19) compiler/crates/relay-transforms/src/handle_fields/handle_field_util.rs:161— relay_transforms::handle_fields::handle_field_util::extract_handle_field_directive_args_helper has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 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.
relay_lsp::docblock_resolution_info::create_docblock_resolution_info (cognitive 30) compiler/crates/relay-lsp/src/docblock_resolution_info.rs:23— relay_lsp::docblock_resolution_info::create_docblock_resolution_info has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, loops 1 (3 pts), match/switch 1 (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.
relay_lsp::rename::create_rename_request (cognitive 26) compiler/crates/relay-lsp/src/rename.rs:129— relay_lsp::rename::create_rename_request has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (11 pts), loops 1 (2 pts) (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
relay_lsp::node_resolution_info::build_node_resolution_info_from_selections (cognitive 22) compiler/crates/relay-lsp/src/node_resolution_info.rs:208— relay_lsp::node_resolution_info::build_node_resolution_info_from_selections has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (2 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.
relay_lsp::completion::get_abstract_type_suggestions (cognitive 17) compiler/crates/relay-lsp/src/completion.rs:1404— relay_lsp::completion::get_abstract_type_suggestions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), 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.
relay_lsp::node_resolution_info::create_node_resolution_info (cognitive 17) compiler/crates/relay-lsp/src/node_resolution_info.rs:96— relay_lsp::node_resolution_info::create_node_resolution_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
relay_docblock::validate_resolver_schema::validate_client_implementors_of_server_interfaces (cognitive 25) compiler/crates/relay-docblock/src/validate_resolver_schema.rs:62— relay_docblock::validate_resolver_schema::validate_client_implementors_of_server_interfaces has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (8 pts), boolean chains 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.
relay_docblock::untyped_representation::parse_untyped_docblock_representation (cognitive 19) compiler/crates/relay-docblock/src/untyped_representation.rs:123— relay_docblock::untyped_representation::parse_untyped_docblock_representation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (9 pts), loops 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.
relay_docblock::validate_resolver_schema::validate_strong_object_interfaces (cognitive 18) compiler/crates/relay-docblock/src/validate_resolver_schema.rs:271— relay_docblock::validate_resolver_schema::validate_strong_object_interfaces has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
relay_docblock::validate_resolver_schema::validate_output_type_resolver_types (cognitive 17) compiler/crates/relay-docblock/src/validate_resolver_schema.rs:138— relay_docblock::validate_resolver_schema::validate_output_type_resolver_types has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
relay_docblock::docblock_ir::validate_fragment_arguments (cognitive 16) compiler/crates/relay-docblock/src/docblock_ir.rs:669— relay_docblock::docblock_ir::validate_fragment_arguments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
schema_set::find_subset_violations::walk_directive_def_violations (cognitive 23) compiler/crates/schema-set/src/find_subset_violations.rs:512— schema_set::find_subset_violations::walk_directive_def_violations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
schema_set::find_subset_violations::walk_same_kind_violations (cognitive 18) compiler/crates/schema-set/src/find_subset_violations.rs:174— schema_set::find_subset_violations::walk_same_kind_violations has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (8 pts), match/switch 4 (7 pts), if/else 1 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
schema_set::from_schema::convert_output_type_reference_with_semantic_nonnull (cognitive 16) compiler/crates/schema-set/src/from_schema.rs:490— schema_set::from_schema::convert_output_type_reference_with_semantic_nonnull has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (4 pts), match/switch 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.
schema_set::merge_sdl_document::build_output_type_reference_with_semantic_nonnull_levels (cognitive 16) compiler/crates/schema-set/src/merge_sdl_document.rs:707— schema_set::merge_sdl_document::build_output_type_reference_with_semantic_nonnull_levels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (4 pts), match/switch 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.
schema_set::schema_set_collector::stringkey_output_type_ref_from_schema_type_with_semantic_nonnull (cognitive 16) compiler/crates/schema-set/src/schema_set_collector.rs:931— schema_set::schema_set_collector::stringkey_output_type_ref_from_schema_type_with_semantic_nonnull has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (4 pts), match/switch 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.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×5
Edited copy of a member (27 corresponding lines) compiler/crates/intern/src/atomic_arena.rs:229— compiler/crates/intern/src/atomic_arena.rs:229-262 | compiler/crates/intern/src/atomic_arena.rs:626-660 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) compiler/crates/schema-diff/src/lib.rs:354— compiler/crates/schema-diff/src/lib.rs:354-392 | compiler/crates/schema-set/src/set_exclude.rs:757-783 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) compiler/crates/schema-set/src/set_merges.rs:353— compiler/crates/schema-set/src/set_merges.rs:353-379 | compiler/crates/schema-set/src/set_merges.rs:427-456 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) compiler/crates/schema-set/src/from_schema.rs:461— compiler/crates/schema-set/src/from_schema.rs:461-487 | compiler/crates/schema-set/src/schema_set_collector.rs:894-929 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs:740— compiler/crates/schema-set/src/schema_set_collector.rs:740-766 | compiler/crates/schema-set/src/schema_set_collector.rs:773-800 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×5
Edited copy of a member (28 corresponding lines) compiler/crates/relay-lsp/src/server/lsp_state.rs:670— compiler/crates/relay-lsp/src/server/lsp_state.rs:670-707 | compiler/crates/relay-lsp/src/server/lsp_state.rs:709-736 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) compiler/crates/relay-typegen/src/flow.rs:342— compiler/crates/relay-typegen/src/flow.rs:342-370 | compiler/crates/relay-typegen/src/typescript.rs:407-434 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:66— compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:66-93 | compiler/crates/relay-transforms/src/handle_fields/handle_field_transform.rs:95-122 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) compiler/crates/schema-set/src/partition_base_extensions.rs:153— compiler/crates/schema-set/src/partition_base_extensions.rs:153-180 | compiler/crates/schema-set/src/partition_base_extensions.rs:184-211 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) compiler/crates/relay-lsp/src/code_action.rs:196— compiler/crates/relay-lsp/src/code_action.rs:196-223 | compiler/crates/relay-lsp/src/code_action.rs:231-264 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×5
Edited copy of a member (17 corresponding lines) compiler/crates/schema/src/flatbuffer/serialize.rs:198— compiler/crates/schema/src/flatbuffer/serialize.rs:198-214 | compiler/crates/schema/src/flatbuffer/serialize.rs:237-255 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) compiler/crates/relay-transforms/src/validations/validate_relay_directives.rs:167— compiler/crates/relay-transforms/src/validations/validate_relay_directives.rs:167-186 | compiler/crates/relay-transforms/src/validations/validate_relay_directives.rs:188-204 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:66— compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:66-82 | compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:84-100 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) compiler/crates/relay-compiler/src/path_validator.rs:75— compiler/crates/relay-compiler/src/path_validator.rs:75-91 | compiler/crates/relay-compiler/src/path_validator.rs:97-114 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:105— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:105-122 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:124-140 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:209— compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:209-223 | compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:225-242 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) compiler/crates/relay-lsp/src/find_field_usages.rs:201— compiler/crates/relay-lsp/src/find_field_usages.rs:201-216 | compiler/crates/relay-lsp/src/find_field_usages.rs:218-232 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) compiler/crates/schema-set/src/set_remove_defined_references.rs:420— compiler/crates/schema-set/src/set_remove_defined_references.rs:420-434 | compiler/crates/schema-set/src/set_remove_defined_references.rs:442-459 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) compiler/crates/relay-transforms/src/client_implementor_cases.rs:438— compiler/crates/relay-transforms/src/client_implementor_cases.rs:438-452 | compiler/crates/relay-transforms/src/client_implementor_cases.rs:463-485 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) compiler/crates/relay-compiler/src/file_source/file_filter.rs:102— compiler/crates/relay-compiler/src/file_source/file_filter.rs:102-116 | compiler/crates/relay-compiler/src/config.rs:1098-1112 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×5
Edited copy of a member (14 corresponding lines) compiler/crates/schema-diff/src/check.rs:482— compiler/crates/schema-diff/src/check.rs:482-496 | compiler/crates/schema-diff/src/check.rs:562-575 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:86— compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:86-100 | compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:134-147 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) compiler/crates/resolution-path/src/lib.rs:891— compiler/crates/resolution-path/src/lib.rs:891-904 | compiler/crates/resolution-path/src/lib.rs:1047-1061 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) compiler/crates/schema/src/compact.rs:766— compiler/crates/schema/src/compact.rs:766-779 | compiler/crates/schema/src/compact.rs:781-794 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) compiler/crates/relay-compiler/src/build_project.rs:255— compiler/crates/relay-compiler/src/build_project.rs:255-268 | compiler/crates/relay-compiler/src/build_project.rs:277-290 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×5
Edited copy of a member (8 corresponding lines) compiler/crates/graphql-ir/src/ir.rs:426— compiler/crates/graphql-ir/src/ir.rs:426-434 | compiler/crates/graphql-syntax/src/node/executable.rs:215-222 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) compiler/crates/graphql-ir/src/visitor.rs:68— compiler/crates/graphql-ir/src/visitor.rs:68-76 | compiler/crates/graphql-syntax/src/visitor.rs:108-115 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) compiler/crates/graphql-ir/src/visitor.rs:170— compiler/crates/graphql-ir/src/visitor.rs:170-177 | compiler/crates/graphql-syntax/src/visitor.rs:196-203 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) compiler/crates/graphql-text-printer/src/print_full_operation.rs:157— compiler/crates/graphql-text-printer/src/print_full_operation.rs:157-165 | compiler/crates/relay-transforms/src/validations/validate_no_inline_with_raw_response_type.rs:93-100 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) compiler/crates/graphql-ir/src/ir.rs:345— compiler/crates/graphql-ir/src/ir.rs:345-353 | compiler/crates/graphql-syntax/src/node/executable.rs:204-211 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×5
Edited copy of a member (13 corresponding lines) compiler/crates/relay-compiler/src/compiler_state.rs:1287— compiler/crates/relay-compiler/src/compiler_state.rs:1287-1299 | compiler/crates/relay-compiler/src/compiler_state.rs:1304-1316 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) compiler/crates/graphql-ir-diff/src/lib.rs:414— compiler/crates/graphql-ir-diff/src/lib.rs:414-426 | compiler/crates/graphql-ir-diff/src/lib.rs:431-443 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:282— compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:282-294 | compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:300-312 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs:191— compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs:191-203 | compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs:331-347 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) compiler/crates/relay-schema/src/definitions.rs:153— compiler/crates/relay-schema/src/definitions.rs:153-165 | compiler/crates/relay-schema/src/definitions.rs:187-203 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×5
Edited copy of a member (6 corresponding lines) compiler/crates/graphql-text-printer/src/print_to_text.rs:293— compiler/crates/graphql-text-printer/src/print_to_text.rs:293-298 | compiler/crates/graphql-text-printer/src/print_to_text.rs:304-311 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) compiler/crates/schema-print/src/shard_printer.rs:40— compiler/crates/schema-print/src/shard_printer.rs:40-45 | compiler/crates/schema-print/src/shard_printer.rs:47-53 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) compiler/crates/schema-print/src/printer.rs:124— compiler/crates/schema-print/src/printer.rs:124-130 | compiler/crates/schema/src/flatbuffer/serialize.rs:130-135 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) compiler/crates/relay-transforms/src/generate_typename_union.rs:93— compiler/crates/relay-transforms/src/generate_typename_union.rs:93-98 | compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:226-231 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) compiler/crates/graphql-syntax/src/node/executable.rs:63— compiler/crates/graphql-syntax/src/node/executable.rs:63-68 | compiler/crates/relay-compiler/src/graphql_asts.rs:91-96 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) compiler/crates/relay-lsp/src/completion.rs:510— compiler/crates/relay-lsp/src/completion.rs:510-522 | compiler/crates/relay-lsp/src/completion.rs:565-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/completion.rs:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:67— compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:67-79 | compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:85-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/validations/validate_required_arguments.rs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&ScalarField` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) compiler/crates/relay-typegen/src/visit.rs:1265— compiler/crates/relay-typegen/src/visit.rs:1265-1277 | compiler/crates/relay-typegen/src/visit.rs:1307-1319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-typegen/src/visit.rs:1263` calls `visit_selections_fn` and `compiler/crates/relay-typegen/src/visit.rs:1305` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) compiler/crates/relay-typegen/src/write.rs:1277— compiler/crates/relay-typegen/src/write.rs:1277-1289 | compiler/crates/relay-typegen/src/write.rs:1376-1388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/write.rs:1277` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) compiler/crates/schema-set/src/ir_collector.rs:203— compiler/crates/schema-set/src/ir_collector.rs:203-215 | compiler/crates/schema-set/src/ir_collector.rs:259-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/ir_collector.rs:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
SchemaSet::fix_all_types_impl (cognitive 48) compiler/crates/schema-set/src/schema_set.rs:327— SchemaSet::fix_all_types_impl has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 25). 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.
SchemaSet::remove_defined_references (cognitive 34) compiler/crates/schema-set/src/set_remove_defined_references.rs:57— SchemaSet::remove_defined_references has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 3 (7 pts), match/switch 2 (5 pts), boolean chains 1 (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.
SchemaSet::print_definitions_for_used_schema (cognitive 26) compiler/crates/schema-set/src/print_schema_set.rs:72— SchemaSet::print_definitions_for_used_schema has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 7 (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.
SchemaSet::touch_field_argument (cognitive 19) compiler/crates/schema-set/src/schema_set_collector.rs:578— SchemaSet::touch_field_argument has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (3 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.
CompilerState::merge_file_source_changes (cognitive 46) compiler/crates/relay-compiler/src/compiler_state.rs:936— CompilerState::merge_file_source_changes has cognitive complexity 46 (threshold 15). Drivers by points: loops 9 (34 pts), if/else 2 (9 pts), match/switch 1 (3 pts) (nesting depth added 34). 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.
CompilerState::get_dirty_artifact_sources (cognitive 35) compiler/crates/relay-compiler/src/compiler_state.rs:1071— CompilerState::get_dirty_artifact_sources has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
CompilerState::from_file_source_changes (cognitive 27) compiler/crates/relay-compiler/src/compiler_state.rs:562— CompilerState::from_file_source_changes has cognitive complexity 27 (threshold 15). Drivers by points: loops 8 (25 pts), match/switch 1 (2 pts) (nesting depth added 18). 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.
CompilerState::schema_change_safety (cognitive 27) compiler/crates/relay-compiler/src/compiler_state.rs:830— CompilerState::schema_change_safety has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 4 (9 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
CompletionRequestBuilder::build_request_from_selections (cognitive 38) compiler/crates/relay-lsp/src/completion.rs:235— CompletionRequestBuilder::build_request_from_selections has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (32 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 25). 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.
CompletionRequestBuilder::build_request_from_arguments (cognitive 30) compiler/crates/relay-lsp/src/completion.rs:480— CompletionRequestBuilder::build_request_from_arguments has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (9 pts), loops 1 (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.
CompletionRequestBuilder::build_request_from_directives (cognitive 22) compiler/crates/relay-lsp/src/completion.rs:605— CompletionRequestBuilder::build_request_from_directives has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
CompletionRequestBuilder::create_completion_request (cognitive 17) compiler/crates/relay-lsp/src/completion.rs:172— CompletionRequestBuilder::create_completion_request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 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.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×4
Edited copy of a member (10 corresponding lines) compiler/crates/schema/src/in_memory.rs:153— compiler/crates/schema/src/in_memory.rs:153-162 | compiler/crates/schema/src/in_memory.rs:2597-2606 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) compiler/crates/schema-set/src/merge_sdl_document.rs:106— compiler/crates/schema-set/src/merge_sdl_document.rs:106-115 | compiler/crates/schema-set/src/merge_sdl_document.rs:128-151 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) compiler/crates/schema-set/src/build_schema_document.rs:318— compiler/crates/schema-set/src/build_schema_document.rs:318-327 | compiler/crates/schema-set/src/build_schema_document.rs:348-357 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:910— compiler/crates/graphql-syntax/src/parser.rs:910-919 | compiler/crates/graphql-syntax/src/parser.rs:1724-1734 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×4
Edited copies of one member (3 members, 12+ corresponding lines) compiler/crates/graphql-ir/src/transform.rs:257— compiler/crates/graphql-ir/src/transform.rs:257-268 | compiler/crates/graphql-ir/src/transform.rs:332-343 | compiler/crates/relay-transforms/src/skip_unreachable_node.rs:184-201 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) compiler/crates/dependency-analyzer/src/minimized_executable.rs:62— compiler/crates/dependency-analyzer/src/minimized_executable.rs:62-74 | compiler/crates/dependency-analyzer/src/minimized_executable.rs:89-100 | compiler/crates/dependency-analyzer/src/minimized_executable.rs:132-144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) compiler/crates/common/src/diagnostic.rs:65— compiler/crates/common/src/diagnostic.rs:65-76 | compiler/crates/common/src/diagnostic.rs:89-101 | compiler/crates/common/src/diagnostic.rs:137-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) compiler/crates/relay-transforms/src/catch_directive.rs:86— compiler/crates/relay-transforms/src/catch_directive.rs:86-98 | compiler/crates/relay-transforms/src/inline_data_fragment.rs:37-48 | compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:49-66 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×4
Edited copy of a member (7 corresponding lines) compiler/crates/schema-set/src/print_schema_set.rs:462— compiler/crates/schema-set/src/print_schema_set.rs:462-468 | compiler/crates/schema-set/src/print_schema_set.rs:471-477 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) compiler/crates/schema/src/flatbuffer/serialize.rs:474— compiler/crates/schema/src/flatbuffer/serialize.rs:474-481 | compiler/crates/schema/src/flatbuffer/serialize.rs:496-502 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) compiler/crates/interner/src/bytes.rs:170— compiler/crates/interner/src/bytes.rs:170-176 | compiler/crates/interner/src/generic.rs:46-52 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) compiler/crates/relay-transforms/src/client_edges.rs:2132— compiler/crates/relay-transforms/src/client_edges.rs:2132-2139 | compiler/crates/relay-transforms/src/raw_text.rs:46-52 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13–14 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:429— compiler/crates/relay-compiler/src/artifact_content/content.rs:429-441 | compiler/crates/relay-compiler/src/artifact_content/content.rs:789-802 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/relay-compiler/src/artifact_content/content.rs:806` calls `Some` and `compiler/crates/relay-compiler/src/artifact_content/content.rs:445` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–14 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:608— compiler/crates/relay-compiler/src/artifact_content/content.rs:608-621 | compiler/crates/relay-compiler/src/artifact_content/content.rs:774-786 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:608` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) compiler/crates/relay-compiler/src/graphql_asts.rs:217— compiler/crates/relay-compiler/src/graphql_asts.rs:217-230 | compiler/crates/relay-compiler/src/graphql_asts.rs:313-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/graphql_asts.rs:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) compiler/crates/relay-transforms/src/declarative_connection.rs:250— compiler/crates/relay-transforms/src/declarative_connection.rs:250-262 | compiler/crates/relay-transforms/src/declarative_connection.rs:338-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/declarative_connection.rs:250` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (25 lines × 2 locations) packages/react-relay/ReactRelayFragmentContainer.js:168— packages/react-relay/ReactRelayFragmentContainer.js:168 · REDACTED:463 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (25 lines × 2 locations) packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:25— packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:25 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:24 — 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 — 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's 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 — 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.
Duplicated block (25 lines × 2 locations) packages/react-relay/relay-hooks/readFragmentInternal.js:183— packages/react-relay/relay-hooks/readFragmentInternal.js:183 · REDACTED:416 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (25 lines × 2 locations) packages/relay-runtime/store/cloneRelayHandleSourceField.js:33— packages/relay-runtime/store/cloneRelayHandleSourceField.js:33 · packages/relay-runtime/store/cloneRelayScalarHandleSourceField.js:32 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
relay_typegen::visit::raw_response_selections_to_babel (cyclomatic 21) compiler/crates/relay-typegen/src/visit.rs:1771— relay_typegen::visit::raw_response_selections_to_babel has cyclomatic complexity 21 (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.
relay_typegen::write::write_fragment_type_exports_section (cyclomatic 21) compiler/crates/relay-typegen/src/write.rs:714— relay_typegen::write::write_fragment_type_exports_section has cyclomatic complexity 21 (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.
relay_typegen::visit::make_prop (cyclomatic 18) compiler/crates/relay-typegen/src/visit.rs:2087— relay_typegen::visit::make_prop 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.
relay_lsp::docblock_resolution_info::create_docblock_resolution_info (cyclomatic 19) compiler/crates/relay-lsp/src/docblock_resolution_info.rs:23— relay_lsp::docblock_resolution_info::create_docblock_resolution_info 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.
relay_lsp::completion::completion_items_for_request (cyclomatic 18) compiler/crates/relay-lsp/src/completion.rs:669— relay_lsp::completion::completion_items_for_request has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. 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 — the same kind of value, with no behaviour of its own — 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.
relay_lsp::rename::create_rename_request (cyclomatic 17) compiler/crates/relay-lsp/src/rename.rs:129— relay_lsp::rename::create_rename_request has cyclomatic complexity 17 (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 — the same kind of value, with no behaviour of its own — 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.
relay_transforms::client_edges::validate_s2c_selections (cyclomatic 18) compiler/crates/relay-transforms/src/client_edges.rs:1925— relay_transforms::client_edges::validate_s2c_selections 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.
relay_transforms::generate_relay_resolvers_operations_for_nested_objects::generate_relay_resolvers_operations_for_nested_objects (cyclomatic 16) compiler/crates/relay-transforms/src/generate_relay_resolvers_operations_for_nested_objects.rs:465— relay_transforms::generate_relay_resolvers_operations_for_nested_objects::generate_relay_resolvers_operations_for_nested_objects 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.
relay_transforms::server_documents::validate_server_documents (cyclomatic 16) compiler/crates/relay-transforms/src/server_documents.rs:153— relay_transforms::server_documents::validate_server_documents 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.
schema_diff::diff_definitions (cognitive 87) compiler/crates/schema-diff/src/lib.rs:418— schema_diff::diff_definitions has cognitive complexity 87 (threshold 15). Drivers by points: if/else 14 (55 pts), match/switch 7 (20 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 58). 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.
schema_diff::detect_changes_from_schemas (cognitive 66) compiler/crates/schema-diff/src/lib.rs:963— schema_diff::detect_changes_from_schemas has cognitive complexity 66 (threshold 15). Drivers by points: if/else 11 (35 pts), match/switch 6 (19 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 41). 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.
schema_diff::compare_fields (cognitive 24) compiler/crates/schema-diff/src/lib.rs:126— schema_diff::compare_fields has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 3 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RelayResolverSpreadTransform::rebind_selection (cognitive 49) compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:470— RelayResolverSpreadTransform::rebind_selection has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 5 (12 pts), boolean chains 5 (nesting depth added 27). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RelayResolverSpreadTransform::rebind_on_server_interface (cognitive 21) compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:777— RelayResolverSpreadTransform::rebind_on_server_interface has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelayResolverSpreadTransform::clone_shadowed_path (cognitive 16) compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:339— RelayResolverSpreadTransform::clone_shadowed_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
InMemorySchema::build_impl (cognitive 49) compiler/crates/schema/src/in_memory.rs:832— InMemorySchema::build_impl has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 7 (20 pts), loops 9 (17 pts), if/else 6 (12 pts) (nesting depth added 27). 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.
InMemorySchema::add_definition_with_field_names (cognitive 48) compiler/crates/schema/src/in_memory.rs:1787— InMemorySchema::add_definition_with_field_names has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 8 (15 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
InMemorySchema::validate_non_repeatable_directives (cognitive 16) compiler/crates/schema/src/in_memory.rs:1143— InMemorySchema::validate_non_repeatable_directives has cognitive complexity 16 (threshold 15). Drivers by points: loops 12 (16 pts) (nesting depth added 4). 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.
MatchTransform::validate_transform_fragment_spread (cognitive 43) compiler/crates/relay-transforms/src/match_/match_transform.rs:332— MatchTransform::validate_transform_fragment_spread has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 5, loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatchTransform::validate_transform_linked_field_with_match_directive (cognitive 39) compiler/crates/relay-transforms/src/match_/match_transform.rs:659— MatchTransform::validate_transform_linked_field_with_match_directive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (34 pts), match/switch 2 (3 pts), loops 2 (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.
MatchTransform::get_js_field_args (cognitive 34) compiler/crates/relay-transforms/src/match_/match_transform.rs:229— MatchTransform::get_js_field_args has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 1, match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ClientEdgesTransform::transform_linked_field_impl (cognitive 29) compiler/crates/relay-transforms/src/client_edges.rs:1276— ClientEdgesTransform::transform_linked_field_impl has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, match/switch 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.
ClientEdgesTransform::get_client_object_for_abstract_type (cognitive 26) compiler/crates/relay-transforms/src/client_edges.rs:832— ClientEdgesTransform::get_client_object_for_abstract_type has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 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.
ClientEdgesTransform::get_edge_to_client_object_metadata_directive (cognitive 18) compiler/crates/relay-transforms/src/client_edges.rs:587— ClientEdgesTransform::get_edge_to_client_object_metadata_directive has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidateSelectionConflict::validate_field_in_set (cognitive 21) compiler/crates/graphql-ir-validations/src/validate_selection_conflict.rs:430— ValidateSelectionConflict::validate_field_in_set has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValidateSelectionConflict::validate_field_pair (cognitive 19) compiler/crates/graphql-ir-validations/src/validate_selection_conflict.rs:340— ValidateSelectionConflict::validate_field_pair has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ValidateSelectionConflict::prewarm_fragments (cognitive 17) compiler/crates/graphql-ir-validations/src/validate_selection_conflict.rs:117— ValidateSelectionConflict::prewarm_fragments has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 4 (8 pts) (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.
TooManyFields: CodegenConstants compiler/crates/relay-codegen/src/constants.rs:13— TooManyFields — 135 stored fields. The bar is 30 stored fields; this is 105 over it, 4.50× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Config compiler/crates/relay-compiler/src/config.rs:313— TooManyFields — 40 stored fields beside 20 methods. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: FeatureFlags compiler/crates/common/src/feature_flags.rs:32— TooManyFields — 38 stored fields. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×3
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×3
Edited copy of a member (29 corresponding lines) compiler/crates/errors/src/error_combinators.rs:29— compiler/crates/errors/src/error_combinators.rs:29-57 | compiler/crates/errors/src/error_combinators.rs:64-99 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) compiler/crates/relay-transforms/src/flatten.rs:195— compiler/crates/relay-transforms/src/flatten.rs:195-225 | compiler/crates/relay-transforms/src/flatten.rs:231-259 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) compiler/crates/schema-set/src/set_remove_defined_references.rs:232— compiler/crates/schema-set/src/set_remove_defined_references.rs:232-261 | compiler/crates/schema-set/src/set_remove_defined_references.rs:483-511 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) compiler/crates/relay-codegen/src/printer.rs:216— compiler/crates/relay-codegen/src/printer.rs:216-241 | compiler/crates/relay-codegen/src/printer.rs:273-288 | compiler/crates/relay-codegen/src/printer.rs:295-310 | compiler/crates/relay-codegen/src/printer.rs:318-334 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) compiler/crates/relay-compiler-playground/src/lib.rs:130— compiler/crates/relay-compiler-playground/src/lib.rs:130-158 | compiler/crates/relay-compiler-playground/src/lib.rs:177-201 | compiler/crates/relay-compiler-playground/src/lib.rs:223-265 | compiler/crates/relay-compiler-playground/src/lib.rs:280-311 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) compiler/crates/relay-lsp/src/completion.rs:893— compiler/crates/relay-lsp/src/completion.rs:893-931 | compiler/crates/relay-lsp/src/completion.rs:938-972 | compiler/crates/relay-lsp/src/completion.rs:978-1023 | compiler/crates/relay-lsp/src/completion.rs:1173-1220 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×3
Edited copy of a member (24 corresponding lines) compiler/crates/schema/src/flatbuffer/serialize.rs:257— compiler/crates/schema/src/flatbuffer/serialize.rs:257-289 | compiler/crates/schema/src/flatbuffer/serialize.rs:340-363 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) compiler/crates/relay-config/src/project_config.rs:599— compiler/crates/relay-config/src/project_config.rs:599-622 | compiler/crates/relay-config/src/project_config.rs:648-674 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) compiler/crates/schema-diff/src/lib.rs:92— compiler/crates/schema-diff/src/lib.rs:92-124 | compiler/crates/schema-diff/src/lib.rs:732-755 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:385— compiler/crates/schema/src/flatbuffer/wrapper.rs:385-409 | compiler/crates/schema/src/in_memory.rs:2523-2548 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) compiler/crates/schema-set/src/set_type_reference.rs:61— compiler/crates/schema-set/src/set_type_reference.rs:61-87 | compiler/crates/schema/src/definitions.rs:260-284 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) compiler/crates/relay-compiler/src/status_reporter.rs:615— compiler/crates/relay-compiler/src/status_reporter.rs:615-639 | compiler/crates/relay-compiler/src/status_reporter.rs:641-666 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×3
Edited copy of a member (23 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:139— compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:139-161 | compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:271-293 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) compiler/crates/relay-transforms/src/transform_connections.rs:549— compiler/crates/relay-transforms/src/transform_connections.rs:549-571 | compiler/crates/relay-transforms/src/transform_connections.rs:576-599 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) compiler/crates/schema-set/src/ir_collector.rs:135— compiler/crates/schema-set/src/ir_collector.rs:135-158 | compiler/crates/schema-set/src/ir_collector.rs:164-186 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×3
Edited copies of one member (3 members, 11+ corresponding lines) compiler/crates/schema/src/compact.rs:393— compiler/crates/schema/src/compact.rs:393-407 | compiler/crates/schema/src/compact.rs:445-455 | compiler/crates/schema/src/compact.rs:473-485 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) compiler/crates/schema-set/src/set_exclude.rs:253— compiler/crates/schema-set/src/set_exclude.rs:253-263 | compiler/crates/schema-set/src/set_exclude.rs:375-386 | compiler/crates/schema-set/src/set_exclude.rs:396-410 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) compiler/crates/relay-transforms/src/client_edges.rs:2120— compiler/crates/relay-transforms/src/client_edges.rs:2120-2130 | compiler/crates/relay-transforms/src/metadata_directive.rs:27-37 | compiler/crates/relay-transforms/src/raw_text.rs:84-96 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) compiler/crates/schema-diff/src/lib.rs:827— compiler/crates/schema-diff/src/lib.rs:827-835 | compiler/crates/schema-set/src/schema_set_collector.rs:877-887 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:283— compiler/crates/schema/src/flatbuffer/wrapper.rs:283-291 | compiler/crates/schema/src/flatbuffer/wrapper.rs:331-340 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) compiler/crates/schema-set/src/set_type_reference.rs:133— compiler/crates/schema-set/src/set_type_reference.rs:133-141 | compiler/crates/schema/src/definitions.rs:360-370 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (20 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:1369— compiler/crates/relay-codegen/src/build_ast.rs:1369-1388 | compiler/crates/relay-codegen/src/build_ast.rs:1469-1488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-codegen/src/build_ast.rs:1369` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&ScalarField` in one and `&LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-codegen/src/build_ast.rs:1467` calls `Bool`, `is_list` and `compiler/crates/relay-codegen/src/build_ast.rs:1368` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:205— compiler/crates/relay-compiler/src/artifact_content/content.rs:205-224 | compiler/crates/relay-compiler/src/artifact_content/content.rs:749-768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:205` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 2) compiler/crates/relay-transforms/src/defer_stream.rs:128— compiler/crates/relay-transforms/src/defer_stream.rs:128-147 | compiler/crates/relay-transforms/src/defer_stream.rs:232-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/defer_stream.rs:128` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18 lines × 2) compiler/crates/relay-docblock/src/ir.rs:457— compiler/crates/relay-docblock/src/ir.rs:457-474 | compiler/crates/relay-docblock/src/ir.rs:511-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-docblock/src/ir.rs:457` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) compiler/crates/relay-lsp/src/completion.rs:399— compiler/crates/relay-lsp/src/completion.rs:399-416 | compiler/crates/relay-lsp/src/completion.rs:451-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/completion.rs:399` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) compiler/crates/relay-transforms/src/apply_transforms.rs:312— compiler/crates/relay-transforms/src/apply_transforms.rs:312-329 | compiler/crates/relay-transforms/src/apply_transforms.rs:854-871 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) compiler/crates/relay-typegen/src/write.rs:1316— compiler/crates/relay-typegen/src/write.rs:1316-1331 | compiler/crates/relay-typegen/src/write.rs:1416-1430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/write.rs:1316` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) compiler/crates/schema-diff/src/lib.rs:979— compiler/crates/schema-diff/src/lib.rs:979-993 | compiler/crates/schema-diff/src/lib.rs:1145-1160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-diff/src/lib.rs:979` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15–16 lines × 2) compiler/crates/schema/src/in_memory.rs:724— compiler/crates/schema/src/in_memory.rs:724-738 | compiler/crates/schema/src/in_memory.rs:963-978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/in_memory.rs:724` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) compiler/crates/relay-transforms/src/connections/connection_util.rs:236— compiler/crates/relay-transforms/src/connections/connection_util.rs:236-242 | compiler/crates/relay-transforms/src/connections/connection_util.rs:256-262 | compiler/crates/relay-transforms/src/connections/connection_util.rs:276-282 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/connections/connection_util.rs:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) compiler/crates/schema-set/src/find_subset_violations.rs:401— compiler/crates/schema-set/src/find_subset_violations.rs:401-407 | compiler/crates/schema-set/src/find_subset_violations.rs:469-475 | compiler/crates/schema-set/src/find_subset_violations.rs:555-562 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/find_subset_violations.rs:401` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 3) compiler/crates/graphql-ir/src/ir.rs:133— compiler/crates/graphql-ir/src/ir.rs:133-139 | compiler/crates/graphql-ir/src/ir.rs:185-191 | compiler/crates/graphql-ir/src/signatures.rs:123-129 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
schema_diff::detect_changes_from_schemas (cyclomatic 45) compiler/crates/schema-diff/src/lib.rs:963— schema_diff::detect_changes_from_schemas has cyclomatic complexity 45 (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.
schema_diff::diff_definitions (cyclomatic 40) compiler/crates/schema-diff/src/lib.rs:418— schema_diff::diff_definitions has cyclomatic complexity 40 (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.
InMemorySchema::build_impl (cyclomatic 36) compiler/crates/schema/src/in_memory.rs:832— InMemorySchema::build_impl has cyclomatic complexity 36 (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 — the same kind of value, with no behaviour of its own — 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.
InMemorySchema::add_definition_with_field_names (cyclomatic 35) compiler/crates/schema/src/in_memory.rs:1787— InMemorySchema::add_definition_with_field_names has cyclomatic complexity 35 (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 — the same kind of value, with no behaviour of its own — 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.
_readClientEdge (cyclomatic 30) REDACTED:1049— _readClientEdge has cyclomatic complexity 30 (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.
_readClientEdge (cyclomatic 30) REDACTED:3002— _readClientEdge has cyclomatic complexity 30 (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.
Compiler::watch (cyclomatic 23) compiler/crates/relay-compiler/src/compiler.rs:174— Compiler::watch 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.
Compiler::incremental_build_loop (cyclomatic 20) compiler/crates/relay-compiler/src/compiler.rs:392— Compiler::incremental_build_loop has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlattenTransform::can_flatten_selections (cyclomatic 23) compiler/crates/relay-transforms/src/flatten.rs:411— FlattenTransform::can_flatten_selections 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.
FlattenTransform::flatten_selections (cyclomatic 17) compiler/crates/relay-transforms/src/flatten.rs:296— FlattenTransform::flatten_selections has cyclomatic complexity 17 (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 — the same kind of value, with no behaviour of its own — 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.
MatchTransform::validate_transform_fragment_spread (cyclomatic 22) compiler/crates/relay-transforms/src/match_/match_transform.rs:332— MatchTransform::validate_transform_fragment_spread 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.
MatchTransform::validate_transform_linked_field_with_match_directive (cyclomatic 22) compiler/crates/relay-transforms/src/match_/match_transform.rs:659— MatchTransform::validate_transform_linked_field_with_match_directive 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.
SchemaSet::fix_all_types_impl (cyclomatic 19) compiler/crates/schema-set/src/schema_set.rs:327— SchemaSet::fix_all_types_impl 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.
SchemaSet::remove_defined_references (cyclomatic 18) compiler/crates/schema-set/src/set_remove_defined_references.rs:57— SchemaSet::remove_defined_references 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.
CompilerState::schema_change_safety (cyclomatic 18) compiler/crates/relay-compiler/src/compiler_state.rs:830— CompilerState::schema_change_safety 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.
CompilerState::merge_file_source_changes (cyclomatic 17) compiler/crates/relay-compiler/src/compiler_state.rs:936— CompilerState::merge_file_source_changes has cyclomatic complexity 17 (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.
CodegenBuilder::build_inline_fragment (cyclomatic 17) compiler/crates/relay-codegen/src/build_ast.rs:2725— CodegenBuilder::build_inline_fragment 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.
CodegenBuilder::build_reader_client_edge (cyclomatic 16) compiler/crates/relay-codegen/src/build_ast.rs:2580— CodegenBuilder::build_reader_client_edge 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.
(anonymous) (cyclomatic 16) packages/react-relay/relay-hooks/useLoadMoreFunction.js:152— (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 5 function items 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.
(anonymous) (cyclomatic 16) packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js:149— (anonymous) has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 5 function items 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.
FixmeComment compiler/crates/relay-compiler/src/build_project/build_resolvers_schema/ir_to_schema.rs:21— // FIXME: Use the base project's schema config where needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment compiler/crates/relay-compiler/src/build_project/build_resolvers_schema/ir_to_schema.rs:22— /// FIXME: Move to relay-docblock crate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
_readClientEdge (cognitive 96) REDACTED:1049— _readClientEdge has cognitive complexity 96 (threshold 15). Drivers by points: if/else 24 (63 pts), ternaries 6 (22 pts), boolean chains 4, other 4, loops 1 (3 pts) (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
_readClientEdge (cognitive 96) REDACTED:3002— _readClientEdge has cognitive complexity 96 (threshold 15). Drivers by points: if/else 24 (63 pts), ternaries 6 (22 pts), boolean chains 4, other 4, loops 1 (3 pts) (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
graphql_ir::signatures::build_fragment_variable_definitions (cognitive 64) compiler/crates/graphql-ir/src/signatures.rs:279— graphql_ir::signatures::build_fragment_variable_definitions has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 3 (15 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
graphql_ir::transform::transform_list_multi (cognitive 17) compiler/crates/graphql-ir/src/transform.rs:516— graphql_ir::transform::transform_list_multi has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), loops 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.
Compiler::incremental_build_loop (cognitive 51) compiler/crates/relay-compiler/src/compiler.rs:392— Compiler::incremental_build_loop has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (42 pts), match/switch 2 (7 pts), boolean chains 1, loops 1 (nesting depth added 30). 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.
Compiler::watch (cognitive 44) compiler/crates/relay-compiler/src/compiler.rs:174— Compiler::watch has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (28 pts), match/switch 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 28). 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.
FlattenTransform::can_flatten_selections (cognitive 47) compiler/crates/relay-transforms/src/flatten.rs:411— FlattenTransform::can_flatten_selections has cognitive complexity 47 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 5 (17 pts), boolean chains 7, loops 1 (nesting depth added 27). 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.
FlattenTransform::flatten_selections (cognitive 37) compiler/crates/relay-transforms/src/flatten.rs:296— FlattenTransform::flatten_selections has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 6 (21 pts), if/else 4 (13 pts), boolean chains 2, loops 1 (nesting depth added 24). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser::parse_optional_arguments (cognitive 40) compiler/crates/graphql-syntax/src/parser.rs:2211— Parser::parse_optional_arguments has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 19). 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.
Parser::parse_value (cognitive 21) compiler/crates/graphql-syntax/src/parser.rs:2443— Parser::parse_value has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (6 pts), loops 2 (6 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FileCategorizer::categorize (cognitive 40) compiler/crates/relay-compiler/src/file_source/file_categorizer.rs:247— FileCategorizer::categorize has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 1 (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.
FileCategorizer::from_config (cognitive 20) compiler/crates/relay-compiler/src/file_source/file_categorizer.rs:152— FileCategorizer::from_config has cognitive complexity 20 (threshold 15). Drivers by points: loops 8 (9 pts), if/else 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 7). 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.
RelayResolverExtractor::parse_document (cognitive 32) compiler/crates/relay-schema-generation/src/lib.rs:246— RelayResolverExtractor::parse_document has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 5 (10 pts), boolean chains 1 (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.
RelayResolverExtractor::extract_function (cognitive 20) compiler/crates/relay-schema-generation/src/lib.rs:842— RelayResolverExtractor::extract_function has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 5 (7 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JSONPrinter::print_ast (cognitive 30) compiler/crates/relay-codegen/src/printer.rs:468— JSONPrinter::print_ast has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (9 pts), loops 2 (6 pts), boolean chains 1 (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.
JSONPrinter::collect_value_duplicates (cognitive 19) compiler/crates/relay-codegen/src/printer.rs:435— JSONPrinter::collect_value_duplicates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
(anonymous)::invalidateDataIDs (cognitive 30) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:701— (anonymous)::invalidateDataIDs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (7 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.
(anonymous)::_setResolverValue (cognitive 26) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:511— (anonymous)::_setResolverValue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (10 pts), boolean chains 4, ternaries 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.
LSPStateResources::internal_watch (cognitive 24) compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:83— LSPStateResources::internal_watch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (4 pts), loops 2 (3 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.
LSPStateResources::build_programs (cognitive 23) compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:423— LSPStateResources::build_programs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 7 (11 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientImplementorCases::transform_selections_at (cognitive 24) compiler/crates/relay-transforms/src/client_implementor_cases.rs:705— ClientImplementorCases::transform_selections_at has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 5 (7 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.
ClientImplementorCases::report_unlisted_refinement (cognitive 16) compiler/crates/relay-transforms/src/client_implementor_cases.rs:654— ClientImplementorCases::report_unlisted_refinement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, 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.
Printer::print_value (cognitive 23) compiler/crates/graphql-text-printer/src/print_to_text.rs:550— Printer::print_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Printer::print_constant_value (cognitive 22) compiler/crates/graphql-text-printer/src/print_to_text.rs:605— Printer::print_constant_value has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
(anonymous) (cognitive 19) packages/react-relay/relay-hooks/useQueryLoader.js:250— (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (2 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.
(anonymous) (cognitive 19) packages/relay-runtime/handlers/connection/MutationHandlers.js:169— (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1, other 1 (nesting depth added 7). None of this is in the body itself: all 19 points belong to 3 function items inside it that branch (a function literal at line 170, nodeUpdater, a function literal at line 218). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
(anonymous) (cognitive 18) packages/react-relay/relay-hooks/useLoadMoreFunction.js:152— (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, other 1, ternaries 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 5 belong to 5 function items 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.
(anonymous) (cognitive 18) packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js:149— (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, other 1, ternaries 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 5 belong to 5 function items 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×2
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) compiler/crates/relay-codegen/src/build_ast.rs:1390— compiler/crates/relay-codegen/src/build_ast.rs:1390-1427 | compiler/crates/relay-codegen/src/build_ast.rs:1490-1536 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) compiler/crates/relay-typegen/src/write.rs:311— compiler/crates/relay-typegen/src/write.rs:311-348 | compiler/crates/relay-typegen/src/write.rs:1116-1164 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) compiler/crates/relay-codegen/src/build_ast.rs:1356— compiler/crates/relay-codegen/src/build_ast.rs:1356-1388 | compiler/crates/relay-codegen/src/build_ast.rs:1448-1488 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) compiler/crates/relay-transforms/src/client_extensions.rs:187— compiler/crates/relay-transforms/src/client_extensions.rs:187-219 | compiler/crates/relay-transforms/src/sort_selections.rs:92-124 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:2869— compiler/crates/graphql-syntax/src/parser.rs:2869-2908 | compiler/crates/graphql-syntax/src/parser.rs:2920-2949 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) compiler/crates/resolution-path/src/lib.rs:1646— compiler/crates/resolution-path/src/lib.rs:1646-1675 | compiler/crates/resolution-path/src/lib.rs:1689-1718 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs:808— compiler/crates/schema-set/src/schema_set_collector.rs:808-839 | compiler/crates/schema-set/src/schema_set_collector.rs:841-871 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs:210— compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs:210-258 | compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs:295-325 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) compiler/crates/graphql-ir/src/transform.rs:350— compiler/crates/graphql-ir/src/transform.rs:350-369 | compiler/crates/relay-transforms/src/fragment_alias_directive.rs:296-316 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) compiler/crates/schema/src/graphql_schema.rs:139— compiler/crates/schema/src/graphql_schema.rs:139-158 | compiler/crates/schema/src/graphql_schema.rs:160-179 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 20+ corresponding lines) · ×2
Edited copies of one member (4 members, 20+ corresponding lines) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:289— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:289-312 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:314-335 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:371-391 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:393-412 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 20+ corresponding lines) compiler/crates/relay-typegen/src/lib.rs:150— compiler/crates/relay-typegen/src/lib.rs:150-169 | compiler/crates/relay-typegen/src/lib.rs:176-200 | compiler/crates/relay-typegen/src/lib.rs:209-237 | compiler/crates/relay-typegen/src/lib.rs:246-274 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 19+ corresponding lines) · ×2
Edited copies of one member (4 members, 19+ corresponding lines) compiler/crates/graphql-ir/src/transform.rs:122— compiler/crates/graphql-ir/src/transform.rs:122-150 | compiler/crates/graphql-ir/src/transform.rs:163-191 | compiler/crates/graphql-ir/src/transform.rs:274-294 | compiler/crates/graphql-ir/src/transform.rs:306-324 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 19+ corresponding lines) compiler/crates/resolution-path/src/lib.rs:1873— compiler/crates/resolution-path/src/lib.rs:1873-1891 | compiler/crates/resolution-path/src/lib.rs:2000-2018 | compiler/crates/resolution-path/src/lib.rs:2031-2049 | compiler/crates/resolution-path/src/lib.rs:2063-2081 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:1017— compiler/crates/schema/src/flatbuffer/wrapper.rs:1017-1026 | compiler/crates/schema/src/flatbuffer/wrapper.rs:1028-1037 | compiler/crates/schema/src/flatbuffer/wrapper.rs:1090-1099 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:262— compiler/crates/graphql-syntax/src/parser.rs:262-271 | compiler/crates/graphql-syntax/src/parser.rs:273-282 | compiler/crates/graphql-syntax/src/parser.rs:284-296 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×2
Edited copies of one member (4 members, 14+ corresponding lines) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:428— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:428-442 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:520-534 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:536-549 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:621-634 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:343— compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:343-361 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:367-385 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:471-484 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:489-502 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×2
Edited copies of one member (4 members, 8+ corresponding lines) compiler/crates/graphql-ir/src/ir.rs:132— compiler/crates/graphql-ir/src/ir.rs:132-139 | compiler/crates/graphql-ir/src/ir.rs:184-191 | compiler/crates/graphql-ir/src/ir.rs:449-460 | compiler/crates/graphql-ir/src/signatures.rs:122-129 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) compiler/crates/schema-print/src/printer.rs:160— compiler/crates/schema-print/src/printer.rs:160-168 | compiler/crates/schema-print/src/printer.rs:170-178 | compiler/crates/schema-print/src/printer.rs:197-204 | compiler/crates/schema-print/src/printer.rs:206-213 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×2
Edited copies of one member (4 members, 6+ corresponding lines) compiler/crates/relay-transforms/src/generate_resolver_operation_metadata.rs:66— compiler/crates/relay-transforms/src/generate_resolver_operation_metadata.rs:66-71 | compiler/crates/relay-transforms/src/inline_fragments.rs:59-65 | compiler/crates/relay-transforms/src/match_/split_module_import.rs:35-40 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:127-132 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 6+ corresponding lines) compiler/crates/relay-transforms/src/generate_data_driven_dependency_metadata.rs:34— compiler/crates/relay-transforms/src/generate_data_driven_dependency_metadata.rs:34-39 | compiler/crates/relay-transforms/src/mask.rs:30-35 | compiler/crates/relay-transforms/src/skip_client_directives.rs:14-19 | compiler/crates/relay-transforms/src/unwrap_custom_directive_selection.rs:25-30 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (26–27 lines × 2) compiler/crates/schema-set/src/schema_set_collector.rs:182— compiler/crates/schema-set/src/schema_set_collector.rs:182-207 | compiler/crates/schema-set/src/schema_set_collector.rs:242-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/schema_set_collector.rs:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26–27 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:416— compiler/crates/schema/src/flatbuffer/wrapper.rs:416-441 | compiler/crates/schema/src/in_memory.rs:2492-2518 — before extracting anything, compare `compiler/crates/schema/src/flatbuffer/wrapper.rs` and `compiler/crates/schema/src/in_memory.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) compiler/crates/graphql-ir/src/transform.rs:123— compiler/crates/graphql-ir/src/transform.rs:123-141 | compiler/crates/graphql-ir/src/transform.rs:164-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:105— compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:105-123 | compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:180-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) compiler/crates/relay-codegen/src/build_ast.rs:1131— compiler/crates/relay-codegen/src/build_ast.rs:1131-1145 | compiler/crates/relay-codegen/src/build_ast.rs:1245-1257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–15 lines × 2) compiler/crates/relay-typegen/src/visit.rs:1637— compiler/crates/relay-typegen/src/visit.rs:1637-1651 | compiler/crates/relay-typegen/src/visit.rs:1718-1730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/visit.rs:1637` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) compiler/crates/graphql-text-printer/src/print_to_text.rs:555— compiler/crates/graphql-text-printer/src/print_to_text.rs:555-567 | compiler/crates/graphql-text-printer/src/print_to_text.rs:620-631 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:97— compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:97-108 | compiler/crates/relay-transforms/src/refetchable_fragment/node_query_generator.rs:144-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 2) compiler/crates/graphql-syntax/src/parser.rs:2824— compiler/crates/graphql-syntax/src/parser.rs:2824-2830 | compiler/crates/graphql-syntax/src/parser.rs:2888-2893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6–7 lines × 2) compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:240— compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:240-246 | compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:250-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs:240` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 3) compiler/crates/relay-transforms/src/assignable_fragment_spread/transform_assignable_fragment_spreads_in_regular_queries.rs:310— compiler/crates/relay-transforms/src/assignable_fragment_spread/transform_assignable_fragment_spreads_in_regular_queries.rs:310-315 | compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_fragment_spread.rs:226-231 | compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_fragment_spread.rs:256-261 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_fragment_spread.rs:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) compiler/crates/relay-transforms/src/client_extensions.rs:34— compiler/crates/relay-transforms/src/client_extensions.rs:34-39 | compiler/crates/relay-transforms/src/client_extensions_abstract_types.rs:34-39 | compiler/crates/relay-transforms/src/sort_selections.rs:25-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (10 lines × 3) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:525— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:525-534 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:540-549 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:625-634 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:525` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `ext` to `&ScalarTypeExtension` in one and `&DirectiveDefinitionExtension` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 3) compiler/crates/schema-set/src/find_subset_violations.rs:202— compiler/crates/schema-set/src/find_subset_violations.rs:202-211 | compiler/crates/schema-set/src/find_subset_violations.rs:231-240 | compiler/crates/schema-set/src/find_subset_violations.rs:267-276 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/find_subset_violations.rs:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) compiler/crates/schema/src/flatbuffer/wrapper.rs:202— compiler/crates/schema/src/flatbuffer/wrapper.rs:202-209 | compiler/crates/schema/src/flatbuffer/wrapper.rs:238-245 | compiler/crates/schema/src/flatbuffer/wrapper.rs:258-265 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/flatbuffer/wrapper.rs:202` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) compiler/crates/graphql-syntax/src/parser.rs:859— compiler/crates/graphql-syntax/src/parser.rs:859-866 | compiler/crates/graphql-syntax/src/parser.rs:1186-1193 | compiler/crates/graphql-syntax/src/parser.rs:1380-1387 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-syntax/src/parser.rs:859` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Low cohesion: SchemaSet (LCOM4 5) compiler/crates/schema-set/src/schema_set.rs:76— SchemaSet's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: EnsureCatch (LCOM4 4) compiler/crates/relay-transforms/src/validations/validate_client_schema_extensions_use_catch.rs:45— EnsureCatch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R10 · Code Duplication· Duplicated block with local edits (49 matched lines × 2 locations) · ×2
Duplicated block with local edits (49 matched lines × 2 locations) packages/react-relay/relay-hooks/useEntryPointLoader.js:112— packages/react-relay/relay-hooks/useEntryPointLoader.js:112 · packages/react-relay/relay-hooks/useQueryLoader.js:177 — the two spans are one implementation copied and then locally edited — 269 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's 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 — 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.
Duplicated block with local edits (49 matched lines × 2 locations) packages/react-relay/relay-hooks/usePaginationFragment.js:34— packages/react-relay/relay-hooks/usePaginationFragment.js:34 · packages/react-relay/relay-hooks/useRefetchableFragment.js:27 — the two spans are one implementation copied and then locally edited — 259 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's 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 — 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.
Duplicated block (22 lines × 2 locations) packages/react-relay/index.js:101— packages/react-relay/index.js:101 · packages/react-relay/legacy.js:62 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Duplicated block (22 lines × 2 locations) packages/relay-runtime/util/recycleNodesInto.js:24— packages/relay-runtime/util/recycleNodesInto.js:24 · packages/relay-runtime/util/recycleNodesInto.js:85 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (20 lines × 2 locations) packages/relay-runtime/store/RelayModernSelector.js:264— packages/relay-runtime/store/RelayModernSelector.js:264 · packages/relay-runtime/store/RelayModernSelector.js:367 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (20 lines × 2 locations) packages/relay-runtime/store/RelayStoreSubscriptions.js:156— packages/relay-runtime/store/RelayStoreSubscriptions.js:156 · packages/relay-runtime/store/RelayStoreSubscriptions.js:177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2 locations) packages/react-relay/relay-hooks/EntryPointContainer.react.js:55— packages/react-relay/relay-hooks/EntryPointContainer.react.js:55 · packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:218 — 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 — 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's 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 — 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.
Duplicated block (18 lines × 2 locations) REDACTED:300— REDACTED:300 · REDACTED:351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Complex function _readClientEdge (cyclomatic 30, cognitive 96) REDACTED:1049— _readClientEdge has cyclomatic complexity 30 and cognitive complexity 96; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _readClientEdge (cyclomatic 30, cognitive 96) REDACTED:3002— _readClientEdge has cyclomatic complexity 30 and cognitive complexity 96; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Dead file (~25 LoC) packages/react-relay/relay-hooks/InternalLogger.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~25 LoC) packages/relay-runtime/store/generateTypenamePrefixedDataID.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~22 LoC) packages/react-relay/__flowtests__/RelayModernFlowtest_badref.graphql.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/__flowtests__/RelayModern-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~22 LoC) packages/react-relay/__flowtests__/RelayModernFlowtest_notref.graphql.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/__flowtests__/RelayModern-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~20 LoC) packages/react-relay/__flowtests__/RelayModernFlowtest_user.graphql.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (packages/react-relay/__flowtests__/RelayModern-flowtest.js, packages/react-relay/__flowtests__/RelayModernFlowtest_badref.graphql.js, packages/react-relay/__flowtests__/RelayModernFlowtest_notref.graphql.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~20 LoC) packages/react-relay/__flowtests__/RelayModernFlowtest_users.graphql.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/__flowtests__/RelayModern-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Unlisted import 'JSResourceReference' packages/react-relay/relay-hooks/EntryPointTypes.flow.js:16— Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
Unlisted import 'JSResourceReference' packages/relay-runtime/util/NormalizationNode.js:16— Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
createContainerWithFragments (cyclomatic 69) REDACTED:319— createContainerWithFragments has cyclomatic complexity 69 (threshold 15). Of this number, 58 points are the body's own statements and 11 belong to 15 function items 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.
(anonymous) (cyclomatic 51) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:405— (anonymous) has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 16 function items inside it that branch (_setResolverValue, invalidateDataIDs, _isInvalid, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
toPayload (cyclomatic 51) packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:215— toPayload has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 269, 250, 235, …). 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' 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.
createContainerWithFragments (cyclomatic 45) packages/react-relay/ReactRelayRefetchContainer.js:70— createContainerWithFragments has cyclomatic complexity 45 (threshold 15). Of this number, 28 points are the body's own statements and 17 belong to 15 function items 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.
update (cyclomatic 44) packages/relay-runtime/handlers/connection/ConnectionHandler.js:50— update has cyclomatic complexity 44 (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.
_project (cyclomatic 43) packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js:510— _project has cyclomatic complexity 43 (threshold 15). Of this number, 22 points are the body's own statements and 21 belong to 9 function items 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.
recycleNodesIntoImplOptimized (cyclomatic 40) packages/relay-runtime/util/recycleNodesInto.js:88— recycleNodesIntoImplOptimized has cyclomatic complexity 40 (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.
_traverseSelections (cyclomatic 39) REDACTED:2507— _traverseSelections has cyclomatic complexity 39 (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.
_traverseSelections (cyclomatic 36) REDACTED:577— _traverseSelections has cyclomatic complexity 36 (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.
readWithIdentifier (cyclomatic 36) packages/react-relay/relay-hooks/legacy/FragmentResource.js:240— readWithIdentifier has cyclomatic complexity 36 (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.
(anonymous) (cyclomatic 35) REDACTED:235— (anonymous) has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 12 function items inside it that branch (_runWithoutNotifying, run, _publishSourceFromPayload, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ExecTimeS2CDataChecker.toChecks (cyclomatic 34) packages/relay-runtime/store/ExecTimeS2CDataChecker.js:215— ExecTimeS2CDataChecker.toChecks has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to one function literal inside it that branches (line 222). 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's 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.
RelayReferenceMarker._traverseSelections (cyclomatic 33) packages/relay-runtime/store/RelayReferenceMarker.js:282— RelayReferenceMarker._traverseSelections has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to one function literal inside it that branches (line 286). 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's 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.
SchemaChange::get_safety (cyclomatic 32) compiler/crates/schema-diff/src/check.rs:71— SchemaChange::get_safety has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_graphql::extract (cyclomatic 31) compiler/crates/extract-graphql/src/lib.rs:121— extract_graphql::extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
loadQuery (cyclomatic 30) packages/react-relay/relay-hooks/loadQuery.js:90— loadQuery has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 27 function items inside it that branch (cancelNetworkRequest, checkAvailabilityAndExecute, a function literal at line 356, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
updateProxyFromSelections (cyclomatic 30) REDACTED:55— updateProxyFromSelections has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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 — the same kind of value, with no behaviour of its own — 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.
RelayResolverSpreadTransform::rebind_selection (cyclomatic 29) compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:470— RelayResolverSpreadTransform::rebind_selection 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.
readFragmentInternal (cyclomatic 29) packages/react-relay/relay-hooks/readFragmentInternal.js:152— readFragmentInternal 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.
recycleNodesIntoImpl (cyclomatic 29) packages/relay-runtime/util/recycleNodesInto.js:27— recycleNodesIntoImpl has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
RelayResponseNormalizer._traverseSelections (cyclomatic 28) REDACTED:246— RelayResponseNormalizer._traverseSelections has cyclomatic complexity 28 (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.
DataChecker._traverseSelections (cyclomatic 28) packages/relay-runtime/store/DataChecker.js:361— DataChecker._traverseSelections has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 365). 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's 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.
RelayObservable.subscribe (cyclomatic 27) packages/relay-runtime/network/RelayObservable.js:508— RelayObservable.subscribe has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function item inside it that branches. 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.
Executor._handleNext (cyclomatic 26) REDACTED:632— Executor._handleNext 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.
RelayModernStore.notify (cyclomatic 26) REDACTED:484— RelayModernStore.notify 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.
RelayResponseNormalizer._normalizeField (cyclomatic 25) REDACTED:616— RelayResponseNormalizer._normalizeField has cyclomatic complexity 25 (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.
executeHandoff (cyclomatic 25) packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:375— executeHandoff has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 12 function items inside it that branch (a function literal at line 385, (anonymous)::(anonymous)::publish, a function literal at line 475, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
rangeDelete (cyclomatic 24) packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js:235— rangeDelete has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 253, 270, 296). 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' 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.
ConnectionTransform::transform_connection_selections (cyclomatic 23) compiler/crates/relay-transforms/src/transform_connections.rs:132— ConnectionTransform::transform_connection_selections 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.
readFromCacheOrEvaluate (cyclomatic 23) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:111— readFromCacheOrEvaluate 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.
_traverseSelections (cyclomatic 23) packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js:257— _traverseSelections 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.
RelayModernStore.updateTargetFromSource (cyclomatic 22) REDACTED:1108— RelayModernStore.updateTargetFromSource has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong 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.
preloadQueryDeduped (cyclomatic 22) packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:147— preloadQueryDeduped has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 7 function items 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.
SourcePrinter::write_span_with_highlight_style (cyclomatic 21) compiler/crates/graphql-cli/src/source_printer.rs:31— SourcePrinter::write_span_with_highlight_style has cyclomatic complexity 21 (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.
DeclarativeConnectionMutationTransform::transform_linked_field (cyclomatic 21) compiler/crates/relay-transforms/src/declarative_connection.rs:181— DeclarativeConnectionMutationTransform::transform_linked_field has cyclomatic complexity 21 (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 — the same kind of value, with no behaviour of its own — 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.
SkipRedundantNodesTransform::transform_selection (cyclomatic 21) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:215— SkipRedundantNodesTransform::transform_selection has cyclomatic complexity 21 (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.
serverQuery.execute (cyclomatic 21) packages/react-relay/relay-hooks/rsc/serverQuery.js:266— serverQuery.execute has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 359, complete, a function literal at line 372, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RelayDeclarativeMutationConfig.rangeDelete.<returned closure> (cyclomatic 21) packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js:253— RelayDeclarativeMutationConfig.rangeDelete.<returned closure> has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong 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.
_collect (cyclomatic 21) REDACTED:948— _collect has cyclomatic complexity 21 (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.
update (cyclomatic 21) packages/relay-runtime/store/RelayModernRecord.js:360— update has cyclomatic complexity 21 (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.
graphql_ir::signatures::build_fragment_variable_definitions (cyclomatic 20) compiler/crates/graphql-ir/src/signatures.rs:279— graphql_ir::signatures::build_fragment_variable_definitions has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser::parse_optional_arguments (cyclomatic 20) compiler/crates/graphql-syntax/src/parser.rs:2211— Parser::parse_optional_arguments has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser::parse_directive_location (cyclomatic 22) is higher and carries no row of its own — 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 function is counted neither in this dimension's figures nor in its score.
relay_codegen::printer::write_constant_value (cyclomatic 20) compiler/crates/relay-codegen/src/printer.rs:886— relay_codegen::printer::write_constant_value has cyclomatic complexity 20 (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 — the same kind of value, with no behaviour of its own — 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.
updatePerf (cyclomatic 20) packages/relay-runtime/store/RelayModernRecord.js:835— updatePerf has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_fetchAndSaveQuery (cyclomatic 20) packages/react-relay/relay-hooks/QueryResource.js:397— _fetchAndSaveQuery has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 7 function items 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.
LSPStateResources::build_programs (cyclomatic 19) compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:423— LSPStateResources::build_programs has cyclomatic complexity 19 (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 — the same kind of value, with no behaviour of its own — 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.
ClientEdgesTransform::transform_linked_field_impl (cyclomatic 19) compiler/crates/relay-transforms/src/client_edges.rs:1276— ClientEdgesTransform::transform_linked_field_impl 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.
ShadowResolversTransform::validate_resolver_metadata (cyclomatic 19) compiler/crates/relay-transforms/src/relay_resolvers/shadow_transform.rs:98— ShadowResolversTransform::validate_resolver_metadata 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.
RscResolverFieldTransform::open_rsc_field (cyclomatic 19) compiler/crates/relay-transforms/src/rsc_resolver_fields.rs:316— RscResolverFieldTransform::open_rsc_field 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.
_propagateResolverMetadata (cyclomatic 19) REDACTED:2878— _propagateResolverMetadata 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.
convert (cyclomatic 19) REDACTED:42— convert has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 93, 81, 108, …). 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' 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.
readServerFragment (cyclomatic 19) packages/react-relay/relay-hooks/rsc/useServerFragment.js:100— readServerFragment 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 21 function items inside it that branch ((anonymous)::next, a function literal at line 200, read, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ArtifactGeneratedTypes::from_operation (cyclomatic 18) compiler/crates/relay-compiler/src/build_project/artifact_generated_types.rs:28— ArtifactGeneratedTypes::from_operation 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.
relay_schema_generation::return_type_to_type_annotation (cyclomatic 18) compiler/crates/relay-schema-generation/src/lib.rs:1120— relay_schema_generation::return_type_to_type_annotation has cyclomatic complexity 18 (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 — the same kind of value, with no behaviour of its own — 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.
_propagateResolverMetadata (cyclomatic 18) REDACTED:945— _propagateResolverMetadata 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.
(anonymous) (cyclomatic 18) REDACTED:284— (anonymous) has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 295, a function literal at line 338, subscribeToSnapshot, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
constructor (cyclomatic 18) packages/relay-runtime/store/RelayModernEnvironment.js:110— constructor 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.
FileCategorizer::categorize (cyclomatic 17) compiler/crates/relay-compiler/src/file_source/file_categorizer.rs:247— FileCategorizer::categorize 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.
RelayResolverExtractor::parse_document (cyclomatic 17) compiler/crates/relay-schema-generation/src/lib.rs:246— RelayResolverExtractor::parse_document 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.
read (cyclomatic 17) REDACTED:2092— read 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.
createContainerWithFragments (cyclomatic 17) packages/react-relay/ReactRelayFragmentContainer.js:47— createContainerWithFragments has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 2 function items 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.
ClientImplementorCases::transform_selections_at (cyclomatic 16) compiler/crates/relay-transforms/src/client_implementor_cases.rs:705— ClientImplementorCases::transform_selections_at 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.
GenerateDataDrivenDependencyMetadata::extract_module_entries_from_selections (cyclomatic 16) compiler/crates/relay-transforms/src/generate_data_driven_dependency_metadata.rs:71— GenerateDataDrivenDependencyMetadata::extract_module_entries_from_selections 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.
RelayModernRecord.areFieldValuesEqual (cyclomatic 16) packages/relay-runtime/store/RelayModernRecord.js:747— RelayModernRecord.areFieldValuesEqual 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.
useFragmentInternal_EXPERIMENTAL.subscribeToSnapshot (cyclomatic 16) REDACTED:280— useFragmentInternal_EXPERIMENTAL.subscribeToSnapshot has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 295, 338, 288, …). 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' 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.
_registerPlaceholders (cyclomatic 16) REDACTED:598— _registerPlaceholders has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's 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.
getSingularSelector (cyclomatic 16) packages/relay-runtime/store/RelayModernSelector.js:67— getSingularSelector 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.
HackComment compiler/crates/extract-graphql/src/lib.rs:226— // Hack for template literals containing /*, see D21256605: — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
update (cognitive 83) packages/relay-runtime/handlers/connection/ConnectionHandler.js:50— update has cognitive complexity 83 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 16, ternaries 4 (14 pts), other 1 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
SchemaChange::get_safety (cognitive 78) compiler/crates/schema-diff/src/check.rs:71— SchemaChange::get_safety has cognitive complexity 78 (threshold 15). Drivers by points: if/else 11 (46 pts), loops 6 (26 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 57). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
createContainerWithFragments (cognitive 77) REDACTED:319— createContainerWithFragments has cognitive complexity 77 (threshold 15). Drivers by points: if/else 28 (33 pts), ternaries 21 (23 pts), boolean chains 17, loops 2, other 2 (nesting depth added 7). Of this number, 66 points are the body's own statements and 11 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
extract_graphql::extract (cognitive 68) compiler/crates/extract-graphql/src/lib.rs:121— extract_graphql::extract has cognitive complexity 68 (threshold 15). Drivers by points: if/else 9 (36 pts), loops 5 (14 pts), match/switch 4 (14 pts), boolean chains 4 (nesting depth added 46). 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.
_project (cognitive 60) packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js:510— _project has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 11, ternaries 6 (9 pts), other 4, loops 2 (3 pts) (nesting depth added 17). Of this number, 37 points are the body's own statements and 23 belong to 9 function items 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.
updateTargetFromSource (cognitive 55) REDACTED:1108— updateTargetFromSource has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (43 pts), loops 2 (6 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 33). Of this number, 45 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
toPayload (cognitive 55) packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:215— toPayload has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 18, ternaries 7 (10 pts), other 3 (nesting depth added 8). None of this is in the body itself: all 55 points belong to 5 function literals inside it that branch (lines 269, 250, 235, …). 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' 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.
recycleNodesIntoImplOptimized (cognitive 55) packages/relay-runtime/util/recycleNodesInto.js:88— recycleNodesIntoImplOptimized has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 18, ternaries 7 (9 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourcePrinter::write_span_with_highlight_style (cognitive 54) compiler/crates/graphql-cli/src/source_printer.rs:31— SourcePrinter::write_span_with_highlight_style has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (47 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createContainerWithFragments (cognitive 51) packages/react-relay/ReactRelayRefetchContainer.js:70— createContainerWithFragments has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 15, ternaries 11, other 2, loops 1 (nesting depth added 5). Of this number, 34 points are the body's own statements and 17 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
_traverseSelections (cognitive 48) REDACTED:2507— _traverseSelections has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 5, other 4, match/switch 1 (2 pts), loops 1 (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.
readWithIdentifier (cognitive 47) packages/react-relay/relay-hooks/legacy/FragmentResource.js:240— readWithIdentifier has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 7, ternaries 5 (7 pts), other 3 (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.
(anonymous) (cognitive 46) REDACTED:235— (anonymous) has cognitive complexity 46 (threshold 15). Drivers by points: if/else 26 (34 pts), boolean chains 11, ternaries 1 (nesting depth added 8). None of this is in the body itself: all 46 points belong to 12 function items inside it that branch (_runWithoutNotifying, _applyUpdates::processUpdate, run, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_traverseSelections (cognitive 45) REDACTED:577— _traverseSelections has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 4, match/switch 1 (2 pts), other 2, loops 1 (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.
_collect (cognitive 45) REDACTED:948— _collect has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 3 (5 pts), boolean chains 3, other 2 (nesting depth added 26). 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.
_handleNext (cognitive 44) REDACTED:632— _handleNext has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 5, loops 1 (2 pts), ternaries 2 (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.
loadQuery (cognitive 44) packages/react-relay/relay-hooks/loadQuery.js:90— loadQuery has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 5 (11 pts), boolean chains 9, other 2 (nesting depth added 13). Of this number, 16 points are the body's own statements and 28 belong to 27 function items 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.
readFromCacheOrEvaluate (cognitive 43) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:111— readFromCacheOrEvaluate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 1 (4 pts), boolean chains 3, other 3, ternaries 3 (nesting depth added 19). 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.
_normalizeField (cognitive 43) REDACTED:616— _normalizeField has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 7, ternaries 1 (2 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.
DeclarativeConnectionMutationTransform::transform_linked_field (cognitive 42) compiler/crates/relay-transforms/src/declarative_connection.rs:181— DeclarativeConnectionMutationTransform::transform_linked_field has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 7 (21 pts), if/else 7 (18 pts), boolean chains 3 (nesting depth added 25). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SkipRedundantNodesTransform::transform_selection (cognitive 42) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:215— SkipRedundantNodesTransform::transform_selection has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 2, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
_processFollowupPayload (cognitive 40) REDACTED:1156— _processFollowupPayload has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 3 (9 pts), error handling 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 23). Most of this is not in the body itself: 10 of the 40 points are its own statements and the rest belongs to 10 function items inside it that branch ((anonymous)::next, (anonymous)::next::publishModuleImportPayload, a function literal at line 1204, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GenerateDataDrivenDependencyMetadata::extract_module_entries_from_selections (cognitive 39) compiler/crates/relay-transforms/src/generate_data_driven_dependency_metadata.rs:71— GenerateDataDrivenDependencyMetadata::extract_module_entries_from_selections has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 3 (12 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 26). 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.
ConnectionTransform::transform_connection_selections (cognitive 39) compiler/crates/relay-transforms/src/transform_connections.rs:132— ConnectionTransform::transform_connection_selections has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (34 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
_registerPlaceholders (cognitive 37) REDACTED:598— _registerPlaceholders has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (10 pts), ternaries 1 (4 pts), other 3, boolean chains 1 (nesting depth added 19). Of this number, 36 points are the body's 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.
readFragmentInternal (cognitive 37) packages/react-relay/relay-hooks/readFragmentInternal.js:152— readFragmentInternal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 7 (11 pts), boolean chains 9, loops 1 (3 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.
_propagateResolverMetadata (cognitive 36) REDACTED:2878— _propagateResolverMetadata has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 3 (9 pts), boolean chains 2, other 1 (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.
subscribe (cognitive 36) packages/relay-runtime/network/RelayObservable.js:508— subscribe has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 7 (13 pts), boolean chains 9 (nesting depth added 8). Most of this is not in the body itself: 11 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (doCleanup, error, unsubscribe, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
serverQuery.execute (cognitive 35) packages/react-relay/relay-hooks/rsc/serverQuery.js:266— serverQuery.execute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 5 (10 pts), boolean chains 3, error handling 1 (nesting depth added 14). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 359, complete, a function literal at line 299, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
(anonymous) (cognitive 35) REDACTED:284— (anonymous) has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (12 pts), boolean chains 2, loops 1 (2 pts), other 2 (nesting depth added 15). None of this is in the body itself: all 35 points belong to 9 function items inside it that branch (a function literal at line 295, a function literal at line 338, subscribeToSnapshot, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ArtifactGeneratedTypes::from_operation (cognitive 34) compiler/crates/relay-compiler/src/build_project/artifact_generated_types.rs:28— ArtifactGeneratedTypes::from_operation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 5, match/switch 1 (2 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.
_propagateResolverMetadata (cognitive 34) REDACTED:945— _propagateResolverMetadata has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 3 (9 pts), boolean chains 2, other 1 (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.
_traverseSelections (cognitive 34) packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js:257— _traverseSelections has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), match/switch 1 (2 pts), other 2, boolean chains 1, loops 1 (nesting depth added 19). 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.
RefetchableDirective::from_directive (cognitive 33) compiler/crates/relay-transforms/src/refetchable_fragment/refetchable_directive.rs:54— RefetchableDirective::from_directive has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (11 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelayReferenceMarker._traverseClientEdgeToClientObject (cognitive 33) packages/relay-runtime/store/RelayReferenceMarker.js:430— RelayReferenceMarker._traverseClientEdgeToClientObject has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 2 (7 pts) (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.
update (cognitive 32) packages/relay-runtime/store/RelayModernRecord.js:360— update has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, other 4, ternaries 1 (4 pts), loops 2 (3 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.
RelayReferenceMarker._traverseSelections (cognitive 31) packages/relay-runtime/store/RelayReferenceMarker.js:282— RelayReferenceMarker._traverseSelections has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 5, match/switch 1 (nesting depth added 12). None of this is in the body itself: all 31 points belong to one function literal inside it that branches (line 286). 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's 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.
updatePerf (cognitive 31) packages/relay-runtime/store/RelayModernRecord.js:835— updatePerf has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, other 4, ternaries 1 (4 pts), loops 2 (3 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.
RelayResponseNormalizer._traverseSelections (cognitive 30) REDACTED:246— RelayResponseNormalizer._traverseSelections has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 3 (9 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 19). 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.
LiveResolverCache.invalidateDataIDs (cognitive 30) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:701— LiveResolverCache.invalidateDataIDs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (7 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.
executeHandoff (cognitive 30) packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:375— executeHandoff has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 7 (9 pts), boolean chains 5, error handling 1 (nesting depth added 4). None of this is in the body itself: all 30 points belong to 12 function items inside it that branch (a function literal at line 385, (anonymous)::(anonymous)::publish, a function literal at line 475, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
rangeDelete (cognitive 30) packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js:235— rangeDelete has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, loops 1 (2 pts), ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 253, 270, 296). 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' 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.
preloadQueryDeduped (cognitive 30) packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:147— preloadQueryDeduped has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 7 (9 pts), boolean chains 5, other 2 (nesting depth added 7). Of this number, 23 points are the body's own statements and 7 belong to 7 function items 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.
notify (cognitive 29) REDACTED:484— notify has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 9, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
DataChecker._traverseSelections (cognitive 28) packages/relay-runtime/store/DataChecker.js:361— DataChecker._traverseSelections has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 1 (nesting depth added 11). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 365). 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's 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.
useFragmentInternal_CURRENT.subscribeToSnapshot (cognitive 28) REDACTED:255— useFragmentInternal_CURRENT.subscribeToSnapshot has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (8 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 301, 265, 334). 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' 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.
(anonymous) (cognitive 28) REDACTED:260— (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (8 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). None of this is in the body itself: all 28 points belong to 9 function items inside it that branch (a function literal at line 301, a function literal at line 265, subscribeToSnapshot, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
recycleNodesIntoImpl (cognitive 28) packages/relay-runtime/util/recycleNodesInto.js:27— recycleNodesIntoImpl has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (7 pts), ternaries 5 (nesting depth added 2). Of this number, 20 points are the body's own statements and 8 belong to 2 function literals inside it that branch. 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.
RelayResolverFieldTransform::extract_resolver_field_directives (cognitive 27) compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:145— RelayResolverFieldTransform::extract_resolver_field_directives has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
_fetchAndSaveQuery (cognitive 27) packages/react-relay/relay-hooks/QueryResource.js:397— _fetchAndSaveQuery has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (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 7 function items inside it that branch (error, start, complete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ResolverIr::field_relay_resolver_directive (cognitive 26) compiler/crates/relay-docblock/src/ir.rs:491— ResolverIr::field_relay_resolver_directive has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 4 (9 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.
ExecTimeS2CDataChecker.toChecks (cognitive 26) packages/relay-runtime/store/ExecTimeS2CDataChecker.js:215— ExecTimeS2CDataChecker.toChecks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 10). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 222). 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's 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.
dependency_analyzer::ir::get_reachable_ir (cognitive 25) compiler/crates/dependency-analyzer/src/ir.rs:58— dependency_analyzer::ir::get_reachable_ir has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (8 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.
relay_schema::client_implementors::collect_client_implementors (cognitive 25) compiler/crates/relay-schema/src/client_implementors.rs:208— relay_schema::client_implementors::collect_client_implementors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (8 pts), boolean chains 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.
relay_schema_generation::return_type_to_type_annotation (cognitive 25) compiler/crates/relay-schema-generation/src/lib.rs:1120— relay_schema_generation::return_type_to_type_annotation has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 6 (16 pts), if/else 5 (9 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
useFragmentInternal_EXPERIMENTAL.subscribeToSnapshot (cognitive 25) REDACTED:280— useFragmentInternal_EXPERIMENTAL.subscribeToSnapshot has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 295, 338, 288, …). 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' 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.
RelayDeclarativeMutationConfig.rangeDelete.<returned closure> (cognitive 25) packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js:253— RelayDeclarativeMutationConfig.rangeDelete.<returned closure> has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 9). Of this number, 18 points are the body's 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.
createContainerWithFragments (cognitive 25) packages/react-relay/ReactRelayFragmentContainer.js:47— createContainerWithFragments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, other 2, ternaries 2, loops 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 1 belongs to 2 function items 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.
updateProxyFromSelections (cognitive 24) REDACTED:55— updateProxyFromSelections has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), other 5, match/switch 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 19 points are the body's own statements and 5 belong to 2 function items 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.
UpdatableDirective::validate_inline_fragments_with_parent (cognitive 23) compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_directive.rs:163— UpdatableDirective::validate_inline_fragments_with_parent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getStreamTarget (cognitive 23) packages/react-relay/relay-hooks/rsc/serverQuery.js:149— getStreamTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (8 pts), boolean chains 3, loops 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.
validateField (cognitive 23) packages/relay-runtime/mutations/validateMutation.js:178— validateField has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, match/switch 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 4 belong to one function literal inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SkipUnreachableNodeTransform::transform_program (cognitive 22) compiler/crates/relay-transforms/src/skip_unreachable_node.rs:94— SkipUnreachableNodeTransform::transform_program has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (8 pts), loops 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.
DeprecatedFields::validate_directive (cognitive 22) compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:151— DeprecatedFields::validate_directive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — 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's 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.
ValidationContext::validate_type_implements_interface (cognitive 22) compiler/crates/schema-validate/src/lib.rs:431— ValidationContext::validate_type_implements_interface has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LiveResolverCache._setResolverValue (cognitive 22) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:511— LiveResolverCache._setResolverValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (10 pts), boolean chains 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.
convert (cognitive 22) REDACTED:42— convert has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 7, other 6 (nesting depth added 4). Of this number, 12 points are the body's own statements and 10 belong to 5 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.
ApplyFragmentArgumentsTransform::transform_no_inline_fragment (cognitive 21) compiler/crates/relay-transforms/src/apply_fragment_arguments.rs:502— ApplyFragmentArgumentsTransform::transform_no_inline_fragment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 21) packages/relay-runtime/handlers/connection/MutationHandlers.js:96— (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1, other 1 (nesting depth added 8). None of this is in the body itself: all 21 points belong to 3 function items inside it that branch (a function literal at line 97, edgeUpdater, a function literal at line 147). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RelayResolverAbstractTypesTransform::transform_selections_given_parent_type (cognitive 20) compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:223— RelayResolverAbstractTypesTransform::transform_selections_given_parent_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (4 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.
MutationHandlers.edgeUpdater.<returned closure> (cognitive 20) packages/relay-runtime/handlers/connection/MutationHandlers.js:97— MutationHandlers.edgeUpdater.<returned closure> has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (3 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.
_normalizeActorChange (cognitive 20) REDACTED:748— _normalizeActorChange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
merge (cognitive 20) packages/relay-runtime/store/RelayModernRecord.js:434— merge has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), boolean chains 4, 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.
readServerFragment (cognitive 20) packages/react-relay/relay-hooks/rsc/useServerFragment.js:100— readServerFragment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 3 (4 pts), ternaries 3, loops 1, other 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 21 function items inside it that branch ((anonymous)::next, a function literal at line 200, read, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ProjectArtifactMap::fmt (cognitive 19) compiler/crates/relay-compiler/src/compiler_state.rs:486— ProjectArtifactMap::fmt has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (8 pts), match/switch 2 (6 pts), if/else 1 (5 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.
RelayDirective::find (cognitive 19) compiler/crates/relay-transforms/src/relay_directive.rs:49— RelayDirective::find has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (2 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.
ShadowResolversTransform::validate_resolver_metadata (cognitive 19) compiler/crates/relay-transforms/src/relay_resolvers/shadow_transform.rs:98— ShadowResolversTransform::validate_resolver_metadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — 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.
FlowPrinter::write_object (cognitive 19) compiler/crates/relay-typegen/src/flow.rs:234— FlowPrinter::write_object has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
RelayErrorTrie.buildErrorTrie (cognitive 19) packages/relay-runtime/store/RelayErrorTrie.js:55— RelayErrorTrie.buildErrorTrie has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 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.
RelayReader._readInlineFragment (cognitive 19) REDACTED:1678— RelayReader._readInlineFragment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 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. This shape REPEATS in the file: one other method here (RelayReaderOptimized._readInlineFragment) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelayReaderOptimized._readInlineFragment (cognitive 19) REDACTED:3644— RelayReaderOptimized._readInlineFragment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 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. This shape REPEATS in the file: one other method here (RelayReader._readInlineFragment) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
GraphModeHandler._populateRecord (cognitive 19) packages/relay-runtime/store/RelayExperimentalGraphResponseHandler.js:79— GraphModeHandler._populateRecord has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (5 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 14 points are the body's own statements and 5 belong 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.
constructor (cognitive 19) packages/relay-runtime/store/RelayModernEnvironment.js:110— constructor has cognitive complexity 19 (threshold 15). Drivers by points: other 11, if/else 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 2). 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.
UpdatableFragmentSpread::validate_fragment_spread_and_mark_enclosing_linked_field (cognitive 18) compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_fragment_spread.rs:84— UpdatableFragmentSpread::validate_fragment_spread_and_mark_enclosing_linked_field has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientExtensionsTransform::transform_selections (cognitive 18) compiler/crates/relay-transforms/src/client_extensions.rs:128— ClientExtensionsTransform::transform_selections has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RequiredDirective::assert_compatible_required_children (cognitive 18) compiler/crates/relay-transforms/src/required_directive.rs:305— RequiredDirective::assert_compatible_required_children has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2, match/switch 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.
RscResolverFieldTransform::open_rsc_field (cognitive 18) compiler/crates/relay-transforms/src/rsc_resolver_fields.rs:316— RscResolverFieldTransform::open_rsc_field has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — 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.
TypeScriptPrinter::write_object_literal (cognitive 18) compiler/crates/relay-typegen/src/typescript.rs:279— TypeScriptPrinter::write_object_literal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
UsedSchemaIRCollector::add_used_type_definitions (cognitive 18) compiler/crates/schema-set/src/ir_collector.rs:83— UsedSchemaIRCollector::add_used_type_definitions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 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.
MutationHandlers.nodeUpdater.<returned closure> (cognitive 18) packages/relay-runtime/handlers/connection/MutationHandlers.js:170— MutationHandlers.nodeUpdater.<returned closure> has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
read (cognitive 18) REDACTED:2092— read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, other 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
_processPayloadFollowups (cognitive 18) REDACTED:1060— _processPayloadFollowups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, other 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1066, 1074, 1085, …). 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' 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.
SchemaChangeDefinitionFinder::add_type_changes (cognitive 17) compiler/crates/dependency-analyzer/src/schema_change_analyzer.rs:133— SchemaChangeDefinitionFinder::add_type_changes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
relay_codegen::printer::write_argument_value (cognitive 17) compiler/crates/relay-codegen/src/printer.rs:815— relay_codegen::printer::write_argument_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), match/switch 1 (3 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.
ProvidedVariableDefinitions::get_errors (cognitive 17) compiler/crates/relay-transforms/src/provided_variable_fragment_transform.rs:80— ProvidedVariableDefinitions::get_errors has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (10 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.
ValidateOperationVariables::transform_operation (cognitive 17) compiler/crates/relay-transforms/src/validate_operation_variables.rs:77— ValidateOperationVariables::transform_operation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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.
checkMissedUpdates (cognitive 17) packages/react-relay/relay-hooks/legacy/FragmentResource.js:697— checkMissedUpdates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 2 belong 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.
areFieldValuesEqual (cognitive 17) packages/relay-runtime/store/RelayModernRecord.js:747— areFieldValuesEqual has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7 (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.
getSingularSelector (cognitive 17) packages/relay-runtime/store/RelayModernSelector.js:67— getSingularSelector has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 2). 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.
Transformer::default_transform_program (cognitive 16) compiler/crates/graphql-ir/src/transform.rs:35— Transformer::default_transform_program has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LinkedField::resolve (cognitive 16) compiler/crates/resolution-path/src/lib.rs:771— LinkedField::resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts) (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.
graphql_text_printer::prettier_schema_printer::expanded_directive_doc (cognitive 16) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:973— graphql_text_printer::prettier_schema_printer::expanded_directive_doc has cognitive complexity 16 (threshold 15). Drivers by points: loops 2 (7 pts), if/else 3 (5 pts), match/switch 1 (4 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.
Scope::push (cognitive 16) compiler/crates/relay-transforms/src/apply_fragment_arguments/scope.rs:60— Scope::push has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compileGraphQLTag.createNode (cognitive 16) packages/babel-plugin-relay/compileGraphQLTag.js:229— compileGraphQLTag.createNode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
RelayModernRecord.setErrors (cognitive 16) packages/relay-runtime/store/RelayModernRecord.js:505— RelayModernRecord.setErrors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelayReader._readClientSideDirectiveField (cognitive 16) REDACTED:755— RelayReader._readClientSideDirectiveField has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (RelayReaderOptimized._readClientSideDirectiveField) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelayReaderOptimized._readClientSideDirectiveField (cognitive 16) REDACTED:2688— RelayReaderOptimized._readClientSideDirectiveField has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (RelayReader._readClientSideDirectiveField) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RelayReferenceMarker.mark (cognitive 16) packages/relay-runtime/store/RelayReferenceMarker.js:141— RelayReferenceMarker.mark has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (7 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.
insertEdgeBefore (cognitive 16) packages/relay-runtime/handlers/connection/ConnectionHandler.js:474— insertEdgeBefore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), 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.
commitMutation (cognitive 16) packages/relay-runtime/mutations/commitMutation.js:81— commitMutation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 1 (2 pts) (nesting depth added 4). 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 items inside it that branch (next, complete, a function literal at line 162). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×1
Near-duplicate member pair (62 shared lines) compiler/crates/relay-typegen/src/write.rs:1274— compiler/crates/relay-typegen/src/write.rs:1274-1351 | compiler/crates/relay-typegen/src/write.rs:1371-1451 — These two members are variants of one another: 62 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (27 shared lines) compiler/crates/relay-typegen/src/flow.rs:234— compiler/crates/relay-typegen/src/flow.rs:234-309 | compiler/crates/relay-typegen/src/typescript.rs:279-348 — These two members are variants of one another: 27 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) compiler/crates/relay-compiler/src/artifact_content/content.rs:56— compiler/crates/relay-compiler/src/artifact_content/content.rs:56-157 | compiler/crates/relay-compiler/src/artifact_content/content.rs:170-279 | compiler/crates/relay-compiler/src/artifact_content/content.rs:296-548 | compiler/crates/relay-compiler/src/artifact_content/content.rs:561-660 | compiler/crates/relay-compiler/src/artifact_content/content.rs:713-830 | compiler/crates/relay-compiler/src/artifact_content/content.rs:839-933 | compiler/crates/relay-compiler/src/artifact_content/content.rs:1118-1197 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:168— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:168-189 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:191-211 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:217-238 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:240-260 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:448-468 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:470-489 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) compiler/crates/schema-set/src/from_schema.rs:211— compiler/crates/schema-set/src/from_schema.rs:211-226 | compiler/crates/schema-set/src/from_schema.rs:239-255 | compiler/crates/schema-set/src/from_schema.rs:269-286 | compiler/crates/schema-set/src/from_schema.rs:301-318 | compiler/crates/schema-set/src/from_schema.rs:333-349 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) compiler/crates/relay-typegen/src/flow.rs:37— compiler/crates/relay-typegen/src/flow.rs:37-83 | compiler/crates/relay-typegen/src/typescript.rs:52-96 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (91 corresponding lines) · ×1
Edited copy of a member (91 corresponding lines) compiler/crates/relay-transforms/src/apply_transforms.rs:353— compiler/crates/relay-transforms/src/apply_transforms.rs:353-443 | compiler/crates/relay-transforms/src/apply_transforms.rs:698-796 — These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:648— compiler/crates/schema/src/flatbuffer/wrapper.rs:648-725 | compiler/crates/schema/src/flatbuffer/wrapper.rs:731-789 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) compiler/crates/schema-set/src/find_subset_violations.rs:382— compiler/crates/schema-set/src/find_subset_violations.rs:382-445 | compiler/crates/schema-set/src/find_subset_violations.rs:453-510 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs:990— compiler/crates/schema-set/src/schema_set_collector.rs:990-1052 | compiler/crates/schema/src/graphql_schema.rs:181-227 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:67— compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:67-123 | compiler/crates/relay-transforms/src/validations/deprecated_fields.rs:151-200 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 53+ corresponding lines) · ×1
Edited copies of one member (3 members, 53+ corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs:180— compiler/crates/schema-set/src/schema_set_collector.rs:180-233 | compiler/crates/schema-set/src/schema_set_collector.rs:240-293 | compiler/crates/schema-set/src/schema_set_collector.rs:300-352 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) compiler/crates/schema-set/src/ir_collector.rs:188— compiler/crates/schema-set/src/ir_collector.rs:188-238 | compiler/crates/schema-set/src/ir_collector.rs:240-301 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:888— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:888-928 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:935-971 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 39+ corresponding lines) · ×1
Edited copies of one member (3 members, 39+ corresponding lines) compiler/crates/graphql-ir/src/transform.rs:471— compiler/crates/graphql-ir/src/transform.rs:471-509 | compiler/crates/graphql-ir/src/transform.rs:520-568 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:425-466 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) compiler/crates/schema-set/src/schema_set_collector.rs:652— compiler/crates/schema-set/src/schema_set_collector.rs:652-690 | compiler/crates/schema-set/src/schema_set_collector.rs:698-733 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) compiler/crates/relay-lsp/src/completion.rs:376— compiler/crates/relay-lsp/src/completion.rs:376-419 | compiler/crates/relay-lsp/src/completion.rs:428-478 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 44+ corresponding lines) · ×1
Edited copies of one member (3 members, 44+ corresponding lines) compiler/crates/schema-set/src/from_schema.rs:494— compiler/crates/schema-set/src/from_schema.rs:494-541 | compiler/crates/schema-set/src/merge_sdl_document.rs:710-753 | compiler/crates/schema-set/src/schema_set_collector.rs:936-985 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 44 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 41+ corresponding lines) · ×1
Edited copies of one member (6 members, 41+ corresponding lines) compiler/crates/resolution-path/src/lib.rs:233— compiler/crates/resolution-path/src/lib.rs:233-275 | compiler/crates/resolution-path/src/lib.rs:484-525 | compiler/crates/resolution-path/src/lib.rs:1376-1416 | compiler/crates/resolution-path/src/lib.rs:1430-1470 | compiler/crates/resolution-path/src/lib.rs:1484-1524 | compiler/crates/resolution-path/src/lib.rs:1537-1577 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) compiler/crates/schema-set/src/merge_sdl_document.rs:301— compiler/crates/schema-set/src/merge_sdl_document.rs:301-326 | compiler/crates/schema-set/src/merge_sdl_document.rs:335-358 | compiler/crates/schema-set/src/merge_sdl_document.rs:391-419 | compiler/crates/schema-set/src/merge_sdl_document.rs:456-480 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:323— compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:323-356 | compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:361-389 | compiler/crates/relay-transforms/src/relay_resolvers_abstract_types.rs:391-419 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) compiler/crates/relay-transforms/src/required_directive.rs:381— compiler/crates/relay-transforms/src/required_directive.rs:381-404 | compiler/crates/relay-transforms/src/required_directive.rs:409-430 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 23+ corresponding lines) · ×1
Edited copies of one member (6 members, 23+ corresponding lines) compiler/crates/resolution-path/src/lib.rs:314— compiler/crates/resolution-path/src/lib.rs:314-347 | compiler/crates/resolution-path/src/lib.rs:660-682 | compiler/crates/resolution-path/src/lib.rs:729-760 | compiler/crates/resolution-path/src/lib.rs:1596-1632 | compiler/crates/resolution-path/src/lib.rs:1785-1814 | compiler/crates/resolution-path/src/lib.rs:1827-1856 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) compiler/crates/schema/src/in_memory.rs:1331— compiler/crates/schema/src/in_memory.rs:1331-1351 | compiler/crates/schema/src/in_memory.rs:1353-1370 | compiler/crates/schema/src/in_memory.rs:1372-1389 | compiler/crates/schema/src/in_memory.rs:1391-1408 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 30+ corresponding lines) · ×1
Edited copies of one member (3 members, 30+ corresponding lines) compiler/crates/resolution-path/src/lib.rs:1283— compiler/crates/resolution-path/src/lib.rs:1283-1312 | compiler/crates/resolution-path/src/lib.rs:1325-1354 | compiler/crates/resolution-path/src/lib.rs:1738-1772 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 20+ corresponding lines) · ×1
Edited copies of one member (8 members, 20+ corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:628— compiler/crates/graphql-syntax/src/parser.rs:628-651 | compiler/crates/graphql-syntax/src/parser.rs:852-873 | compiler/crates/graphql-syntax/src/parser.rs:962-983 | compiler/crates/graphql-syntax/src/parser.rs:1058-1081 | compiler/crates/graphql-syntax/src/parser.rs:1104-1127 | compiler/crates/graphql-syntax/src/parser.rs:1180-1199 | compiler/crates/graphql-syntax/src/parser.rs:1253-1274 | compiler/crates/graphql-syntax/src/parser.rs:1373-1393 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:1592— compiler/crates/graphql-syntax/src/parser.rs:1592-1612 | compiler/crates/graphql-syntax/src/parser.rs:1661-1683 | compiler/crates/graphql-syntax/src/parser.rs:1834-1856 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) compiler/crates/schema/src/flatbuffer/wrapper.rs:1039— compiler/crates/schema/src/flatbuffer/wrapper.rs:1039-1054 | compiler/crates/schema/src/flatbuffer/wrapper.rs:1056-1071 | compiler/crates/schema/src/flatbuffer/wrapper.rs:1073-1088 | compiler/crates/schema/src/flatbuffer/wrapper.rs:1101-1116 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 10+ corresponding lines) · ×1
Edited copies of one member (5 members, 10+ corresponding lines) compiler/crates/schema/src/in_memory.rs:432— compiler/crates/schema/src/in_memory.rs:432-441 | compiler/crates/schema/src/in_memory.rs:446-456 | compiler/crates/schema/src/in_memory.rs:458-468 | compiler/crates/schema/src/in_memory.rs:485-494 | compiler/crates/schema/src/in_memory.rs:496-505 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×1
Edited copies of one member (5 members, 12+ corresponding lines) compiler/crates/schema/src/in_memory.rs:601— compiler/crates/schema/src/in_memory.rs:601-614 | compiler/crates/schema/src/in_memory.rs:618-630 | compiler/crates/schema/src/in_memory.rs:634-645 | compiler/crates/schema/src/in_memory.rs:653-666 | compiler/crates/schema/src/in_memory.rs:670-681 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) compiler/crates/resolution-path/src/lib.rs:702— compiler/crates/resolution-path/src/lib.rs:702-718 | compiler/crates/resolution-path/src/lib.rs:1244-1264 | compiler/crates/resolution-path/src/lib.rs:2114-2135 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:183— compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:183-198 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:414-426 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:491-506 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:648-660 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) compiler/crates/schema-set/src/print_schema_set.rs:257— compiler/crates/schema-set/src/print_schema_set.rs:257-282 | compiler/crates/schema-set/src/print_schema_set.rs:296-321 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) compiler/crates/schema/src/flatbuffer.rs:242— compiler/crates/schema/src/flatbuffer.rs:242-253 | compiler/crates/schema/src/flatbuffer.rs:255-266 | compiler/crates/schema/src/flatbuffer.rs:268-280 | compiler/crates/schema/src/flatbuffer.rs:315-327 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) compiler/crates/schema-set/src/build_schema_document.rs:663— compiler/crates/schema-set/src/build_schema_document.rs:663-678 | compiler/crates/schema-set/src/build_schema_document.rs:681-698 | compiler/crates/schema-set/src/build_schema_document.rs:727-744 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) compiler/crates/schema/src/compact.rs:661— compiler/crates/schema/src/compact.rs:661-680 | compiler/crates/schema/src/compact.rs:730-746 | compiler/crates/schema/src/compact.rs:748-764 | compiler/crates/schema/src/compact.rs:796-816 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 19+ corresponding lines) · ×1
Edited copies of one member (5 members, 19+ corresponding lines) compiler/crates/schema/src/suggestion_list.rs:110— compiler/crates/schema/src/suggestion_list.rs:110-128 | compiler/crates/schema/src/suggestion_list.rs:130-148 | compiler/crates/schema/src/suggestion_list.rs:150-168 | compiler/crates/schema/src/suggestion_list.rs:170-188 | compiler/crates/schema/src/suggestion_list.rs:190-208 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) compiler/crates/graphql-ir/src/node_identifier.rs:571— compiler/crates/graphql-ir/src/node_identifier.rs:571-580 | compiler/crates/graphql-ir/src/node_identifier.rs:648-654 | compiler/crates/graphql-ir/src/node_identifier.rs:677-690 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 14+ corresponding lines) · ×1
Edited copies of one member (5 members, 14+ corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:818— compiler/crates/graphql-syntax/src/parser.rs:818-833 | compiler/crates/graphql-syntax/src/parser.rs:928-943 | compiler/crates/graphql-syntax/src/parser.rs:1025-1038 | compiler/crates/graphql-syntax/src/parser.rs:1151-1164 | compiler/crates/graphql-syntax/src/parser.rs:1219-1234 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×1
Edited copies of one member (5 members, 11+ corresponding lines) compiler/crates/graphql-syntax/src/parser.rs:1859— compiler/crates/graphql-syntax/src/parser.rs:1859-1869 | compiler/crates/graphql-syntax/src/parser.rs:1979-1991 | compiler/crates/graphql-syntax/src/parser.rs:1992-2004 | compiler/crates/graphql-syntax/src/parser.rs:2395-2407 | compiler/crates/graphql-syntax/src/parser.rs:2410-2422 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 13+ corresponding lines) · ×1
Edited copies of one member (5 members, 13+ corresponding lines) compiler/crates/schema-set/src/build_schema_document.rs:302— compiler/crates/schema-set/src/build_schema_document.rs:302-314 | compiler/crates/schema-set/src/build_schema_document.rs:331-344 | compiler/crates/schema-set/src/build_schema_document.rs:361-374 | compiler/crates/schema-set/src/build_schema_document.rs:390-402 | compiler/crates/schema-set/src/build_schema_document.rs:434-446 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 11+ corresponding lines) · ×1
Edited copies of one member (7 members, 11+ corresponding lines) compiler/crates/relay-transforms/src/declarative_connection.rs:43— compiler/crates/relay-transforms/src/declarative_connection.rs:43-55 | compiler/crates/relay-transforms/src/fragment_alias_directive.rs:58-68 | compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:106-117 | compiler/crates/relay-transforms/src/relay_resolvers/spread_transform.rs:93-105 | compiler/crates/relay-transforms/src/required_directive.rs:75-87 | compiler/crates/relay-transforms/src/test_operation_metadata.rs:63-74 | compiler/crates/relay-transforms/src/validate_operation_variables.rs:39-49 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) compiler/crates/relay-transforms/src/defer_stream.rs:52— compiler/crates/relay-transforms/src/defer_stream.rs:52-67 | compiler/crates/relay-transforms/src/match_/hash_supported_argument.rs:30-41 | compiler/crates/relay-transforms/src/match_/match_transform.rs:76-89 | compiler/crates/relay-transforms/src/relay_resolvers/shadow_transform.rs:52-61 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) compiler/crates/schema-set/src/set_merges.rs:239— compiler/crates/schema-set/src/set_merges.rs:239-247 | compiler/crates/schema-set/src/set_merges.rs:273-281 | compiler/crates/schema-set/src/set_merges.rs:306-312 | compiler/crates/schema-set/src/set_merges.rs:316-323 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) compiler/crates/relay-transforms/src/client_implementor_cases.rs:264— compiler/crates/relay-transforms/src/client_implementor_cases.rs:264-272 | compiler/crates/relay-transforms/src/client_implementor_cases/pipelines.rs:156-165 | compiler/crates/relay-transforms/src/util.rs:65-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) compiler/crates/graphql-syntax/src/node/document.rs:48— compiler/crates/graphql-syntax/src/node/document.rs:48-56 | compiler/crates/graphql-syntax/src/node/type_system.rs:752-759 | compiler/crates/relay-compiler/src/compiler_state.rs:128-137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) compiler/crates/common/src/text_source.rs:153— compiler/crates/common/src/text_source.rs:153-156 | compiler/crates/relay-codemod/src/codemod.rs:270-273 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (24–36 lines × 2) compiler/crates/relay-typegen/src/write.rs:325— compiler/crates/relay-typegen/src/write.rs:325-348 | compiler/crates/relay-typegen/src/write.rs:1129-1164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/write.rs:325` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (36 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:501— compiler/crates/schema/src/flatbuffer/wrapper.rs:501-536 | compiler/crates/schema/src/in_memory.rs:2450-2485 — before extracting anything, compare `compiler/crates/schema/src/flatbuffer/wrapper.rs` and `compiler/crates/schema/src/in_memory.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (25–32 lines × 2) compiler/crates/errors/src/error_combinators.rs:30— compiler/crates/errors/src/error_combinators.rs:30-54 | compiler/crates/errors/src/error_combinators.rs:65-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/errors/src/error_combinators.rs:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) compiler/crates/relay-typegen/src/visit.rs:1857— compiler/crates/relay-typegen/src/visit.rs:1857-1884 | compiler/crates/relay-typegen/src/visit.rs:1913-1940 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (27 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:66— compiler/crates/relay-compiler/src/artifact_content/content.rs:66-92 | compiler/crates/relay-compiler/src/artifact_content/content.rs:326-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:66` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (26 lines × 2) compiler/crates/schema-set/src/find_subset_violations.rs:186— compiler/crates/schema-set/src/find_subset_violations.rs:186-211 | compiler/crates/schema-set/src/find_subset_violations.rs:215-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/find_subset_violations.rs:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–25 lines × 2) compiler/crates/relay-typegen/src/write.rs:430— compiler/crates/relay-typegen/src/write.rs:430-453 | compiler/crates/relay-typegen/src/write.rs:600-624 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23–25 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:594— compiler/crates/schema/src/flatbuffer/wrapper.rs:594-618 | compiler/crates/schema/src/flatbuffer/wrapper.rs:687-709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:246— compiler/crates/relay-compiler/src/artifact_content/content.rs:246-268 | compiler/crates/relay-compiler/src/artifact_content/content.rs:434-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-compiler/src/artifact_content/content.rs:245` calls `print_updatable_query` and `compiler/crates/relay-compiler/src/artifact_content/content.rs:433` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19–23 lines × 2) compiler/crates/relay-compiler/src/artifact_content/content.rs:801— compiler/crates/relay-compiler/src/artifact_content/content.rs:801-823 | compiler/crates/relay-compiler/src/artifact_content/content.rs:893-911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:801` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (22 lines × 2) compiler/crates/schema/src/flatbuffer/wrapper.rs:444— compiler/crates/schema/src/flatbuffer/wrapper.rs:444-465 | compiler/crates/schema/src/in_memory.rs:2574-2595 — before extracting anything, compare `compiler/crates/schema/src/flatbuffer/wrapper.rs` and `compiler/crates/schema/src/in_memory.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (21 lines × 2) compiler/crates/relay-typegen/src/flow.rs:63— compiler/crates/relay-typegen/src/flow.rs:63-83 | compiler/crates/relay-typegen/src/typescript.rs:76-96 — before extracting anything, compare `compiler/crates/relay-typegen/src/flow.rs` and `compiler/crates/relay-typegen/src/typescript.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/flow.rs:63` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/relay-typegen/src/flow.rs:85` calls `get_runtime_fragment_import` and `compiler/crates/relay-typegen/src/typescript.rs:98` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20–21 lines × 2) compiler/crates/schema-set/src/partition_base_extensions.rs:246— compiler/crates/schema-set/src/partition_base_extensions.rs:246-265 | compiler/crates/schema-set/src/partition_base_extensions.rs:273-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19–20 lines × 5) compiler/crates/relay-compiler/src/artifact_content/content.rs:180— compiler/crates/relay-compiler/src/artifact_content/content.rs:180-199 | compiler/crates/relay-compiler/src/artifact_content/content.rs:562-581 | compiler/crates/relay-compiler/src/artifact_content/content.rs:714-733 | compiler/crates/relay-compiler/src/artifact_content/content.rs:840-859 | compiler/crates/relay-compiler/src/artifact_content/content.rs:1119-1137 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18–20 lines × 2) compiler/crates/relay-lsp/src/server/lsp_state.rs:320— compiler/crates/relay-lsp/src/server/lsp_state.rs:320-337 | compiler/crates/relay-lsp/src/utils.rs:217-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/server/lsp_state.rs:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17–19 lines × 2) compiler/crates/relay-typegen/src/write.rs:409— compiler/crates/relay-typegen/src/write.rs:409-427 | compiler/crates/relay-typegen/src/write.rs:835-851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-typegen/src/write.rs:409` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18 lines × 3) compiler/crates/schema-set/src/set_remove_defined_references.rs:239— compiler/crates/schema-set/src/set_remove_defined_references.rs:239-256 | compiler/crates/schema-set/src/set_remove_defined_references.rs:384-401 | compiler/crates/schema-set/src/set_remove_defined_references.rs:490-507 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/set_remove_defined_references.rs:239` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/schema-set/src/set_remove_defined_references.rs:487` calls `remove_directive_usages` and `compiler/crates/schema-set/src/set_remove_defined_references.rs:381` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 2) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:295— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:295-312 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:319-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:295` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31–33 lines × 2) compiler/crates/schema-set/src/schema_set_collector.rs:420— compiler/crates/schema-set/src/schema_set_collector.rs:420-450 | compiler/crates/schema-set/src/schema_set_collector.rs:455-487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/schema_set_collector.rs:420` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) compiler/crates/relay-compiler/src/artifact_content/content.rs:73— compiler/crates/relay-compiler/src/artifact_content/content.rs:73-89 | compiler/crates/relay-compiler/src/artifact_content/content.rs:333-349 | compiler/crates/relay-compiler/src/artifact_content/content.rs:721-737 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler/src/artifact_content/content.rs:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 3) compiler/crates/relay-transforms/src/relay_resolvers/fragment_dependencies.rs:26— compiler/crates/relay-transforms/src/relay_resolvers/fragment_dependencies.rs:26-42 | compiler/crates/relay-transforms/src/relay_resolvers/fragment_dependencies.rs:77-91 | compiler/crates/relay-transforms/src/relay_resolvers/fragment_dependencies.rs:119-134 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/relay_resolvers/fragment_dependencies.rs:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16–17 lines × 2) compiler/crates/schema-set/src/schema_set_collector.rs:217— compiler/crates/schema-set/src/schema_set_collector.rs:217-233 | compiler/crates/schema-set/src/schema_set_collector.rs:278-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/schema_set_collector.rs:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 4) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:175— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:175-189 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:197-211 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:224-238 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:246-260 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:175` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `def` to `&ObjectTypeDefinition` in one and `&InterfaceTypeDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 3) compiler/crates/schema-set/src/schema_set_collector.rs:191— compiler/crates/schema-set/src/schema_set_collector.rs:191-205 | compiler/crates/schema-set/src/schema_set_collector.rs:251-265 | compiler/crates/schema-set/src/schema_set_collector.rs:311-325 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/schema_set_collector.rs:191` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–14 lines × 6) compiler/crates/schema-set/src/print_schema_set.rs:91— compiler/crates/schema-set/src/print_schema_set.rs:91-104 | compiler/crates/schema-set/src/print_schema_set.rs:106-119 | compiler/crates/schema-set/src/print_schema_set.rs:121-134 | compiler/crates/schema-set/src/print_schema_set.rs:136-149 | compiler/crates/schema-set/src/print_schema_set.rs:151-164 | compiler/crates/schema-set/src/print_schema_set.rs:165-174 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-set/src/print_schema_set.rs:91` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–14 lines × 2) compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:257— compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:257-270 | compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:324-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/skip_redundant_nodes.rs:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 4) compiler/crates/relay-lsp/src/completion.rs:917— compiler/crates/relay-lsp/src/completion.rs:917-928 | compiler/crates/relay-lsp/src/completion.rs:957-969 | compiler/crates/relay-lsp/src/completion.rs:1008-1020 | compiler/crates/relay-lsp/src/completion.rs:1206-1217 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-lsp/src/completion.rs:917` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) compiler/crates/relay-transforms/src/generate_id_field.rs:104— compiler/crates/relay-transforms/src/generate_id_field.rs:104-116 | compiler/crates/relay-transforms/src/generate_typename.rs:179-191 | compiler/crates/relay-transforms/src/generate_typename_union.rs:191-203 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/generate_id_field.rs:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&LinkedField` in one and `&'s LinkedField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 4) compiler/crates/relay-codegen/src/printer.rs:230— compiler/crates/relay-codegen/src/printer.rs:230-241 | compiler/crates/relay-codegen/src/printer.rs:277-288 | compiler/crates/relay-codegen/src/printer.rs:299-310 | compiler/crates/relay-codegen/src/printer.rs:323-334 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-codegen/src/printer.rs:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 3) compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:298— compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:298-308 | compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:316-326 | compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:329-340 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:328` calls `is_composite_type` and `compiler/crates/relay-transforms/src/relay_resolvers/field_transform.rs:316` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–12 lines × 2) compiler/crates/schema-diff/src/lib.rs:96— compiler/crates/schema-diff/src/lib.rs:96-107 | compiler/crates/schema-diff/src/lib.rs:733-741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-diff/src/lib.rs:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) compiler/crates/schema-diff/src/lib.rs:859— compiler/crates/schema-diff/src/lib.rs:859-870 | compiler/crates/schema-diff/src/lib.rs:924-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-diff/src/lib.rs:859` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 6) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:175— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:175-184 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:197-206 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:224-233 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:246-255 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:454-463 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:475-484 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `def` to `&ObjectTypeDefinition` in one and `&InterfaceTypeDefinition` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 5) compiler/crates/schema-set/src/from_schema.rs:214— compiler/crates/schema-set/src/from_schema.rs:214-223 | compiler/crates/schema-set/src/from_schema.rs:242-251 | compiler/crates/schema-set/src/from_schema.rs:272-281 | compiler/crates/schema-set/src/from_schema.rs:304-313 | compiler/crates/schema-set/src/from_schema.rs:336-345 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/crates/schema-set/src/from_schema.rs:253` calls `default` and `compiler/crates/schema-set/src/from_schema.rs:225` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) compiler/crates/relay-transforms/src/required_directive.rs:395— compiler/crates/relay-transforms/src/required_directive.rs:395-404 | compiler/crates/relay-transforms/src/skip_unreachable_node.rs:193-201 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/required_directive.rs:395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5–10 lines × 3) compiler/crates/schema-diff/src/lib.rs:1025— compiler/crates/schema-diff/src/lib.rs:1025-1029 | compiler/crates/schema-diff/src/lib.rs:1074-1081 | compiler/crates/schema-diff/src/lib.rs:1108-1117 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema-diff/src/lib.rs:1025` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) compiler/crates/relay-compiler-playground/src/lib.rs:133— compiler/crates/relay-compiler-playground/src/lib.rs:133-141 | compiler/crates/relay-compiler-playground/src/lib.rs:180-188 | compiler/crates/relay-compiler-playground/src/lib.rs:283-291 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-compiler-playground/src/lib.rs:133` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 4) compiler/crates/relay-transforms/src/connections/connection_util.rs:246— compiler/crates/relay-transforms/src/connections/connection_util.rs:246-254 | compiler/crates/relay-transforms/src/connections/connection_util.rs:266-274 | compiler/crates/relay-transforms/src/connections/connection_util.rs:283-291 | compiler/crates/relay-transforms/src/connections/connection_util.rs:298-306 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-transforms/src/connections/connection_util.rs:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/crates/relay-transforms/src/connections/connection_util.rs:246` calls `ScalarField`, `from` and `compiler/crates/relay-transforms/src/connections/connection_util.rs:283` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–9 lines × 2) compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs:170— compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs:170-176 | compiler/crates/graphql-text-printer/src/prettier_executable_printer.rs:342-350 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `directive` to `&ConstantDirective` in one and `&Directive` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10–11 lines × 2) compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:904— compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:904-914 | compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:949-958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/graphql-text-printer/src/prettier_schema_printer.rs:904` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) compiler/crates/relay-config/src/project_config.rs:603— compiler/crates/relay-config/src/project_config.rs:603-610 | compiler/crates/relay-config/src/project_config.rs:654-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/relay-config/src/project_config.rs:654` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 4) compiler/crates/relay-compiler-playground/src/lib.rs:131— compiler/crates/relay-compiler-playground/src/lib.rs:131-137 | compiler/crates/relay-compiler-playground/src/lib.rs:178-184 | compiler/crates/relay-compiler-playground/src/lib.rs:224-230 | compiler/crates/relay-compiler-playground/src/lib.rs:281-287 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 5) compiler/crates/schema/src/compact.rs:1090— compiler/crates/schema/src/compact.rs:1090-1094 | compiler/crates/schema/src/compact.rs:1103-1107 | compiler/crates/schema/src/compact.rs:1116-1120 | compiler/crates/schema/src/compact.rs:1129-1133 | compiler/crates/schema/src/compact.rs:1142-1146 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/crates/schema/src/compact.rs:1090` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
End-of-life runtime: Node.js 18 packages/eslint-plugin-relay-internal/package.json:23— packages/eslint-plugin-relay-internal/package.json declares Node.js 18 as this project's engines.node, and Node.js 18, support ended 2025-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2025-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in the repository root ran and not one test passed (FAIL packages/react-relay/relay-hooks/__tests__/usePaginationFragment-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's maintainers can perform; once it passes, the real number is measured on the next scan.
Type Safety — 0 typed · 717 plain JS — the untyped files are flow-typed/dev.js, flow-typed/npm/chalk_v4.x.x.js, flow-typed/npm/invariant_v2.x.x.js, flow-typed/npm/jest_v29.x.x.js, packages/babel-plugin-relay/BabelPluginRelay.js, packages/babel-plugin-relay/BabelPluginRelay.macro.js (+711 more).
R10 · Code Duplication· Duplicated block with local edits (1253 matched lines × 2 locations) · ×1
Duplicated block with local edits (1253 matched lines × 2 locations) REDACTED:128— REDACTED:128 · REDACTED:2050 — the two spans are one implementation copied and then locally edited — 6112 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's 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 — 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.
R10 · Code Duplication· Duplicated block with local edits (508 matched lines × 2 locations) · ×1
Duplicated block with local edits (508 matched lines × 2 locations) REDACTED:62— REDACTED:62 · REDACTED:74 — the two spans are one implementation copied and then locally edited — 2467 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's 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 — 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.
Wholesale file copy (265 identical lines × 2 files) REDACTED:16— REDACTED:16 · REDACTED:15 — these 2 files are line-for-line copies of one another — 265 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (221 identical lines × 2 files) REDACTED:14— REDACTED:14 · REDACTED:14 — these 2 files are line-for-line copies of one another — 221 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (119 matched lines × 2 locations) · ×1
Duplicated block with local edits (119 matched lines × 2 locations) REDACTED:278— REDACTED:278 · packages/relay-runtime/store/RelayModernEnvironment.js:233 — the two spans are one implementation copied and then locally edited — 484 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's 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 — 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.
Wholesale file copy (101 identical lines × 2 files) packages/react-relay/relay-hooks/useLoadMoreFunction.js:14— packages/react-relay/relay-hooks/useLoadMoreFunction.js:14 · packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js:14 — these 2 files are line-for-line copies of one another — 101 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (81 matched lines × 2 locations) · ×1
Duplicated block with local edits (81 matched lines × 2 locations) packages/react-relay/ReactRelayFragmentContainer.js:80— packages/react-relay/ReactRelayFragmentContainer.js:80 · packages/react-relay/ReactRelayRefetchContainer.js:136 — the two spans are one implementation copied and then locally edited — 397 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's 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 — 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.
Duplicated block (72 lines × 2 locations) packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js:32— packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js:32 · packages/react-relay/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js:32 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (67 lines × 2 locations) packages/relay-runtime/store/RelayModernRecord.js:360— packages/relay-runtime/store/RelayModernRecord.js:360 · packages/relay-runtime/store/RelayModernRecord.js:835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (56 matched lines × 2 locations) · ×1
Duplicated block with local edits (56 matched lines × 2 locations) REDACTED:423— REDACTED:423 · REDACTED:1591 — the two spans are one implementation copied and then locally edited — 320 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's 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 — 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.
Duplicated block (55 lines × 2 locations) packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:99— packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:99 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:82 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
R10 · Code Duplication· Duplicated block with local edits (51 matched lines × 2 locations) · ×1
Duplicated block with local edits (51 matched lines × 2 locations) packages/react-relay/relay-hooks/useQueryLoader.js:49— packages/react-relay/relay-hooks/useQueryLoader.js:49 · packages/react-relay/relay-hooks/useQueryLoader_EXPERIMENTAL.js:37 — the two spans are one implementation copied and then locally edited — 268 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's 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 — 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.
R10 · Code Duplication· Duplicated block with local edits (47 matched lines × 2 locations) · ×1
Duplicated block with local edits (47 matched lines × 2 locations) packages/react-relay/relay-hooks/legacy/FragmentResource.js:639— packages/react-relay/relay-hooks/legacy/FragmentResource.js:639 · packages/react-relay/relay-hooks/legacy/FragmentResource.js:769 — the two spans are one implementation copied and then locally edited — 179 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's 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 — 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.
Duplicated block (42 lines × 3 locations) packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:77— packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:77 · packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:99 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:82 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (42 lines × 2 locations) packages/relay-runtime/handlers/connection/MutationHandlers.js:107— packages/relay-runtime/handlers/connection/MutationHandlers.js:107 · packages/relay-runtime/handlers/connection/MutationHandlers.js:185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (36 matched lines × 2 locations) · ×1
Duplicated block with local edits (36 matched lines × 2 locations) REDACTED:320— REDACTED:320 · REDACTED:832 — the two spans are one implementation copied and then locally edited — 129 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's 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 — 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.
Duplicated block (35 lines × 2 locations) packages/relay-runtime/util/getPaginationVariables.js:34— packages/relay-runtime/util/getPaginationVariables.js:34 · packages/relay-runtime/util/getPaginationVariables.js:70 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (31 lines × 2 locations) packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:89— packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:89 · packages/react-relay/relay-hooks/prepareEntryPoint_DEPRECATED.js:49 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (30 lines × 2 locations) packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:64— packages/react-relay/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js:64 · packages/react-relay/relay-hooks/loadEntryPoint.js:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (29 lines × 2 locations) packages/relay-runtime/mutations/RelayRecordSourceProxy.js:176— packages/relay-runtime/mutations/RelayRecordSourceProxy.js:176 · packages/relay-runtime/mutations/RelayRecordSourceSelectorProxy.js:132 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (25 lines × 3 locations) REDACTED:154— REDACTED:154 · REDACTED:307 · REDACTED:819 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (24 lines × 3 locations) packages/react-relay/relay-hooks/readFragmentInternal.js:265— packages/react-relay/relay-hooks/readFragmentInternal.js:265 · REDACTED:711 · REDACTED:833 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (23 lines × 2 locations) REDACTED:1440— REDACTED:1440 · REDACTED:1467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (23 matched lines × 2 locations) · ×1
Duplicated block with local edits (23 matched lines × 2 locations) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:576— packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:576 · packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:621 — the two spans are one implementation copied and then locally edited — 72 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's 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 — 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.
Duplicated block (21 lines × 2 locations) packages/relay-runtime/handlers/connection/ConnectionHandler.js:333— packages/relay-runtime/handlers/connection/ConnectionHandler.js:333 · packages/relay-runtime/handlers/connection/ConnectionHandler.js:437 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — 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 — the whole function, component or branch these lines sit in — 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.
Duplicated block (20 lines × 5 locations) packages/react-relay/relay-hooks/readFragmentInternal.js:60— packages/react-relay/relay-hooks/readFragmentInternal.js:60 · REDACTED:77 · REDACTED:98 · REDACTED:89 · +1 more site(s) not listed — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (18 lines × 3 locations) packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:47— packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js:47 · packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js:32 · packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js:31 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication· Duplicated block with local edits (18 matched lines × 2 locations) · ×1
Duplicated block with local edits (18 matched lines × 2 locations) packages/relay-runtime/mutations/RelayRecordSourceProxy.js:108— packages/relay-runtime/mutations/RelayRecordSourceProxy.js:108 · packages/relay-runtime/mutations/RelayRecordSourceProxyOptimized.js:61 — the two spans are one implementation copied and then locally edited — 86 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's 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 — 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.
Complex function createContainerWithFragments (cyclomatic 58, cognitive 66) REDACTED:319— createContainerWithFragments has cyclomatic complexity 58 and cognitive complexity 66; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 56, cognitive 69) REDACTED:268— (anonymous) has cyclomatic complexity 56 and cognitive complexity 69; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function update (cyclomatic 44, cognitive 83) packages/relay-runtime/handlers/connection/ConnectionHandler.js:50— update has cyclomatic complexity 44 and cognitive complexity 83; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function recycleNodesIntoImplOptimized (cyclomatic 40, cognitive 55) packages/relay-runtime/util/recycleNodesInto.js:88— recycleNodesIntoImplOptimized has cyclomatic complexity 40 and cognitive complexity 55; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _traverseSelections (cyclomatic 39, cognitive 48) REDACTED:2507— _traverseSelections has cyclomatic complexity 39 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 39, cognitive 42) packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:269— (anonymous) has cyclomatic complexity 39 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readWithIdentifier (cyclomatic 36, cognitive 47) packages/react-relay/relay-hooks/legacy/FragmentResource.js:240— readWithIdentifier has cyclomatic complexity 36 and cognitive complexity 47; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _traverseSelections (cyclomatic 36, cognitive 45) REDACTED:577— _traverseSelections has cyclomatic complexity 36 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 34, cognitive 26) packages/relay-runtime/store/ExecTimeS2CDataChecker.js:222— (anonymous) has cyclomatic complexity 34 and cognitive complexity 26; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 33, cognitive 31) packages/relay-runtime/store/RelayReferenceMarker.js:286— (anonymous) has cyclomatic complexity 33 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 30, cognitive 38) packages/relay-e2e-test/__tests__/fixtures-test.js:99— (anonymous) has cyclomatic complexity 30 and cognitive complexity 38; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readFragmentInternal (cyclomatic 29, cognitive 37) packages/react-relay/relay-hooks/readFragmentInternal.js:152— readFragmentInternal has cyclomatic complexity 29 and cognitive complexity 37; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createContainerWithFragments (cyclomatic 28, cognitive 34) packages/react-relay/ReactRelayRefetchContainer.js:70— createContainerWithFragments has cyclomatic complexity 28 and cognitive complexity 34; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _traverseSelections (cyclomatic 28, cognitive 30) REDACTED:246— _traverseSelections has cyclomatic complexity 28 and cognitive complexity 30; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 28, cognitive 28) packages/relay-runtime/store/DataChecker.js:365— (anonymous) has cyclomatic complexity 28 and cognitive complexity 28; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function updateProxyFromSelections (cyclomatic 27, cognitive 19) REDACTED:55— updateProxyFromSelections has cyclomatic complexity 27 and cognitive complexity 19; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _handleNext (cyclomatic 26, cognitive 44) REDACTED:632— _handleNext 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function notify (cyclomatic 26, cognitive 29) REDACTED:484— notify has cyclomatic complexity 26 and cognitive complexity 29; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _normalizeField (cyclomatic 25, cognitive 43) REDACTED:616— _normalizeField has cyclomatic complexity 25 and cognitive complexity 43; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readFromCacheOrEvaluate (cyclomatic 23, cognitive 43) packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:111— readFromCacheOrEvaluate has cyclomatic complexity 23 and cognitive complexity 43; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _traverseSelections (cyclomatic 23, cognitive 34) packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js:257— _traverseSelections has cyclomatic complexity 23 and cognitive complexity 34; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function recycleNodesIntoImpl (cyclomatic 23, cognitive 20) packages/relay-runtime/util/recycleNodesInto.js:27— recycleNodesIntoImpl has cyclomatic complexity 23 and cognitive complexity 20; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _project (cyclomatic 22, cognitive 37) packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js:510— _project has cyclomatic complexity 22 and cognitive complexity 37; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _collect (cyclomatic 21, cognitive 45) REDACTED:948— _collect has cyclomatic complexity 21 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function update (cyclomatic 21, cognitive 32) packages/relay-runtime/store/RelayModernRecord.js:360— update has cyclomatic complexity 21 and cognitive complexity 32; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function updatePerf (cyclomatic 20, cognitive 31) packages/relay-runtime/store/RelayModernRecord.js:835— updatePerf has cyclomatic complexity 20 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _propagateResolverMetadata (cyclomatic 19, cognitive 36) REDACTED:2878— _propagateResolverMetadata has cyclomatic complexity 19 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function preloadQueryDeduped (cyclomatic 19, cognitive 23) packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js:147— preloadQueryDeduped has cyclomatic complexity 19 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function updateTargetFromSource (cyclomatic 18, cognitive 45) REDACTED:1108— updateTargetFromSource has cyclomatic complexity 18 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _propagateResolverMetadata (cyclomatic 18, cognitive 34) REDACTED:945— _propagateResolverMetadata has cyclomatic complexity 18 and cognitive complexity 34; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function constructor (cyclomatic 18, cognitive 19) packages/relay-runtime/store/RelayModernEnvironment.js:110— constructor has cyclomatic complexity 18 and cognitive complexity 19; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseStep (cyclomatic 17, cognitive 24) REDACTED:84— parseStep has cyclomatic complexity 17 and cognitive complexity 24; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function read (cyclomatic 17, cognitive 18) REDACTED:2092— read has cyclomatic complexity 17 and cognitive complexity 18; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createContainerWithFragments (cyclomatic 16, cognitive 24) packages/react-relay/ReactRelayFragmentContainer.js:47— createContainerWithFragments has cyclomatic complexity 16 and cognitive complexity 24; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 16, cognitive 19) packages/relay-runtime/mutations/RelayDeclarativeMutationConfig.js:253— (anonymous) has cyclomatic complexity 16 and cognitive complexity 19; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _mockScalar (cyclomatic 16, cognitive 18) REDACTED:654— _mockScalar has cyclomatic complexity 16 and cognitive complexity 18; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function areFieldValuesEqual (cyclomatic 16, cognitive 17) packages/relay-runtime/store/RelayModernRecord.js:747— areFieldValuesEqual has cyclomatic complexity 16 and cognitive complexity 17; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getSingularSelector (cyclomatic 16, cognitive 17) packages/relay-runtime/store/RelayModernSelector.js:67— getSingularSelector has cyclomatic complexity 16 and cognitive complexity 17; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
REDACTED: 3664 lines of code REDACTED:1— REDACTED has 3664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1818 lines of code REDACTED:1— REDACTED has 1818 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayStoreTypes.js · ×1
packages/relay-runtime/store/RelayStoreTypes.js: 1526 lines of code packages/relay-runtime/store/RelayStoreTypes.js:1— packages/relay-runtime/store/RelayStoreTypes.js has 1526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· flow-typed/npm/jest_v29.x.x.js · ×1
flow-typed/npm/jest_v29.x.x.js: 1235 lines of code flow-typed/npm/jest_v29.x.x.js:1— flow-typed/npm/jest_v29.x.x.js has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1177 lines of code REDACTED:1— REDACTED has 1177 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1027 lines of code REDACTED:1— REDACTED has 1027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/live-resolvers/LiveResolverCache.js · ×1
packages/relay-runtime/store/live-resolvers/LiveResolverCache.js: 1016 lines of code packages/relay-runtime/store/live-resolvers/LiveResolverCache.js:1— packages/relay-runtime/store/live-resolvers/LiveResolverCache.js has 1016 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 991 lines of code REDACTED:1— REDACTED has 991 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayModernRecord.js · ×1
packages/relay-runtime/store/RelayModernRecord.js: 906 lines of code packages/relay-runtime/store/RelayModernRecord.js:1— packages/relay-runtime/store/RelayModernRecord.js has 906 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 874 lines of code REDACTED:1— REDACTED has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/react-relay/relay-hooks/rsc/useRelayHandoff.js · ×1
packages/react-relay/relay-hooks/rsc/useRelayHandoff.js: 867 lines of code packages/react-relay/relay-hooks/rsc/useRelayHandoff.js:1— packages/react-relay/relay-hooks/rsc/useRelayHandoff.js has 867 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/react-relay/relay-hooks/legacy/FragmentResource.js · ×1
packages/react-relay/relay-hooks/legacy/FragmentResource.js: 848 lines of code packages/react-relay/relay-hooks/legacy/FragmentResource.js:1— packages/react-relay/relay-hooks/legacy/FragmentResource.js has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 833 lines of code REDACTED:1— REDACTED has 833 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 829 lines of code REDACTED:1— REDACTED has 829 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 708 lines of code REDACTED:1— REDACTED has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js · ×1
packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js: 682 lines of code packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js:1— packages/react-relay/relay-hooks/rsc/RelayServerHandoff.js has 682 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/DataChecker.js · ×1
packages/relay-runtime/store/DataChecker.js: 648 lines of code packages/relay-runtime/store/DataChecker.js:1— packages/relay-runtime/store/DataChecker.js has 648 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/network/RelayObservable.js · ×1
packages/relay-runtime/network/RelayObservable.js: 608 lines of code packages/relay-runtime/network/RelayObservable.js:1— packages/relay-runtime/network/RelayObservable.js has 608 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/handlers/connection/ConnectionHandler.js · ×1
packages/relay-runtime/handlers/connection/ConnectionHandler.js: 592 lines of code packages/relay-runtime/handlers/connection/ConnectionHandler.js:1— packages/relay-runtime/handlers/connection/ConnectionHandler.js has 592 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 591 lines of code REDACTED:1— REDACTED has 591 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 580 lines of code REDACTED:1— REDACTED has 580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/react-relay/relay-hooks/QueryResource.js · ×1
packages/react-relay/relay-hooks/QueryResource.js: 574 lines of code packages/react-relay/relay-hooks/QueryResource.js:1— packages/react-relay/relay-hooks/QueryResource.js has 574 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayReferenceMarker.js · ×1
packages/relay-runtime/store/RelayReferenceMarker.js: 573 lines of code packages/relay-runtime/store/RelayReferenceMarker.js:1— packages/relay-runtime/store/RelayReferenceMarker.js has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayModernEnvironment.js · ×1
packages/relay-runtime/store/RelayModernEnvironment.js: 560 lines of code packages/relay-runtime/store/RelayModernEnvironment.js:1— packages/relay-runtime/store/RelayModernEnvironment.js has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-test-utils/RelayModernMockEnvironment.js · ×1
packages/relay-test-utils/RelayModernMockEnvironment.js: 560 lines of code packages/relay-test-utils/RelayModernMockEnvironment.js:1— packages/relay-test-utils/RelayModernMockEnvironment.js has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 530 lines of code REDACTED:1— REDACTED has 530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayModernSelector.js · ×1
packages/relay-runtime/store/RelayModernSelector.js: 518 lines of code packages/relay-runtime/store/RelayModernSelector.js:1— packages/relay-runtime/store/RelayModernSelector.js has 518 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 487 lines of code REDACTED:1— REDACTED has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-e2e-test/src/rsc/rscClient.js · ×1
packages/relay-e2e-test/src/rsc/rscClient.js: 476 lines of code packages/relay-e2e-test/src/rsc/rscClient.js:1— packages/relay-e2e-test/src/rsc/rscClient.js has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/react-relay/ReactRelayRefetchContainer.js · ×1
packages/react-relay/ReactRelayRefetchContainer.js: 464 lines of code packages/react-relay/ReactRelayRefetchContainer.js:1— packages/react-relay/ReactRelayRefetchContainer.js has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 453 lines of code REDACTED:1— REDACTED has 453 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js · ×1
packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js: 453 lines of code packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js:1— packages/relay-runtime/store/RelayExperimentalGraphResponseTransform.js has 453 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 452 lines of code REDACTED:1— REDACTED has 452 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/index.js · ×1
packages/relay-runtime/index.js: 448 lines of code packages/relay-runtime/index.js:1— packages/relay-runtime/index.js has 448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/react-relay/relay-hooks/loadQuery.js · ×1
packages/react-relay/relay-hooks/loadQuery.js: 446 lines of code packages/react-relay/relay-hooks/loadQuery.js:1— packages/react-relay/relay-hooks/loadQuery.js has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/relay-runtime/store/RelayModernFragmentSpecResolver.js · ×1
packages/relay-runtime/store/RelayModernFragmentSpecResolver.js: 442 lines of code packages/relay-runtime/store/RelayModernFragmentSpecResolver.js:1— packages/relay-runtime/store/RelayModernFragmentSpecResolver.js has 442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 440 lines of code REDACTED:1— REDACTED has 440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 427 lines of code REDACTED:1— REDACTED has 427 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~1278 LoC) flow-typed/npm/jest_v29.x.x.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~487 LoC) REDACTED— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~265 LoC) packages/react-relay/__flowtests__/RelayModern-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~259 LoC) scripts/release-notes/App.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~175 LoC) flow-typed/npm/chalk_v4.x.x.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~171 LoC) packages/react-relay/__flowtests__/ReactRelayPaginationContainer-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~154 LoC) packages/react-relay/__flowtests__/ReactRelayRefetchContainer-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~146 LoC) packages/react-relay/__flowtests__/ReactRelayFragmentContainer-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~145 LoC) packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~143 LoC) packages/react-relay/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~124 LoC) scripts/release-notes.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~106 LoC) packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~100 LoC) packages/react-relay/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~94 LoC) packages/react-relay/relay-hooks/__flowtests__/utils.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 6 in-repo import(s) from 3 other file(s) do name it (packages/react-relay/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js, packages/react-relay/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js, packages/react-relay/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~90 LoC) packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/ExtractQueryTypes-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~81 LoC) packages/react-relay/relay-hooks/__flowtests__/useFragment-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~56 LoC) packages/react-relay/multi-actor/ActorChange.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/multi-actor/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~52 LoC) scripts/jest/preprocessor.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~50 LoC) packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/EntryPointElementConfig-flowtest.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~47 LoC) packages/react-relay/multi-actor/useRelayActorEnvironment.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/multi-actor/ActorChange.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~39 LoC) packages/react-relay/relay-hooks/NestedRelayEntryPointBuilderUtils.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/react-relay/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~23 LoC) flow-typed/npm/invariant_v2.x.x.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~15 LoC) flow-typed/dev.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~14 LoC) packages/react-relay/multi-actor/index.js— no import path from any entry point (38 application, 105 tooling, 459 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'flow-bin' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'gulp-chmod' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked compiler/crates/relay-compiler-playground/package.json:11— compiler/crates/relay-compiler-playground/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / REDACTED / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×1
Length read from the parsed input is spent without ever being bounded compiler/crates/schema/src/compact.rs:836— `count` is read from the bytes being parsed at line 834 (`u32::from_le_bytes`), then used to size a `Vec::with_capacity` at line 836 — and nowhere in its scope is `count` compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with `memory allocation of … bytes failed` — an abort, not a panic, so no `catch_unwind` intercepts it and the whole process dies; a 64-bit length past `isize::MAX` panics with `capacity overflow` instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound `count` against the bytes actually remaining and a maximum the format allows before allocating.
Orphaned file compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/common/src/diagnostic.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-lsp/src/node_resolution_info.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_fragment_spread.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/schema/src/suggestion_list.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/schema/src/definitions/interface.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/assignable_fragment_spread/transform_assignable_fragment_spreads_in_regular_queries.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-lsp/src/code_action.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/schema/src/graphql_schema.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/resolution-path/src/constant_value_root.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-lsp/src/code_action/create_name_suggestion.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/match_/subscription_transform.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-lsp/src/find_field_usages.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/assignable_fragment_spread/errors.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/graphql-syntax/src/node/executable.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/interner/src/bytes.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/sort_selections.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/graphql-text-printer/src/print_ast_to_text.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/intern/src/small_bytes.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/graphql-ir/src/visitor.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/dependency-analyzer/src/minimized_executable.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/generate_typename_union.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-transforms/src/refetchable_fragment/refetchable_directive.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/relay-docblock/src/untyped_representation.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file compiler/crates/intern/src/path.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate packages/react-relay/ReactRelayFragmentContainer.js:185— `!fragments.hasOwnProperty(key) && !isScalarAndEqual(nextProps[key], this.props[key])` appears character-identically in 3 files — packages/react-relay/ReactRelayFragmentContainer.js, REDACTED, packages/react-relay/ReactRelayRefetchContainer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:351— `!isLoadingMoreRef.current && !isLoadingMore && !isRefetching && !disablePrefetching && !hasPrefetchErroredRef.current && hasNext && (sourceS…` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:279— `!isLoadingMoreRef.current && availableSizeRef.current < 0` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:262— `!isLoadingMoreRef.current || availableSizeRef.current >= 0` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:600— `RelayFeatureFlags.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE || environment !== previousEnvironment || committedFragmentSelectorRef.current ===…` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/legacy/useFragmentNode.js:102— `RelayFeatureFlags.LOG_MISSING_RECORDS_IN_PROD || __DEV__` appears character-identically in 4 files — packages/react-relay/relay-hooks/legacy/useFragmentNode.js, packages/react-relay/relay-hooks/readFragmentInternal.js, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:785— `cacheConfig != null && options?.metadata != null` appears character-identically in 2 files — REDACTED, packages/react-relay/ReactRelayRefetchContainer.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:208— `environment !== mirroredEnvironment || fragmentIdentifier !== mirroredFragmentIdentifier` appears character-identically in 4 files — REDACTED, packages/react-relay/relay-hooks/useLoadMoreFunction.js, packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:635— `fieldPayload.dataID === parentID || fieldID === parentID` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/readFragmentInternal.js:218— `fragmentNode.metadata?.hasClientEdges === true || RelayFeatureFlags.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES` appears character-identically in 3 files — packages/react-relay/relay-hooks/readFragmentInternal.js, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/rsc/RelayHandoffSeam.js:116— `fragmentRef != null && typeof fragmentRef === 'object'` appears character-identically in 2 files — packages/react-relay/relay-hooks/rsc/RelayHandoffSeam.js, packages/react-relay/relay-hooks/rsc/useRelayHandoff.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/readFragmentInternal.js:190— `fragmentRef == null || (isPlural && Array.isArray(fragmentRef) && fragmentRef.length === 0) || fragmentSelector != null` appears character-identically in 3 files — packages/react-relay/relay-hooks/readFragmentInternal.js, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/readFragmentInternal.js:168— `fragmentRef == null || Array.isArray(fragmentRef)` appears character-identically in 3 files — packages/react-relay/relay-hooks/readFragmentInternal.js, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:599— `fragmentRefPathInResponse.length !== 1 || fragmentRefPathInResponse[0] !== 'node' || id == null` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/useLoadMoreFunction.js:201— `fragmentSelector != null && fragmentSelector.kind !== 'PluralReaderSelector'` appears character-identically in 2 files — packages/react-relay/relay-hooks/useLoadMoreFunction.js, packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:470— `identifierInfo != null && !providedRefetchVariables.hasOwnProperty( identifierInfo.identifierQueryVariableName, )` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/useLoadMoreFunction.js:109— `identifierInfo?.identifierField != null && internalFragmentData != null && typeof internalFragmentData === 'object'` appears character-identically in 3 files — packages/react-relay/relay-hooks/useLoadMoreFunction.js, packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/useLoadMoreFunction.js:149— `internalFragmentData == null || isParentQueryActive` appears character-identically in 2 files — packages/react-relay/relay-hooks/useLoadMoreFunction.js, packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:256— `maxFetchSize != null && maxFetchSize > 0` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/ReactRelayRefetchContainer.js:392— `observer.complete && observer.complete()` appears character-identically in 4 files — packages/react-relay/ReactRelayRefetchContainer.js, packages/react-relay/relay-hooks/useLoadMoreFunction.js, packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js, packages/relay-runtime/network/RelayObservable.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/ReactRelayRefetchContainer.js:438— `observer.start && observer.start(subscription)` appears character-identically in 4 files — packages/react-relay/ReactRelayRefetchContainer.js, packages/react-relay/relay-hooks/useLoadMoreFunction.js, packages/react-relay/relay-hooks/useLoadMoreFunction_EXPERIMENTAL.js, packages/relay-runtime/network/RelayObservable.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/react-relay/relay-hooks/useQueryLoader.js:215— `options != null && options.hasOwnProperty('__environment')` appears character-identically in 2 files — packages/react-relay/relay-hooks/useQueryLoader.js, packages/react-relay/relay-hooks/useQueryLoader_EXPERIMENTAL.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:541— `previousIDAndTypename == null || refetchedFragmentRef == null` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/relay-compiler/index.js:26— `process.platform === 'darwin' && process.arch === 'arm64'` appears character-identically in 2 files — packages/relay-compiler/index.js, vscode-extension/src/utils/findRelayBinary.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate packages/relay-compiler/index.js:24— `process.platform === 'darwin' && process.arch === 'x64'` appears character-identically in 2 files — packages/relay-compiler/index.js, vscode-extension/src/utils/findRelayBinary.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Mock-dominated test: applies payload on @defer fragments in a query with modules packages/relay-runtime/store/__tests__/RelayModernEnvironment-CommitPayload-test.js:295— This test sets up 3 test doubles (for example `jest.fn`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: publishes the source to the store packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:792— This test sets up 5 test doubles (for example `jest.fn`) against 3 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: invalidates the store if invalidated via updater packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1337— This test sets up 6 test doubles (for example `jest.fn`) against 3 real object(s) of its own, and its only verification is 8 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: invalidates any ids marked as invalid via the updater packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1404— This test sets up 6 test doubles (for example `jest.fn`) against 3 real object(s) of its own, and its only verification is 9 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: publishes the source to the store packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1478— This test sets up 5 test doubles (for example `jest.fn`) against 3 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: publishes the source to the store packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1679— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: invalidates the store if invalidated via updater packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1709— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: invalidates any ids marked as invalid via the updater packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1734— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: publishes handle field payloads now, notifies on the continuation packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1809— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records the operation when it publishes, not when it notifies packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1871— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records every publish sharing a flush, not just one of them packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1899— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: holds no state in the continuation: extra calls no-op packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1925— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: falls back to the next run() when the continuation is dropped packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:1959— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not notify the store if no mutations have occurred packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2128— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: notifies the store if an optimistic mutation is applied packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2149— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: notifies the store if an optimistic mutation is reverted packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2172— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: notifies the store if a server mutation is committed packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2203— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: should disable CG if there are any applied optimistic updates packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2239— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: should not disable GC if there are no optimistic updates packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2261— This test sets up 5 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: should dispose gc hold, when there are no optimistic updates are in the queue packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2280— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: should release the gc hold when that is the only work left packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2318— This test sets up 6 test doubles (for example `jest.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Cleans up when unsubscribed packages/relay-runtime/network/__tests__/RelayObservable-test.js:1562— This test sets up 5 test doubles (for example `jest.fn`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Calls next and complete when the promise resolves packages/relay-runtime/network/__tests__/RelayObservable-test.js:1583— This test sets up 5 test doubles (for example `jest.fn`) against 0 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: Calls error when the promise rejects packages/relay-runtime/network/__tests__/RelayObservable-test.js:1602— This test sets up 5 test doubles (for example `jest.fn`) against 1 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: send a network request with actor specific params packages/relay-runtime/multi-actor-environment/__tests__/actorEnvironment_execute-test.js:27— This test sets up 4 test doubles (for example `jest.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
redundant comment packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-test.js:2908— "Set new environment" repeats the code it sits on: 3 of its 3 words (set, new, environment) are already in `const newEnvironment = createMockEnvironment({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/react-relay/relay-hooks/__tests__/usePaginationFragment-test.js:2511— "Set new environment" repeats the code it sits on: 3 of its 3 words (set, new, environment) are already in `const [newEnvironment, newFetch] = createMockEnvironment();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js:1167— "Set new environment" repeats the code it sits on: 3 of its 3 words (set, new, environment) are already in `const newEnvironment = createMockEnvironment();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js:1228— "Set new environment" repeats the code it sits on: 3 of its 3 words (set, new, environment) are already in `const newEnvironment = createMockEnvironment();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js:3222— "Set new environment" repeats the code it sits on: 3 of its 3 words (set, new, environment) are already in `const newEnvironment = createMockEnvironment();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/react-relay/relay-hooks/rsc/__tests__/RelayServerHandoff-test.js:253— "A server fragment read as a promise." repeats the code it sits on: 4 of its 4 words (server, fragment, read, promise) are already in `function serverRead<TFragmentType extends FragmentType, TData>(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/react-relay/relay-hooks/rsc/__tests__/serverQuery-test.js:56— "A server fragment read as a promise." repeats the code it sits on: 4 of its 4 words (server, fragment, read, promise) are already in `function serverRead<TFragmentType extends FragmentType, TData>(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:572— "Suspend if a Live Resolver within this fragment is in a suspended state:" repeats the code it sits on: 5 of its 6 words (suspend, live, resolver, suspended, state) are already in `const suspendingLiveResolvers = getSuspendingLiveResolver(state);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:610— "Suspend if a Live Resolver within this fragment is in a suspended state:" repeats the code it sits on: 5 of its 6 words (suspend, live, resolver, suspended, state) are already in `const suspendingLiveResolvers = getSuspendingLiveResolver(state);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-e2e-test/src/setupTempDir.js:94— "Symlink node_modules from project root" repeats the code it sits on: 5 of its 5 words (symlink, node, modules, project, root) are already in `await symlink(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/mutations/__tests__/RelayRecordSourceProxyOptimized-test.js:48— "RelayRecordSourceProxy's other methods reach records through these." repeats the code it sits on: 6 of its 7 words (relay, record, source, proxy, methods, records) are already in `expect(ownMethods(RelayRecordSourceProxyOptimized.prototype)).toEqual([`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/RelayOperationTracker.js:65— "This is a new `ownerIdentifier` that is affected by the operation" repeats the code it sits on: 4 of its 5 words (new, owner, identifier, operation) are already in `this._ownersToPendingOperations.set(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/RelayRecordSource.js:93— "Filter out any Relay Resolver records" repeats the code it sits on: 4 of its 4 words (filter, relay, resolver, records) are already in `if (`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/RelayReferenceMarker.js:454— "Mark all @outputType record IDs" repeats the code it sits on: 4 of its 5 words (output, type, record, ds) are already in `const outputTypeRecordIDs = getOutputTypeRecordIDs(resolverRecord);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/__tests__/RelayModernEnvironment-NoInline-test.js:401— "noInline fragment data is present" repeats the code it sits on: 4 of its 5 words (no, inline, fragment, data) are already in `const selector = nullthrows(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/__tests__/RelayOperationTracker-test.js:207— "There is one more operation that is affecting the owner" repeats the code it sits on: 3 of its 3 words (operation, affecting, owner) are already in `const updatedResult =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/__tests__/RelayPublishQueue-test.js:2224— "Query payload sets name to 'zuck'" repeats the code it sits on: 4 of its 5 words (query, payload, name, zuck) are already in `queue.commitPayload(createOperationDescriptor(NameQuery, {id: '4'}), {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/relay-runtime/store/__tests__/RelayReader-Resolver-test.js:51— "The call count of the resolver used in this test" repeats the code it sits on: 4 of its 5 words (call, count, resolver, test) are already in `UserConstantDependentResolver._relayResolverTestCallCount = undefined;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:425— "This will get default values for current selection type" repeats the code it sits on: 5 of its 6 words (get, default, values, selection, type) are already in `const defaults = this._getDefaultValuesForObject(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:450— "Second, defaults for abstract type of the selection" repeats the code it sits on: 4 of its 5 words (defaults, abstract, type, selection) are already in `defaultValuesForSelection = defaultsForAbstractType;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 6 significant file(s) lose their only recent owner: compiler/crates/relay-compiler/src/build_project/shadow_return_conversion.rs, compiler/crates/relay-schema/src/definitions.rs, compiler/crates/graphql-text-printer/src/print_full_operation.rs, compiler/crates/dependency-analyzer/src/query_stats.rs, compiler/crates/relay-transforms/src/apply_fragment_arguments/scope.rs, compiler/crates/relay-compiler/src/build_project/get_artifacts_file_hash_map.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: compiler/crates/schema-set/src/build_schema_document.rs, compiler/crates/schema-set/src/build_in_memory_schema.rs, compiler/crates/schema-set/src/from_schema.rs, compiler/crates/schema-set/src/set_type_reference.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: compiler/crates/project-fixture/src/lib.rs, compiler/crates/relay-transforms/src/validations/disallow_readtime_features_in_mutations.rs, compiler/crates/relay-compiler/src/build_project/build_resolvers_schema/ir_to_schema.rs. Pair on, review, or document these before any departure.
Documentation: no build, run or usage example packages/relay-compiler/README.md:1— `relay-compiler` is a command-line package (`bin` in `package.json`) and neither `packages/relay-compiler/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/relay-test-utils/README.md:1— `relay-test-utils` is a published package (`package.json` without `"private": true`) and neither `packages/relay-test-utils/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/relay-test-utils-internal/README.md:1— `relay-test-utils-internal` is a published package (`package.json` without `"private": true`) and neither `packages/relay-test-utils-internal/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
R8 · Dependency Hygiene· Test-only dependency 'nullthrows' in production deps · ×2
Test-only dependency 'nullthrows' in production deps package.json:78— Only test files import it (first: packages/react-relay/relay-hooks/__tests__/loadQuery-test.js:41) — move it to devDependencies.
Test-only dependency 'nullthrows' in production deps packages/react-relay/package.json:22— Only test files import it (first: packages/react-relay/relay-hooks/__tests__/loadQuery-test.js:41) — move it to devDependencies.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (23 single-owned of 342 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 342 of the 445 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: compiler/crates/relay-compiler/src/server_daemon.rs, compiler/crates/relay-compiler/src/server_daemon/vcs_state.rs, compiler/crates/relay-lsp/src/explore_schema_for_type/types.rs, compiler/crates/schema-set/src/transform.rs, compiler/crates/graphql-ir/src/validator.rs, compiler/crates/relay-lsp/src/server/lsp_request_dispatch.rs, compiler/crates/js-config-loader/src/lib.rs.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 7 project(s) overshoot their size bounds, lowering Project Cohesion to 4.3/10. The most over is `compiler` (148200 LoC, 1013 module-visible types across 76 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 74 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: compiler/crates/graphql-text-printer/src/prettier_doc_builders.rs, compiler/crates/common/src/diagnostic.rs, compiler/crates/relay-lsp/src/node_resolution_info.rs, compiler/crates/relay-transforms/src/assignable_fragment_spread/validate_updatable_fragment_spread.rs, compiler/crates/schema/src/suggestion_list.rs, compiler/crates/schema/src/definitions/interface.rs, compiler/crates/relay-transforms/src/assignable_fragment_spread/transform_assignable_fragment_spreads_in_regular_queries.rs, compiler/crates/relay-lsp/src/code_action.rs (and 66 more) (79 orphaned of 344 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 344 of the 445 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Logging is not universal — Only 6/12 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `compiler/crates/fixture-tests`, `compiler/crates/persist-query`, `compiler/crates/prettier-format`, `compiler/crates/schema-validate`, `packages/relay-compiler` and 1 more.
No dependency-update automation package.json:26— `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R8 · Dependency Hygiene· Test-only dependency 'react-test-renderer' in production deps · ×1
Test-only dependency 'react-test-renderer' in production deps package.json:84— Only test files import it (first: packages/react-relay/__tests__/Catch-test.js:16) — move it to devDependencies.
Silent fallback default on Err compiler/crates/persist-query/src/lib.rs:170— `sanitize_endpoint` turns every `Err` into `"<invalid endpoint>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Outdated: zstd — `zstd` is locked at 0.14.3 but 0.14.4 is the current stable release on crates.io, and it already satisfies the `"0.14.3"` requirement declared in compiler/crates/relay-compiler/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zstd` and commit the updated REDACTED.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 120 file(s) — `flow-typed/npm/chalk_v4.x.x.js`, `flow-typed/npm/invariant_v2.x.x.js`, `flow-typed/npm/jest_v29.x.x.js`, `packages/babel-plugin-relay/BabelPluginRelay.js`, `packages/babel-plugin-relay/compileGraphQLTag.js`, … (+115 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d8ea-75b6-7865-b0e8-22ce2ed3c263 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 108 · Warnings: 1363 · Recommendations: 187 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 07:16 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.